unit win probobility

Gamemaster77

PC > Mac
Joined
Mar 8, 2009
Messages
998
Location
In a place.
Does anyone now the formula used to calculate the probability of a unit winning. Let's say the defender had 2 defence, and the attacker had 4 attack but the defender had a 50% defensive bonus.
 
Somebody's going to accuse me of cognitive bias, but I think the probability changes in the sequence of attacks.

Having played the game a lot, I notice that when I march a stack up to an AI city and attack (same units attacking, same units defending), the first couple units I get favorable results. After the first 2 or 3 rounds of attacking, suddenly they catch lightning in a bottle.

Happens to me all the time, so much that I expect it.
 
Does anyone now the formula used to calculate the probability of a unit winning. Let's say the defender had 2 defence, and the attacker had 4 attack but the defender had a 50% defensive bonus.

That would be a modified defense of 3 against an attack of 4. For 1 round of battle, which will take 1 HP off the loser, the odds are 3/7 (= roughly 43%) for the defender, and 4/7 (= roughly 57%) for the attacker.

If both units have 2 HP, the chance for the defender must be calculated using all possible sequences of rounds that gets 2 HP off the attacker while the defender remains alive, and take the sum of that:

win-win (defender wins 2 straight rounds): 3/7.3/7
lose-win-win: 4/7.3/7.3/7
win-lose-win: 3/7.4/7.3/7
sum = roughly 39%

For 3 HP we have:

win-win-win
lose-win-win-win
win-lose-win-win
win-win-lose-win
lose-lose-win-win-win
lose-win-lose-win-win
lose-win-win-lose-win
win-lose-lose-win-win
win-lose-win-lose-win
win-win-lose-lose-win
win-win-lose-win-lose
sum = I'm too lazy to calculate this, but it will be smaller than 39%.

When the number of hitpoints goes up, the chances of the weaker unit go down. Roughly, this is because the lower the hitpoints, lucky streaks are a larger part of the total amount of possibilities. Suppose you'd have to fight the world champion in boxing. Would your chances be better if you could both take 1 punch, or if you could both take 2 or more?
 
The de facto standard for quickly getting the odds as far as I know is this program. There's also an Excel spreadsheet to do combat calculation here. There also used to be an HTML one here, but it doesn't seem to be there anymore. I've used all except the Excel ones. Both worked well, although the standalone program has more detail.

If the formula itself is what you're looking for rather than the tools, then ThinkTank has you covered with his excellent post above.

And yeah, Sweetchuck, I'm afraid you're probably falling to cognitive bias...
 
thanks(why do we need at least 10 characters in our message)
 
Back
Top Bottom