Before dice notation was adopted, early roleplaying games described dice rolls using range notation. For example, 3-18 indicated rolling three six-sided dice or 3d6 in modern notation. Converting a range to dice notation requires a little thought, so I’m going to describe a way to solve the conversion programmatically. Background Dice notation is a succinct domain specific language to represent discrete probability distributions and is heavily used in tabletop roleplaying games. For example...