To my knowledge no one has yet analyzed the probability of success when a unit attacks another.
The Civ2 manual tells us that when a unit with attack A attacks a unit withe defense D (assuming no fortification, vet status, and terrain bonus for simplicity) then the probability that the attacker wins a round is A/(A+D). Whichever side wins a round its firepower will be deducted from the loser's remaining strength which is 10*hitpoints for a healthy unit. Battle stops when one side loses all its strength.
Assuming the above is true, what is the probability that a given unit wins a battle against another? The answer is not simple and that is probably why it has not been analyzed yet.
This past weekend I analyzed this problem and I believe I have a solution. However, I would like fellow math enthusiasts in the forum (such as Peaster) to check my model.
For simplicity I am going to assume Firepower of 1 and hitpoint of 1. If my model is correct, we can enhance it for arbitrary firepower and hit points later.
The battle can last a maximum of 19 rounds. At the end of round 19 one of the sides must have been hit 10 times and be dead. I model the outcome of each round as A+D possible outcomes. So, in total, there are (A+D)^19 possible outcomes. Next I do a binomial expansion. The probability of the attacker winning is the sum of all those terms where the power of A is 10-19 over the total. That is:
(A^19 + 19*A^18*D + 19-choose-2 * A^17 * D^2 + ... + 19-choose-9 * A^10 * D^9
over
(A+D)^19
For example, if A=2 and D=1 (Horseman attacking a warrior) then the probability of a win is:
(2^19 + 19*2^18 + 19-choose-2 * 2^17 + ... + 19-choose-9 * 2^10) / (3^19)
The Civ2 manual tells us that when a unit with attack A attacks a unit withe defense D (assuming no fortification, vet status, and terrain bonus for simplicity) then the probability that the attacker wins a round is A/(A+D). Whichever side wins a round its firepower will be deducted from the loser's remaining strength which is 10*hitpoints for a healthy unit. Battle stops when one side loses all its strength.
Assuming the above is true, what is the probability that a given unit wins a battle against another? The answer is not simple and that is probably why it has not been analyzed yet.
This past weekend I analyzed this problem and I believe I have a solution. However, I would like fellow math enthusiasts in the forum (such as Peaster) to check my model.
For simplicity I am going to assume Firepower of 1 and hitpoint of 1. If my model is correct, we can enhance it for arbitrary firepower and hit points later.
The battle can last a maximum of 19 rounds. At the end of round 19 one of the sides must have been hit 10 times and be dead. I model the outcome of each round as A+D possible outcomes. So, in total, there are (A+D)^19 possible outcomes. Next I do a binomial expansion. The probability of the attacker winning is the sum of all those terms where the power of A is 10-19 over the total. That is:
(A^19 + 19*A^18*D + 19-choose-2 * A^17 * D^2 + ... + 19-choose-9 * A^10 * D^9
over
(A+D)^19
For example, if A=2 and D=1 (Horseman attacking a warrior) then the probability of a win is:
(2^19 + 19*2^18 + 19-choose-2 * 2^17 + ... + 19-choose-9 * 2^10) / (3^19)