Dice and Games

Everyone has played with dice. Dice are used all the time in games because they are so common and easy to grasp. Six sided dice are one of the first examples statistic students encounter in their education. Any game that needs randomness can use dice. Tabletop games use actual dice, and computer games use virtual dice, but they all behave the same way. If you’re going to play a game with dice, you need to know how they work. Dice, if made correctly, fall with equal probability on each of their sides. Games can use one or more dice in a roll. A roll of x dice with y faces is written xdy. Rolling 2d6, that is, two six-sided dice, and then adding the result gives us a range from 2 to 12 of possible outputs. Most of the time we roll several of the same size die.

1D6 Distribution
1D6 Distribution

For 1d6, the probability distribution is uniform (flat). For two dice, it looks like a peaked roof. For three or more dice, it visibly curves. As we add more dice on, the distribution more closely approximates a bell curve, following the Central Limit Theorem.

3D6 Distribution
3D6 Distribution

Changing the number of dice determines the shape of the curve (uniform, peaked roof, and approximate bell curve), and the number of faces determines the fineness. An approximated bell curve of 3d6 (above) is much “grainier” than 6d6 (below), even though they have the same shape. This graininess can also be thought of as step size or sample size. With a small number of faces on the die, there are few possible outputs (numbers). Each possible output has a sharp increase or decrease in probability from its neighbors. With many faces, each possible number changes in probability gently from its neighbors.

6D6 Distribution
6D6 Distribution

Game developers use dice a lot because they are the easiest reliable random number generators around. On top of that, they’re cheap, ubiquitous and fun to throw. In a computer, virtual dice are easy to compute, easy to program, and result in decent probability distributions. In both cases, varying the number and size of dice can give a great variety of results. From the point of view of a player, understanding the distribution you’ve been given can be central to your strategy.

In terms of gaming, what effect do different rolls have?

Take the tabletop game Battletech, which runs on 2d6. One of the many die rolls players perform is to see if their attacks hit an opponent. To calculate this, each opponent carries a number, called a to-hit. You must roll a number equal to or greater than the to-hit for a successful attack. A major part of the strategy of Battletech is manipulating the numbers each unit carries to make yours harder to strike and the enemy units easier.

2D6 Distribution
2D6 Distribution

Looking at the probability distribution of 2d6 (above), we can see a peak in the middle of the graph. How easy is it to roll better than a 6? (Look at the area under the curve.) For a 6, it’s very easy; 72% chance. Better than a 7? So-so; 58%. Better than an 8? Not good; 41%. Over these three numbers in the distribution, the likelihood of success falls from 72% to 41%. Rolling 10 or better is only 17%! This tells us that seven is a very important number. We want to attack enemies with numbers no higher than 8, and 7 or 6 if we can get it. So our strategy depends very much on the dice the developers picked!

Other games use more dice than Battletech, some as many as six or seven. Why bother with more dice? More dice in a roll increases the resemblance to a bell curve, meaning that extreme events (high and low numbers) become rarer and median events (middle numbers) more common. Real life is made up of bell curves, so generally we want these extreme events (which can be roughly characterized as “failing badly” versus “succeeding wildly) to be appropriately rare.

When the game developers pick their dice, they choose how likely you are to succeed at a task and how well. Players intuitively know how easy or hard an objective should be. If there’s a mismatch in the expected vs actual difficulties, it causes frustration. There are many things we can roll dice for, but most of them fall into two camps. The first is the weighted coin, ie, there are only two outcomes (pass/fail) but of unequal probability. Landing a hit in Battletech is a weighted coin. The second camp is when each number has a different effect. “How many points of damage did you do” is one example, and “where on the opponent did you hit” is another. The actual number you roll might be used (damage) or might select among other possibilities (location).

In Battletech, landing a hit is supposed to be rather unreliable—yet, lucky shots happen too. Therefore, rolling few dice (2d6) allows the player to experience the random chaos of the fight and those extreme events relatively frequently. The mechanic matches the expectation.

In other situations, reliability is more valuable than chance. Imagine mixing a magic potion, where success means potion and failure means wasting pricey ingredients. Failure is punished here, so the player needs a realistic expectation of how likely they are to succeed. Reliability (many dice; bell curve) cuts down on failing unexpectedly, which is most frustrating when the player has or feels no control.

In some situations, a uniform distribution is best. Uniform distributions work well when you either want A: a large variability in the outcome (very chancy or lots of luck), or B: the outcomes are essentially interchangeable. Variability might be an untrained swordsman who flails wildly; his strikes could be papercuts—or they could be decapitation! Interchangeable outcomes might be turning left or right or choosing the color of pants NPC #5 is wearing.

The number of faces plays a smaller role than the number of dice. Smaller dice are useful when playing with physical dice (as they are easier to calculate and cheaper to get), while computers can roll any size dice easily. Small dice mean that probabilities jump noticeably from one number to the next, so small changes in player strategy or attributes can have big effects. Big dice smooth out these jumps. Which one is appropriate depends on the situation.

Selecting the right distribution is therefore very important to matching game mechanics with player expectations. On the player side, understanding distributions is important to strategy, yet another place where math is useful!

To get some of the data for my graphs, I used this online dice-roller and grapher, where you can roll any number of dice. The web page will even give you the chance of rolling above or below a given number. Go check it out!