Todd Rowland
Wolfram Research
Maryland
Registered: Oct 2003
Posts: 103 |
running these rules in Mathematica
The simplest way is to use a general function because in general these are not outer totalistic. For states 0 and 1 the rule is similar but for states >1 they do not affect the firing of neighboring cells, and themselves transition 2->3->4...->max->0.
E.g. the Star Wars rule is CellularAutomaton[{Switch[#[[2, 2]], 0, Count[#, 1, {2}] /. {2 -> 1, _ -> 0}, 1, Count[#, 1, {2}] /. {3 | 4 | 5 -> 1, _ -> 2}, 2, 3, _, 0] &, {}, {1, 1}}, {RandomInteger[3, {10, 10}], 0}, 20]
and the LOTE is CellularAutomaton[{Switch[#[[2, 2]], 0,Count[#, 1, {2}] /. {3 -> 1, _ -> 0}, 1, Count[#, 1, {2}] /. {3 | 4 | 5 -> 1, _ -> 2}, 2, 3, 3, 4, 4, 5, _, 0] &, {}, {1, 1}}, {RandomInteger[5, {10, 10}], 0}, 20]
starting from a random 10x10 block for 20 steps. Attached are such evolutions out to 150 steps.
Todd Rowland has attached this image:
Report this post to a moderator | IP: Logged
|