Imploding / Exploding Die

Imploding / Exploding Die

Return to topic list

Mon Jan 4 15:48:58 2016   by   Ishpeming
I would like to figure out probabilities for the old world of darkness.  I would like the program to count 8s, 9s, 10s on a variable number of d10s.  10s explode infinitely.  However, 1s subtract from the total number of counted die.
 
Tue Jan 5 10:32:54 2016   by   Torben
You can do it this way:

N := 4;  \ number of dice in pool
pool := N # accumulate x := d10 while x=10;
(count 7<pool) - (count 1=pool)


However, that is very slow when N is 4 or more.  To speed it up, we note that 2-7 behave the same, as does 8 and 9, so instead of a d10 we use a die with one 1, six 2s, two 8s and one 10:

N := 4;  \ number of dice in pool
pool := N # accumulate x := choose {1,6#2,2#8,10} while x=10;
(count 7<pool) - (count 1=pool)


The reason this is faster is that there are fewer different pools possible.
 
Tue Jan 5 17:35:03 2016   by   Ishpeming
Marvelous!
 

Return to topic list



New message:
Topic:
Posted by:

Type the values of the dice shown below:

Return to topic list