Project: Risk Simulator

9.09% relative
5.00% relative

Began in January 2022

This is a small JavaScript project I worked on that uses data visualization and empirical analysis to determine the odds of winning from throwing random dice in the game of Risk. The theoretical analysis is more difficult because in Risk, attackers have three dice, but ties win for the defending side which only has two dice. So, I brute-forced the answer by simulating a large number of trials to find out the answer.

This project simulates throwing random dice and follows the game logic of Risk to determine the odds of winning.

Try the simulator for yourself below.

  • A graph of the risk simulator data, leveling off as the probabilities become more stable
  • After 1025 trials: 27.41% chance of 0 Wins, 34.83% chance of 1 Win, 37.76% chance of 2 Wins
  • A page with more details analyzing the results