Ok, I went to the trouble of looking up how Civ3's combat probability works (to the best of anyone's knowledge online) and then used my handy-dandy probability spreadsheet (which I have used for other games where probabilities of this sort are required) and worked out the actual chances of stuff.
It turns out the the civulator created by a guy on CivFanatics (which I tested against my model) works exactly the same way and spits out the same result. By contrast, the equation Shriber was using is *not* accurate.
The reality is that you have to use either Pascal's triangle as a data set for a series of fairly complex calculations (my formula for each cell in the spreadsheet is below) or you have to use a series of factorials and other stuff like that (which is what the "Civulator" uses), essentially the same calculation.
First of all, the chance of the attacker winning any individual round of combat is the same as Civ1:
a = attacker's modified attack rating
d = defender's modified defense rating
% = a/(a+d)
To determine the result of an entire combat for two units with given hitpoints as well as modified attack/defense ratings is a hellishly complicated thing to do.
Just to give you a glimpse of how I set up my spreadsheet, here's the fomula for individual cells (each cell representing the chance that a certain number of hits will be scored by the attacker in a given number of rounds):
c = % chance of attacker winning a single round
r = maximum # of possible rounds for this combat
h = # of rounds won by attacker (of maximum # of rounds)
k = appropriate number from Pascal's triangle
% = [(c)^(h)]*[(1-c)^(r-h)]*k
------------
To give you an example... I'll use the combat we were debating about during the turnchat earlier today...
An Elite (5/5) Apolytonian Pikeman (1/3/1) attacks a Regular (3/3) Persian Archer (2/1/1) on a jungle tile. The jungle tile gives the Persian Archer a 25% bonus to defense, so its modified defense rating is 1.25, where the Apolytonian Pikeman's modified attack rating is 1, the same as its base attack rating.
a = 1
d = 1.25
c = a/(a+d) = .4444 (rounding)
c = .4444
The value of r is defender's hp + attacker's hp - 1
so r = (3)+(5)-1 = 7
r = 7
The values for h and k are determined case-by-case as we determine the chance for a specific number of attacker wins (h) -vs- the total number of possible rounds (r).
In this case, we have 8 different cases to examine, one each for values of h from 0 through 7. Now, It is not possible for the attacker to even *make* anything more than 3 hits, but for purposes of determining the probability of a "win" for the attacker, 3+ hits are a "win" since the extra "hits" simply represent that the combat might have ended more quickly than maximum possible 7 rounds.
Here's the calculation for each individual case:
c = % chance of attacker winning a single round
r = maximum # of possible rounds for this combat
h = # of rounds won by attacker (of maximum # of rounds)
k = appropriate number from Pascal's triangle
% = [(c)^(h)]*[(1-c)^(r-h)]*k
****0/7 attacker wins (defender victory)****
k = 1
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*1
% = 1.63%
****1/7 attacker wins (defender victory)****
k = 7
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*7
% = 9.15%
****2/7 attacker wins (defender victory)****
k = 21
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*21
% = 21.96%
****3/7 attacker wins (attacker victory)****
k = 35
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*35
% = 29.27%
****4/7 attacker wins (attacker victory)****
k = 35
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*35
% = 23.41%
****5/7 attacker wins (attacker victory)****
k = 21
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*21
% = 11.24%
****6/7 attacker wins (attacker victory)****
k = 7
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*7
% = 3.00%
****7/7 attacker wins (attacker victory)****
k = 1
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*1
% = 0.34%
Now, adding up the cases of defender victory and attacker victory seperately:
attacker victory: 67.26%
defender victory: 32.74%
----------------------------------
Now, the good news is that you don't have to do all that math on your own . The civulator that someone on CivFanatics created actually does these calculations for you (though in a different way than I have) and just spits out the results of each of those cases (you still have to tally the cases of attacker victory -vs- defender victory yourself). My spreadsheet is much the same, but it's significantly less user friendly (I designed it for my own use...).
The reason why Shriber's calculations didn't work was that his system for determining the victor of a full combat was too simple (he multiplied the modified attack rating by the attacker's hp and the modified defense rating by the defender's hp). The reality is that the multiple rounds of combat caused by having multiple hitpoints make the situation many times more complex.
I strongly suggest that at least one person who will be around for turnchats go take a visit to CivFanatics or somewhere else to pick up a copy of the Civulator spreadsheet (I think OPD apparently already has one). Conversely, if I'm around, I'll just use my spreadsheet (I like mine better, though it spits out the exact same results :-) ).
That's all for now. Sorry for the obsessively long post with all the mathy stuff...
It turns out the the civulator created by a guy on CivFanatics (which I tested against my model) works exactly the same way and spits out the same result. By contrast, the equation Shriber was using is *not* accurate.
The reality is that you have to use either Pascal's triangle as a data set for a series of fairly complex calculations (my formula for each cell in the spreadsheet is below) or you have to use a series of factorials and other stuff like that (which is what the "Civulator" uses), essentially the same calculation.
First of all, the chance of the attacker winning any individual round of combat is the same as Civ1:
a = attacker's modified attack rating
d = defender's modified defense rating
% = a/(a+d)
To determine the result of an entire combat for two units with given hitpoints as well as modified attack/defense ratings is a hellishly complicated thing to do.
Just to give you a glimpse of how I set up my spreadsheet, here's the fomula for individual cells (each cell representing the chance that a certain number of hits will be scored by the attacker in a given number of rounds):
c = % chance of attacker winning a single round
r = maximum # of possible rounds for this combat
h = # of rounds won by attacker (of maximum # of rounds)
k = appropriate number from Pascal's triangle
% = [(c)^(h)]*[(1-c)^(r-h)]*k
------------
To give you an example... I'll use the combat we were debating about during the turnchat earlier today...
An Elite (5/5) Apolytonian Pikeman (1/3/1) attacks a Regular (3/3) Persian Archer (2/1/1) on a jungle tile. The jungle tile gives the Persian Archer a 25% bonus to defense, so its modified defense rating is 1.25, where the Apolytonian Pikeman's modified attack rating is 1, the same as its base attack rating.
a = 1
d = 1.25
c = a/(a+d) = .4444 (rounding)
c = .4444
The value of r is defender's hp + attacker's hp - 1
so r = (3)+(5)-1 = 7
r = 7
The values for h and k are determined case-by-case as we determine the chance for a specific number of attacker wins (h) -vs- the total number of possible rounds (r).
In this case, we have 8 different cases to examine, one each for values of h from 0 through 7. Now, It is not possible for the attacker to even *make* anything more than 3 hits, but for purposes of determining the probability of a "win" for the attacker, 3+ hits are a "win" since the extra "hits" simply represent that the combat might have ended more quickly than maximum possible 7 rounds.
Here's the calculation for each individual case:
c = % chance of attacker winning a single round
r = maximum # of possible rounds for this combat
h = # of rounds won by attacker (of maximum # of rounds)
k = appropriate number from Pascal's triangle
% = [(c)^(h)]*[(1-c)^(r-h)]*k
****0/7 attacker wins (defender victory)****
k = 1
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*1
% = 1.63%
****1/7 attacker wins (defender victory)****
k = 7
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*7
% = 9.15%
****2/7 attacker wins (defender victory)****
k = 21
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*21
% = 21.96%
****3/7 attacker wins (attacker victory)****
k = 35
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*35
% = 29.27%
****4/7 attacker wins (attacker victory)****
k = 35
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*35
% = 23.41%
****5/7 attacker wins (attacker victory)****
k = 21
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*21
% = 11.24%
****6/7 attacker wins (attacker victory)****
k = 7
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*7
% = 3.00%
****7/7 attacker wins (attacker victory)****
k = 1
% = [(.4444%)^(0)]*[(1-.4444)^(7-0)]*1
% = 0.34%
Now, adding up the cases of defender victory and attacker victory seperately:
attacker victory: 67.26%
defender victory: 32.74%
----------------------------------
Now, the good news is that you don't have to do all that math on your own . The civulator that someone on CivFanatics created actually does these calculations for you (though in a different way than I have) and just spits out the results of each of those cases (you still have to tally the cases of attacker victory -vs- defender victory yourself). My spreadsheet is much the same, but it's significantly less user friendly (I designed it for my own use...).
The reason why Shriber's calculations didn't work was that his system for determining the victor of a full combat was too simple (he multiplied the modified attack rating by the attacker's hp and the modified defense rating by the defender's hp). The reality is that the multiple rounds of combat caused by having multiple hitpoints make the situation many times more complex.
I strongly suggest that at least one person who will be around for turnchats go take a visit to CivFanatics or somewhere else to pick up a copy of the Civulator spreadsheet (I think OPD apparently already has one). Conversely, if I'm around, I'll just use my spreadsheet (I like mine better, though it spits out the exact same results :-) ).
That's all for now. Sorry for the obsessively long post with all the mathy stuff...
Comment