AnyDice Classic Archive 18
Exploding Doubles
Something people love to do but AnyDice 1 fails to support is exploding when rolling doubles. I'll use the example of rolling 2d10 and rerolling on double 1s, double 2s, etcetera. I'll explode only once in this example. Exploding more often would follow the usual pattern of adding more low-odds tails.
First, what can AnyDice show you? It can calculate the distribution for exploding all even numbers of 2d10, using d(2d10)e{2,4,6,8,10,12,14,16,18,20}. But you only want to explode the doubles! As 10% of all possible rolls are doubles, a crude approximation would be interpolating the distributions of 2d10 and 2d10-explode-even at a 9:1 ratio.
This approximation is actually not that bad, but it has some flaws. In reality, the steps of the pyramid are very pronounced. The actual distribution can be obtained by some spreadsheet trickery, which I won't bother you with.
As you can see, the final distribution is a slightly tilted step pyramid followed by a nearly flat downward curve.
I've included two slight variations, to show how they affects the distribution. Not exploding on double 1s means that you can roll a 2, while the graph between 4 and 22 lowers very slightly and nearly uniform to compensate. Basically, each double you choose not to explode bumps up the odds of rolling their usual value, while the odds of rolling between 2 and 20 points above that value lower to compensate. Drop them all and you're back at 2d10. So, for example, by choosing to only explode double 2s, 4s, 6s, 8s and 10s, half the steps of the pyramid have disappeared and the odds of rolling above 20 have visibly lowered.
Neat posting - thank you so much. As you might be aware this is the dice rolling pattern used by DC Heroes (aka Blood of Heroes, aka Mayfair's Exponential Game System), with double 1s being an automatic failure rather than an explosion.
Could you make your spreadsheet downloadable from the article ? As we discussed a few hours ago I'm having a severe attack of the stupids making my own, so I'd like to compare. Thanks. :-)
Hm, I didn't keep my spreadsheet. Anyway, to reproduce it:
Export the 2d10 distribution and copy the # column in a sheet. Copy this column and divide the numbers by 100. Paste those values in a new column per double, shifting down by 2 each step, to account for the added value of the initial double. Subtract 1 from the # in each double row (in the first column). Now sum all # per row to get the final # values. Divide those by the total # and you have the distribution.
Thank you for confirming than my reasoning was correct. Really, everything was fine except for working on the wrong initial series due to a moment of absent-mindedness. But, truly, do we really need correct series to achieve correct results ? Pish posh.
Thanks. :-)
My pleasure!
:) Nah, correct input is not required to obtain the desired output. Being sure you got the correct output, however, is another thing.
For what it's worth, the article you helped with is in beta version at
http://www.writeups.org/fiche.php?id=4724 .
:) Cool! It's always nice to see stuff one helped with, no matter how indirect.