Five ways to bend a cellular automaton

The simplest cellular automaton is a row of cells, each 0 or 1. At every tick each cell looks at itself and its two neighbours, and one fixed rule, the same for every cell, says what it becomes next; all cells switch at the same moment. That is the elementary cellular automaton, and it has been studied to death, because even it can compute anything a computer can. Yet almost nobody who uses cellular automata uses this one. A model of a forest fire, an epidemic, a traffic jam or a cipher bends at least one item of the recipe: cells that do not all switch at once, rules that roll dice, more than two states, neighbours further away, different rules for different cells. Each bend grew its own name and its own literature, and from the outside the result looks like a pile of trial and error.

In a review paper with Kallil Zielinski, Aisling Daly, Odemir Bruno and Jan Baetens I sorted the pile. Its answer, in one sentence:

The variants of the cellular automaton are not a melting pot but a family tree: five families, each bending one item of the classical definition, tied together by exact mathematical identities, and in which every gain in realism is paid for in mathematical elegance.

Unlike in a biological family tree, some types belong to two families at once, because they are provably the same thing written two ways. The tabs below go through the families one by one, the way the paper does: the definition, the main variants within the family, the identity that ties it to its neighbour, and what the bend does to the tools that describe a cellular automaton. Every identity runs live, and the page counts, cell by cell, whether the two sides really draw the same picture.

The paper is a review, so it has no data: everything below is simulated in your browser. The formulas and the examples are the paper's; where I add something of my own, I say so.

The recipe

Every family starts from the same recipe, the elementary cellular automaton or ECA, written as six items:

  1. cells cic_i in a row, one for every integer ii;
  2. states S={0,1}S = \{0, 1\};
  3. the state of cell cic_i at tick tt, written s(ci,t)s(c_i, t);
  4. a start s(ci,0)=s0(ci)s(c_i, 0) = s_0(c_i);
  5. a neighbourhood N(ci)={ci−1,ci,ci+1}\mathcal{N}(c_i) = \{c_{i-1}, c_i, c_{i+1}\};
  6. a rule ϕ\phi that turns the three states of the neighbourhood into the next state:
s(ci,t+1)=ϕ(s(ci−1,t), s(ci,t), s(ci+1,t)).s(c_i, t+1) = \phi\bigl(s(c_{i-1}, t),\, s(c_i, t),\, s(c_{i+1}, t)\bigr).

Three cells of two states make eight neighbourhoods, and a rule is a 0 or a 1 for each: 223=2562^{2^3} = 256 rules, numbered 0 to 255 by reading the eight answers as a binary number W(ϕ)W(\phi). A rule seen in a mirror, or with 0 and 1 swapped, draws the same pictures, which leaves 88 genuinely different ones. A few of those, like rule 110, are complex enough to compute anything.

The five families each change one item. Three of them change item 6, the rule: the asynchronous family changes when a cell applies it, the stochastic family lets a coin choose it, and the non-uniform family lets it depend on the cell. The multi-state family changes item 2, the states, and the extended-neighbourhood family item 5, the neighbourhood. The paper's central diagram puts them round the elementary automaton, with an arrow from the centre for what each family changes and an arrow between neighbours for the identity that turns one into the other:

mapping ontoproduct statesor fewer cellsmore time stepsor ±1 dimensionnetwork wiringupdate sequenceprobabilisticprobabilisticrule allocationECAelementaryνCAnon-uniformMSCAmulti-stateENCAextendedneighbourhoodACAasynchronousSCAstochastic
The central diagram of the paper. Click a family for its tab, or an arrow round the rim to watch that identity hold.

There is a seventh item, hidden in the first. A computer holds a finite row, so the cells at the ends miss a neighbour, and something has to fill it in. The paper lists eight boundary conditions; a ring, where the last cell's right neighbour is the first cell, is the usual one and the only one in which no cell ever sees an edge. The choice can change the picture well beyond the edge cells:

start from

One more pair of words runs through all the tabs. Some tools read a cellular automaton off its rule without running it: Langton's λ\lambda, the share of neighbourhoods that do not map to 0, or the sensitivity, how often flipping one input flips the output. That is the genotype. Other tools read it off the pictures it draws: Wolfram's four classes (homogeneous, periodic, chaotic, complex), Lyapunov exponents that measure how a flipped cell spreads, entropies. That is the phenotype. Each family tab ends with which of these tools survive the bend, because that is where the price of realism shows.