New combat calculator

How to beat those cowardly High Elves?

Moderators: Layne, The Dread Knights

User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

New combat calculator

Post by Daeron »

Greetings fellow generals,

While still under development, I thought I'd post my new combat calculator here:
http://warhammer.orderoftheathanor.eu/C ... lator.html

It still needs some tweaking in how it displays the results but I'll be taking feature requests henceforth.
I do plan on giving the calculator another iteration or two to improve it. In time, perhaps, we can even derive a sort of cheat sheet, but I think that's going to be a challenge (in how to condense all that information into a single, user friendly sheet).
Last edited by Daeron on Fri Oct 19, 2012 5:02 pm, edited 1 time in total.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Dyvim tvar
Lord of the Dragon Caves
Lord of the Dragon Caves
Posts: 8372
Joined: Wed Jan 01, 2003 6:34 pm
Location: The Dragon Caves of the Underway (Indianapolis IN)
Contact:

Post by Dyvim tvar »

Nice job. There seems to be a problem in the output in that you get two columns with identical headings "Chance to Kill at Least This" but with totally different results. I think the second columns is supposed to be "chance to kill this number or less".

Instead of a cheat sheet, I would love to have an iPhone app ...
Truly These are the End Times ...
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Well.. it's all Javascript. I don't know to what extent they support Javascript but if they do, then I could make a lightweight version that would work on a mobile phone without the graphical crap. BUT... I don't have any phone or pad with such functionality, making it hard for me to develop it for such devices. I'll have to search some mobile development environment (I think FF has some interesting things for that)

And you're right about the label. Fixed it!
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
Helle
Executioner
Posts: 168
Joined: Wed Mar 21, 2012 11:22 am

Post by Helle »

Well done. I dont like that the script shows so many decimal places though. No one needs to know that there will be killed 9.234671325 enemies on average. I would prefer 2-3 digits, that makes it easier to read.
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Updated to accomodate that.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Lord tsunami
Malekith's Best Friend
Posts: 1308
Joined: Sat Jun 28, 2003 9:49 pm
Location: Behind you!

Post by Lord tsunami »

very nice!

i have an excel sheet that does all this too and i checked the maths and it seems solid, at least as far as the average kills goes. however, i find it unlikely (i have no maths to back this up though) that the "chance for number of kills" is correct. i did an example with 100 attacks (4+ it, wound, armour and ward) and i got 99% chance to kill between 1 and 11 models. to me that feels like a bit too narrow span. as i said, i have no maths to back this, and you may be correct, but you may want to look it over :)
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Ahh.. well.. Let's do it manually then.
With 4+ to hit, wound, armor save and ward save, we have 6.25% for 1 attack to produce 1 unsaved wound.

The chance to fail to make any kills is: (100% - 6.25%) ^ 100 = 0.1574445529... %
This gives you 99.8425554...% to get at least 1 kill.

The chance on an outcome of 12 unsaved wounds is:
chance to make 12 unsaved wounds
times the chance to make 88 fails
timea the number of ways we achieve this
This is the Binomial distribution which I'm guessing you may know, but I'll explain it a bit for people interested in knowing where these numbers come from.

Example
Let's imagine we have 10 models making a single attack for this example, and we want to know the chance for 3 unsaved wounds. We have a 5x2 setup, and I use these icons:

!mad! for a failed attack
:mrgreen: for an unsaved wound.

Then we can imagine the first 3 models in the front rank (upper row) succeeding their attack:
:mrgreen: :mrgreen: :mrgreen: !mad! !mad!
!mad! !mad! !mad! !mad! !mad!

The chance for this is:
chance-to-succeed power 3
times chance-to-fail power 7

Or: 6.25% ^ 3 * 93.75% ^ 7 = 0.015539...%

That's fairly slim! But.. It's also possible that other models made those 3 wounds:
!mad! :mrgreen: !mad! !mad! !mad!
:mrgreen: !mad! !mad! :mrgreen: !mad!

