Page 1 of 1

Retreat Algorithm

Posted: Sun Jul 17, 2011 12:31 pm
by Obsolete
Do retreat locations carry out in a random nature? I ask this because I've seen units move into the worst hex possible out of its choices.

Posted: Sun Jul 17, 2011 1:17 pm
by Obsolete
Here is an example... my tank retreated twice in the same turn. Notice how the first one chose the worst possible of two choices. Tank into close terrain, and adjacent to two units?

Image

Posted: Sun Jul 17, 2011 1:26 pm
by El_Condoro
I think the logic is normally for the unit to retreat directly (or as close as possible to) away from the attacking unit, no matter what the real logic is. So that's the first retreat.
The second one had 2 choices as 'directly away' hex was occupied. Clear terrain makes sense from the terrain perspective but into the forest would bring it closer to friendly units.
In that case it may be a simple 50-50 chance?

Posted: Sun Jul 17, 2011 2:58 pm
by Rudankort
Yes, the unit retreats along the axis of attack, and if it is not possible - as close to it as possible. Terrain and any other considerations are not used. The game has no idea if forest is bad for retreating unit or not, this depends on so many factors, I don't see any good reason to try to implement such logic.