Statistics Question: Best chance of kill?
Moderators: Forum Moderators, Developers
 irrevenant
 Moderator Emeritus
 Posts: 3692
 Joined: August 15th, 2005, 7:57 am
 Location: I'm all around you.
Statistics Question: Best chance of kill?
I've found myself in the following situation a couple of times last game and would like to know which approach offers best odds:
There's an opponent with 6hp left.
I can attack him with either a 61 (60%) attack or a 33 (60%) attack.
Which has the best chance of killing him?
There's an opponent with 6hp left.
I can attack him with either a 61 (60%) attack or a 33 (60%) attack.
Which has the best chance of killing him?
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance

 Posts: 161
 Joined: September 6th, 2005, 10:41 pm
 Location: Australia

 Posts: 1012
 Joined: February 11th, 2006, 1:04 am
 Location: Somewhere
OK, you win. I've been lurking for long enough and this statistical question has convinced me to register. Right, let's answer it:
The probability of a kill with a 61 (60%) attack is the probability of 1 successful hit out of 1, which is, needless to say, 60%.
The probability of a kill with a 33 (60%) attack is the probability of 2 or more successful hits out of three. This can be any one of the following:
Hit, hit, hit: Probability = 0.6 * 0.6 * 0.6 = 0.216
Hit, hit, miss: Probability = 0.6 * 0.6 * 0.4 = 0.144
Hit, miss, hit: Probability = 0.6 * 0.4 * 0.6 = 0.144
Miss, hit, hit: Probability = 0.4 * 0.6 * 0.6 = 0.144
Total = 0.216 + 0.144 + 0.144 + 0.144 = 0.648 = 64.8%
So a 33 attack has a better chance of a kill (unless the unit you are attacking might kill you before you finish attacking).
Doesn't Wesnoth calculate this for you though?
The probability of a kill with a 61 (60%) attack is the probability of 1 successful hit out of 1, which is, needless to say, 60%.
The probability of a kill with a 33 (60%) attack is the probability of 2 or more successful hits out of three. This can be any one of the following:
Hit, hit, hit: Probability = 0.6 * 0.6 * 0.6 = 0.216
Hit, hit, miss: Probability = 0.6 * 0.6 * 0.4 = 0.144
Hit, miss, hit: Probability = 0.6 * 0.4 * 0.6 = 0.144
Miss, hit, hit: Probability = 0.4 * 0.6 * 0.6 = 0.144
Total = 0.216 + 0.144 + 0.144 + 0.144 = 0.648 = 64.8%
So a 33 attack has a better chance of a kill (unless the unit you are attacking might kill you before you finish attacking).
Doesn't Wesnoth calculate this for you though?

 Posts: 53
 Joined: January 17th, 2006, 10:21 pm
 Location: a long time ago, in a galaxy far far away...
It does but it rounds to the nearest tens place I thinkDoesn't Wesnoth calculate this for you though?
NO FOG is certain  Elvish Pillager
Campaign: Revenge of the Elves http://www.wesnoth.org/forum/viewtopic.php?t=11477
Campaign: Revenge of the Elves http://www.wesnoth.org/forum/viewtopic.php?t=11477
 irrevenant
 Moderator Emeritus
 Posts: 3692
 Joined: August 15th, 2005, 7:57 am
 Location: I'm all around you.
I'm pretty sure the percentage displayed is the chance for each attack to hit not the chance to achieve a kill. Otherwise it would be at 0% an awful lot of the time.Liminiality2 wrote:It does but it rounds to the nearest tens place I thinkDoesn't Wesnoth calculate this for you though?
My math had come up with the same answer as Chris NS, but I didn't trust it so it's good to get it verified (thanks Chris!).
I hadn't thought about the issue of return damage, so it was helpful to have that mentioned too.
Thanks all!
Want to post a Wesnoth idea? Great! Read these:
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance
Frequently Posted Ideas Thread
Giving your idea the best chance of acceptance

 Posts: 161
 Joined: September 6th, 2005, 10:41 pm
 Location: Australia
Odds for the Chance to Kill and Chance to be Killed are actually available when attacking. The attack dialog does only display the chance to hit, however, currently within the Damage Calculation dialog (which is avaliable via the attack dialog) towards the bottom there are 3 numbers each separated with a "/". These numbers represent "Chance to Kill", "Chance to be Killed", and "chance that both units survive", respectively and are rounded to nearest 1%.
This is exceptionally useful ingame for quick estimations on optimising each attack. And as Soliton said, they will be replaced with quite nice looking hitpoint distribution graphs next release.
This is exceptionally useful ingame for quick estimations on optimising each attack. And as Soliton said, they will be replaced with quite nice looking hitpoint distribution graphs next release.