Associated Topics || Dr. Math Home || Search Dr. Math

### Die Roll Probabilities in Gaming

```
Date: 01/06/2001 at 10:52:43
From: Wray Ferrell
Subject: Odds of winning battles

I am designing a game based on the Rise of Rome. Battles are resolved
by having both sides roll 2D6 with modifiers from better leaders,
troops, terrain, etc. To simulate the ancient battles where one side
should have been routed but was not, the attacker always loses if they
roll a 2 or if the defender rolls a 12. Ties go to the defender. After
modifiers the attacker must roll higher than the defender. My
playtesters wanted a chart giving the odds of victory based on
modifiers.

I know the odds of rolling a 2 are 1/36 and the odds of rolling a 12
are 1/36. So the attacker has 1/18 chance of losing regardless of the
die roll modifiers. It also seems that without any die roll modifiers
the odds of the attacker rolling higher than the defender are 1/2.
However, my math falls down when trying to determine the additional
probability gained or lost from the die roll modifiers. I think the
equation is:

Prob. of Victory = 50 - 1/18 + (A * modifier)

Thus a negative modifier, a desperate attack, subtracts from your
chances, while a positive modifier helps them.

My question is; how do I determine A?

Thanks,
Wray
```

```
Date: 01/08/2001 at 14:02:28
From: Doctor TWE
Subject: Re: Odds of winning battles

Hi Wray - thanks for writing to Dr. Math.

Your odds of the attacker winning aren't quite right for two reasons.
First, you've counted the probability of the attacker rolling a 2 AND
the defender rolling a 12 twice. (Once as the attacker rolls a 2, and
again as the defender rolls a 12.) Second, you haven't accounted for
the fact that ties go to the defender. The correct probability should
be 575/1296 ~= 44.37%.

As to modifiers, the amount they add to (or subtract from) the
probability is not linear - it depends on how many modifiers you
depends on how they are implemented with respect to the 2 and 12
rules: does a modified 12 (after additions) guarantee the defender
wins, or only a "natural" 12? Same for the attacker. Finally, are all
modifiers bonuses (i.e. they can only add to the attacker's or
defender's rolls), or are there negative modifiers as well?

Here are the probabilities of rolling each combination on 2D6
(combinations are out of 36):

Roll   Comb.   Prob.
----   -----   -----
2      1      2.8%
3      2      5.6
4      3      8.3
5      4     11.1
6      5     13.9
7      6     16.7
8      5     13.9
9      4     11.1
10      3      8.3
11      2      5.6
12      1      2.8

So here's the attack matrix:

Attacker
Roll: |  2 |  3   4   5   6   7   8   9  10  11  12 |  Total
Comb: |  1 |  2   3   4   5   6   5   4   3   2   1 | Att Def
-------+----+----------------------------------------+---------
R C |    |                                        |
2 1 |  1 |\ 2   3   4   5   6   5   4   3   2   1 |  35   1
|    | +-+
3 2 |  2 |  4 \ 6   8  10  12  10   8   6   4   2 |  66   6
|    |     +-+
4 3 |  3 |  6   9 \12  15  18  15  12   9   6   3 |  90  18
|    |         +-+
D  5 4 |  4 |  8  12  16 \20  24  20  16  12   8   4 | 104  40
e      |    |             +-+
f  6 5 |  5 | 10  15  20  25 \30  25  20  15  10   5 | 105  75
e      |    |                 +-+
n  7 6 |  6 | 12  18  24  30  36 \30  24  18  12   6 |  90 126
d      |    |                     +-+
e  8 5 |  5 | 10  15  20  25  30  25 \20  15  10   5 |  50 130
r      |    |                         +-+
9 4 |  4 |  8  12  16  20  24  20  16 \12   8   4 |  24 120
|    |                             +-+
10 3 |  3 |  6   9  12  15  18  15  12   9 \ 6   3 |   9  99
|    |                                 +-+
11 2 |  2 |  4   6   8  10  12  10   8   6   4 \ 2 |   2  70
|    +----------------------------------------+---------
12 1 |  1    2   3   4   5   6   5   4   3   2   1 |   0  36
-------+---------------------------------------------+---------
Att. |  0    2   9  24  50  90 105 104  90  66  35 | 575
Def. | 36   70  99 120 130 126  75  40  18   6   1 |     721

Based on the assumption that (a) only a "natural" 2 or 12 guarantees
the defender wins, and (b) there are no negative modifiers, here is a
partial chart of the probabilities based on modifiers. You can extend
it yourself if these assumptions are incorrect.

Net |   Attacker    |   Defender
Mod | Comb   Prob.  | Comb   Prob.
----+-------------------------------
+9 | 1225   94.52% |   71    5.48%
+8 | 1221   94.21  |   75    5.78
+7 | 1209   93.29  |   87    6.71
+6 | 1184   91.36  |  112    8.64
+5 | 1140   87.96  |  156   12.04
+4 | 1070   82.56  |  226   17.44
+3 |  974   75.15  |  322   24.85
+2 |  855   65.97  |  441   34.03
+1 |  719   55.48  |  577   44.52
+0 |  575   44.37  |  721   55.63
-1 |  435   33.56  |  861   66.44
-2 |  310   23.92  |  986   76.08
-3 |  206   15.90  | 1090   84.10
-4 |  126    9.72  | 1170   90.28
-5 |   70    5.40  | 1226   94.60
-6 |   35    2.70  | 1261   97.30
-7 |   15    1.16  | 1281   98.84
-8 |    5    0.39  | 1291   99.61
-9 |    1    0.08  | 1295   99.92
-10 |    0    0     | 1296  100

I hope this helps. If you have any more questions, write back.

- Doctor TWE, The Math Forum
http://mathforum.org/dr.math/
```

