How Gaming Got Its Dice (2013) 51 points by benbreen on June 14, 2017 | hide | past | web | favorite | 26 comments

 > There is no intuitive way to extract percentile results from rolling a small number of d6s.Here is an algorithm for rolling a single decimal digit using on average about 2.19 d6 rolls (which can be done in parallel if you have more than one d6):`````` function one_digit d = roll() while d == 6 d = roll() if roll() <= 3 return d - 1 else return d + 4 `````` Do this twice to get a percentile. This seems reasonably intuitive to me.
 The problem of doing the job of a d10 with a d6 can provide a nice illustration of an application of bases other than 10. Might be useful for an elementary school math teacher trying to explain why the kids should learn this stuff.Write the numbers from 0.0 through 0.9 in steps of 0.1, but write them in base 6, to produce this table:`````` dec base 6 0.0 0.0000 0.1 0.0333... 0.2 0.1111... 0.3 0.1444... 0.4 0.2222... 0.5 0.3000 0.6 0.3333... 0.7 0.4111... 0.8 0.4444... 0.9 0.5222... `````` Roll a d6 to generate base 6 digits, which you take as the digits of a base6-imal fraction in [0,1). Roll until you have enough digits to determine which [k/10, (k+1)/10) interval it falls in, using the above table as an aid.In general this can be used to make a table for simulating a dN with a dM, by writing i/N in base M for i = 0 to N-1.When M is 2 this gives a nice way to simulate a dN with coin flips.The above can be made easier to use by representing it in a graph instead of a table, where you start at a root node and follow edges labeled by dM values, and the leaf nodes give the dN values.That would be easy and fast to use.
 I've never heard of this method before! That's a _really_ nifty trick, thanks for putting it here!
 Here's another approach you might enjoy. We wish to simulate a dN with a dM. I'll use simulating a d10 (N=10) with a d6 (M=6).1. let L = a common multiple of N and M. The least common multiple of N and M is a good choice here, so for our example we'll use L = 30.2. Make a list of the values you are trying to choose from. Repeat each value L/N times, so that the length of the list is L. For our example, L is 30, N is 10, and L/N is three, so our list consists of the values 1 through 10 each repeated 3 times: [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10].3. Viewing this list as M chunks of length L/M, select one of the chunks at random via a roll of our dM. For our example that is 6 chunks of length 5. Here is the list again with parenthesis drawn around the 6 chunks: [(1 1 1 2 2) (2 3 3 3 4) (4 4 5 5 5) (6 6 6 7 7) (7 8 8 8 9) (9 9 10 10 10)]4. Take the chunk selected by the roll of the dM. If all L/M numbers in the chunk are the same, that is the value of our simulated dN roll and we are done. Let's say we've picked the second chunk, (2 3 3 3 4). That contains more than one distinct value, so we go on to step #5.5. Replace the list with the items from that chunk, each repeated M times. In our example, our new list is [2 2 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 4 4 4 4 4 4].6. Go to step #3.Note that the second time through this is how we chunk the list: [(2 2 2 2 2) (2 3 3 3 3) (3 3 3 3 3) (3 3 3 3 3) (3 3 3 3 4) (4 4 4 4 4)]. 4 of the 6 chunks contain only one distinct value now, so there is a 2/3 chance that we find our d10 value on the second iteration.If you actually implement this, you don't need to actually make the lists like I did above. You just need a count of how many times each thing appears. So instead of [1 1 1 2 2 2 3 3 3 4 4 4 5 5 5 6 6 6 7 7 7 8 8 8 9 9 9 10 10 10] you would have [3 3 3 3 3 3 3 3 3 3], meaning you have three '1', three '2', and so on.To pick the second chunk, you skip 5 items and then take 5. That means we skip all 3 '1's, and 2 of the '2's, and take 1 '2', then all 3 '3's, and 1 '4'. That gives us [0 1 3 1 0 0 0 0 0 0].BTW, note that this also works for simulating a smaller die with a larger die. For example, simulating a d6 with a d10. There is a really simple way to do that, of course: roll the d10 and discard anything above 6. With that method, you get a d6 output on 6 out of 10 rolls. Let's call this method the trivial method.If we use the list method as described above, we get a higher output rate. Here is a little table:`````` 1 1 1 (1) 1 1 2 111 111 111 111 111 111 112 222 222 222 2 2 2 (2) 2 3 3 222 222 222 233 333 333 333 333 333 333 3 3 3 (3) 4 4 4 (4) 4 4 5 444 444 444 444 444 444 445 555 555 555 5 5 5 (5) 5 6 6 555 555 555 566 666 666 666 666 666 666 6 6 6 (6) `````` On the left, the first 3 columns just show the initial [1 1 1 1 1 2 2 2 2 2 3 3 3 3 3 4 4 4 4 4 5 5 5 5 5 6 6 6 6 6] list (N distinct values each repeated L/N times) broken down into groups of L/M, which is 3 in this case.If our d10 roll is 1, 3, 5, 6, 8, or 10 we count that as a successful d6 roll of 1, 2, 3, 4, 5, or 6, respectively, because those chunks all have only one distinct value. I've marked those in the table with the resulting d6 value in parenthesis. So, on the first d10 roll we get a d6 value 6 out of 10 times, just like with the trivial method.Where we beat it is on the next roll. For each chunk that does not yield a d6 value on the first row, I've added the resulting list, grouped into chunks. Note that in all 4 of the possible lists, 9 out of the 10 chunks have only one distinct value, and so 9 out of 10 times the second roll yields a d6 value.If the second roll fails too, the trivial method will again only succeed 6/10 times on the third roll. Again we beat it, with a 9/10 success rate, and so on.
 I created an account to tell you "great job".
 The implication in the article is that humans will be doing this on the fly. This solution does not fit with that criterion.
 That's an easy algorithm to do on the fly. Take two d6s that can be distinguished (different color, for example). Call them A and B.Roll A and B. If A is a 6, reroll A until it is not 6. If B is even, take A as your result. If B is odd, take A+5 as your result. (I changed to use B odd/even instead of B <= 3 because that might be easier for people).That gives you a number from 1 to 10. Subtract 1 if you need 0 to 9.If your two d6s cannot be distinguished, take the one that lands leftmost to be A.
 No. I won't do any of that. Most games already have enough essential complexity that all of its components must be able to be interpreted at a glance. D20s and D10s make this easy and intuitive without requiring an algorithm or mathematical post-process.
 And that's just how old tables often worked.
 In fact, this takes exactly 11/5 rolls on average: 6/5 rolls to get a non-6, and then 1 more.
 "Intuitive" in this context means "intuitively practical."Besides which, that may be intuitive to programmers like us, but it's definitely not intuitive to the average person.
 Interesting that once there was a trend in tabletop wargaming towards "realistic" probabilities expressed as a percentage (e.g. "these riflemen have a 70% of hitting the target"). I think this isn't as common anymore.Nowadays, for whatever reason, I see a trend back to the humble d6, both in historical wargaming and fantasy skirmish games. Many wargames use d6 in disguise (see: Bolt Action, SAGA, Warhammer). I think it has to do with two things: the d6 is readily available (though, one has to wonder, why is this an issue when everything else in wargaming isn't as easy to find, like the miniatures and tokens!), and the other fancier dice didn't pan out in practice.
 > and the other fancier dice didn't pan out in practice.For wargaming I think what happened is that “special dice and more detailed simulation” moved into “computerized simulation” (which allows a lot more depth with less player-managed overhead) in the late 1980s through the 1990s, and most of that whole end of the hobby left the tabletop world.
 Yeah, although the more complex simulations have largely have largely faded away from the computer space as well. (With a few exceptions.) And very niche board games are probably more viable than very niche computer games. Modder communities for some old computer games notwithstanding.Personally, I confess to finding complex simulations (whether of the board game or flight/combat genres) more appealing in theory than I do in practice.
 They're also a pain to make. I work on complex simulations for a living, and the number of parameters and data sets you need to get good results is staggering.If you end up just going "We think it's about 100 meters" that's a lot of effort for not much reward.
 Agreed. In support of this theory, do note the tabletop world (which still exists and apparently makes money. See: Games Workshop and its many current competitors) is moving away from complex simulations, and striving to streamline and simplify the gaming experience, within reason.
 D6 are also common today because they help simplify the user experience. Charts, tables, and fancy dice get in the way of learning the rules and having fun for the average person. Most people need to perceive a low barrier to entry and don't want to invest in learning a large ruleset.Games you mention are still made, but they're a niche product in a niche market.Needle moving growth for the tabletop industry comes from introducing new people to the hobby, not from selling another Space Marine model to an existing gamer. It's difficult to build a sustainable tabletop business without one or two big hits (ex: Days of Wonder's "Ticket to Ride"). It's even harder for companies that sacrifice usability for realistic simulations.
 Playing devil's advocate, I'm not sure the D6 provides a simpler user experience. Why is rolling a D6 to determine whether you kill something in an RPG or wargame "easier" than rolling a D10? A single D10 seems more intuitive to me than a single D6 (that is, a score "from 1 to 10" seems more natural than "from 1 to 6").An argument could be made that the D6 is more readily available, but this is probably irrelevant in the context of miniature gaming: miniatures themselves are NOT "readily available", and you can get the specialized dice from the same store you get your miniatures!
 The difficulty is when you have to go hunting for the right die to use, and mistake, say, the d12 for the d20. Or get confused that, for d4s, you have to read the downward face instead of the top face.That being said, I fell deeply in love with the classic D&D polyhedra the moment I first saw them. Platonic solids are cool! They're delightfully arcane and geeky. They complement each other in a set. I wish the weird d8 and d12 throws came up more often.Perhaps there's a lesson here for UX in general: sometimes there's a tradeoff between being _simple_ and being _interesting_, and (particularly in the world of games) it's a tradeoff worth taking seriously.
 I thought with d4s you read the value at the point, not the face on the bottom? Maybe my dice are different.I prefer the d12 to the d6 for generic rolls, as it allows for the least number of sides with the most human-usable fractions (25/50/75%, 33/66%, and "a little less than 10%").
 Well, wargames and RPGs are so complex enough already that surely mistaking the type of die is the least of a player's problems. And D6 used to require complex table lookups (which current tabletop game design seems to eschew), so not sure it was easier to begin with... just the most common shape of dice.I share your love of D&D dice :)
 > There is no intuitive way to extract percentile results from rolling a small number of d6s.Shadowrun 5e -> Roll 21d6 defense test against a 18d6 attack.In all seriousness, good article. I always wondered where the need of the d20s came from, and always wondered why d10s and the likes didn't catch on. I always had shadowrun to blame for an ungodly amount of d6's laying around my house
 Is 5e any good? I loved the flavor update in 4e, but felt like they threw out a lot of what was good with the mechanics from 3e.
 Yeah, besides the huge amount of errata and bizarre inconsistencies between what you would expect a roll to be vs what it actually is 5e is ok.The amount of flavor is sad, but at lest deckers are cool now since [everything] is wireless.