And in fact, any sort of combination of 3 models succeeding and 7 models failing gives this outcome. The number of combinations is:
C (10,3) = 10! / (7! * 3!) = 120.

Our total chance of any combination making 3 unsaved wounds is:
120 * 0.015539...% = 1.8647...%

Once we know this, we simply add the odds of scoring 1 kill, 2 kills etc to know our odds of a certain interval.

Check

If we check this for 100 attacks and 12 unsaved wounds, then we get:
p_success ^ 12 * p_fail ^ 88 * C(100,12) = 1.275%
And we know that any more kills are less likely to happen. So I don't think it's unrealistic to think that one scores at most 11 unsaved wounds with 97% chance, on 100 attacks.


Here's a google doc doing that, but... Google docs didn't optimize the "combin" function so it fails after a while. It falls back on calling the combination "infinite" and messes up the calculation. I added a fixed column which only takes into account the valid numbers. My calculator did optimize that combination function to avoid exactly this problem :)
https://docs.google.com/spreadsheet/ccc ... W1hVUFnclE
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Lord tsunami
Malekith's Best Friend
Posts: 1308
Joined: Sat Jun 28, 2003 9:49 pm
Location: Behind you!

Post by Lord tsunami »

ok, great. i fold :D

you have obviously done your homework. i was just surprised that the span from 1-99% was so narrow, but the math checks out. :)
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

I did do my homework, but never the less I value a critical mind greatly, even more so if it makes me double check some results :)

This span from 1-99% is exactly the kind of research and results I'm aiming for with this calculator. It shows how reliable the performance of some units can be, and in particular Witch Elves seem to score low in reliability in most tests I've run. That doesn't stop them from being destructive in most outcomes though :)
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Omnichron
Malekith's Best Friend
Posts: 1378
Joined: Tue Oct 17, 2006 11:10 pm
Location: Norway

Post by Omnichron »

Daeron wrote:... and in particular Witch Elves seem to score low in reliability in most tests I've run. That doesn't stop them from being destructive in most outcomes though :)


How are they unreliable? Due to poison and reroll to hit, you are more likely to wound things than a lot of other dark elf units, and they strike almost always before anyone can strike them.

Nice calculator by the way :D
Personal quote: "It's better to do little damage and lose nothing than to do lots of damage and lose everything."
Final tournament score for 7th DE book in 8th edition - W/D/L: 25/5/10
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Well.. perhaps unreliable is the wrong word, but their performance can fluctuate a lot.

Let them fight a common spearman: 3+ to hit, poison, reroll, 4+ to wound, 5+ AS. We have a 7 wide formation, yielding 29 attacks against that unit. The average will point out 10.3 kills. But the calculator indicates anything between 6 to 16 kills to be quite a plausible outcome. That's very destructive... but if you're sending them against such a unit, it becomes very hard to guess how many turns they'll need to take it out. They could take half as long, or twice as long.

Compare that to, say, a group of executioners, who will probably score anything between 8 to 14. That's more reliable... At least in this situation.

Of course, dice will always offer some randomness and no calculator will save you from the ultimate bad roll of 1's. It just seems Witch Elves often come out with a lower score you can rely on, but a much higher killing potential. A bit more risk, a bit more gain.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Omnichron
Malekith's Best Friend
Posts: 1378
Joined: Tue Oct 17, 2006 11:10 pm
Location: Norway

Post by Omnichron »

Hmmm... how can the witch elves have more variations/randomness than the corsairs? They have less rolls to wound due to poison, which should mean they are more stable in my mind (About 33% more stable than corsairs).

Oh, and witch elves have 4+ to hit against spear elves, which is kinda neat as they will get more poison hits ;) (Less hits though).
Personal quote: "It's better to do little damage and lose nothing than to do lots of damage and lose everything."
Final tournament score for 7th DE book in 8th edition - W/D/L: 25/5/10
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

It's a sound logic and it's true that you weaken the factor of the dice. But mathematically, in this model anyhow, that isn't reflected at all.
I'll explain why this is so... But there's a TLDR version below. Also, we're reaching a slightly sketchy level here. This is something to keep in mind, but will rarely serve tactical choices (It's more useful for the game designer).

