mortany / pocketheroes Goto Github PK
View Code? Open in Web Editor NEWAutomatically exported from code.google.com/p/pocketheroes
License: Apache License 2.0
Automatically exported from code.google.com/p/pocketheroes
License: Apache License 2.0
in many cases AI attacks a weaker unit, but is srong enough to kill a more
tough stack.
E.g. a classical example from our game manual:
we have 9 archers. Split them in 6 stacks: 1, 1, 1, 1, 1, 4
AI will sequentially attack the first five single units, and only then kill the
strong 4-units stack.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2010 at 11:19
AI doesn't use the opportunity to attack 2 units with a 2-hex atack
sometimes AI hits friendly units with 2-hex attacks
Original issue reported on code.google.com by [email protected]
on 15 Jul 2010 at 11:17
1) Ghosts (and creatures in general too) should estimate HOW LONG THEY CAN
SURVIVE.
2) Based on that, they may choose one of the 2 general tactics - "the selfish"
tactics (if calculated that we can win), or the "kamikaze" tactics (if we know
more or less for sure that after N rounds we will DIE)
Ghosts should calculate every enemy troops with this formula:
"N" of ghosts before attack PLUS "X" killed enemies MINUS "Y"ghosts, killed by
retaliation attack. The higher the number - the more "tasty" the victim troop
is. If the caclulation returns negative result - the troop is deadly, and the
attack is suicidal. If the number equals zero, we should attack that troop if
no better victims are present on the battlefield.
Enemy troops from the ghosts' point of view can be classified into based on
attack preference:
1) DEADLY - negative attack ratio
2) "not interesting" - zero attack ratio
3) "best victim" - highest attack ratio
4) "most harmful to enemy" - these are troops with worse ratio, but of great
strategic importance to the enemy (i.e. archers)
The win strategy for ghosts is:
1) STAY ALIVE - never attack deadly dangerous enemies
2) always prefer "best victims", only except cases when there's an enemy archer
that can kill us ranged.
If we calculate that we can survive only N rounds - we must choose the kamikaze
strategy.
1) Our #1 goal here is to attack the "most harmful to enemy" and kill as many
as possible.
Here are several situations with comments:
1) 10 ghosts vs. 20 peasants, 20young mages, and 1 dragon.
round 1 - dragons move and kill 7 ghosts.
Our calculations are that we will survive LESS THAN ONE round.
Decision - move forward. Attacking dragons is useless (kill 0, instant death) -
but there may be a chance that young mages may have bad morale or skip turn.
Next decisions will be based on the future situation.
2) 10 ghosts vs. 20peasants, 20young mages, and 1 dragon.
round1 - dragons move - but not attack, just move in our attack radius.
We calculate that we may WIN! Our goal is to wait until young mages skip their
turn/or attack from max. distance at half damage, then move closer.
round2 - dragons attack ghosts, and leave let's say 3-4 alive. Our turn, we
feed on the best victim - young mages (so that their attack will be 1/2damage,
and then on peasants, and we kill the dragon the last.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2010 at 11:21
Observing the AI movements thanks to the new online open mode, I have come to
the conclusion that AI treats all his heroes equally.
This is not the best way to manage your kingdom.
AI should use his starting hero as a scout/gatherer, exploring the map and
collecting free resources and mines. Most important skills for him are:
logistics, pathfinding, scouting. More is even not necessary.
The second hero will be trained as the main force, putting more EXP in it and
giving him/her better armies. Important fights will be preferred to be done
with the main hero.
The third hero is a supplier for the main hero: his main role is to bring
reinforcements to the main hero(es) - the supplier has less armies, and has
less EXP (most important skills to consider: logistics, pathfinding, scouting,
wisdom, earth magic (town portal), diplomacy)
Subtypes of the main hero:
"Bruiser":
sec. skills: Offence, armorer, luck, leadership, ballistics, logistics,
pathfinding, resistance
creatures: any, dominantly the most XP, better attack/defence. Speed is not
important.
strategy: conquer, gather army, and dominate (defend) conquered land.
preferred hero race: barbarian/knight/necromancer
"Blitzkrieg"
sec. skills: logistics, pathfinding, wisdom, earth magic, air magic, fire
magic, sorcery
creatures: ultimately - dragons. In general, tough AND FAST creatures.
Flyers/shooters.
strategy: ignore minor targets on map, avoid fighting main enemy heroes far
from enemy capital, take major enemy castles, important mines (gold and
relevant resource - i.e. sulphur is fighting vs. warlock). Ultimate tactics -
dragons+expert armageddon, one strong fast troop+antimagic, and mass
destructive spell next turn. Town portal for transportation.
preferred race: warlock, wizard, sorceress
artifacts of most importance: +speed, +speed for troops, +magic effect
strategies for secondary hero types:
"thief"
this is the strategy for the "scout" when exploring enemy land - take most
important resources/mines, free artifacts. (gold/most relevant res. types for
enemy/most relevant res types for himself)
preferred tactics: avoid enemy contact, always rearrange troops in many squads
("1, 1, 1, 1, 1, THE_REST"), if forced to fight - hit with a destructive spell,
and run. Give gathered artifacts to main heroes.
"attache"
this strategy is used by a "supplier" when accompanying a main hero in the
enemy land.
activities: Gather resources (if accompanied, main hero will ignore non-EXP
resources, and take only chests, and artifacts). Give gathered artifacts (if
any) to main hero. Defend conquered castles instead of the main hero, to let
him move on.
Original issue reported on code.google.com by [email protected]
on 15 Jul 2010 at 11:12
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.