# Risk Dice Roll Odds

7 replies [Last post]
Mr.Cause
Offline
Joined: 07/27/2009

I searched and found this article that defines how the odds of RISK dice rolls play out: http://www.recreationalmath.com/Risk/index.htm

I was wondering if anyone who understands the math well could duplicate this but instead of using 6-sided dice using 8-sided dice.

Mr.Cause
Offline
Joined: 07/27/2009
You have to scroll to the

You have to scroll to the bottom and click on the link to the paper***

scifiantihero
Offline
Joined: 07/08/2009
Yes.

Someone could duplicate that for any sort of probabilities.

I have no idea how to write computer programs, but I am using one right now so I assume that someone does!

:)

apeloverage
Offline
Joined: 08/01/2008
Mr.Cause wrote:I searched and

Mr.Cause wrote:
I searched and found this article that defines how the odds of RISK dice rolls play out: http://www.recreationalmath.com/Risk/index.htm

I was wondering if anyone who understands the math well could duplicate this but instead of using 6-sided dice using 8-sided dice.

It'd be reasonably easy to do in php.

But the only difference would be the chance of two dice showing the same number, which would happen slightly less often with 8-sided dice. So the odds would be slightly better for the defender - but I don't think it'd make a significant difference.

larienna Offline
Joined: 07/28/2008
I placed my old tables

I made some tables a few years ago to calculate some probabilities for a game. It was talked about in the old forum. I placed them all on this page:

http://ariel.minilab.bdeb.qc.ca/~ericp/cgi-bin/boardgame/index.php?n=Des...

I studied a bit the probabilities lately and I might eventually make a probability math for dummy page.

scifiantihero
Offline
Joined: 07/08/2009
;)

larienna wrote:

I studied a bit the probabilities lately and I might eventually make a probability math for dummy page.

Dummies still won't get it :)

larienna Offline
Joined: 07/28/2008
It's not that hard. Most of

It's not that hard. Most of it can be done with formulas. Just insert variables and you have the results. Generally, it's all done by calculating combinations and arrangements.

What is complicated (for me), is when you have a problem and want to transcribe it as a math formula. In this case, you must be able to see throught the problem correctly and recognise what is the math behind the problem.

HairyMezican
Offline
Joined: 07/31/2009
Warning: Math Involved

First we will define F(x,y) to be the probably that the attacker will win, where the attacker has x armies, and the defender has y armies

F(x,0) is defined to be 1, because the attacker has already won
F(1,y) is defined to be 0, because the attacker cannot attack any more

F(2,1) means that each player rolls 1 die with the defender winning in a tie. The loser loses 1 army.
Number rolled - Attacker - Defender
8 - 1/8 - 1/8
7 - 1/8 - 1/8
6 - 1/8 - 1/8
5 - 1/8 - 1/8
4 - 1/8 - 1/8
3 - 1/8 - 1/8
2 - 1/8 - 1/8
1 - 1/8 - 1/8
so we get
1/8 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 1/8 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 1/8 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 1/8 * (1/8 + 1/8 + 1/8 + 1/8) + 1/8 * (1/8 + 1/8 + 1/8) + 1/8 * (1/8 + 1/8) + 1/8 * (1/8) + 1/8 * (0)
1/8 * 7/8 + 1/8 * 6/8 + 1/8 * 5/8 + 1/8 * 4/8 + 1/8 * 3/8 + 1/8 * 2/8 + 1/8 * 1/8 + 1/8 * 0/8
= 7/64 + 6/64 + 5/64 + 4/64 + 3/64 + 2/64 + 1/64 + 0/64
= 28/64
= 7/16 that the attacker will win the die roll

F(2,1) = F(2,0)*7/16 + F(1,1)*9/16
= 1*7/16 + 0*9/16
= 7/16 that the attacker wins the whole battle