The long explanation

The mathematical term we need here is the "variance", which is calculated as follows:
variance = n * p * (1-p)

* n is the number of attacks
* p is the chance to kill.

We can plot this in a graphic, for different numbers of attacks (10, 20, 30) and different chance to score a kill.

Image

We see that:
- The more attacks you have, the bigger the variance will become (you have more potential outcomes). In fact, it increases dramatically with the number of attacks.
- The variance increases as your chance on a kill approaches 50%.

This second revelation is a little less intuitive at first, but follows sound logic:
- if your model has very little chance of scoring a kill, well, then it's reliably going to fail.
- if your model is making every attack a success, then it's reliably going to kick ass.
- Anything in the middle is subject to more randomness.. (In an even matchup in football, the outcome can swing either way).

Strength 3 attacks will rarely make a very killy character. Just imagine a 3+ to hit and 4+ to wound which yields 33% chance to wound per attack. Any armor, ward, higher toughness or higher weapon skill is going to weaken that chance. As your chance decreases, you go further away from the "50%" peak in variation and your unit becomes more reliable. Witch Elves, thanks to poison, crawl closer to that 50% and only pass it marginally in some situations. That is why they will usually have more variance than frenzied Corsairs.

If the Corsairs aren't frenzied, then the Corsairs are far less subject to variance because both their chance to kill is lower and their number of attacks.

Executioners swing the other way: against common infantry they have well over 50% kill chance per attack and become more reliable in killing power. They also have notably fewer attacks, which makes their variance lower. (Well, when you have only 10 attacks, it can go only from 0 to 10 attacks. If you have 30, it can go from 0 to 30.)

TL DR

Witch Elves are the most random, simply because their killing power per attack is right in the middle lane and they throw in an incredible number of attacks. This makes a lot of outcomes plausible.

Corsairs are "reliably" weaker, making fewer outcomes plausible. Without frenzy they have fewer attacks, further reducing the number plausible outcomes.

Executioners are very killy per attack and have a low number of attacks. This makes their performance less random, but not necessarily better.

It could be reasoned this is part of the value of a character:
- Few attacks (limited number of outcomes)
- Very high killing power per attack (making the attacks reliable)
So it adds reliable killing power to a unit, which is never something to be sneezed at.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Omnichron
Malekith's Best Friend
Posts: 1378
Joined: Tue Oct 17, 2006 11:10 pm
Location: Norway

Post by Omnichron »

I agree with the fact that the more attacks you have, the more variation there is. The same about how much strength you have, the higher it is the less variation it will be.

Corsairs (frenzied) and witch elves has the same amounts of attacks, however the poison is autowound, so that means less randomness of dices... which means less variation. That's why I wonder how the witch elves are more random than them, because all logic says otherwise.

If we take it even more extreme and say that all hits from witch elves would wound, wouldn't it mean a more stable outcome than corsairs?
Personal quote: "It's better to do little damage and lose nothing than to do lots of damage and lose everything."
Final tournament score for 7th DE book in 8th edition - W/D/L: 25/5/10
User avatar
Lorddrittz
Beastmaster
Posts: 302
Joined: Sun Sep 16, 2012 2:27 am
Location: Australia

Post by Lorddrittz »

The P value for Witch Elves vs. Corsairs would be slightly higher due to the poison Attacks of the Witch Elves (giving slightly more hits, therefore slightly more wounds, therefore slightly more kills than the Corsairs).

Admittedly the number of extra kills by the Witch Elves when compared to the Corsairs may be very low depending on what you are fighting against.

vs. T4 or higher the Witch Elves will start to pile up more kills than the Corsairs (due to poison).
Dark Elf Battles

Win/Draw/Loss
10 : 1 : 4 7th Ed Codex
User avatar
Lord tsunami
Malekith's Best Friend
Posts: 1308
Joined: Sat Jun 28, 2003 9:49 pm
Location: Behind you!

