Thursday, July 26, 2012

Risk Battle Statistics and Simulator

Number of Attackers: Offensive Airfield
Number of Defenders: Defensive Airfield

Offense Rolls:
Defense Rolls:
Offense Wins:
Defense Wins:
Cumulative Offense Wins: 0
Cumulative Defense Wins: 0
Offensive Kill-Death Ratio: NA


I was trying to find an image to put above and then I had the bright idea to code the above simulator. After an embarrassingly long amount of time due to my Javascript inexperience, it is done. An explanation of how battle works in Risk is at the bottom following the *

A long time ago I wrote a post that contained some probability calculations associated with the popular board game Risk. This was long before I knew how to format things nicely on the internet and before I was aware of some other things. That said, I think that I can approach the content and its presentation much better now than I could then so I've redone the post.

The original post was focused on showing that you should always choose to attack and defend with as many units as you can, that the odds work out best for you that way. This means that the offense should always attack with 3 if possible and the defense should always defend with 2.

It turns out that the latest version of the Risk rules (which are the rules used in Risk: Factions, a downloadable title for the PS3 and XBox 360) can have situations which modify your battles. Fulfilling certain objectives can allow a player to attack with up to 4 soldiers or defend with up to 3. Furthermore, the player can obtain an airport which bestow a +1 bonus to that player's highest die roll when attacking or defending for any battle that takes place on or adjacent to the territory which has the airport.

I decided that I wanted to see how these variables affect the probabilities of success and the kill-death ratio for the offense. To quickly explain the data in the chart:
  • Most entries fall under "X Kills" which is the probability that under those circumstance the offense will kill X of the defender's pieces. Remember that if the offense doesn't kill a defender's piece then the defender kills a piece belonging to the offense.
  • KDR stands for Kill-to-Death Ratio and is how many pieces the offense should expect to kill for every piece they expect to lose. For example, in the 3 vs 2 matchup with an airport for the offense, the offense should expect to kill almost 2 of the defender's pieces for each piece they lose. A KDR>1 is good for the offense. A KDR<1 is good for the defense.

Probability of offense winning X rolls and KDR
3 vs 2
2 Kills1 Kill0 KillsKDR
Normal37%34%29%1.17
Off +151%31%18%1.97
Def +124%41%35%0.80
3 vs 3
3 Kills2 Kills1 Kill0 KillsKDR
Normal14%21%26%38%0.58
Off +120%25%31%24%0.88
Def +18%21%27%45%0.44
4 vs 2
2 Kills1 Kill0 KillsKDR
Normal46%33%21%1.67
Off +163%25%12%3.11
Def +130%45%25%1.09
4 vs 3
3 Kills2 Kills1 Kill0 KillsKDR
Normal25%26%25%24%1.03
Off +137%25%24%14%1.61
Def +114%31%27%28%0.78

There's nothing surprising here, but it is very interesting to see how much of an advantage the offense has in the normal situation and how much that advantage changes depending on various conditions. There is another advantage that the offense has that isn't discussed here. The offense gets to choose when and where they attack, which allows the to pick battles that they are fairly certain they can win. Play wisely, everyone.

*In classic Risk the objective is to conquer all the territory on the map. You do this by engaging your enemies in battle. To do this you select up to three units on a territory you control to attack an adjacent territory. The owner of that territory can defend with up to two units (these numbers can be increased under certain conditions)

Each player rolls a die for each unit they are attack/defending with and sorts them from highest to lowest. The compare matching dice and if the offense's roll is higher than the defense's the defense loses a piece. If the defense's is higher or there is a tie, then the offense loses a piece. This repeats until the defender loses all their pieces on the territory or the offense gives up.

Example: The offense attacks with 3 pieces and the defense defends with 2. Their rolls are
  • Offense: 4 6 2
  • Defense: 5 4
Sorted, the offense has 6, 4 and 2 and the defense has 5 and 4. The offense's 6 beats the defense's matching 5 but the defense's 4 beats the offense's matching 4 since the defense wins ties. Both sides lose a piece. The 2 is ignored.