Tag Info

New answers tagged


This is not an answer, but an extended comment on @beliarius's answer which I much admire. Notwithstanding my admiration, I have some nits to pick. The simulation should be parameterized by the number of steps to run, the number of dice, and the delay between histograms. oneCycle should not flatten news twice. For a million steps, as proposed by the OP, ...


(* First we calc the ways to add up n with two dice *) alts[x_] := Union[Join @@ Map[{#, Reverse@#} &, IntegerPartitions[x, {2}, Range@6]]] ways = alts /@ Range[1, 12]; (* an initial dice config *) m1 = RandomVariate[DiscreteUniformDistribution[{1, 6}], 300]; (* the "collision result" function*) oneCycle[m1_] := Module[{p1, s1, news}, (* form the ...

Top 50 recent answers are included