Post by Lord tsunami »

Omnichron wrote:Hmmm... how can the witch elves have more variations/randomness than the corsairs? They have less rolls to wound due to poison,


i think you actually answered your own question there. fewer dice rolled means MORE randomness, or at least more variance. if you roll a single die you have an equal chance of rolling 1 as you have of rolling 4. if you rolled 10 dice and added the results you would find that you have a very different probability of rolling 10 than of rolling 40. you will have a lot higher probability of rolling 40. poison on the WE has a similar effect, since it bypasses the to-wound-roll and thus lowers the total number of dice rolled. (ok, i know this is not strictly for the same reason, mathematically, but its a reasonable metaphor)
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Well.. it's all about where the "chance to kill per attack" lands and how many attacks you have. The closer your "chance to kill per attack" gets to 50%, the more random the outcome becomes. Compare it to this real mean bean machine:
Image

Beans tumble down, spread out over the entire device. By having a kill-score further away from 50%, it's like tilting the machine to the left or right. Your beans won't spread out so evenly, but all tumble to one side.

Having fewer attacks means you have a slimmer machine with fewer catch slots at the bottom. Ovbiously, those beans will be spread over fewer slots :)

In the meta of the Warhammer world, it will be rare that the Witch elf and a corsair have more than a 50% kill chance per attack. Since they are both scoring less than 50%, but the Witch Elf has a better kill chance, the Witch Elf will be closer to 50% than the corsair... thus show more variance.

Another comparison

Just to show how this works out in kills, we put these "probabilities" of Corsairs, Witch Elves and Executioners on a chart. They are fighting a WS3, T3, 5+ AS enemy. All 3 have a 7 wide formation and at least 1 supporting rank.
Image

The horizontal axis shows the number of kills. So.. more to the right is better. The vertical axis shows the "probability" of that outcome. We want that to be high on good outcomes and low on bad/worse outcomes.

Witch Elves do it better than frenzied corsairs: their "peak" is more to the right than those of corsairs. They have less chance of scoring 6 kills.. because they have more chance of scoring 14 kills. However, the peak around 11 kills is lower than the frenzied corsair's peak around 9 kills. This is because their potential outcomes are more spread out, usually on higher kills which is good, but it makes their kill score less "dependable" as part of a tactic.

Let's compare it with Executioners who, on average, don't score so differently from the Witch Elves in this scenario. Executioners have a tremendous peak on 12 kills, showing it's quite likely they'll score exactly 12 kills. It's less likely they'll score 15 kills, or 16 kills, compared to Witch Elves. It's also less likely they'll score 8 kills than witch elves.
So their outcome of 12 kills or anything close to 12 kills is very "reliable" compared to Witch Elves, but Witch Elves have the potential of doing more... at the risk of also doing less.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Calisson
Corsair
Corsair
Posts: 8820
Joined: Fri Mar 14, 2008 10:00 pm
Location: Hag Graef

Post by Calisson »

:shock:
Me like your desings and graphs. :P
Winds never stop blowing, Oceans are borderless. Get a ship and a crew, so the World will be ours! Today the World, tomorrow Nagg! {--|oBrotherhood of the Coast!o|--}
User avatar
Omnichron
Malekith's Best Friend
Posts: 1378
Joined: Tue Oct 17, 2006 11:10 pm
Location: Norway

Post by Omnichron »

fewer dice rolled means MORE randomness, or at least more variance.

That doesn't sound very logical to me. If you have 20 attacks with autohits, autowounds and no saving throws, you'd have no variation. Add 50% chances to one and then the other and the variations will increase. Take away some dices and the variations will decrease.

Poison takes away the dices to wound, so I'd think you get less variations... although that's just what my logic tells me.

And I agree with Calisson, great graphs :D
Personal quote: "It's better to do little damage and lose nothing than to do lots of damage and lose everything."
Final tournament score for 7th DE book in 8th edition - W/D/L: 25/5/10
User avatar
Saintofm
Malekith's Best Friend
Posts: 1755
Joined: Sat Mar 19, 2011 2:28 am
Location: California