```
Date: 01/09/2001 at 16:29:09
From: Wray Ferrell
Subject: Re: Odds of winning battles

First of all, thanks for the response. I do have a few more questions
if you don't mind. I'm trying to understand the math rather than just

>Based on the assumption that (a) only a "natural" 2 or 12 guarantees
>the defender wins

...Correct.

>(b) there are no negative modifiers

...There is a -2 modifier for attacking over mountains or rivers, but
I am not sure how that would affect the numbers. What is the
difference between the attacker having +5 for having five combat units
(+5 for 5 combat units) or having +5 for having seven combat units
attacking over the mountains (+7 for 7 combat units and -2 for
attacking over mountains)?

Also, I understand from the chart you provided how you came up with
the 44.37% chance of victory for an even battle. But how did you
calculate the effects of the modifiers? I mean did you just "brute
force" it by looking at the matrix?

Thanks,
Wray
```

```
Date: 01/09/2001 at 17:48:19
From: Doctor TWE
Subject: Re: Odds of winning battles

Hi - thanks for writing back.

>...There is a -2 modifier for attacking over mountains or rivers,
>but I am not sure how that would affect the numbers. What is the
>difference between the attacker having +5 for having five combat
>units (+5 for 5 combat units) or having +5 for having seven combat
>units attacking over the mountains (+7 for 7 combat units and -2 for
>attacking over mountains)?

Actually, there's no difference. I hadn't evaluated the situation that
thoroughly at the time I wrote that assumption. Once I derived the
chart, I realized that negative modifiers to the attacker have the
same effect as positive modifiers to the defender, and vice-versa. The
probabilities never go beyond those listed for +9 or -10, however.
(Beyond this either the defender automatically wins, or the defender
only wins on a natural 2/12.)

>Also, I understand from the chart you provided how you came up with
>the 44.37% chance of victory for an even battle. But how did you
>calculate the effects of the modifiers? I mean did you just "brute
>force" it by looking at the matrix?

Each +1 to the attacker (or -1 to the defender) shifts the diagonal
line on the matrix down one place. The quickest way to calculate it is
to add up the numbers that the line passed over, add this total to the
attacker's combinations and subtract it from the defender's. Remember
that the numbers in the leftmost column and bottom row always belong
to the defender's combinations - they never switch to the attacker.

Similarly, each +1 to the defender (or -1 to the attacker) shifts the
diagonal line on the matrix up one place. Again, add up the numbers
that the line passed over, but in this case, subtract this total from
the attacker's combinations and add it to the defender's.

Yes, I did this by "brute force." (I had a spreadsheet generate the
matrix and the diagonal sums.) With a matrix of this size, it is far
easier to do it this way than to generate complicated combinatoric
formulas - these get very messy when comparing sums of random numbers.

I hope this helps. If you have any more questions or comments, write
back again.

- Doctor TWE, The Math Forum
http://mathforum.org/dr.math/
```
Associated Topics:
High School Probability
High School Projects

Search the Dr. Math Library:

 Find items containing (put spaces between keywords):   Click only once for faster results: [ Choose "whole words" when searching for a word like age.] all keywords, in any order at least one, that exact phrase parts of words whole words

Submit your own question to Dr. Math
Math Forum Home || Math Library || Quick Reference || Math Forum Search