Withdrawal not working

pmurnion

Chieftain
Joined
Dec 23, 2008
Messages
10
I'm used to Civ4 cheating like mad at the combat odds. Its not the 90% odds but still losing (thats what probability means!). It's when you have a 80% chance to win and you re-roll the fight four times, losing three in a row (thats 0.20 ^ 3 or 0.008 probability of happening). So yeah, Civ 4 cheats - and lies to you about the odds. But this is different. I just attacked a defender with a horse archer with the flanking I and II promotions. So while the combat odds were a miserly 5% the withdrawal chance was 48%. I re-ran the fight 12 times with no withdrawals, dead every time. So the likelihood of that happening is 0.52 ^ 12 or near zero. Is the cheating just worse for special outcomes like withdraw or is the withdraw mechanic just broken?
It's interesting because on the forums a lot of people recommend a mob of cavalry with high withdraw skills who can 'soak up' the first round of combat with an enemy. I never found that to be the case. With every mounted unit, combat I and II was always far superior to flanking I and II, in my experience. Funny (and disappointing) how the AI cheating just makes parts of the game effectively dead, like the way the AI can always see subs so you dont use them ...
 
I don't think the odds displayed are perfect, but I'm fairly confident the AI doesn't "cheat" when it comes to combat. I think what's happening here is you haven't selected the random seed on reloading option, meaning the result of combat is "predestined" so to speak at the beginning of your turn. You could re-roll ten million times and it would always be the same result.

Kind regards,
Ita Bear
 
That aside combat is better than flanking anyway except for the rare mounted units not immune to first strikes (flanking 2 gives that bonus) or to get Sentry on one unit.
 
Withdrawal works as intended. The only question is really if/why are using it at all. If you are reloading the same game save, then you are also probbaly reloading the same seed. You will get the same combat odds from running the same attack from the same save immediately after loading it. I just tested it myself. You simply did not have "random seed on reloading" ticked when creating a custom game. I had the same combat outcomes (deaths, damage dealt, withdrawals) each time.

Anyway, here's my Flanking II vs. Combat II demo for you:

10 Flanking I and II Cavs-----10 Rifles in city-----10 Combat I and II Cavs

I set up a custom game with unpromoted rifles in a city for the AI and cavs with different promotions on each side. I reloaded with random seeds. I had each stack attack 10 separate times against the riflemen.

Next, I promoted all the rifles to City Garrison III and ran the same 10-attack-each-stack test again with random seeds.

On average, the Flanking II stack survives with a few more cavs (1-2 unit survival edge) than Combat II cavs will while damaging all the riflemen in the process. However, the Combat II cavs kill on average more unpromoted riflemen to compensate and approx 1-2 more CG III rifleman on average than the Flanking II cavs against the promoted rifle stack.

Basically, the only use case withdrawal has is when you are fighting against units with such superior strength that the combat odds are horrifically out of your favor and you aren't using seige. This is typical of some Immortal and Diety plays where you don't have time to/don't want to march 1 tile at a time with seige and would rather spend all your hammers/gold on rushing out a single attacking unit to overwhelm the enemy quickly. You will have a much higher withdrawal chance than Combat II (typically slightly over 50%,) meaning that you will be able to damage the top defenders without losing your cav units quite as much against combat odds that look grim. I play on Immortal a lot, and I have occasionally used this strategy. However, I find that I promote to Combat II far more often because at the end of the day, you need garrisoning units to guard the wounded cavalry eventually if your push fizzles out, or else those turbo-damaged withdrawn cavs are worthless and free experience for the enemy. They'll need to therefore ride with the rest of the attacking stack forward, or have garrisoning units left behind. The point of cavalry is to rush forward to take cities (most common) or crush the enemy stack ideally in your own turf or before getting too deep into their territory, outside of cities, so you don't need to worry about massive defenses in the enemy's home. Flanking II is essentially a poor-man's substitute for siege when speed is needed for your strategy to work and you're trying to save every hammer possible put into your attacking units. That being said, it can easily spiral away from you if not planned correctly and/or if the withdrawal coin flips screw you over, and I'd rather attack with CRIII cannons than Flanking II cavs lolol

Let me know if you have any more questions or want to see some screen shots of the befores and afters.
 
Last edited:
Withdrawal works as intended. The only question is really if/why are using it at all. If you are reloading the same game save, then you are also probbaly reloading the same seed. You will get the same combat odds from running the same attack from the same save immediately after loading it. I just tested it myself. You simply did not have "random seed on reloading" ticked when creating a custom game. I had the same combat outcomes (deaths, damage dealt, withdrawals) each time.

Anyway, here's my Flanking II vs. Combat II demo for you:

10 Flanking I and II Cavs-----10 Rifles in city-----10 Combat I and II Cavs

I set up a custom game with unpromoted rifles in a city for the AI and cavs with different promotions on each side. I reloaded with random seeds. I had each stack attack 10 separate times against the riflemen.

Next, I promoted all the rifles to City Garrison III and ran the same 10-attack-each-stack test again with random seeds.

On average, the Flanking II stack survives with a few more cavs (1-2 unit survival edge) than Combat II cavs will while damaging all the riflemen in the process. However, the Combat II cavs kill on average more unpromoted riflemen to compensate and approx 1-2 more CG III rifleman on average than the Flanking II cavs against the promoted rifle stack.

Basically, the only use case withdrawal has is when you are fighting against units with such superior strength that the combat odds are horrifically out of your favor and you aren't using seige. This is typical of some Immortal and Diety plays where you don't have time to/don't want to march 1 tile at a time with seige and would rather spend all your hammers/gold on rushing out a single attacking unit to overwhelm the enemy quickly. You will have a much higher withdrawal chance than Combat II (typically slightly over 50%,) meaning that you will be able to damage the top defenders without losing your cav units quite as much against combat odds that look grim. I play on Immortal a lot, and I have occasionally used this strategy. However, I find that I promote to Combat II far more often because at the end of the day, you need garrisoning units to guard the wounded cavalry eventually if your push fizzles out, or else those turbo-damaged withdrawn cavs are worthless and free experience for the enemy. They'll need to therefore ride with the rest of the attacking stack forward, or have garrisoning units left behind. The point of cavalry is to rush forward to take cities (most common) or crush the enemy stack ideally in your own turf or before getting too deep into their territory, outside of cities, so you don't need to worry about massive defenses in the enemy's home. Flanking II is essentially a poor-man's substitute for siege when speed is needed for your strategy to work and you're trying to save every hammer possible put into your attacking units. That being said, it can easily spiral away from you if not planned correctly and/or if the withdrawal coin flips screw you over, and I'd rather attack with CRIII cannons than Flanking II cavs lolol

Let me know if you have any more questions or want to see some screen shots of the befores and afters.
I think OP had “random seed” on by basis of their post stating that the 80% odds took four attempts with 1st three attempts being Ls. I don’t think its the seed or the game cheating, but just that we’re more likely to notice the bad rolls, especially if you’re rerolling on losses. No one rerolls on wins , so we only really notice when we get bad luck. Rolling three straight losses on 80% is 0.00
08, but thats actually only 1 in 125; not impossible odds. Playing this game many times, you’re bound to get that happen several times in your gaming life. You’re going to remember that, and not the time your spearman beat a tank at full health.

Ironically, the only time the AI “cheats” in this situation, is by design with random seed off. The game doesnt really just lock the seed, but also the “result”. Try it, if you attack an LB with a Mace, and the mace loses, youre going to get that result every time any mace faces the LB, even if you select a different one in your stack, at least thsts thr way it seems.
 
The random numbers generated by computers are not truly random and I've seen this stuff in all kinds of different games. But it is rare. One handy tool I've used to make adjustments when this has been a problem is a sledgehammer.
 
I think OP had “random seed” on by basis of their post stating that the 80% odds took four attempts with 1st three attempts being Ls. I don’t think its the seed or the game cheating, but just that we’re more likely to notice the bad rolls, especially if you’re rerolling on losses. No one rerolls on wins , so we only really notice when we get bad luck. Rolling three straight losses on 80% is 0.00
08, but thats actually only 1 in 125; not impossible odds. Playing this game many times, you’re bound to get that happen several times in your gaming life. You’re going to remember that, and not the time your spearman beat a tank at full health.

Ironically, the only time the AI “cheats” in this situation, is by design with random seed off. The game doesnt really just lock the seed, but also the “result”. Try it, if you attack an LB with a Mace, and the mace loses, youre going to get that result every time any mace faces the LB, even if you select a different one in your stack, at least thsts thr way it seems.
Thanks, at least you realised that I had 'random seed' on. Obviously the 'experiment' would be pointless otherwise so most of the replies here are irrelevant. But I disagree with your comment on what I am 'noticing'. Yes. its a known bias that people remember negative results more often but thats not really relevant to a case where an experiment is being run and the results are tabulated carefully (if that was the case science as we know it wouldnt work).
I have run this (multi-run) experiment many times in different games and I get the same result reliably - that is a conbat that is given (say) 80% probability of success in actual fact only wins (say) 1 in 3 times, so actually 33%. In other words what actually happens is markedly different from what we're being told will happen. I'm not giving an opinion, its a reliable set of actual results. So opinions in response are not useful, even from experienced gamers. I'll stand corrected if I see actual results which differ markedly from mine (and concur with the game stated predictions), or I'm shown code from the game that indicates that the numbers stated are correct.
 
