The Risk board game dice roll probability calculator and battle simulator

icon

I know there are plenty of you out there who love to play the board game Risk. We're hooked on the Lord Of The Rings edition, and I still need to check out the very rare expansion pack one of my friends recently got. As you will see, I'm getting ready for it with all I've got, developing myself a weapon that will help me dominate the game. Something that will turn the odds in my favor without actually cheating. Say hi to my Risk battle simulator, which is able to calculate the chance of winning for specific Risk situations.

Launch

Risk is an interesting game, powered by simple mathematics. In the battle, the attacker throws three dice, the defender throws two. The attacker's advantage is the one extra die. The defender's advantage is that he/she wins when the dice are tied. Which, in the general situation of 3 dice vs. 2 dice roll, translates into the following odds: the attacker has 37.17% chance of winning, the defender has 33.58% chance of winning, and there's a 29.26 % chance of tie - they will both lose one army. But what about specific situations? How can I know if my 10 armies are enough against my opponent's 5+4?

Since I'm a developer and not a mathematician, I decided I will rather build a simple brute force JavaScript simulator than try to derive the formula behind the battles. An application that simulates 10.000 Risk fights (around 50.000 dice rolls) and calculates the result odds. That should be enough to make an approximation, right?

Risk's rules specify that the attacker always has to leave one army behind (can't use it to attack), and can attack any number of territories in a single turn. Which the calculator also takes into account. Every territory the attacker wins, his/her number of armies is subtracted by 1 (one army is left behind), and the last army is not able to attack. I think I got it right, but if you find and error, please let me know.

Risk Dice Roll Battle Simulation

Risk dice roll battle simulation.

Besides, the simulator also knows how to calculate probabilities for specific single battle situations for different numbers of dice the attacker and defender throw, by going through all the possibilities of dice throw results (which means 7.776 (65) different dice throws in 3 vs. 2 battle).

Risk Dice Roll Possibilities and Odds

Risk dice roll possibilities and odds.

I made this to help myself and others understand and appreciate the statistics behind the dice. So, the next time you play Risk, don't forget to bring your phone and use the simulator to your unfair advantage. And if you're a developer, feel free to upgrade the algorithm (available on Github). Game on.

http://diceroll.stritar.net/risk.html
https://github.com/gstritar/DiceRoll

A few more things you might find interesting:


Comment
written 17.3.2013 17:32 CET on chronolog
12317 views   •   1 like   •   Like   •   
date
date
date
date