Rolling the Dirac dice 3 times results in 27 quantum universes. However, the dice total is
one of only 7 possible values. Instead of handling 27 values, we encode the possible dice
totals with the number of times that they occur. For example, a score of 3 (1 + 1 + 1) only
happens once in the 27 rolls, but a score of 6 happens a total of 7 times.
The initial deterministic dice roll total is 6 (1 + 2 + 3) and increases by 9 each turn.
An interesting observation is that since the player’s position is always modulo 10, we can
also increase the dice total modulo 10, as (a + b) % 10 = (a % 10) + (b % 10). Additionally,
both players end up back in the same position every 10 moves, so we can compute the score per
batch of 10 moves before simulating only the remainder.
Handle each player separately. The number of universes for each player grows independently.
When a player wins, then multiply the number of states by the other player’s states.