## martedì 20 settembre 2016

### Can we predict the winning of a battle?

Hi readers!As you already know I'm not a player: I paint small minis, sometimes I sell them, I like to create armies, but I do not battle.

However the mathematical part of a battle is very interesting to me: rolling dice were one of the funniest thing to do - when long years ago I played- but knowing the probabilistic features under the dice is now very interesting, above all if you are a player I suppose.

Maybe reading this post you'll not be capable to predict if you are going to win, but it could give you some interesting issues to think about of course.
First a precisation: despite I love formalism and theoretical aspects, I'll try to avoid them, because a post on a blog of miniatures is not the place for such precision: if you want more of them, ask and I'll provide them to you.
This post is the result of some weeks of thinking so, please, if you notice some error or something not clear, please leave a comment: I like to talk about numbers, but I like more improve my knowledge, and if your criticism or ideas can help, they are welcome: I do not hide that I thought a lot those things, so confirms or refutations are welcome to make stronger my ideas.

I'd like to say that the talk will start with the analysis of the dice, than the speech will be enlarged to "game".
I think that what makes Wh games great is the complexity of them, because we have a mathematical part that we can study (on this post!)  and a strategy and subjective part that is quite impossible to make in theorems. Clearly gamers want to maximize their gain function, but to write down this function is a very hard task!
So first we are going to analyze our dice, then a simple fight one turn 1 vs 1, then a 5 vs 5 one turn only, after a 5 vs 5 more turns, lastly a 5 vs 20 more turn, than some ideas and conclusion.

Fist: lets have a look to our pal dice!

Well first we should analyze the prince of the game, the dice. For all our discussion I intend the dice well balanced, not a cheat dice.
the general classical formula in a frequentistic way is

Where f(a) is the probability, Sa the event we want, S the totality of the event possible.
The dice has 6 faces, each one has 1 chance of "win" out of 6. So the probability to have as results of rolling a face is

1/6=0,1666≈0,166= 16,6%

I'm not talking of expected value because that result (3.5) does not mean that the most likely result is 3.5, but what we are expecting to gain weighting the results for their probability.

Generally it means that if you roll dices to infinite, the expected value is 3.5: the result has decimals because the formula is

And xi are the dice resuts, pi are the probability.

Now wich is the probability of score for example 4+?
Quite simple, we want as results 4,5,6 on one rolling dice, so 3 out 6 faces:

3/6=0.5=50%

Remember that the probability are between 1 (100%), and 0 (0%). It is a blasphemy say that it is more or less of those values.

Now lets bend this to a simple game 1 vs 1 of one turn only.

If I remember well, in games you should hit and wound and hope that the opponent fail the ts, so 3 dices rolled.
Lets simplify : hit 6+, wound 6+, ts 2+, a very hard opponent! So

hit, 1/6=16.6%
Wound 1/6=16.6%
Ts is the reverse of win because we want that he fail: so he must score 1 to fail: again in this case 1/6=16.6%.

What is the probability  (total) of success?

0.166×0.166×0.166≈0.54%

but why this result? We can only find the triple 661. With three dice we have 6 faces each one. So all the cases (triple) are 216 (6^3), we have only one good result, so

1/216≈0.54%

now lets think about a battle 5 vs 5 of one turn only.
The idea is an ideal fight, not a real one, to weight if it is convenient attack or not.

Attack!
First, 5 men should do the result said before: 6+, 6+, 1+.
We have to roll so 5*3 dice, 15 dice.
Every dice, shoud do 6,6,1, the probability of success are 0,54%= 1/216: now we have 5 dice, and the good results are "all" the 6,6,1, so 5 good results on 216*5 cases:
5/1080 ≈ 0.54% again!

Defender!
Lets see the defender:  to win he shoud do 6+,5+,1+.
We have to roll so 5*3 dice again.
The good results for one dice is 2/216≈0.92%, and for 5 dice the same. It is quite clear that the defender, is in slight advance in close combact.

If you have seen, till now seems that the number of man on a unit is not relevant: the probability is always the same! Is it correct?

5 vs 5: more than one turn.

This is quite near the reality, but as you can see nothing we can add to what said above: the probability are always the same, and the number of man is a function that depends on your luck. It is clear that the second unit has more "luck", because they have more chances of winning, but it is only the reiteration of rolled dice, and only the one that has better score win: it is only matter of reiterations, or time if you want.

5 vs 20: more than one turn.
This is another case near the reality. Let's use the same statistics above. In the best case, the first unit kills 5 men, and the second 0. I really do not know the resolution rules etc., but we can say that the second turn imply 5 vs 15 men. Looking at the theory said above, the probability is the same, but we can say that the 5 unit in the best case (not thinking at flee etc.) is implied in the battle for at least 3 turns.

Is it useful to have massive units?

The question is very tricky, because if common sense says that "the more you try, the most you could win", the theory above refutes this idea.
I think that in if we talk only of probability, nothing change, but we are not talking of one shot fight: the warhammer games are most complex than a 5 vs 5 in only one turn, there are more turns, other complex rules.
This is quite counterintuitive but the probability are always the same, continuing rolling dice do not change the probability. You can imagine a dice like trying to pick a ball from a bowl with 6 balls, each ball is a number. If you want the 6, you shall pick one ball: if it is 6 or not, you'll put the ball in the bowl, then you pick another ball and so on. You do not remove the ball after picking it, so the probability are always the same, despite the attemps.
In a simplified example, if you have 5 vs 20 men, maybe the unit of five in one turn can kill 5 opponents, but to delete all the enemies, the unit can (in theory of course) spend 4 turns, and be blocked for a big part of the game (if I remember well this was the utility of zombies in WHFB).
Again, if you are lucky with the 5 man unit, you kill 5 on 20 men, if you are lucky with the 20 unit men and rules allow this, yoh can erase in a turn the opponent: but you should be lucky, because the probability model is not affect by the reiteration of rolling dice.
These and other strategy advantages can be achieved with big units, but the probability does not care about it.

CONCLUSIONS

The main concept of this post was to try to investigate if it is possible to predict if we can win a battle or not.
Clearly the answer is no, or quite difficult to do.
We can generally look at the statistical/probabilistic models that underlie our favourite games, and this concerns only the rolling of the dice.
It is demostrate that we can only think about "easiness" to kill: everything is about our dice, and the statistics of our units.
It is demostrate also that the number of a unit does not affect the probability, but can affect other part of the games.

So I want to left you the formula to know the probability of winning with a "game" with three dices:

1≤Nh≤6: the number of faces of the dice good to hit (4+ =>3, 5+=> 2 etc.)
1≤Nw≤6: the number of faces of the dice good to wound (4+ =>3, 5+=> 2 etc.)
1≤Ns:≤ 6: the number of faces of the dice good to save (4+ =>3, 5+=> 2 etc.)

Remember, if 1 and 6 automatically hit, wound or save, you should remove the correspondent fraction with 1 (in case of 6) or 0( in case of 1). 1 is the max of probability (100%), 0 the lowest (0%).

I want to finish the post with another idea: a story about Sun Pin, the author of "Military Methods", tells something that I want to turn to you in a question: if you and your opponent have 1 fast horse each one, 1 medium horse each one, and 1 slow horse each one, how do you put them in a strategical way to win?
The answer im my opinion is very interesting, if you add it to the knowledge of the probability, because your units are good, medium and slow horses, and also your opponent has them: how do you maximize your winning?