 |
|  |
 |
|  |
 |
|  |
 |
|
Captain Nemo
|
|
Red Front
Jan 1970 time: 05:13
|
|
I ran a number of combat tests to determine if the above formulas are correct. Since I ran each combat 200 times and averaged the damage sustained by the victor and the number of times each side won I can tell you that (a)/(a+d+0.125) only works when a=d. As soon as a and d diverge the odds become heavily weighted towards the unit with the higher stat.
After a little additional analysis I came up with this formula:
Odds= Max(2a-d,a)/(Max(2d-a,d)+Max(2a-d,a)+0.125)
When I apply this number to the binomial distribution formula the results come out right on the money including the damage numbers.
This amounts to giving the better unit an extra bonus equal to it's advantage over the weaker unit, for example a 6a attacking a 1d unit is really equivalent to an 11a unit attacking a 1d unit.
One of my tests had 15a,2f,2h attacking 9d,2f,2h and the 15a units were basically never loosing when they should have lost 15% of the time.
I tried the reverse with 2a,1f,1h attacking 4d,1f,1h and the 4d were also doing much better than the stats showed. I expected them to loose about 5% of the time in the test they only lost once in 200 tries or 0.5% which is too much of a swing to be explained away.
I am not 100% sure that this is it but I am pretty sure the simpler formula is not correct
|
|
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|  |
 |
|
Captain Nemo
|
|
Red Front
Jan 1970 time: 05:13
|
|
As to the spreadsheet calculating the odds and damage here is what I did:
4 columns for the attacker (aa,ad,af,ah)
4 columns for the defender (da,dd,df,dh)
(Although ad for the attacker and da for the defender are not used, it makes it easier to copy a unit from the attacker to defender column to see how it fares in the opposite role)
Next two columns calculate the "corrected" a and d factors, Ca and Cd based on the difference between aa and dd
Ca=Max(2*aa-dd,aa)
Cd=Max(2*dd-aa,dd)
Next column, the odds of the attacker winning a round:
odds=Ca/(Ca+Cd+0.125) (Display in percent)
Next the number of rounds won required for Attacker to kill defender:
aw=dh*10/af
Next the number of rounds won required for Defender to kill Attacker:
dw=ah*10/df
Next the "BIG" formula the Attacker's odds to win the entire battle:
ODDS=BINOMDIST(dw-1,aw+dw-1,1-odds,True)
Translates as "odds that Defender wins dw-1 or less rounds out of aw+dw-1 rounds considering that the odds of the defender to win each round are 1-odds" (Changing True to False would change "wins dw-1 or less" to "wins exactly dw-1")
Now the average damage sustained by the attacker by the time the defender is dead: aw*(1-odds)/odds * df (odds=odds to win one round)
And the average damage sustained by the defender by the time the attacker is dead: dw*odds/(1-odds) * af
Of course for the loser of the ODDS equation this number will exceed the unit's hitpoints.
This should allow anyone with basic knowledge of EXCEL to reproduce the spreadsheet. I copied the formulas down each column so I can display multiple combats situations simultaneously. I also added a column before the attacker and defender with the respective unit names so I can keep track of what is what.
Did I put everyone to sleep?
|
|
|  |
 |
|  |
 |
|
markusf
|
|
I think the terrian your attacking from is also taken into account.
|
|
|  |
All times are GMT. The time now is 05:13. Apolyton Time is 00:13. |
top of page
|
| archivepost |
|
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
|
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
|
|
|
|
|
|