I wouldn't reload to get results. Here's an easier and more reliable way: use world builder to create a large (e.g. 100) stack of identical attackers and a large stack of identical defenders with promotions adjusted to give you the desired odds. Send the attackers one by one and record the results of how many win their fights.
 
Thanks, at least you realised that I had 'random seed' on. Obviously the 'experiment' would be pointless otherwise so most of the replies here are irrelevant. But I disagree with your comment on what I am 'noticing'. Yes. its a known bias that people remember negative results more often but thats not really relevant to a case where an experiment is being run and the results are tabulated carefully (if that was the case science as we know it wouldnt work).
I have run this (multi-run) experiment many times in different games and I get the same result reliably - that is a conbat that is given (say) 80% probability of success in actual fact only wins (say) 1 in 3 times, so actually 33%. In other words what actually happens is markedly different from what we're being told will happen. I'm not giving an opinion, its a reliable set of actual results. So opinions in response are not useful, even from experienced gamers. I'll stand corrected if I see actual results which differ markedly from mine (and concur with the game stated predictions), or I'm shown code from the game that indicates that the numbers stated are correct.
There is an interesting thread that showed up in recommendations in my related threads to this. I lost the link, but if I find it, I'll post it. The convo started like this one, but then delved into convo about the random number generator that the code uses. Got too computer sciencey for me, but some suggested that that type of RNG is not truly random and may be suseptible to streaky results. Which may be why some impossible odds result. Either way, it's not necessarily cheating, but the odds may not be totally reliable.
 
That thread would be interesting, but I think my tests still stand. Don't forget that any discussion of RNG settings etc is only a theory about what is happening. It is outcomes that count, not causes; and outcomes is what i tested for. Yes, the RNG is probably not truly random but thats just a technical limitation. My testing shows that over many tests, each with decent sample sizes, there is a clear (anti-player) difference between actual and stated combat outcomes. Technically I should apply a one-tailed test for significance but for the purposes of a game the results are solid enough. If you are being quoted a combat outcome (say 80%) the reality is that it is actually 3/5 to 3/4 of that (i.e. 50%-60%). The game is cheating. It's fine once you know it, but the fact that it's undocumented is surprising.
 
The game is cheating. It's fine once you know it, but the fact that it's undocumented is surprising.
What's surprising is that no one else has found this out over the 10+ years we have been playing the game. Plenty have asserted it but been disproven by the numbers so I wonder what is different about your analysis. Are you able to share any more details, start files, spreadsheets etc etc?
 
Maybe I'm just imagining things, but I believe there may be some aspects of the flanking mechanics and combat in general that aren't covered in the game's documentation.

For flanking specifically, I think it works best when you actually flank an opponent. That is, you get better attack results the closer the direction you attack from is to being perpendicular to the direction your opposing unit is facing. To see what I mean, look at the diagram on the flanking promotion icon.

Beyond the initial attack, think also about what happens when you weaken an enemy unit to the point where, instead of showing 3 warriors, or archers, or whatever, it now shows 2 because the unit has taken some damage. This unit will also display as though it's bracing for an attack from the direction you last struck from. If you then attack this weakened unit from it's now exposed side, you may find you'll get better results. I think this may explain the behavior of barbarian wolves and panthers, for example. Often, if they're just one tile away, they'll use both movement points to attack from a more favorable direction.

Anyway, I find this helpful to my game, and I'm happy with the outcomes I get playing this way.
 
Last edited:
There is no "direction" that matters when attacking in CIV IV, just terrain for the defender. It doesn't matter what tile the attacker is attacking from or the angle the unit faces. Maybe you are thinking of crossing a river? That is the only penalty that could be avoided by movement, but I assure you, the AI has no problem throwing away troops attacking over a river (looking at you, AI Survivor games).
 
There is no "direction" that matters when attacking in CIV IV, just terrain for the defender. It doesn't matter what tile the attacker is attacking from or the angle the unit faces.
How do you know this? The Odds display? Is that showing a complete picture?
 
People have looked at the code.
Then there's mere logic: such a behaviour would need to have been coded in, which takes effort, which means ultimately money.
Why invest in implementing a cool behaviour and never document it, never make it a selling point, never mention it?
 
the game does not cheat, the displayed combat odds is only an estimation. The combat logic is way more complicated than a single random roll. You have a random roll every combat round, you have a variable amount of combat rounds depending on the starting hp of each unit and how the combat goes. And on top of that you have mechanics like first strikes which means that one side has a chance to get some damage in before the normal combat rounds start.
 
Top Bottom