Since I've never seen a post out there like this, here it is...forgive me if somebody else has done this too - I couldn't find it.
Everyone knows (if you've read the manual) how basic combat is computed on a round to round basis. But what is the OVERALL propability of winning the entire battle (10+ rounds)??!! Not only that, but how much damage can you expect to see if winning? We need to do a little math.
Let a = attack factor, d = defense factor
Then the propability of wining 1 round of combat is :
a/(a+d). Example Elephant vs. Warrior (no modifiers) has a 4/5 or 80%
chance of winning 1 round. When winning a round, fire-power units are subtracted from 10 * hit-points of the unit. Combat ends when the hit points of 1 unit reach 0. All combat with early units are between 1hp/1fp units, and so combat will last 10-19 rounds. That's what I focus on here. (ie. only phalanx,warrior,archer,legion,elephant,crusader,kn ight,chariot,caravel,catapult,horsemen,pikeman,tri eme; NOT armor,battleship,etc..)
Let p = chance of winning 1 round = a/(a+d)
Let q = chance of loosing 1 round = 1-p = d/(a+d)
P(x) = propability of win with x damage done
P(0) = p^10
P(1) = 10 * p^10 * q
P(2) = 55 * p^10 * q^2
P(3) = 220 * p^10 * q^3
P(4) = 715 * p^10 * q^4
P(5) = 2002 * p^10 * q^5
P(6) = 5005 * p^10 * q^6
P(7) = 11440 * p^10 * q^7
P(8) = 24310 * p^10 * q^8
P(9) = 48620 * p^10 * q^9
-----------------------
P(win) = sum of P(x) from 0..9 =
p^10 * (1+ 10*q + 55*q^2 + 220*q^3 + 715*q^4 + 2002*q^5 + 5005*q^6 + 11440*q^7 + 24310*q^8 + 48620*q^9)
Sanity check: when p=q=0.5, then P(win) should equal .5 exactly -
well p^10 = 1/1024, and the other terms add up to 512 exactly!!
so we do indeed get 1/2 - not obvious from the formula!
How were the probabilities found? The constants represent the number of ways you can distribute the wins and losses. I counted them by hand!
Just kiding. There is a natural way of counting them if you break up the rounds by the number of ways the first 10 rounds look and how the tail rounds are constrained to look.
Let (x y) = x choose y - the number of ways of picking out y positions from x posibilities.
Clearly there is only 1 way of winning a 10 round combat with no damage: win every round, so the constant = 1
for an 11 round combat, the loss can be anywhere within the first 10 rounds, or (10 1) = 10
12 rounds: (10 1) + (10 2)
13: (10 1) + 2*(10 2) + (10 3)
14: (10 1) + 3*(10 2) + 3*(10 3) + (10 4)
15: (10 1) + 4(10 2) + 6(10 3) + 4(10 4) + (10 5)
16: (10 1)+5(10 2)+10(10 3)+10(10 4)+5(10 5)+1(10 6)
17: (10 1)+6(10 2)+15(10 3)+20(10 4)+15(10 5)+6(10 6)+(10 7)
18: (10 1)+7(10 2)+21(10 3)+35(10 4)+35(10 5)+21(10 6)+7(10 7)+(10 8)
19: (10 1)+8(10 2)+28(10 3)+56(10 4)+70(10 5)+56(10 6)+28(10 7)
+8(10 8)+(10 9)
Probability of a win in 10+ round combat (1fp/1hp vs 1fp/1hp units)
-----------------------------------------------------------------------
def/att_1____2____3____4____5____6____7____8____9____1 0
1_____0.500 0.935 0.991 0.998 1.000 1.000 1.000 1.000 1.000 1.000
2_____0.065 0.500 0.814 0.935 0.977 0.991 0.996 0.998 0.999 1.000
3_____0.009 0.186 0.500 0.737 0.869 0.935 0.967 0.983 0.991 0.995
4_____0.002 0.065 0.263 0.500 0.689 0.814 0.890 0.935 0.961 0.977
5_____0.000 0.023 0.131 0.311 0.500 0.656 0.771 0.849 0.901 0.935
6_____0.000 0.009 0.065 0.186 0.344 0.500 0.633 0.737 0.814 0.869
7_____0.000 0.004 0.033 0.110 0.229 0.367 0.500 0.616 0.710 0.784
8_____0.000 0.002 0.017 0.065 0.151 0.263 0.384 0.500 0.603 0.689
9_____0.000 0.001 0.009 0.039 0.099 0.186 0.290 0.397 0.500 0.592
10____0.000 0.000 0.005 0.023 0.065 0.131 0.216 0.311 0.408 0.500
11____0.000 0.000 0.003 0.014 0.043 0.092 0.160 0.241 0.329 0.417
12____0.000 0.000 0.002 0.009 0.028 0.065 0.118 0.186 0.263 0.344
13____0.000 0.000 0.001 0.006 0.019 0.046 0.087 0.143 0.209 0.281
14____0.000 0.000 0.001 0.004 0.013 0.033 0.065 0.110 0.166 0.229
15____0.000 0.000 0.000 0.002 0.009 0.023 0.048 0.084 0.131 0.186
16____0.000 0.000 0.000 0.002 0.006 0.017 0.036 0.065 0.103 0.151
17____0.000 0.000 0.000 0.001 0.004 0.012 0.027 0.050 0.082 0.122
18____0.000 0.000 0.000 0.001 0.003 0.009 0.020 0.039 0.065 0.099
19____0.000 0.000 0.000 0.001 0.002 0.007 0.015 0.030 0.051 0.080
20____0.000 0.000 0.000 0.000 0.002 0.005 0.012 0.023 0.041 0.065
------------------------------------------------------------------------
Expected damage after successful win (out of 10):
------------------------------------------------------------------------
def/att_1____2____3____4____5____6____7____8____9____1 0
1_____6.476 4.565 3.267 2.487 1.997 1.666 1.428 1.250 1.111 1.000
2_____7.433 6.476 5.467 4.565 3.834 3.267 2.829 2.487 2.216 1.997
3_____7.711 7.131 6.476 5.798 5.149 4.565 4.058 3.628 3.267 2.963
4_____7.839 7.433 6.973 6.476 5.967 5.467 4.996 4.565 4.177 3.834
5_____7.913 7.603 7.255 6.876 6.476 6.068 5.664 5.275 4.907 4.565
6_____7.961 7.711 7.433 7.131 6.810 6.476 6.136 5.798 5.467 5.149
7_____7.994 7.785 7.556 7.307 7.041 6.763 6.476 6.185 5.894 5.608
8_____8.019 7.839 7.644 7.433 7.209 6.973 6.728 6.476 6.221 5.967
9_____8.038 7.881 7.711 7.529 7.335 7.131 6.919 6.700 6.476 6.250
10____8.053 7.913 7.763 7.603 7.433 7.255 7.069 6.876 6.678 6.476
11____8.065 7.939 7.805 7.662 7.512 7.353 7.188 7.017 6.840 6.659
12____8.075 7.961 7.839 7.711 7.576 7.433 7.285 7.131 6.973 6.810
13____8.083 7.979 7.868 7.751 7.628 7.500 7.366 7.227 7.083 6.936
14____8.091 7.994 7.892 7.785 7.673 7.556 7.433 7.307 7.176 7.041
15____8.097 8.007 7.913 7.814 7.711 7.603 7.491 7.375 7.255 7.131
16____8.102 8.019 7.931 7.839 7.744 7.644 7.541 7.433 7.323 7.209
17____8.107 8.029 7.947 7.861 7.772 7.680 7.584 7.484 7.382 7.276
18____8.111 8.038 7.961 7.881 7.797 7.711 7.621 7.529 7.433 7.335
19____8.115 8.046 7.973 7.898 7.820 7.739 7.655 7.568 7.479 7.387
20____8.119 8.053 7.984 7.913 7.839 7.763 7.684 7.603 7.519 7.433
Expected damage (given a successful win) was calculated by:
sum(P(i)*i)/sum(P(i))
The way to view the charts: a crusader (5) will beat a phalanx behind city walls (6) only 34.4% of the time! 65.6% of the time the phalanx will win, but will sustain an average of 6 units of damage though (look at the next chart with att/def switched). Another crusader should be able to come along and finish him off (so it might be a good policy to destroy those city walls with 2/3 diplomats first if a crusader loss or 2 is unacceptable!)
Modifiers question::::
Does anyone know how a 50% modifier is done with an original attack factor an odd number (or an odd def factor). In other words is a veteran warrior considered to have 1, 1.5, or 2 defence/attack?
A vet crusader has 7,7.5,or 8 attack? I tried setting up a scenario where I compared how easy killing a warrior with a warrior was on different terrain: grassland, forest, hills. grassland is clearly df=1.
hills are clearly df=2; I wasn't able to get a statistically significant picture if forest was 1, 1.5 or 2... Maybe somebody else out there has done the research??? I'm dying to know!
Some of the defense factors in the above tables are fictitious; 5 I think is an unreachable factor for instance.
Everyone knows (if you've read the manual) how basic combat is computed on a round to round basis. But what is the OVERALL propability of winning the entire battle (10+ rounds)??!! Not only that, but how much damage can you expect to see if winning? We need to do a little math.
Let a = attack factor, d = defense factor
Then the propability of wining 1 round of combat is :
a/(a+d). Example Elephant vs. Warrior (no modifiers) has a 4/5 or 80%
chance of winning 1 round. When winning a round, fire-power units are subtracted from 10 * hit-points of the unit. Combat ends when the hit points of 1 unit reach 0. All combat with early units are between 1hp/1fp units, and so combat will last 10-19 rounds. That's what I focus on here. (ie. only phalanx,warrior,archer,legion,elephant,crusader,kn ight,chariot,caravel,catapult,horsemen,pikeman,tri eme; NOT armor,battleship,etc..)
Let p = chance of winning 1 round = a/(a+d)
Let q = chance of loosing 1 round = 1-p = d/(a+d)
P(x) = propability of win with x damage done
P(0) = p^10
P(1) = 10 * p^10 * q
P(2) = 55 * p^10 * q^2
P(3) = 220 * p^10 * q^3
P(4) = 715 * p^10 * q^4
P(5) = 2002 * p^10 * q^5
P(6) = 5005 * p^10 * q^6
P(7) = 11440 * p^10 * q^7
P(8) = 24310 * p^10 * q^8
P(9) = 48620 * p^10 * q^9
-----------------------
P(win) = sum of P(x) from 0..9 =
p^10 * (1+ 10*q + 55*q^2 + 220*q^3 + 715*q^4 + 2002*q^5 + 5005*q^6 + 11440*q^7 + 24310*q^8 + 48620*q^9)
Sanity check: when p=q=0.5, then P(win) should equal .5 exactly -
well p^10 = 1/1024, and the other terms add up to 512 exactly!!
so we do indeed get 1/2 - not obvious from the formula!
How were the probabilities found? The constants represent the number of ways you can distribute the wins and losses. I counted them by hand!
Just kiding. There is a natural way of counting them if you break up the rounds by the number of ways the first 10 rounds look and how the tail rounds are constrained to look.
Let (x y) = x choose y - the number of ways of picking out y positions from x posibilities.
Clearly there is only 1 way of winning a 10 round combat with no damage: win every round, so the constant = 1
for an 11 round combat, the loss can be anywhere within the first 10 rounds, or (10 1) = 10
12 rounds: (10 1) + (10 2)
13: (10 1) + 2*(10 2) + (10 3)
14: (10 1) + 3*(10 2) + 3*(10 3) + (10 4)
15: (10 1) + 4(10 2) + 6(10 3) + 4(10 4) + (10 5)
16: (10 1)+5(10 2)+10(10 3)+10(10 4)+5(10 5)+1(10 6)
17: (10 1)+6(10 2)+15(10 3)+20(10 4)+15(10 5)+6(10 6)+(10 7)
18: (10 1)+7(10 2)+21(10 3)+35(10 4)+35(10 5)+21(10 6)+7(10 7)+(10 8)
19: (10 1)+8(10 2)+28(10 3)+56(10 4)+70(10 5)+56(10 6)+28(10 7)
+8(10 8)+(10 9)
Probability of a win in 10+ round combat (1fp/1hp vs 1fp/1hp units)
-----------------------------------------------------------------------
def/att_1____2____3____4____5____6____7____8____9____1 0
1_____0.500 0.935 0.991 0.998 1.000 1.000 1.000 1.000 1.000 1.000
2_____0.065 0.500 0.814 0.935 0.977 0.991 0.996 0.998 0.999 1.000
3_____0.009 0.186 0.500 0.737 0.869 0.935 0.967 0.983 0.991 0.995
4_____0.002 0.065 0.263 0.500 0.689 0.814 0.890 0.935 0.961 0.977
5_____0.000 0.023 0.131 0.311 0.500 0.656 0.771 0.849 0.901 0.935
6_____0.000 0.009 0.065 0.186 0.344 0.500 0.633 0.737 0.814 0.869
7_____0.000 0.004 0.033 0.110 0.229 0.367 0.500 0.616 0.710 0.784
8_____0.000 0.002 0.017 0.065 0.151 0.263 0.384 0.500 0.603 0.689
9_____0.000 0.001 0.009 0.039 0.099 0.186 0.290 0.397 0.500 0.592
10____0.000 0.000 0.005 0.023 0.065 0.131 0.216 0.311 0.408 0.500
11____0.000 0.000 0.003 0.014 0.043 0.092 0.160 0.241 0.329 0.417
12____0.000 0.000 0.002 0.009 0.028 0.065 0.118 0.186 0.263 0.344
13____0.000 0.000 0.001 0.006 0.019 0.046 0.087 0.143 0.209 0.281
14____0.000 0.000 0.001 0.004 0.013 0.033 0.065 0.110 0.166 0.229
15____0.000 0.000 0.000 0.002 0.009 0.023 0.048 0.084 0.131 0.186
16____0.000 0.000 0.000 0.002 0.006 0.017 0.036 0.065 0.103 0.151
17____0.000 0.000 0.000 0.001 0.004 0.012 0.027 0.050 0.082 0.122
18____0.000 0.000 0.000 0.001 0.003 0.009 0.020 0.039 0.065 0.099
19____0.000 0.000 0.000 0.001 0.002 0.007 0.015 0.030 0.051 0.080
20____0.000 0.000 0.000 0.000 0.002 0.005 0.012 0.023 0.041 0.065
------------------------------------------------------------------------
Expected damage after successful win (out of 10):
------------------------------------------------------------------------
def/att_1____2____3____4____5____6____7____8____9____1 0
1_____6.476 4.565 3.267 2.487 1.997 1.666 1.428 1.250 1.111 1.000
2_____7.433 6.476 5.467 4.565 3.834 3.267 2.829 2.487 2.216 1.997
3_____7.711 7.131 6.476 5.798 5.149 4.565 4.058 3.628 3.267 2.963
4_____7.839 7.433 6.973 6.476 5.967 5.467 4.996 4.565 4.177 3.834
5_____7.913 7.603 7.255 6.876 6.476 6.068 5.664 5.275 4.907 4.565
6_____7.961 7.711 7.433 7.131 6.810 6.476 6.136 5.798 5.467 5.149
7_____7.994 7.785 7.556 7.307 7.041 6.763 6.476 6.185 5.894 5.608
8_____8.019 7.839 7.644 7.433 7.209 6.973 6.728 6.476 6.221 5.967
9_____8.038 7.881 7.711 7.529 7.335 7.131 6.919 6.700 6.476 6.250
10____8.053 7.913 7.763 7.603 7.433 7.255 7.069 6.876 6.678 6.476
11____8.065 7.939 7.805 7.662 7.512 7.353 7.188 7.017 6.840 6.659
12____8.075 7.961 7.839 7.711 7.576 7.433 7.285 7.131 6.973 6.810
13____8.083 7.979 7.868 7.751 7.628 7.500 7.366 7.227 7.083 6.936
14____8.091 7.994 7.892 7.785 7.673 7.556 7.433 7.307 7.176 7.041
15____8.097 8.007 7.913 7.814 7.711 7.603 7.491 7.375 7.255 7.131
16____8.102 8.019 7.931 7.839 7.744 7.644 7.541 7.433 7.323 7.209
17____8.107 8.029 7.947 7.861 7.772 7.680 7.584 7.484 7.382 7.276
18____8.111 8.038 7.961 7.881 7.797 7.711 7.621 7.529 7.433 7.335
19____8.115 8.046 7.973 7.898 7.820 7.739 7.655 7.568 7.479 7.387
20____8.119 8.053 7.984 7.913 7.839 7.763 7.684 7.603 7.519 7.433
Expected damage (given a successful win) was calculated by:
sum(P(i)*i)/sum(P(i))
The way to view the charts: a crusader (5) will beat a phalanx behind city walls (6) only 34.4% of the time! 65.6% of the time the phalanx will win, but will sustain an average of 6 units of damage though (look at the next chart with att/def switched). Another crusader should be able to come along and finish him off (so it might be a good policy to destroy those city walls with 2/3 diplomats first if a crusader loss or 2 is unacceptable!)
Modifiers question::::
Does anyone know how a 50% modifier is done with an original attack factor an odd number (or an odd def factor). In other words is a veteran warrior considered to have 1, 1.5, or 2 defence/attack?
A vet crusader has 7,7.5,or 8 attack? I tried setting up a scenario where I compared how easy killing a warrior with a warrior was on different terrain: grassland, forest, hills. grassland is clearly df=1.
hills are clearly df=2; I wasn't able to get a statistically significant picture if forest was 1, 1.5 or 2... Maybe somebody else out there has done the research??? I'm dying to know!
Some of the defense factors in the above tables are fictitious; 5 I think is an unreachable factor for instance.
Comment