Post by Saintofm »

THis will help me quite a bit, thanks
Who needs sanity? I have a Hydra
User avatar
Lord tsunami
Malekith's Best Friend
Posts: 1308
Joined: Sat Jun 28, 2003 9:49 pm
Location: Behind you!

Post by Lord tsunami »

well, obviously you get no randomness if you completely remove the dice, but you have to agree that you get more randomness if you roll a single die compared to if you roll 10 and add the results.

the more important a single dice roll is for the outcome, the more randomness you will have. witches to-hit-roll is very important for the outcome, since a 6 will bypass the next step.

if you drew a normal distribution (as Daeron has in his nice graphs) for a single dice roll, it would be a straight line at 16,7% chance of each number. you have an average of 3,5 but with a very large (compared to the average) standard deviation (1,87/3,5=53,5%). If you did the same thing for rolling 10 dice you would get one of those nice bell shaped distribution, and with a maximum around 35. i do not have time for the maths (especially since i am not very good at this lol) but the standard deviation will be much smaller than 18,7, and thus much smaller than 53,4%.

ok, so i have gotten way too tangled up with this :D thanks again Daeron for a great tool (though i think ill keep using my excel sheet for now. its like my only child :D)
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

Lord Tsunami wrote: (though i think ill keep using my excel sheet for now. its like my only child :D)


I can only encourage diversity. I'm a firm believer that, inside a community like ours, different views, approaches and thinking are key to making our community stronger. It's a bit like a genetic algorithm. Genetic diversity makes it more likely that our community as a whole will be able to tackle new challenges and changes. Inspiring other people to copy work and improve upon it is as crucial as inventing new things entirely.
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Omnichron
Malekith's Best Friend
Posts: 1378
Joined: Tue Oct 17, 2006 11:10 pm
Location: Norway

Post by Omnichron »

Lord Tsunami wrote:well, obviously you get no randomness if you completely remove the dice, but you have to agree that you get more randomness if you roll a single die compared to if you roll 10 and add the results.


Yes, you're right. It's just like when you roll one dice, the chance of getting 4 is equal to the other rolls, while when you roll 2 dices it's a bigger chance of getting 7 than the more extremes...

So, in the example of the witch elves, they'll have less of variation of the curve because of the poison... and a better kill rate as well.
Personal quote: "It's better to do little damage and lose nothing than to do lots of damage and lose everything."
Final tournament score for 7th DE book in 8th edition - W/D/L: 25/5/10
User avatar
Daeron
Malekith's Best Friend
Posts: 3973
Joined: Fri Oct 03, 2003 7:36 pm
Location: Belgium, Brussels
Contact:

Post by Daeron »

The combat calculator has now been updated with two new features:
- You can use the dreaded Chaos "reroll 1's on a ward save".
- Next to the "Calculate" button, a link is offered to your calculation. I believe this may be handy to use your calculations as a reference in discussions.

For example, you can now link to the combat of a Horde of Corsairs attacking T3 5+ AS troops, with lower WS than the Corsairs:
http://warhammer.orderoftheathanor.eu/C ... 5:0:4:1:50
I love me a bowl of numbers to crunch for breakfast. If you need anything theoryhammered, I gladly take requests.

Furnace of Arcana, a warhammer blog with delusional grandeur.

"I move unseen. I hide in light and shadow. I move faster than a bird. No plate of armour ever stopped me. I strike recruits and veterans with equal ease. And all shiver at my coldest of whispers."
- The stiff breeze
User avatar
Lorddrittz
Beastmaster
Posts: 302
Joined: Sun Sep 16, 2012 2:27 am
Location: Australia

Post by Lorddrittz »

Can you put the Black Guard on the Graph above as a reference? my babies :lol:

Also the biggest improvement with extra attacks from the Cauldron would be the Executioners I would think.
Dark Elf Battles

Win/Draw/Loss
10 : 1 : 4 7th Ed Codex
Post Reply