If I want my rule to affect cells in this way:
- dead $\to$ dead $\iff$ Cell has $n$ living neighbours, $n\in A$
- dead $\to$ alive$\iff$ Cell has $n$ living neighbours, $n\in B$
- alive $\to$ dead $\iff$ Cell has $n$ living neighbours, $n\in C$
- alive $\to$ alive $\iff$ Cell has $n$ living neighbours, $n\in D$
(where neighborhood of a cell consists of all closest surrounding cells)
Then, how do I specify my rule
?
ArrayPlot[Last[CellularAutomaton[rule, board, step]]]
For example, if $A=C=\{0,2,4,6,8\}, B=D=\{1,3,5,7\}$, and
board = Table[If[i == j == 20, 1, 0], {i, 1, 41}, {j, 1, 41}]
and step
goes from $0$ to $15$, then we should have this replicator pattern:
Which was taken from Terrific Toothpick Patterns - at 14:51 (https://youtu.be/_UtCli1SgjI?t=891)
So how to convert given $A,B,C,D$ to a rule
that gives, for example the pattern above?