• Skip to primary navigation
  • Skip to main content
Sal Ferrarello
  • About Sal Ferrarello
  • Speaking
  • Connect
    Mastodon GitHub Twitter (inactive)
You are here: Home / Draft / Risk Dice Odds

Risk Dice Odds

Last updated on August 14, 2019 by Sal Ferrarello

I’ve been playing a lot of the Risk Boardgame with my two boys recently. The game involves rolling dice to determine the outcome of a battle.

While it was always clear to me that the attacker has an advantage when attacking with three dice, I was curious about how great the advantage is so I wrote some JavaScript code to calculate the odds.

Risk Odds When Rolling 3 Dice against 2

When rolling 3 attacking dice against 2 defending dice.

attacker wins 2: 37.17%
attacker wins 1, defender wins 1: 33.58%
defender wins 2: 29.26%

The code I used to calculate these odds is available at github.com/salcode/risk-board-game-dice-odds.

Risk Dice Rules of Battle

The following explanation comes from gamerules.org.

How to Attack:

Begin by announcing where you plan to attack and what territory you are attacking from. Roll the dice against you opponent.

  • Before you roll, both you and your opponent must announce the number of dice you plan to roll, and both you and your opponent must roll at the same time.
  • Attacker, rolls 1, 2, or 3 red dice. The attacker must have at least one more army than the amount of dice they roll.
  • Defender, rolls 1 or 2 white dice. In order to roll 2 dice, the defender must have two or more armies in their territory.

Deciding a Battle:

Compare the highest die rolled. If the attacker’s is higher, the defender loses one army. Conversely, if the defender’s is higher, the attacker loses one amy from the territory attacked from. If both rolled more than one die, compare the next highest pair and apply the same rules. In the event of a tie, the defender always wins. Also, the attacker can never lose more than two armies per roll.

Sal Ferrarello
Sal Ferrarello (@salcode)
Sal is a PHP developer with a focus on the WordPress platform. He is a conference speaker with a background including Piano Player, Radio DJ, Magician/Juggler, Beach Photographer, and High School Math Teacher. Sal can be found professionally at WebDevStudios, where he works as a senior backend engineer.

Share this post:

Share on TwitterShare on FacebookShare on LinkedInShare on EmailShare on Reddit
Warning! This is a draft, not a finalized post. See full draft disclosure.

Filed Under: Computing, Draft, Game Theory Tagged With: Board Game, Risk

Reader Interactions

Comments

  1. Hi says

    February 2, 2022 at 7:39 pm

    I coded up a similar program and got very similar results
    Attack wins 2: 37.16401%
    Attack wins 1, defense wins 1: 33.59162%
    Defense wins 2: 29.244369999999996%

    Reply

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Copyright © 2023 · Bootstrap4 Genesis on Genesis Framework · WordPress · Log in