One rule, guaranteed order
Fill a grid with uniform random integers 0…K−1 and apply a single local rule: a cell advances to its next state if any neighbour already carries that successor state. Run it for a few hundred synchronous steps and something remarkable happens — the noise organises itself into rotating spiral waves that persist indefinitely. This is the cyclic cellular automaton (CCA), the simplest computational model of an excitable medium: a system where a local disturbance triggers a self-propagating wave that briefly resets before it can fire again.
The Greenberg-Hastings model
Formalised by Greenberg and Hastings in 1978, each cell carries a state s ∈ {0, 1, …, K−1}: state 0 is resting, and states 1…K−1 are successive excited/refractory stages that cycle. The synchronous update rule is:
s'(c) = (s(c)+1) mod K if at least θ neighbours have state (s(c)+1) mod K s'(c) = s(c) otherwise // neighbourhood: Moore (8 cells) or von Neumann (4 cells); threshold θ
With a von Neumann neighbourhood and K ≥ 3, Fisch, Gravner and Griffeath proved in 1991 that CCA started from random initial conditions form persistent spiral waves with probability 1 — the spirals are the dynamics' unique attractor, not a lucky outcome.
How a spiral is born
Spiral formation follows a precise three-step sequence. First, nucleation: a local patch of random noise happens to form a monotonically increasing sequence in one direction, and this "seed wave" expands outward as a target ring. Second, breakup: when a planar wave front meets a region already in a different phase, the front breaks and its free ends curl inward — the curling tips are topological defects where all K states meet at a point, and they become the spiral's rotating core. Third, annihilation: spirals of opposite chirality destroy each other on collision, so the survivors are the ones that opened enough territory to outlast their competitors. The rotation period is roughly T ≈ K steps and the wavelength is roughly λ ≈ K cells, so more states means slower, larger spirals.
Three numbers control everything
The qualitative behaviour of CCA is governed by just three parameters. Higher K (states) means a longer refractory period, larger spirals and slower rotation. Higher θ (threshold) makes cells harder to excite, giving fewer but larger spirals — θ = 1 is the most excitable, and above roughly K/4 the automaton stops forming spirals at all and freezes into a static state. A Moore neighbourhood (8 cells) propagates waves faster and produces more complex tips than a von Neumann one (4 cells). Gravner and Griffeath's 1993 analysis splits the (K, θ) parameter space into a dying phase, a chaotic transient phase, and a persistent phase where spirals form inevitably and never die.
The same mathematics as heart tissue
Spiral waves are not a curiosity of toy cellular automata — the same excitable-medium dynamics appears in the Belousov-Zhabotinsky chemical reaction, in slime-mould colonies signalling with cAMP pulses, and, more seriously, in cardiac tissue: a reentrant spiral wave of electrical activation in heart muscle is the mechanism behind ventricular fibrillation. Around each spiral tip the discrete state field winds by exactly ±2π, giving it a conserved topological charge of ±1 — mathematically identical to a vortex in a superfluid or a dislocation in a crystal lattice. That topological protection is why a lone spiral, once formed, essentially never disappears on its own: it takes an opposite-chirality partner to annihilate it.
Frequently asked questions
What is the update rule of a cyclic cellular automaton?
Every cell holds a state s in {0, 1, …, K−1}. On each synchronous step a cell advances to (s+1) mod K if at least θ of its neighbours already hold that successor state; otherwise it stays put. With a von Neumann neighbourhood and K ≥ 3, random initial conditions form persistent spiral waves with probability 1 — proved by Fisch, Gravner and Griffeath in 1991.
Why can't a single spiral just disappear?
Each spiral core carries a topological winding number of +1 or −1, and total topological charge is conserved modulo K. A lone spiral cannot vanish without an opposite-chirality partner to annihilate against — the same mathematics that protects vortices in superfluids and dislocations in crystals. That is why spirals, once formed, are so long-lived.
Does every parameter choice produce spiral waves?
No. Gravner and Griffeath (1993) identified three regimes for large K: a dying phase (θ too high relative to K) where almost all initial conditions collapse to a static uniform state, a chaotic transient phase near the boundary, and a persistent phase (θ ≤ roughly K/4) where spiral waves form inevitably and never die out.
Try it live
Set K, θ and the neighbourhood type in Cyclic Cellular Automata and press randomise — watch order emerge from pure noise within a few hundred generations, entirely in your browser.
▶ Open Cyclic Cellular Automata simulation