Comprehensive Retreat Study

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%)
 
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:
 
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?
 
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 ;)
 
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.
 
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.
 
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...
 
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...
 
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...
 
Back
Top Bottom