Of course one can call Richard Gaylord's pyro function as follows
![enter image description here][1]Clear[pyro]
pyro[p_ /; 0 <= p <= 1, f_ /; 0 <= f <= 1] :=
Function[((# /. {0 :> Floor[1 + p - Random[]],
1 :> Floor[2 + f - Random[]]}) //. {{2, c___, 1} -> {2, c,
2}, {1, c___, 2} -> {2, c, 2}, {a___, 2, 1, b___} -> {a, 2, 2,
b}, {a___, 1, 2, b___} -> {a, 2, 2, b}}) /. 2 -> 0]
CellularAutomaton[{pyro[0.01, 0.03], {}, 1}, RandomInteger[{0, 1}, 100], 2]
but this is not appropriate, because the CellularAutomaton reference reads
If an explicit function fun is given, the first argument supplied to
it is the list of neighbors. The second argument is the step number
starting at 0.
CellularAutomaton does not work on the whole actual row to produce a new row, but on the neighbors (in the previous row) of the evolving element in the current row - the one which is under construction. I did not find a way up to now to translate MySmokey
into a CellularAutomaton
call. Nevertheless one can do something analogous working on the neighbors:
Clear[pyron]
pyron[p_ /; 0 <= p <= 1, f_ /; 0 <= f <= 1] :=
Function[With[{x =
Partition[# /. {0 :> Floor[1 + p - Random[]],
1 :> Floor[2 + f - Random[]]}, 2, 1]},
(* Print["Argument is: ",#]; *)
If[IntersectingQ[x, {{1, 2}}] || IntersectingQ[x, {{2, 1}}], 0,
If[#[[2]] != 1, 0, 1]]]]
ArrayPlot[CellularAutomaton[{pyron[0.01, 0.03], {}, 1}, RandomInteger[{0, 1}, 100], 100]]
giving