View Full Version : Comprehensive Retreat Study
BomberEscort Sep 25, 2003, 06:26 AM This thread is a deviation/continuation from the 'Chance To Retreat (http://forums.civfanatics.com/showthread.php?s=&threadid=51633&pagenumber=1)' thread.
I've tested the retreat bonus thouroughly... and there are problems...
PRELIMINARY TEST INFORMATION
Civilization I: Germans (Horseman)
Civilization II: Americans (Infantry)
Regular Horseman (2.1.2) v. Regular Infantry (6.10.1)
Unfortified on Grassland, Horseman always attacking...
Attack = 2.0
Modified Defense = 11.0
Random Seed Off
v1.21f PTW (Conditional Zenith (http://forums.civfanatics.com/showthread.php?postid=1255682#post1255682) used 1.27f for his test)
TESTING BREAKDOWN
Tested 50 units at a time on a Grassland map. Manually attacked with every unit and recorded the results... EDIT: Note from Post #23, both units have the same retreat bonuses...
200 Trials w/ 100% Retreat Bonus
400 Trials w/ 80% Retreat Bonus
200 Trials w/ 66% Retreat Bonus
200 Trials w/ 58% Retreat Bonus
200 Trials w/ 50% Retreat Bonus
200 Trials w/ 34% Retreat Bonus
200 Trials w/ 0% Retreat Bonus
RAW DATA
===========================================
Total Trials: 1,600 Total Wins: 39 (2.4375%)
My Civ III Combat Calculator prediction is 2.852734%
200 Trials @ 100% Bonus
WIN: 5 LOSS: 65 DRAW: 130 (64.5%)
Civ III Combat Calculator prediction is 97.147266% Draw
Modified Civ III Combat Calculator prediction is 88.543818% Draw
400 Trials @ 80% Bonus
WIN: 10 LOSS: 163 DRAW: 227 (56.75%)
Civ III Combat Calculator prediction is 77.717813% Draw
Modified Civ III Combat Calculator prediction is 70.835055% Draw
200 Trials @ 66% Bonus
WIN: 4 LOSS: 91 DRAW: 105 (52.5%)
Civ III Combat Calculator prediction is 64.117196% Draw
Modified Civ III Combat Calculator prediction is 58.43892% Draw
200 Trials @ 58% Bonus
WIN: 5 LOSS: 118 DRAW: 97 (48.5%)
Civ III Combat Calculator prediction is 56.345415% Draw
Modified Civ III Combat Calculator prediction is 51.355415% Draw
200 Trials @ 50% Bonus
WIN: 5 LOSS: 113 DRAW: 92 (46%)
Civ III Combat Calculator prediction is 48.573633% Draw
Modified Civ III Combat Calculator prediction is 44.271909% Draw
200 Trials @ 34% Bonus
WIN: 3 LOSS: 135 DRAW: 62 (31%)
Civ III Combat Calculator prediction is 33.030071% Draw
Modified Civ III Combat Calculator prediction is 30.104898% Draw
200 Trials @ 0% Bonus
WIN: 7 LOSS: 193 DRAW: 0 (0%)
Civ III Combat Calculator prediction is 0% Draw
Modified Civ III Combat Calculator prediction is 0% Draw
===========================================
Conclusions:
It appears Conditional Zenith (http://forums.civfanatics.com/showthread.php?postid=1247442#post1247442) was correct in his test, there does appear to be an error with handling retreat bonuses of 100%, and may even be some problems with bonuses over 50%
The 100% retreat bonus should be a retreat from every losing battle. Just like the 0% bonus provides no retreat. The 0% is functioning properly, but the 100% is not.
At the very least Firaxis/Breakaway/Atari needs to look at the code governing retreat bonuses. I believe there is a coding problem. I for one would like to be able to mod a unit that always retreats.
What seems odd is that the veteran and elite bonuses (58% and 66% respectively) do not seem to be working properly either, this can cause some minor problems in unmodded gameplay...
The win percentage is very close to 'perfect accuracy', this lets me know that my calculator and the way Civ III handles combat are the same. Also, notice how my calculator comes very close to the actual retreat bonus in all cases. My calculations will always be lower than the bonus because of the infrequent wins by the horseman... I am currently using a beta-version of my calculator and will post it as soon as possible. See my signature.
Note that the bonuses for 50% and below are very close to the test results (e.g.- 50% retreat bonus resulted in 46% retreat), but how above 50% they start to skew greatly...
Maybe these are not percentage bonuses, but they will not accept input outside of the 0-100 range inclusive. This leads me to believe they are percentage bonuses.
Any comments about the analysis are appreciated...
bike Sep 25, 2003, 07:41 AM I think I have never seen a retreat when both are almost dead (1 hp left). Seems that in that case the attacker gets crazy and tries to finish the defender off, regardless of his own health.
That should degrade the 100% retreat a bit, but I still think your numbers are quiet high even with respect to this.
And then again, I might be wrong anyway...
LouLong Sep 25, 2003, 07:42 AM You should post that at C&C, lots of people would be interested in reading that.
BomberEscort Sep 25, 2003, 07:54 AM Originally posted by bike
I think I have never seen a retreat when both are almost dead (1 hp left)...
They won't
Originally posted by bike
That should degrade the 100% retreat a bit, but I still think your numbers are quiet high even with respect to this...
The numbers are accurate, its all mathematical statistics, and statistics don't lie :D Plus, a 100% retreat-unit will never lose in this situation. He will be victorious or retreat...
See Catt's Retreat Explanation (http://forums.civfanatics.com/showthread.php?postid=941904#post941904) for retreating details...
Segal Sep 25, 2003, 10:48 AM I believe bike is correct. If the defender is at 1 HP, the attacker will not retreat regardless of quality. Thus a 100% retreat-unit would have the following results: Win, Retreat, or Lose to a 1-hp defender.
BomberEscort Sep 25, 2003, 10:55 AM Originally posted by Segal
I believe bike is correct. If the defender is at 1 HP, the attacker will not retreat regardless of quality. Thus a 100% retreat-unit would have the following results: Win, Retreat, or Lose to a 1-hp defender.
Do you have a link where you got this information... I'd like to confim or deny this if possible...
AFAIK the retreat ability of the offensive unit has nothing to do with the defensive units hp... I had a row of 50 horsemen and 50 Infantry and attacked. There was only one horseman vs. one infantry 50 times over and over again with different modifiers...
I will test tonight if horsemen can retreat from 1hp Infantry... if this is true, this will effect the numbers... but only by about 9% less on the Draw outcomes, there will still be a large discrepancy...
EDIT: I've read Civ III v1.17b (http://forums.civfanatics.com/showthread.php?postid=187327#post187327) readme and it does not say anything about the 1hp defender preventing retreat... Testing to follow...
Krayzeenbk Sep 25, 2003, 11:41 AM Massive personal experience shows that an unit with retreat ability will not retreat if the enemy unit (attacker OR defender) is down to 1 hp. I believe this was true even when fast units always retreated. Thus, back then (ca. 1.16) fast units retreated in all situations except when the enemy unit was at 1 hp.
I believe you might also want to try another test, horsemen vs. spearmen. They have equal attack and defense ratings, and those (esp attack for horseman and defense for spearman) may be variables that need to be controlled.
BomberEscort Sep 25, 2003, 11:44 AM I made the Attack/Defense difference large so I would minimize the times the horseman would win, and maximize the times a horseman would retreat or lose...
I have not been able to find any info on this 1hp slow-defender ability to deny a retreat... I know about the 1hp fast-attacker not retreating... but like I said above the difference would result only in about a 9% drop in Draws and a 9% increase in losses.
This still is nowhere close to the 100% retreat bonus. If what you are saying is true the results for a 100% retreat bonus under the conditions of the first post should be WIN: 2.5% LOSS: 9% DRAW: 88.5% (approximaely)
Also, the chance of the horseman reducing the infantry to 1hp is about 9% (8.603%) but in the first post I note 65 out-of 200 encounters are losses (32.5%). If this is true this numbers should be very close and they are not. Something else is happening here...
Krayzeenbk Sep 25, 2003, 11:49 AM I have no doubt about the 1 hp defender preventing attacker retreat. But that's just my experience (in the thousands of situations over the years). I don't think anyone could say that they have ever seen a fast unit retreat from a defender that was down to 1 hp.
The horsemen/spearmen situation really needs to be tested.
I can do it if you like ;)
BomberEscort Sep 25, 2003, 11:56 AM Originally posted by Krayzeenbk
I have no doubt about the 1 hp defender preventing attacker retreat. But that's just my experience (in the thousands of situations over the years). I don't think anyone could say that they have ever seen a fast unit retreat from a defender that was down to 1 hp.
I will test this tonight... not that I don't believe you :D, I'm just from the show-me-state...
Originally posted by Krayzeenbk
The horsemen/spearmen situation really needs to be tested.
I can do it if you like ;)
Feel free to test all you want :D... any help is appreciated. But since the test of this thread is to force retreat. I think the values of attack and defense should be large. The best test being a regular Horseman v. regular Infantry (highest Defense slow-moving unit IIRC)
Krayzeenbk Sep 25, 2003, 11:58 AM Originally posted by BomberEscort
I will test this tonight...
Feel free to test all you want :D... any help is appreciated. But since the test of this thread is to force retreat. I think the values of attack and defense should be large. The best test being a regular Horseman v. regular Infantry (highest Defense slow-moving unit IIRC)
I understand this will be a much more painful and time-consuming test than infantry. Watching for 1 hp situations will make it much slower.
EDIT: Screw sleep today, thinking and swimming tomorrow ;) I think I'll go for it ;)
BomberEscort Sep 25, 2003, 12:02 PM What I am going to do, since I alreay have a map with 50 Horseman and 50 Infantry on it (all grassland). I will change all 50 Infantry in the editor to one hp and leave the horseman regulars. If I get 0 retreats, I'll call it good and modify my calculator accordingly... There still will be a large discrepancy, but I will slay that dragon after this one is dead :D
BTW, it took me about 1 hour to do 1,600 trials...
BomberEscort Sep 25, 2003, 12:03 PM Originally posted by Krayzeenbk
EDIT: Screw sleep today, thinking and swimming tomorrow ;) I think I'll go for it ;)
Get to work, damnit!!! :whipped: :D
Krayzeenbk Sep 25, 2003, 12:28 PM Due to a huge number of various situations, I am only going to count whether a horseman that could retreat did in fact retreat or continued to fight.
(For example, a particularly hard situation is when the attacker wins with 1 hp remaining. Obviously, it did not retreat for whatever reason, but that reason could be one of two things: the defender had 1 hp, in which case the point is removed from the statistic, or the RNG said no, in which case it's a valid point).
(This means battle animations are on, grr).
BomberEscort Sep 25, 2003, 01:29 PM Originally posted by Krayzeenbk
Due to a huge number of various situations, I am only going to count whether a horseman that could retreat did in fact retreat or continued to fight.
I don't see how this matters. If the horseman does retreat we can assume the infantry had 2hp or more.
If the horseman does not retreat then the reason as you pointed out is the defender had 1hp or the RNG said no (either way will force a WIN/LOSS scenario) to a 1 hp horseman vs a 2-3hp Infantry... Either way, there will be no retreat...
I don't see WHY he doesn't retreat matters... If he wins with one hp remaining he stills wins, no retreat was possible since it was calculated in the round before... what needs to be expressed in a formula for retreat is: The chance that the attackers hp will equal one, the chance that a defenders hp will be greater than one, the retreat percentage based on experience. Maybe I am not understanding correctly :confused:
Krayzeenbk Sep 25, 2003, 01:49 PM Because I am trying to isolate the retreat roll, not the combat rolls that cause one or the other of the combatants to cross the 2hp/1hp line first. So far the test results are coming out pretty straightforward, I don't know if I should continue in light of this comment ;)
EDIT: Never mind that I am now getting some funkiness *triple checks modded rules*
Krayzeenbk Sep 25, 2003, 02:45 PM I will post the test results I have obtained so far just in case you want to continue them (I am in GMT +5. It is after practice and I am unable to think or stay awake for much longer ;) ).
Preliminary Test Results
The test was conducted on Regent difficulty, preserve random seed off. All defenders were on grasslands, which were modified to have a defense bonus of 0%.
Attacker: Egyptian Regular Horseman (2.1.2)
Defender: Roman unfortified Regular Spearman (1.2.1)
The first observation that was made was that no Horseman ever withdrew if the Spearman being attacked by it reached 1 hp first (before the Horseman). It may be concluded that fast units only get a chance to withdraw if and when they reach 1 hp first (more testing may be in order).
Retreat data
Regular (Horseman) chance to retreat: 50%
500 trials yielded 247 valid cases (cases where the Horseman reached 1 hp before the Spearman). 49.4% of cases were valid cases.
In 131 (53.04% of) cases, the Horseman retreated.
In 116 (46.96% of) cases, the Horseman continued to fight.
Regular (Horseman) chance to retreat: 100%
250 trials yielded 128 valid cases. 51.2% of cases were valid cases.
In 90 (70.31% of) cases, the Horseman retreated.
In 38 (29.69% of) cases, the Horseman continued to fight.
I will conduct 250 more trials of 100% and up to 500 trials of 0% (probably less if it does look as if the Horsemen never retreat at 0%). Then I may conduct more tests of 100% to get the percentage closer to what it should be. I may also conduct tests of other percentages, but all this will have to wait until Sunday, when I will have plenty of time. Check back here then for a big fat edit if I do do it ;)
BomberEscort Sep 26, 2003, 06:10 AM Originally posted by Krayzeenbk
I have no doubt about the 1 hp defender preventing attacker retreat...
This has been confirmed... :thumbsup:
Originally posted by Segal
I believe bike is correct. If the defender is at 1 HP, the attacker will not retreat regardless of quality. Thus a 100% retreat-unit would have the following results: Win, Retreat, or Lose to a 1-hp defender.
He was, and so are you :thumbsup: Thanks for the help...
Originally posted by Krayzeenbk
I will conduct ... 500 trials of 0%
This is not neccessary, I did 200 trials at 0% retreat in my first test and no horseman ever retreated...
BomberEscort Sep 26, 2003, 06:21 AM Originally posted by Krayzeenbk
Regular (Horseman) chance to retreat: 100%
250 trials yielded 128 valid cases. 51.2% of cases were valid cases.
In 90 (70.31% of) cases, the Horseman retreated.
In 38 (29.69% of) cases, the Horseman continued to fight.
The result from my calaculator at 100% retreat are:
Win: 50.000000%
Loss: 18.750000%
Draw: 31.250000%
70.31% (Retreats) * 51.2% Valid Cases = 36.00%
So, 36% of all encounters will lead to retreat... This is similar to what the calculator predicts. Good Work Krayzeenbk :goodjob:, what it seems I failed to take into consideration was the fact that fast-units cannot retreat from 1hp slow-units...
Originally posted by Krayzeenbk
Regular (Horseman) chance to retreat: 50%
500 trials yielded 247 valid cases (cases where the Horseman reached 1 hp before the Spearman). 49.4% of cases were valid cases.
In 131 (53.04% of) cases, the Horseman retreated.
In 116 (46.96% of) cases, the Horseman continued to fight.
The result from my calaculator at 50% retreat are:
Win: 50.000000%
Loss: 34.375000%
Draw: 15.625000%
53.04% (Retreats) * 49.4% Valid Cases = 26.2%
So, 26.2% of all encounters will lead to retreat... This is similar to what the calculator predicts also... a little off... also assuming my calculator is right :rolleyes: To be statistically signifigant we would need approximately 500 valid cases before we can finalize the results but we are heading in the right direction... I would feel more comfortable if the numbers were closer. I'm going to check my calculator and make sure it is handling retreats properly (I'm 99% sure it is)
At the very least the retreat bonus of 100% is misleading... It means that of all the battles he can retreat from, he will. The rules governing retreat are as follows:
Retreat is not possible (no matter the experience of the unit); these instances are:
(1) When the fast-mover has only 1 HP left (at the beginning of the attack)
(2) When both units are fast-movers
(3) When there is no available tile for retreat
(4) When the fast-mover is fortified in a city (or colony?)
(5) When the Defender has 1hp remaining.
If the battle meets all the above criteria, and the bonus is 100% the unit will retreat...
anarres Sep 26, 2003, 06:25 AM Cool - this stuff is good!
You should really link this from the old thread so that people who subscribed there will see this.
BomberEscort Sep 26, 2003, 01:07 PM Testing for this weekend...
I will continue with more testing... I think I just about have this formula nailed down. Factoring in the fact that a 1 hp defender can prevent a retreat is adding some complications. For sake of my sanity :eek: I will assume in my calculator and in testing that the horseman will have an available tile for retreat... I can see no conceivable way to program this into a spreadsheet (or anywhere) for that matter since game circumstances vary greater that the boyancy of a various terds in a punch bowl... I will just have to live with this minor error :(
Also, I will be continuing along the lines of previous testing done by Krayzeenbk and I with different parameters. I will not be able to post all weekend since I only have internet at work :( But Monday I hope to be full of answers on everything-you-ever-wanted-to-know-about-retreating-units-but-were-afraid-to-ask!
:D
Krayzeenbk Sep 27, 2003, 08:29 AM Originally posted by BomberEscort
At the very least the retreat bonus of 100% is misleading... It means that of all the battles he can retreat from, he will. The rules governing retreat are as follows:
Retreat is not possible (no matter the experience of the unit); these instances are:
(1) When the fast-mover has only 1 HP left (at the beginning of the attack)
(2) When both units are fast-movers
(3) When there is no available tile for retreat
(4) When the fast-mover is fortified in a city (or colony?)
(5) When the Defender has 1hp remaining.
If the battle meets all the above criteria, and the bonus is 100% the unit will retreat...
I believe I just showed that to not be true. I had horsemen with a retreat bonus of 100%.
1) They all started with 3/3 HP.
2) They were fast movers and the spearmen defenders were not.
3) They had an available tile for retreat (this is really only a problem when the fast unit is being attacked, I think).
4) The fast unit was obviously not fortified anywhere since it was attacking and was definetely not in any city, colony, fortress, on any airbase, outpost, radar tower, or anything else you can think of.
5) The defenders in the valid cases had over 1 HP remaining.
All of these criteria were met, yet the 100% retreat horsemen continued to fight in 29.69% of cases where they had a valid chance to retreat. :confused:
As for the number of cases - yes it is definetely true that I need to do more tests (as I said, probably tomorrow).
EDIT: As for the formula, you need to calculate the chance that the attacker will reach 1 HP before the defender, then multiply that by his actual chance to retreat at the chance to retreat value entered in the editor (which are apparently not the same numbers).
Oystein Sep 27, 2003, 01:30 PM Tests on vanilla v1.29f
I have used modded units, elite slow defender with d=1000 and fast regular attacker with a=1 or 2
Defender never lost more than 1hp.
attacker--defender------------attacker
retreat---retreat---attempts--retreats---%retreats
-bonus-----bonus
--100-------51--------500-------496--------99.2
--100-------60--------500-------459--------91.8
--100-------75--------500-------396--------79.2
--100------100--------500-------324--------64.8
---50-------50--------500-------268--------53.6
---50------100--------500-------179--------35.8
Seems like defenders retreat bouns decreases the chance for the attacker if above 50.
Krayzeenbk Sep 27, 2003, 02:06 PM Very interesting........ You could have nailed it on the head....
BomberEscort Sep 29, 2003, 06:25 AM Does a slow defender get a retreat bonus???
BomberEscort Sep 29, 2003, 06:29 AM I've done more tests over the weekend, and to summarize my results... Retreat bonuses 50 or under seem to work. Anything higher that 66% seems to get capped at 66%. I did tests at 100%, 99%, 80%, and 75% and they all capped around the 66% mark. I've never had results like Oystein's in my testing... Something is going on that we are missing. Maybe he has found it...
EDIT: Maybe the bonus has something to do with the ratio between the attack and defense of the respective units...
BomberEscort Sep 29, 2003, 06:35 AM Originally posted by Oystein
Seems like defenders retreat bouns decreases the chance for the attacker if above 50.
This would seem to go with my observation that bonuses above 50% 'seem to be broken'...
from my first post...
WIN: 5 LOSS: 65 DRAW: 130 (64.5%)... Both are regulars so the 100-100 bonus would apply, this agrees with Oystein's data
WIN: 5 LOSS: 113 DRAW: 92 (46%)... Both are regulars so the 50-50 bonus would apply, this agrees with Oystein's data
I believe Oystein has lead us in a new direction... :goodjob: I think the secret is about to be revealed...
BomberEscort Sep 29, 2003, 07:49 AM I will do tests on the following:
Unit #1 = 2.1.2
Unit #2 = 1.1000.1
Unit #1-Unit #2-Actual Results
66-66 (Elite v. Elite)
66-58 (Elite v. Veteran)
66-50 (Elite v. Regular)
66-34 (Elite v. Conscript)
58-66 (Veteran v. Elite)
58-58 (Veteran v. Veteran)
58-50 (Veteran v. Regular)
58-34 (Veteran v. Conscript)
50-66 (Regular v. Elite)
50-58 (Regular v. Veteran)
50-34 (Regular v. Conscript)
34-66 (Conscript v. Elite)
34-58 (Conscript v. Veteran)
34-50 (Conscript v. Regular)
34-34 (Conscript v. Conscript)
Krayzeenbk Sep 29, 2003, 08:20 AM Originally posted by BomberEscort
Does a slow defender get a retreat bonus???
He carries the retreat bonus parameter... so you could say he does, but the parameter is never used (unless testing shows defender retreat bonus to be a factor, as I suspect it will).
Oystein Sep 29, 2003, 02:49 PM New tests:
attacker--defender------------attacker
retreat---retreat---attempts--retreats---%retreats
-bonus-----bonus
---50--------0--------100-------100-------100.0
---49--------0--------500-------485--------97.0
---10--------0--------500-------106--------21.2
----1--------0--------500--------14---------2.8
If attackers retreat bonus if 50 points higher than the defender, he will always retreat.
BomberEscort Sep 30, 2003, 05:33 AM I am almost finished with my tests above, now all we need is a formula to quantify the retreat ability, so I can incorporate it into my calculator...
CellarDweller22 Oct 01, 2003, 08:38 AM Not to confuse the issue, but......
It SEEMS like whenever one of my tanks is hit by artillery, he NEVER retreats. In my last battle, I had about 30 tanks attacking a city. Every tank that was hit by artillery didn't retreat at 1hp (and the defender had 2+ hp), but those that did NOT get hit (or there was no more artillery to fire) almost ALWAYS retreated at 1hp. Has anyone else seen this? How does artillery fire affect the situation? In other words, does this USUALLY happen or was I just the "lucky" one...... :rolleyes:
Great work, all!
-- From The Cellar :smoke:
BomberEscort Oct 01, 2003, 08:46 AM Retreating does not apply to bombardment, since bombardment is a free attack for the bombarding unit...
CellarDweller22 Oct 01, 2003, 10:10 AM Sorry..... I must not have been clear. What I meant was this. I send a tank into a city, the defender fires artillery, my attacker is knocked down 1 hp, and after being knocked down 1 hp, it never seems to retreat, even with the enemy having 2hp +. Instead, this tank gets killed. Now OTHER tanks that don't get hit with "defending" artillery will retreat from the same stack.
GO CHIEFS!!!!! :goodjob: ;)
-- From The Cellar :smoke:
BomberEscort Oct 01, 2003, 10:49 AM It should still have the possibility of retreat as long as it meets the rules for retreat given earlier in this thread... (e.g.- has more than 1 hp, has a tile to retreat to, etc...) I have had retreat after defensive bombardment and normal combat. It must be bad luck...
BomberEscort Oct 01, 2003, 11:03 AM DELETED
anarres Oct 01, 2003, 11:09 AM Originally posted by BomberEscort
It should still have the possibility of retreat as long as it meets the rules for retreat given earlier in this thread... (e.g.- has more than 1 hp, has a tile to retreat to, etc...) I have had retreat after defensive bombardment and normal combat. It must be bad luck... You mean you've seen a 2HP fast unit get shelled by Arty and seen it retreat when it drops to 1HP?
According to the way retreating works this is the only time it gets to retreat - when it passes the 2HP/1HP boundary. This is when it is being shelled by Arty, not when the unit attacks it later (when it is on 1HP).
Hmm, I am sure I have never seen that... :confused:
BomberEscort Oct 01, 2003, 11:17 AM Originally posted by anarres
You mean you've seen a 2HP fast unit get shelled by Arty and seen it retreat when it drops to 1HP?
According to the way retreating works this is the only time it gets to retreat - when it passes the 2HP/1HP boundary. This is when it is being shelled by Arty, not when the unit attacks it later (when it is on 1HP).
Hmm, I am sure I have never seen that... :confused:
From what I understand he was saying:
He had Tanks (Regular or above, since I don't see how you can get Conscript Tanks), Attacked a city, Defensive Bombardment by arty reduced him by 1 hp (Now he is 2, 3 or 4hp), the Tank continues to fight (since it was attacking the city in the first place), is reduced to 1 hp and never retreats hence winning or losing the encounter... As opposed to other Tank units, that are not defensively bombarded, attack the city, subsequently are reduced to 1 hp and always retreat. I believe he was trying to make a correlation between the Tank being defensively bombarded and its ability to retreat... and no correlation exists. :eek: If there are questions about 'retreating' please address them here (http://forums.civfanatics.com/showthread.php?s=&threadid=51633). I would like to keep this thread related only to comments on the statistical analysis of the retreat ability. Thanks... ;)
anarres Oct 01, 2003, 11:37 AM bleh! ok, I posted in the linked thread, even if I did have to quote 4 seperate posts. :rolleyes:
BomberEscort Oct 01, 2003, 12:10 PM DELETED
Krayzeenbk Oct 02, 2003, 05:17 AM Well, interesting results, good thing you worked this out :)
We should give Firaxis an A for misleading labeling in the editor....
BomberEscort Oct 02, 2003, 05:26 AM The final results of my testing...
Unit #1 = 2.1.2
Unit #2 = 1.1000.1
Unit #1-Unit #2-Actual Results
66-66 (Elite v. Elite)----------Results: 170/300 (56.6%)
66-58 (Elite v. Veteran)--------Results: 197/300 (65.6%)
66-50 (Elite v. Regular)--------Results: 180/299 (60.2%)
66-34 (Elite v. Conscript)------Results: 230/300 (76.6%)
58-66 (Veteran v. Elite)--------Results: 147/300 (49.0%)
58-58 (Veteran v. Veteran)------Results: 151/300 (50.3%)
58-50 (Veteran v. Regular)------Results: 182/300 (60.6%)
58-34 (Veteran v. Conscript)----Results: 196/300 (65.3%)
50-66 (Regular v. Elite)--------Results: 130/300 (43.3%)
50-58 (Regular v. Veteran)------Results: 132/300 (44.0%)
50-34 (Regular v. Conscript)----Results: 170/300 (56.7%)
34-66 (Conscript v. Elite)------Results: 87/300 (29.0%)
34-58 (Conscript v. Veteran)----Results: 96/300 (32.0%)
34-50 (Conscript v. Regular)----Results: 108/300 (36.0%)
34-34 (Conscript v. Conscript)--Results: 124/300 (37.2%)
BomberEscort Oct 02, 2003, 05:27 AM Summary of all the tests...
attacker--defender------------attacker
retreat---retreat---attempts--retreats---%retreats
-bonus-----bonus
--100-------51--------500-------496--------99.20
--100-------60--------500-------459--------91.80
--100-------75--------500-------396--------79.20
--100------100--------828-------544--------64.70
---80-------80--------400-------227--------56.75
============Unmodded Civ III Range==============
---66-------66--------500-------275--------55.00
---66-------58--------300-------197--------65.67
---66-------50--------299-------180--------60.20
---66-------34--------300-------230--------76.67
---58-------66--------300-------147--------49.00
---58-------58--------500-------248--------49.60
---58-------50--------300-------182--------60.60
---58-------34--------300-------196--------65.30
---50-------66--------300-------130--------43.33
---50-------58--------300-------132--------44.00
---50-------50--------947-------491--------51.84
---50-------34--------300-------170--------56.67
---34-------66--------300--------87--------29.00
---34-------58--------300--------96--------32.00
---34-------50--------300--------108-------36.00
---34-------34--------500--------186-------37.20
============Unmodded Civ III Range==============
---50------100--------500-------179--------35.80
---25------100--------300--------63--------21.00
---10------100--------300--------21---------7.00
---50--------0--------100-------100-------100.00
---49--------0--------500-------485--------97.00
---10--------0--------500-------106--------21.20
----1--------0--------500--------14---------2.80
----0--------0--------200---------0---------0.00
EDIT: Combined Oystein, Krayzeenbk and my unit testing statistics...
Total Trials: 11,274
What we know about retreating...
When the Attackers retreat value is 50 percentage points greater than the Defender, the Attacker always retreats
When the Attackers and Defenders retreat values are zero, the attacker will never retreat
The slow-Defenders retreat bonus does factor into the ability of the fast-Attacker to retreat. The greater the difference in the attackers favor, the greater the chance of retreat.
There is no way to create a slow-unit that will always block a fast-units retreat.
The range for an elite fast-attacker is 55-75% retreat in valid cases.
The range for a veteran fast-attacker is 50-66% retreat in valid cases.
The range for a regular fast-attacker is 43-56% retreat in valid cases.
The range for an conscript fast-attacker is 29-38% retreat in valid cases.
The best-guess for the retreat formula is (100*Attacker Retreat Bonus)/(50+Defense Retreat Bonus)--Credit to Oystein for this discovery.
In my opinion, I think there is not enough spread between a veteran and a regular in retreat ability to be statistically signifigant. If I had my way :king: I would rework the values as follows: 75%/66%/50%/34%. This would make the difference between units more noticeable. Currently, there is little difference, in retreat ability, between a regular and veteran, but large differences at the ends between Elite-Veteran and Regular-Conscript...
I'd also like to thank Oystein and Krayzeenbk for their testing help, thanks :goodjob: The next mission should anyone choose to except it, is to make sense of all this data and put it into a formula... :crazyeye:. I will be working on this, along with a couple of other projects... I fear this will be the hard part :nuke:. Maybe a Firaxian can enlighten us on the formula used in the calculation... :yeah:
Oystein Oct 02, 2003, 07:12 AM Maybe the formula is 100a/(d+50)
font=monospace]
attacker--defender
retreat---retreat----%retreats-----100a/(d+50)
-bonus-----bonus
- 100 ----- 51 ------- 99.20 ------ 99.01
- 100 ----- 60 ------- 91.80 ------ 90.91
- 100 ----- 75 ------- 79.20 ------ 80.00
- 100 ---- 100 ------- 64.70 ------ 66.67
-- 80 ----- 80 ------- 56.75 ------ 61.54 **
-- 66 ----- 66 ------- 55.00 ------ 56.90
-- 66 ----- 58 ------- 65.67 ------ 61.11 **
-- 66 ----- 50 ------- 60.20 ------ 66.00 **
-- 66 ----- 34 ------- 76.67 ------ 78.57
-- 58 ----- 66 ------- 49.00 ------ 50.00
-- 58 ----- 58 ------- 49.60 ------ 53.70 **
-- 58 ----- 50 ------- 60.60 ------ 58.00
-- 58 ----- 34 ------- 65.30 ------ 69.05 **
-- 50 ----- 66 ------- 43.33 ------ 43.10
-- 50 ----- 58 ------- 44.00 ------ 46.30
-- 50 ----- 50 ------- 51.84 ------ 50.00
-- 50 ----- 34 ------- 56.67 ------ 59.52 **
-- 34 ----- 66 ------- 29.00 ------ 29.31
-- 34 ----- 58 ------- 32.00 ------ 31.48
-- 34 ----- 50 ------- 36.00 ------ 34.00
-- 34 ----- 34 ------- 37.20 ------ 40.48 **
-- 25 ---- 100 ------- 21.00 ------ 16.67 **
-- 10 ---- 100 -------- 7.00 ------- 6.67
-- 50 ------ 0 ------ 100.00 ----- 100.00
-- 49 ------ 0 ------- 97.00 ------ 98.00
-- 10 ------ 0 ------- 21.20 ------ 20.00
--- 1 ------ 0 -------- 2.80 ------- 2.00
--- 0 ------ 0 -------- 0.00 ------- 0.00
[/font]
I have marked the the worst results by **
EDIT:
font=monospace]
-- 66 ----- 34 ------- 76.67 ------ 78.57
-- 58 ----- 34 ------- 65.30 ------ 69.05
-- 50 ----- 34 ------- 56.67 ------ 59.52
-- 34 ----- 34 ------- 37.20 ------ 40.48
[/font]
Looks like I always get to big value when atacking conscripts. Coinsidence?
BomberEscort Oct 02, 2003, 07:20 AM Thanks Oystein... I believe that may be the formula for retreat in valid cases... I will incorporate this formula into my retreat calculator and post a new version soon... Not so hard after all ;)
Krayzeenbk Oct 02, 2003, 07:23 AM The only real difference in % retreat chance range between two consecutive experience levels is at regular-conscript. Elites get the least retreat bonus compared to veterans.
BomberEscort Oct 02, 2003, 07:31 AM Originally posted by Oystein
Looks like I always get to big value when atacking conscripts. Coinsidence?
That's still very close though... I believe this is the formula. Trials in most cases are 300 trials, which should be enough. I will retest with another 300 trials for 66-58 and 66-50, and see if this helps with the percentages.
anarres Oct 02, 2003, 07:45 AM That's a very good match! I would say none of the 'worst' results are too far off to say it is invalid, but if you wanted to check you could run those tests again (ignoring the first results), and see if they come out closer.
Another reason to trust your formula is that the 'worst' results are both above and below the expected values - if they were all over or under then it would imply you may be missing something, but they don't.
If you take the 'worst' result for the 80/80 test run and apply the binomial distribution to it you can see exactly how good the actual values are at modeling your formula...
The standard deviation is:
s.d. = sqrt( npq )
where n=number of tries, p=prob(success), q=1-p
So, for 80/80 (n=400, p=61.54%=0.6154, q=0.3846)
s.d. = 9.73
In 400 tests:
The expected number of retreats is 400*0.6154=246.16
The s.d. is 9.73
The actual number of retreats is 227, 19.16 out from the expected.
The difference from actual to expected is 1.97*s.d.
This is further out from the expected value for a "one-off" event than would normally be comfortable, but since you did 28 tests, it is not that unusual. There are a couple more results with similarly amololous results, but nothing too unusual IMO.
BomberEscort Oct 02, 2003, 07:50 AM Good analysis... I will add 400 more trials for 80-80 also... This should help with the statistics.
New testing...
300 Trials @ 66-58
300 Trials @ 66-50
400 Trials @ 80-80
Results, soon...
Also, this formula does not take into account the probability of the attacker reaching 1hp before the defender reaches 1hp. But this is the formula for the ideal case. (Tested using 2.1.2 and 1.1000.1 units). Since the defender will most likely never fall below 2 hp nor will the Attacker win.
BTW, my calculator is up and operating properly with this new retreat formula...
BomberEscort Oct 03, 2003, 07:51 AM I am going to run the same series of tests for slow-attacker v. fast-defender over the weekend and see if I get the same results... Hopefully there isn't a different formula for this...
BomberEscort Oct 06, 2003, 06:24 AM They seem to use the same formula for slow-attacker v. fast-defender... This study is complete.
Final Summary of all the tests...
attacker--defender------------attacker
retreat---retreat---attempts--retreats---%retreats
-bonus-----bonus
--100-------51--------500-------496--------99.20
--100-------60--------500-------459--------91.80
--100-------75--------500-------396--------79.20
--100------100--------828-------544--------64.70
---80-------80--------400-------227--------56.75
============Unmodded Civ III Range==============
---66-------66--------500-------275--------55.00
---66-------58--------300-------197--------65.67
---66-------50--------299-------180--------60.20
---66-------34--------300-------230--------76.67
---58-------66--------300-------147--------49.00
---58-------58--------500-------248--------49.60
---58-------50--------300-------182--------60.60
---58-------34--------300-------196--------65.30
---50-------66--------300-------130--------43.33
---50-------58--------300-------132--------44.00
---50-------50--------947-------491--------51.84
---50-------34--------300-------170--------56.67
---34-------66--------300--------87--------29.00
---34-------58--------300--------96--------32.00
---34-------50--------300--------108-------36.00
---34-------34--------500--------186-------37.20
============Unmodded Civ III Range==============
---50------100--------500-------179--------35.80
---25------100--------300--------63--------21.00
---10------100--------300--------21---------7.00
---50--------0--------100-------100-------100.00
---49--------0--------500-------485--------97.00
---10--------0--------500-------106--------21.20
----1--------0--------500--------14---------2.80
----0--------0--------200---------0---------0.00
Total Trials: 11,274
What we know about retreating...
When the Attackers retreat value is 50 percentage points greater than the Defender, the Attacker always retreats
When the Attackers and Defenders retreat values are zero, the attacker will never retreat
The slow-Defenders retreat bonus does factor into the ability of the fast-Attacker to retreat. The greater the difference in the attackers favor, the greater the chance of retreat.
There is no way to create a slow-unit that will always block a fast-units retreat.
The range for an elite fast-attacker is 55-75% retreat in valid cases.
The range for a veteran fast-attacker is 50-66% retreat in valid cases.
The range for a regular fast-attacker is 43-56% retreat in valid cases.
The range for an conscript fast-attacker is 29-38% retreat in valid cases.
The best-guess for the retreat formula is:
(100*Attacker Retreat Bonus)/(50+Defense Retreat Bonus)
Credit to Oystein for this discovery...
This formula is also modified by the chance of the fast-attacker/fast-defender reaching 1hp before the slow-defender/slow-attacker reaches 1hp... The larger the difference between A/D values, the less this effects the results. Testing above was done with a 2 Attack fast-attacker v. 1000 Defense slow-Defender...
|
|