Mathematical Journeys: An Exercise in Averages

A few summers ago I wrote a blog post about finding math in unexpected places as a way to keep skills sharp through the summer break. One of the unexpected places I talked about was the world of tabletop Role-Playing Games (RPGs) such as Dungeons & Dragons. Such games are essentially communal storytelling exercises which use chance elements to help guide the story via a set of polyhedral dice.

I've been running a D&D game for a group of friends for several months now, serving as “Game Master.” As Game Master I serve as lead storyteller for the group, while the others each create a character to experience the story firsthand. My job is to create the framework for the story. I devise and flesh out the world that the story takes place in, present challenges for the players to overcome, and rationalize the effect their actions have upon the world. Overall, my goal is to create circumstances that will allow the players to be heroes. Today I'd like to delve a little deeper into the math applications involved in a D&D game, through the use of an example from the game I'm currently running.

In the current story arc, my players recently made the acquaintance of a tribe of goblins led by a goblin chief by the name of Skizaan. Goblins are a very classic antagonist in the setting of D&D, and they are often seen as little more than cannon fodder – weak enemies who can be bowled over easily. However, these particular goblins are highly organized and skilled at group tactics, and as the brains behind their operation I wanted Skizaan to present more of a challenge to the group. In the rulebook for the game there are statistics for the average goblin, as well as a “Goblin Boss” - both of which were a bit too weak for my tastes. I decided to amp up Skizaan by altering some of his statistics to increase his 'Challenge Rating' (known as 'CR' - the system the game uses to help Game Masters determine which antagonists will present an appropriate challenge for a player group of a given power level).

As part of this alteration, I needed to increase the amount of damage Skizaan dealt with weapon attacks to bring it in line with my target CR. The rulebook contains a handy table listing the average values for various statistics at different CRs, so looking at the table entry for my target CR shows me that the average damage value per round should be about 33. Great – that's my target. However, there's a bit of a wrinkle – D&D uses dice rolls to determine damage dealt, so every enemy lists a number and type of dice to roll when an attack hits. This adds another element of chance, where combat can lead to drastically different outcomes depending on the luck of the dice – which is one of my favorite aspects of the game. The table only lists average damage output, though, not dice ranges, so I needed to figure out what combination of dice would result in an average damage of 33.

This is starting to sound like a word problem from a math test!

Now, there are several ways to do that, but here's the system I worked out. To figure out the average result of a die roll, I just need to take the average of the lowest possible roll and the highest possible roll. Since I know my target average, reverse engineering the average formula is the quickest way to get there algebraically:

lowest (l) + highest (h) = average

l + h = 33

l + h = 66

Now it's time to think about the way dice rolls work for a moment. The lowest possible outcome would be all 1's on the dice, the highest would be every die rolling its maximum. The game uses dice that have 4 sides, 6 sides, 8 sides, 10 sides, 12 sides, and 20 sides, so I have a few options. The thing that immediately hits me, though, is that 66 is 11 times 6. If I went with six dice, my lowest possible roll would be 6, regardless of what kind of dice I was using. That would leave me with 60 points left to divvy up between 6 dice, so they'd need to be 10-sided dice. In game terms, I'd write that as 6d10. So rather than the original 1d6 of the Goblin Boss, my new amped-up goblin chief could do 6d10.

So that's one option, but there's another aspect of the luck of the dice that I want to acknowledge: the spread of possible outcomes. The lowest and highest values of that 6d10 roll would be 6 and 60, which means that this attack could vary wildly in terms of how much damage it actually does. Sure, on average it'll be around 33, but if my dice are having an off day when we actually play, Skizaan could do practically no damage and the players would steamroller him, which would be pretty anticlimactic. I'd like to find a way to make the rolls more consistent, with less variation. The way to do that is to change up the type of die rolled to decrease the spread – make the highest and lowest values closer together.

To do that, I'll need to shift the composition of the roll to be more dice with fewer sides each. More dice increases the lowest value, and less sides each decreases the highest value. So let's take our target of l + h = 66 again. We can split it into the same 6 and 10, but switch their placement – instead of six ten-sided dice, let's use ten six-sided dice. That would make the lowest value 10 and the highest value 60. That would increase the average value a bit, from 33 to 35, but would condense the spread a bit in the process.

However, there might be an even better option – we do have four-sided dice at our disposal. Let's say we used as many four-sided dice as possible to get the same average outcome. At this point, I use a slightly different logical process. Take a look at our previous two examples. With ten-sided dice, we ended up with six times eleven. With six-sided dice, we ended up with ten times seven. In each case, we end up with the number of dice rolled multiplied by one more than the number of sides on the dice. So if we have four-sided dice, we can figure out the number of dice to roll by dividing our target of 66 by one more than the number of sides on the dice – 66 divided by 5. Rounding down to avoid decimals, we end up with 13 four-sided dice. Plugging that back into our main formula to check our work, we get

13 + 52


So we've decreased the average just a tiny bit, but in exchange we've given ourselves a much more condensed spread on the dice. Minimum damage for Skizaan's attacks is now 13, which is much better than 6, and his maximum damage potential is a still very threatening 52.

This is just one example of the many ways in which serving as Game Master for a game of D&D involves quite a bit of math and logic. Running this game has been a great experience for me in problem solving with algebra, and I thought you might enjoy hearing about it.
if (isMyPost) { }