23 February 2009

Exploding D10

Classic Battletech RPG Role Playing gameSince I seem to be thinking a lot about dice, the Classic Battletech RPG (formerly Mechwarrior 3rd edition) use a unique dice method, sometimes referred to as "Exploding D10". The game uses two 10-sided dice for skill rolls, but it is a little bit more than just the sum of the two dice: If either dice rolls a "10", then 10 is added you your sum AND you roll that die again. If you get a bit of luck and roll consecutive tens, you can end up with quite a large number (your roll "explodes" upwards). This is unique in that it generates a right-skewed result, and is theoretically open-ended, meaning you might keep on rolling forever. That isn't a practical consideration though. Not only is it very unlikely, but for these skill rolls you only care about reaching some finite target number, and there is no need to keep rolling once your total exceeds that amount.

Probability two 9-sided diceThis business of rolling a "10" is the part that is different, so lets set that aside for a moment and consider what happen if we don't roll any 10's. Consider that no matter how many tens we might roll, we will always add the sum of two 9-sided dice to however many tens we might get. That makes this part easy; for a single "d9" die the chance of any outcome is 1-in-9, and for two dice the sum is a discrete triangular distribution very similar to that of (the sum of) two six-sided dice, which I wrote about last week.

Geometric Distribution p=0.10Going back to the roll of a "10" on a single d10, there is a 1-in-10 chance of getting a ten. If this is successful you roll again and again until you stop getting tens. The total number of tens rolled on a single die follows what is known as the geometric distribution (with p=0.10). This is essentially like flipping a very unbalance coin that has a 10% chance of coming up heads and 90% tails. We keep flipping it until "tails" comes up and count the total number of heads we get along the way (or keep flipping it until we fail to get "heads").

Probability Exploding 1d10

Rolling an exploding d10, lets call it d10X, is really a two stage process. First we flip the unbalanced coin, multiplying the number of "heads" by ten, and second we add to this a roll of our 9-sided die. Note that it is not possible to roll multiples of ten, because whenever we get a ten(s) we always add the d9 result to it. I cut this (and following) table off at 31 because it didn't seem useful to take the probabilities out father than that.





Probability Exploding 2d10



At this point I'm going to skip the gruesome arithmetic and get on to the result when we roll two d10X and add them together.
There is no trick to the calculation this time, I set up a spreadsheet for all combinations that sum from 2 up to 31 and tallied the results.








Probability Exploding 2d10
Finally (finally!) here is the right-skewed distribution I mentioned back at the beginning of all this. Note the odd little dip in probability at 19, which results because it is not possible to roll a 10 on single d10X. The repeats at 29, but is much harder to see (and 39, 49, etc.).

No comments: