Page 1 of 1
venting about retreats
Posted: Sat Feb 01, 2014 9:37 pm
by aaminoff
When next you have some free developer time, please put some effort into making retreats work more sensibly.
Playing as the Union, I had a fleet in Hampton Roads. My clever PBEM opponent brought a large fleet of ironclads from somewhere and beat them up. The remnants of my fleet then retreated into the James Estuary, a place where they had no supply, no ports, no friendly forces (except one scouting brig up the James River). The next turn I tried to run the gauntlet through Hampton Roads again to get back to my bases and they were all sunk.
A similar thing happened on land in central MO, where a force after losing a battle retreated into some random territory instead of back towards its supply source and the relief force I was sending.
Surely there can be some sort of algorithm deciding where a force goes when it retreats which takes into account distance or unblocked access to supply sources and friendly bases.
Posted: Sun Feb 02, 2014 1:23 pm
by Mickey3D
The same happens to my opponent and myself in two PBEMs :
- CSA army in Erie (MO) retreating towards Jefferson city (held by the Union) instead of Springfield (held by the CSA)
- After a missed landing by Grant on Island No 10, he retreated into Dyer (TN), the Tennessee being firmly in CSA hands.
Posted: Sun Feb 02, 2014 7:05 pm
by minipol
I concur. I planned a march from Morgantown to Covington, and while marching my force was attacked which was weird in itself as my force was also on a forced march,
and the attackers came from the north. Dunno how the Union troops managed to overtake me (it wasn't a cavalry force).
As a result, instead of heading for the original destination (Covington), they reverted back to Morgantown...
Posted: Sun Feb 02, 2014 7:37 pm
by ArmChairGeneral
AFAIK there is such an algorithm, it's just that it does not guarantee that the force retreats to the best position. (And I am unclear what the algorithm actually consists of and how large of a random component it includes.) Combat is chaotic, and sometimes sub-optimal outcomes are forced on us. I suspect that repeating the battle in Erie many times would see a retreat toward Springfield more often than not. In the case of Grant, he can't retreat across the river if he doesn't have enough movement left, so has to go somewhere (he might not even make it out by land, depending, since Island 10 is a swamp). I would not be surprised at this result unless he had an adjacent friendly land force that he did not fall back toward and enough time left in the turn to make it there. Military control, presence of friendly or enemy units, structures, terrain, wagons, ZOC, the magnitude of the defeat and the quality of the leader's mustache seem to be relevant factors in determining retreat regions, but sometimes even with all these things working in your favor you still end up in an awkward spot. Naval retreats are especially chaotic since most of these factors will not be present (except the mustache) although you usually do not retreat directly into regions where you can come under fire from shore batteries. (Of course in a river there are only two places to go, which makes things more predictable.)
Posted: Sun Feb 02, 2014 7:58 pm
by ArmChairGeneral
minipol,
I can't speak to the overtaking issue but retreating back to Morgantown where there is supply and cover makes sense compared to fleeing deeper into the wilderness, so it sounds like the retreat I would expect and want. You probably had Floyd commanding(?), who is almost guaranteed to be inactive or fixed after a defeat and slow from cohesion loss even if able to move. Better Morgantown than the mountains of West Virginia in that case.
Posted: Sun Feb 02, 2014 8:16 pm
by minipol
True except my force was a lot closer to Covington than Morgantown so retreating to Morgantown resulted in a lot more deaths.
Posted: Sun Feb 02, 2014 9:01 pm
by ArmChairGeneral
Hmm, would have thought it would have chosen Covington in that case, especially if you had gotten a depot built there. The retreat mechanism is an arcane and occult subject for sure.
Posted: Sun Feb 02, 2014 9:22 pm
by GraniteStater
This is the Retreat algorithm:
f(x)=\sum_{n=-\infty}^\infty c_n\ e^{2\pi i(n/T) x} =\sum_{n=-\infty}^\infty \hat{f}(\xi_n)\ e^{2\pi i\xi_n x}\Delta\xi
which the student can work out as an exercise.
Posted: Mon Feb 03, 2014 4:58 am
by ArmChairGeneral
Ahh, the Floyd Equation

Posted: Mon Feb 03, 2014 10:38 am
by minipol
Haha

Or is it the Floyd constant which is a negative constant

Posted: Mon Feb 03, 2014 11:16 am
by Ace
Not sure how will it help you, but I have put retreat algorithm values to this wiki page to help us understand better the logic in retreat algorithm.
http://cw2.wikia.com/wiki/RETREATIt would be nice, if all answers to game concepts and strategic questions were put into cw2 wiki like this. We could concentrate all strategic and game concept knowledge dispersed over this forum into one place this way.
Posted: Tue Feb 04, 2014 3:44 am
by ArmChairGeneral
Thanks Ace, it helped me for sure. Is the retreat algorithm in the wiki comprehensive? I was surprised not to see MC or friendly units as factors in the retreat choice.
The upshot is that a stack moving into a region that then retreats will almost always go back to its previous region if it is unoccupied by the enemy, whereas friendly structures and presence of the enemy are the main considerations for a stack retreating from a region in which it began the turn (it doesn't have a region it is "coming from").
If everything is WAD, mysterious results like those described by earlier posters might happen because a) there is not enough time remaining in the turn for a moving stack to go back the way it came b) it is a stationary stack whose adjacent regions do not have enough structures for any one of them to be obviously favored.
Also, we can conclude that friendly stacks and wagons do not draw retreaters, nor do retreaters directly consider the location of supply (they are going toward structures because they are structures, not because of the supply). We can also say that moving naval vessels will tend to retreat the way they came and that stationary vessels forced to retreat will want to go to an adjacent harbor.
Posted: Tue Feb 04, 2014 7:03 am
by Ace
There is a line in the file for minimum MC to allow retreat into. But, it is currently set at 0 to make encirclements more difficult as in actual Civil War. Friendly units might be a factor the same way as enemy units by increasing interest points by 4/regiment (I am not sure however about this)
Posted: Tue Feb 04, 2014 2:56 pm
by aaminoff
Well, I think the main problem is there is no consideration of things beyond one space away. In the case of naval battles, unless there happens to be a port adjacent to where you are fighting, what difference is there between one stretch of water and another? According to that algorithm, none. There needs to be some impact on retreat interest of ports/bases/troops further away, or at least the ability of a force to draw supply in the region after it retreats there. The wide open plains of MO and west work similarly to naval battles some of the time.
Posted: Wed Feb 05, 2014 2:18 am
by ArmChairGeneral
aaminoff, I see what you mean, and MO is where I have always gotten the most unexpected results too. Still, I am agnostic on adjusting the algorithm. I am much more confident in my planning now that I have some guidelines on what to expect, but agree that either supply or regions further away should logically be factors. Still, I kind of like that bad results in the field can cause unexpected problems, and chaotic results lend verisimilitude. When troops are on the run you can only lead them toward where they are already running!
Ace,
I have a suspicion that they do as well, (why wouldn't they) but I have no confirmation from gameplay to think one way or the other whether friendlies increase interest. This is a pretty important question I think: the player can't influence most of the rest of the algorithm.
There could be other non-algorithm factors also influencing retreat: ZOC could rule out a region, as could insufficient movement. If the retreat alg. picks a region you do not have enough movement (time) to reach will it do a partial retreat toward that region or will it instead divert to a less interesting region that CAN be reached? For example, attacking across a river as in the Island 10 example above. I haven't ever seen anyone get back on the river, cross a river, or get back on a transport; maybe this is due to movement time, maybe it just isn't allowed because of other rules.