CivFloaterHun
Dec 14, 2005, 02:37 AM
This article consist of 3 texts from another forum, 2 of them is mine.
Claudelu
"
Unit A vs. Unit B has a 2:1 chance to win a round of battle. If Unit A does win a round, 20 percent of the health of Unit B disappears. The computer does the RNG again... if unit A wins again, the computer takes another 20 percent off unit B... if B wins, 20 percent of the health of unit A is removed... and so on till 1 of the units has zero health.
So the Random Number Generator is spanned over many rounds of battle, not just one. This makes relatively small differences in odds very significant. A spearman will kill a chariot in much more than 66 percent of cases (8 v 4)... An archer will kill the non-defense-bonus warrior in much more than 60 percent of cases (3v2) because at least FIVE rounds are needed for a unit to kill the other! Of course the computer does it all automatically and fast, so you don't see the details of each round, but this is how it works and this is why odds of 5.0 v 4.3 are generally safe towards you. Of course, if I have a single archer in my city I wont attack a warrior in my land even if odds are good for me... Losing a city is much worse. If I had an axeman vs. a warrior, I'd most likely attack without fear. "
Thanx claudelu, never understood americans, they always write so dumm manuals as if users were monkeys.
!From civilisation official manual: ""Basically, if an attacker and defender have the same (modified)
!combat strength at the start of a battle, each has an equal
!chance of winning the combat. If one unit has double the
!strength of the other, it has a 2-1 chance of obtaining victory.
!And so on."
THAT IS SIMPLY NOT TRUE! LOL
What i understood is that to loose a battle a unit has to get 5 losses (before i read Arathorns article) before the other unit, as far as i think (would be logical) a wounded unit is the same as a not wounded with the same strength. So always a unit can only loose the 20% of its starting strength in a subround of the battle!?
Here is the aproximating formula for loosing a battle:
A little combinatory without the possibility of using its operators here. A bit messy with ASCII.
summa(n=0 to 4)[(n out of (4+n))*/(winning odd)^n/*/(loosing odd)^5/ ]
n is the number of winning against the enemy before 5 losses occure which means the death of the unit. Now in the combinatorial formula there is only 4 because i now calculate the chance of loosing, and in this case in the last round the unit always looses so no further cases.
In case of loosing a unit can maximal win 4 rounds so i sum from 0 to 4...
THis is an aprox formula cos odds do vary with the path taken on the binomial tree, and of course i dont got the formula from the devs only tried to figure it out from what claudelu said.
So in your example 5 vs 4,3
the result is 37% that you loose the battle. But here is what you waited for a table of loosing chances. The column is the strength of your attacker unit, the row u can guess...
hing 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50
0.50 0.50 0.86 0.95 0.98 0.99 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
1.00 0.14 0.50 0.73 0.86 0.92 0.95 0.97 0.98 0.99 0.99 0.99 1.00 1.00 1.00 1.00 1.00 1.00
1.50 0.05 0.27 0.50 0.67 0.78 0.86 0.90 0.93 0.95 0.96 0.97 0.98 0.99 0.99 0.99 0.99 0.99
2.00 0.02 0.14 0.33 0.50 0.63 0.73 0.80 0.86 0.89 0.92 0.94 0.95 0.96 0.97 0.98 0.98 0.98
2.50 0.01 0.08 0.22 0.37 0.50 0.61 0.70 0.76 0.82 0.86 0.89 0.91 0.93 0.94 0.95 0.96 0.97
3.00 0.00 0.05 0.14 0.27 0.39 0.50 0.59 0.67 0.73 0.78 0.82 0.86 0.88 0.90 0.92 0.93 0.94
3.50 0.00 0.03 0.10 0.20 0.30 0.41 0.50 0.58 0.65 0.71 0.76 0.80 0.83 0.86 0.88 0.90 0.91
4.00 0.00 0.02 0.07 0.14 0.24 0.33 0.42 0.50 0.57 0.63 0.69 0.73 0.77 0.80 0.83 0.86 0.87
4.50 0.00 0.01 0.05 0.11 0.18 0.27 0.35 0.43 0.50 0.56 0.62 0.67 0.71 0.75 0.78 0.81 0.83
5.00 0.00 0.01 0.04 0.08 0.14 0.22 0.29 0.37 0.44 0.50 0.56 0.61 0.66 0.70 0.73 0.76 0.79
5.50 0.00 0.01 0.03 0.06 0.11 0.18 0.24 0.31 0.38 0.44 0.50 0.55 0.60 0.64 0.68 0.72 0.75
6.00 0.00 0.00 0.02 0.05 0.09 0.14 0.20 0.27 0.33 0.39 0.45 0.50 0.55 0.59 0.63 0.67 0.70
6.50 0.00 0.00 0.01 0.04 0.07 0.12 0.17 0.23 0.29 0.34 0.40 0.45 0.50 0.55 0.59 0.63 0.66
7.00 0.00 0.00 0.01 0.03 0.06 0.10 0.14 0.20 0.25 0.30 0.36 0.41 0.45 0.50 0.54 0.58 0.62
7.50 0.00 0.00 0.01 0.02 0.05 0.08 0.12 0.17 0.22 0.27 0.32 0.37 0.41 0.46 0.50 0.54 0.58
8.00 0.00 0.00 0.01 0.02 0.04 0.07 0.10 0.14 0.19 0.24 0.28 0.33 0.37 0.42 0.46 0.50 0.54
8.50 0.00 0.00 0.01 0.02 0.03 0.06 0.09 0.13 0.17 0.21 0.25 0.30 0.34 0.38 0.42 0.46 0.50
9.00 0.00 0.00 0.00 0.01 0.03 0.05 0.08 0.11 0.14 0.18 0.22 0.27 0.31 0.35 0.39 0.43 0.46
9.50 0.00 0.00 0.00 0.01 0.02 0.04 0.07 0.09 0.13 0.16 0.20 0.24 0.28 0.32 0.36 0.40 0.43
10.00 0.00 0.00 0.00 0.01 0.02 0.04 0.06 0.08 0.11 0.14 0.18 0.22 0.25 0.29 0.33 0.37 0.40
Sorry for bad table format, i dint do it with inser table command...
I tested with world builder the 8.8 praetorian vs 8 axeman, with 50 units, 16 cases were death for praet, seems my formula overestimates that by 10 percentage points.
/Anyway i would be happy if somebody could give all the important combat exact formulas of the game, eg healing, collateral damage, promotion health up. I may made a site with colorfull 3d graphs with them. At RON i made scouting efficiency calculations with derivative calculus, whereas came out the archer as the winner in (explored territory per second)/cost ratio./
Omg, i didnt read Arathorns thread before, all is more punctuatelly written there. Only thing is that i hate Monte Carlo simulation methods, cos for any complex problem in life they are too slow. I WANT CLOSED FORMULAS, its seems that a closed formula for winning chances would be 10X longer than i wrote up above... Atm i dont want to do that:) BTW, i bet civ4 engine uses simulation too for a solution of a battle, maybe the closed formula would be as slow as the simulation. Anyone has a clue?
Claudelu
"
Unit A vs. Unit B has a 2:1 chance to win a round of battle. If Unit A does win a round, 20 percent of the health of Unit B disappears. The computer does the RNG again... if unit A wins again, the computer takes another 20 percent off unit B... if B wins, 20 percent of the health of unit A is removed... and so on till 1 of the units has zero health.
So the Random Number Generator is spanned over many rounds of battle, not just one. This makes relatively small differences in odds very significant. A spearman will kill a chariot in much more than 66 percent of cases (8 v 4)... An archer will kill the non-defense-bonus warrior in much more than 60 percent of cases (3v2) because at least FIVE rounds are needed for a unit to kill the other! Of course the computer does it all automatically and fast, so you don't see the details of each round, but this is how it works and this is why odds of 5.0 v 4.3 are generally safe towards you. Of course, if I have a single archer in my city I wont attack a warrior in my land even if odds are good for me... Losing a city is much worse. If I had an axeman vs. a warrior, I'd most likely attack without fear. "
Thanx claudelu, never understood americans, they always write so dumm manuals as if users were monkeys.
!From civilisation official manual: ""Basically, if an attacker and defender have the same (modified)
!combat strength at the start of a battle, each has an equal
!chance of winning the combat. If one unit has double the
!strength of the other, it has a 2-1 chance of obtaining victory.
!And so on."
THAT IS SIMPLY NOT TRUE! LOL
What i understood is that to loose a battle a unit has to get 5 losses (before i read Arathorns article) before the other unit, as far as i think (would be logical) a wounded unit is the same as a not wounded with the same strength. So always a unit can only loose the 20% of its starting strength in a subround of the battle!?
Here is the aproximating formula for loosing a battle:
A little combinatory without the possibility of using its operators here. A bit messy with ASCII.
summa(n=0 to 4)[(n out of (4+n))*/(winning odd)^n/*/(loosing odd)^5/ ]
n is the number of winning against the enemy before 5 losses occure which means the death of the unit. Now in the combinatorial formula there is only 4 because i now calculate the chance of loosing, and in this case in the last round the unit always looses so no further cases.
In case of loosing a unit can maximal win 4 rounds so i sum from 0 to 4...
THis is an aprox formula cos odds do vary with the path taken on the binomial tree, and of course i dont got the formula from the devs only tried to figure it out from what claudelu said.
So in your example 5 vs 4,3
the result is 37% that you loose the battle. But here is what you waited for a table of loosing chances. The column is the strength of your attacker unit, the row u can guess...
hing 0.50 1.00 1.50 2.00 2.50 3.00 3.50 4.00 4.50 5.00 5.50 6.00 6.50 7.00 7.50 8.00 8.50
0.50 0.50 0.86 0.95 0.98 0.99 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00 1.00
1.00 0.14 0.50 0.73 0.86 0.92 0.95 0.97 0.98 0.99 0.99 0.99 1.00 1.00 1.00 1.00 1.00 1.00
1.50 0.05 0.27 0.50 0.67 0.78 0.86 0.90 0.93 0.95 0.96 0.97 0.98 0.99 0.99 0.99 0.99 0.99
2.00 0.02 0.14 0.33 0.50 0.63 0.73 0.80 0.86 0.89 0.92 0.94 0.95 0.96 0.97 0.98 0.98 0.98
2.50 0.01 0.08 0.22 0.37 0.50 0.61 0.70 0.76 0.82 0.86 0.89 0.91 0.93 0.94 0.95 0.96 0.97
3.00 0.00 0.05 0.14 0.27 0.39 0.50 0.59 0.67 0.73 0.78 0.82 0.86 0.88 0.90 0.92 0.93 0.94
3.50 0.00 0.03 0.10 0.20 0.30 0.41 0.50 0.58 0.65 0.71 0.76 0.80 0.83 0.86 0.88 0.90 0.91
4.00 0.00 0.02 0.07 0.14 0.24 0.33 0.42 0.50 0.57 0.63 0.69 0.73 0.77 0.80 0.83 0.86 0.87
4.50 0.00 0.01 0.05 0.11 0.18 0.27 0.35 0.43 0.50 0.56 0.62 0.67 0.71 0.75 0.78 0.81 0.83
5.00 0.00 0.01 0.04 0.08 0.14 0.22 0.29 0.37 0.44 0.50 0.56 0.61 0.66 0.70 0.73 0.76 0.79
5.50 0.00 0.01 0.03 0.06 0.11 0.18 0.24 0.31 0.38 0.44 0.50 0.55 0.60 0.64 0.68 0.72 0.75
6.00 0.00 0.00 0.02 0.05 0.09 0.14 0.20 0.27 0.33 0.39 0.45 0.50 0.55 0.59 0.63 0.67 0.70
6.50 0.00 0.00 0.01 0.04 0.07 0.12 0.17 0.23 0.29 0.34 0.40 0.45 0.50 0.55 0.59 0.63 0.66
7.00 0.00 0.00 0.01 0.03 0.06 0.10 0.14 0.20 0.25 0.30 0.36 0.41 0.45 0.50 0.54 0.58 0.62
7.50 0.00 0.00 0.01 0.02 0.05 0.08 0.12 0.17 0.22 0.27 0.32 0.37 0.41 0.46 0.50 0.54 0.58
8.00 0.00 0.00 0.01 0.02 0.04 0.07 0.10 0.14 0.19 0.24 0.28 0.33 0.37 0.42 0.46 0.50 0.54
8.50 0.00 0.00 0.01 0.02 0.03 0.06 0.09 0.13 0.17 0.21 0.25 0.30 0.34 0.38 0.42 0.46 0.50
9.00 0.00 0.00 0.00 0.01 0.03 0.05 0.08 0.11 0.14 0.18 0.22 0.27 0.31 0.35 0.39 0.43 0.46
9.50 0.00 0.00 0.00 0.01 0.02 0.04 0.07 0.09 0.13 0.16 0.20 0.24 0.28 0.32 0.36 0.40 0.43
10.00 0.00 0.00 0.00 0.01 0.02 0.04 0.06 0.08 0.11 0.14 0.18 0.22 0.25 0.29 0.33 0.37 0.40
Sorry for bad table format, i dint do it with inser table command...
I tested with world builder the 8.8 praetorian vs 8 axeman, with 50 units, 16 cases were death for praet, seems my formula overestimates that by 10 percentage points.
/Anyway i would be happy if somebody could give all the important combat exact formulas of the game, eg healing, collateral damage, promotion health up. I may made a site with colorfull 3d graphs with them. At RON i made scouting efficiency calculations with derivative calculus, whereas came out the archer as the winner in (explored territory per second)/cost ratio./
Omg, i didnt read Arathorns thread before, all is more punctuatelly written there. Only thing is that i hate Monte Carlo simulation methods, cos for any complex problem in life they are too slow. I WANT CLOSED FORMULAS, its seems that a closed formula for winning chances would be 10X longer than i wrote up above... Atm i dont want to do that:) BTW, i bet civ4 engine uses simulation too for a solution of a battle, maybe the closed formula would be as slow as the simulation. Anyone has a clue?