View Full Version : Battle odds revealed?!


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?

Smirk
Dec 14, 2005, 12:44 PM
Which one is calling all Americans dumb?

And oh yeah, only in a even battle will each combatant need to win 5 times, in all other difference in power battles each unit inflicts greater or less than 20% damage.

CivFloaterHun
Dec 14, 2005, 01:42 PM
I bet u didnt read it carefully, thats always the case when someone writes more than a hello it seems.

There is a citat from the mannual, thats why i say THE MANUAL AUTHORS THINK WHAT u wrote^^

Again who is the dumb Smirk?

Smirk
Dec 14, 2005, 09:11 PM
Well if you want to get right down to it, I choose you, PIKA-CHU!


While you may be a non-native english speaker the grammar is still so bad that its painful to read, and moreso to comprehend [1]. Also, to begin slinging insults at a drop of a hat shows me that you are definately pretty ignorant, while not necessarily just dumb.




Note 1: In addition your entire writing style is arrogant and purposely arcane. For instance, you can't be bothered to format a table properly, and then you leave it up to the reader to guess what one of your axis represent. Nice one, good communication skills for teh WIN!

CivFloaterHun
Dec 15, 2005, 06:24 AM
Man i understand you know, u are lightweight in IQ.

"For instance, you can't be bothered to format a table properly, and then you leave it up to the reader to guess what one of your axis represent."

1st There is no insert table command, you walked into my trap.

2nd If you cant understand this: "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..." Hint: The row is the defenders strength.

Im right with my first sentence.

ainwood
Dec 15, 2005, 12:10 PM
Stop the flaming - both of you.

A+ombomb
Dec 15, 2005, 01:28 PM
It is spelled "lose" and loses" and "loser" for future reference. For some reason the mispelling of that word really bothers me - perhaps because the mispelling is a word in and of itself.

The reason why your table misjudges the odds of victory is pretty simple. When one battle at even odds occurs, the successive 4 battles are no longer necessarily at equal odds anymore, thus the variables need to be interchanged for each round of the 5. I would figure out the total 5 round formula, but I really don't feel like it since playing civ4 seems more fun at the moment :) .

DaveMcW
Dec 15, 2005, 01:47 PM
If the odds are 2:1, the chance of attacker losing is not 14%. The chance is less than 1%.

See Arathorn's thread (http://forums.civfanatics.com/showthread.php?t=137615) for details.

CivFloaterHun
Dec 15, 2005, 02:14 PM
I made this aprox formula before i knew the exact battle odds formula in the game. It will badly overestimate loosing chance as the strength ratio for the attacker gets higher, cos than the probability of taking a route on the binomial tree where the odds for the attacker increases is high. It is best for "close combat situations". Btw, i didnt know even the damage formula, so no jump points and whatsoever. Yeah i didnt find theese important informations in the "sofisticated american" manual :mad: .

I dont have the time even to do it right, i have in mind a 10 hours long Monte Carlo (the program for it can be writen in 20 mins) though to have a nice 3D graph for average remained health after successfull attack, and there standard deviations (to know if the datas have any information).