Christian Jacob, University of Calgary 2
Two-Dimensional Cellular Automata
Christian Jacob, University of Calgary 3
Formally, we can characterize the 2D Moore neighbourhood Nij(r) of radius r in a cell lattice L for a cell cij by
- Nij(r) = {(k, l) L | |k-i| r and |l-j| r }.
Two-dimensional CA Neighbourhoods
von Neumann r = 1 Moore r = 1 Extended Moore r = 1, 2, 3
Christian Jacob, University of Calgary 4
Totalistic Cellular Automata
- Consider the following 1D CA rule:
111 110 101 100 011 010 001 000 0 1 1 0 1 0 0 0
- This automaton changes ci into a 1 only if the sum of the
cells ci-1, ci, and ci+1 is exactly 2: This is an example of a totalistic rule. ci(t+1) = 1, if ci-1(t) + ci(t) + ci+1(t) = 2 0, otherwise
{
Christian Jacob, University of Calgary 5
Encoding of Totalistic Rules
- We first look at one-dimensional, binary CA rules (V = 2):
ci(t+1) = f ( j Ni(2) ci+j (t) ),
- where f : V 2r +1 {0, 1}.
- We can make a table of f in the form of a tuple
- ( f (0), f (1), f (2), …, f (2r + 1) ).
- We can encode this tuple by the following formula:
- Cf = j=0, …, 2r+1 f ( j ) · 2j.
Christian Jacob, University of Calgary 6
Encoding of Totalistic Rules (2)
- With this encoding all legal rule codes are even numbers.