F(2,2) means that the defender rolls an extra die, taking the higher one.
8 - 1/8 - 15/64
7 - 1/8 - 13/64
6 - 1/8 - 11/64
5 - 1/8 - 9/64
4 - 1/8 - 7/64
3 - 1/8 - 5/64
2 - 1/8 - 3/64
1 - 1/8 - 1/64
= 1/8 * (13/64 + 11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 1/8 * (11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 1/8 * (9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 1/8 * (7/64 + 5/64 + 3/64 + 1/64) + 1/8 * (5/64 + 3/64 + 1/64) + 1/8 * (3/64 + 1/64) + 1/8 * (1/64) + 1/8 * (0)
= 1/8 * 49/64 + 1/8 * 36/64 + 1/8 * 25/64 + 1/8 * 16/64 + 1/8 * 9/64 + 1/8 * 4/64 + 1/8 * 1/64 + 1/8 * 0/64
= 49/512 + 36/512 + 25/512 + 16/512 + 9/512 + 4/512 + 1/512 + 0/512
= 140/512
= 35/128 that the attacker wins the die roll
so
F(2,2) = F(2,1) * 35/128 + F(1,2) * 93/128
= 7/16 * 35/128 + 0/16 * 93/128
= 245/2048 that the attacker wins the whole battle

F(3,1) means that the attacker gets to roll the extra die instead
8 - 15/64 - 1/8
7 - 13/64 - 1/8
6 - 11/64 - 1/8
5 - 9/64 - 1/8
4 - 7/64 - 1/8
3 - 5/64 - 1/8
2 - 3/64 - 1/8
1 - 1/64 - 1/8
= 15/64 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 13/64 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 11/64 * (1/8 + 1/8 + 1/8 + 1/8 + 1/8) + 9/64 * (1/8 + 1/8 + 1/8 + 1/8) + 7/64 * (1/8 + 1/8 + 1/8) + 5/64 * (1/8 + 1/8) + 3/64 * (1/8) + 1/64 * (0)
= 15/64 * (7/8) + 13/64 * (6/8) + 11/64 * (5/8) + 9/64 * (4/8) + 7/64 * (3/8) + 5/64 * (2/8) + 3/64 * (1/8) + 1/64 * (0/8)
= 105/512 + 78/512 + 55/512 + 36/512 + 21/512 + 10/512 + 3/512 + 0/512
= 308/512
= 77/128 that the attacker wins the die roll

F(3,1) = F(3,0) * 77/128 + F(2,1) * 51/128
= 1 * 77/128 + 7/16 * 51/128
= 1232/2048 + 357/2048
= 1589/2048 that the attacker wins the whole battle

Now we get to the tougher cases...

F(3,2) gives us 2 dice at stake. Both players roll twice highest goes against highest, lowest against lowest

For the higher die
8 - 15/64 - 15/64
7 - 13/64 - 13/64
6 - 11/64 - 11/64
5 - 9/64 - 9/64
4 - 7/64 - 7/64
3 - 5/64 - 5/64
2 - 3/64 - 3/64
1 - 1/64 - 1/64

= 15/64 * (13/64 + 11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 13/64 * (11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 11/64 * (9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 9/64 * (7/64 + 5/64 + 3/64 + 1/64) + 7/64 * (5/64 + 3/64 + 1/64) + 5/64 * (3/64 + 1/64) + 3/64 * (1/64) + 1/64 * (0)
= 15/64 * 49/64 + 13/64 * 36/64 + 11/64 * 25/64 + 9/64 * 16/64 + 7/64 * 9/64 + 5/64 * 4/64 + 3/64 * 1/64 + 1/64 * 0/64
= 735/4096 + 468/4096 + 275/4096 + 144/4096 + 63/4096 + 20/4096 + 3/4096 + 0/4096
= 1708/4096
= 427/1024 that the attacker wins the higher of the two die rolls

For the lower die
8 - 1/64 - 1/64
7 - 3/64 - 3/64
6 - 5/64 - 5/64
5 - 7/64 - 7/64
4 - 9/64 - 9/64
3 - 11/64 - 11/64
2 - 13/64 - 13/64
1 - 15/64 - 15/64

= 1/64 * (3/64 + 5/64 + 7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 3/64 * (5/64 + 7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 5/64 * (7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 7/64 * (9/64 + 11/64 + 13/64 + 15/64) + 9/64 * (11/64 + 13/64 + 15/64) + 11/64 * (13/64 + 15/64) + 13/64 * (15/64) + 15/64 * (0)
= 1/64 * 63/64 + 3/64 * 60/64 + 5/64 * 55/64 + 7/64 * 48/64 + 9/64 * 39/64 + 11/64 * 28/64 + 13/64 * 15/64 + 15/64 * 0/64
= 63/4096 + 180/4096 + 275/4096 + 336/4096 + 351/4096 + 308/4096 + 240/4096 + 0/4096
= 1753/4096 that the attacker will win the lower of the two die rolls

the chance that the attacker will win both of the die rolls is
427/1024 * 1753/4096
=748531/4194304

the chance that the attacker will lose both die rolls is
597/1024 * 2343/4096
=1398771/4194304

the chance that the players will split the die rolls is
1 - (748531/4194304 + 1398771/4194304)
= 1 - 2147302/4194304
= 2047002/4194304
=1023501/2097152

So the overall battle probabilities are
F(3,2) = F(3,0) * 748531/4194304 + F(2,1) * 1023501/2097152 + F(1,2) * 1398771/4194304
= 1 * 748531/4194304 + 7/16 * 1023501/2097152 + 0 * 1398771/4194304
= 748531/4194304 + 7164507/33554432
= (748531*8 + 7164507)/33554432
= 131527555/33554432 that the attacker wins the whole battle

And finally we get to the common case which is the most difficult case
F(x>3,y>1) means that the attacker rolls 3 dice, and the defender rolls 2. Comparing the top 2 dice from each.
For the highest die
8 - (64+15+15+15+15+15+15+15)/512 = 169/512 - 15/64
7 - (0+49+13+13+13+13+13+13)/512 = 127/512 - 13/64
6 - (0+0+36+11+11+11+11+11)/512 = 91/512 - 11/64
5 - (0+0+0+25+9+9+9+9)/512 = 61/512 - 9/64
4 - (0+0+0+0+16+7+7+7)/512 = 37/512 - 7/64
3 - (0+0+0+0+0+9+5+5)/512 = 19/512 - 5/64
2 - (0+0+0+0+0+0+4+3)/512 = 7/512 - 3/64
1 - (0+0+0+0+0+0+0+1)/512 = 1/512 - 1/64

= 169/512 * (13/64 + 11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 127/512 * (11/64 + 9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 91/512 * (9/64 + 7/64 + 5/64 + 3/64 + 1/64) + 61/512 * (7/64 + 5/64 + 3/64 + 1/64) + 37/512 * (5/64 + 3/64 + 1/64) + 19/512 * (3/64 + 1/64) + 7/512 * (1/64) + 1/512 * (0)
= 169/512 * 49/64 + 127/512 * 36/64 + 91/512 * 25/64 + 61/512 * 16/64 + 37/512 * 9/64 + 19/512 * 4/64 + 7/512 * 1/64 + 1/512 * 0/64
= 8281/32768 + 4572/32768 + 2275/32768 + 976/32768 + 333/32768 + 76/32768 + 7/32768 + 0/32768
= 16520/32768
= 2065/4096 that the attacker will win the higher die roll

For the second die roll
8 - (15+1+1+1+1+1+1+1)/512 = 22/512 - 1/64
7 - (13+27+3+3+3+3+3+3)/512 = 58/512 - 3/64
6 - (11+11+35+5+5+5+5+5)/512 = 82/512 - 5/64
5 - (9+9+9+39+7+7+7+7)/512 = 94/512 - 7/64
4 - (7+7+7+7+39+9+9+9)/512 = 94/512 - 9/64
3 - (5+5+5+5+5+35+11+11)/512 = 82/512 - 11/64
2 - (3+3+3+3+3+3+27+13)/512 = 58/512 - 13/64
1 - (1+1+1+1+1+1+1+15)/512 = 22/512 - 15/64

= 22/512 * (3/64 + 5/64 + 7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 58/512 * (5/64 + 7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 82/512 * (7/64 + 9/64 + 11/64 + 13/64 + 15/64) + 94/512 * (9/64 + 11/64 + 13/64 + 15/64) + 94/512 * (11/64 + 13/64 + 15/64) + 82/512 * (13/64 + 15/64) + 58/512 * (15/64) + 22/512 * (0)
= 22/512 * (63/64) + 58/512 * (60/64) + 82/512 * (55/64) + 94/512 * (48/64) + 94/512 * (39/64) + 82/512 * (28/64) + 58/512 * (15/64) + 22/512 * (0/64)
= 1386/32768 + 3480/32768 + 4510/32768 + 4512/32768 + 3666/32768 + 2296/32768 + 870/32768 + 0/32768
= 20720/32768
= 1295/2048 that the attacker will win the second die roll

the chance that the attacker will win both die rolls
= 2065/4096 * 1295/2048
= 2674175/8388608

the chance that the attacker will lose both die rolls
= 2031/4096 * 753/2048
= 1529343/8388608

the chance that the players will split the die rolls
= 1 - (2674175/8388608 + 1529343/8388608)
= 1 - 4203518/8388608
= 4185090/8388608
= 2092545/4194304

So F(x>3,y>1) = F(x,y-2)*2674175/8388608 + F(x-1,y-1)*2092545/4194304 + F(x-2,y)*1529343/8388608

Recursively solving for various values of x and y by plugging them into the formula above is left for an exercise for the reader (and possibly an excel spreadsheet)

N.B. I'm tired and my arithmetic and or fingers hitting the calculator may be off. Don't use these for rocket calculations. 