About Cyclic Cellular Automata
Cyclic Cellular Automata (CCA) are a family of two-dimensional grid models where each cell cycles through N discrete states (0, 1, 2, …, N−1). At each generation, a cell in state s advances to state (s+1) mod N if and only if at least threshold of its neighbours are already in state s+1. This minimal rule produces self-organising spiral waves and rotating target patterns without any central coordination.
With a small N (3–5 states) and threshold 1–2, the grid rapidly self-organises into rotating spirals that persist indefinitely. Raising N to 10–16 shifts the behaviour toward concentric target waves (resembling the Belousov–Zhabotinsky reaction). The Moore neighbourhood (8 neighbours) produces tighter, more symmetric patterns than the Von Neumann neighbourhood (4 neighbours).
CCA were studied extensively by David Griffeath and Janko Gravner in the 1990s. They serve as discrete analogues of excitable media in biology and chemistry, illustrating how local rules give rise to global order — a key theme in complexity science, emergent computation and generative art.
Frequently Asked Questions
What is the difference between Moore and Von Neumann neighbourhoods?
How many states N should I use for the best spirals?
Is this related to Conway's Game of Life?
What real-world phenomena does CCA model?
Does the simulation wrap around at the edges?
Why does the pattern sometimes freeze or become uniform?
How is the rendering done at high speed?
Can I use these patterns in my own projects?
About Cyclic Cellular Automata — Spiral Wave Patterns
Cyclic Cellular Automata (CCA) simulate a two-dimensional grid where each cell holds one of N discrete states cycling from 0 to N-1. A cell advances to its next state only when at least a threshold number of its neighbours already hold that next state — the Greenberg-Hastings excitable-media rule. From a random initial configuration, this purely local interaction spontaneously self-organises into rotating spiral waves and concentric target waves without any central control.
CCA serve as a discrete analogue of excitable media found throughout nature, most famously the Belousov-Zhabotinsky oscillating chemical reaction and spiral-wave dynamics in cardiac muscle tissue, making them an important tool for studying emergence in complex systems.
Frequently Asked Questions
What is a cyclic cellular automaton?
A cyclic cellular automaton is a grid model where each cell holds one of N states (0 through N-1) arranged in a cycle. At each generation a cell in state s advances to state (s+1) mod N if and only if at least a specified threshold number of its neighbours are already in state s+1. This minimal local rule produces rich global pattern formation — rotating spirals and target waves — without any top-down coordination.
How do I use the simulation controls?
Use the States N slider (3-16) to set the cycle length — low values (3-6) produce tight spirals while high values (10-16) produce target waves. The Threshold slider (1-8) sets how many neighbours must be in the next state before a cell advances; lower thresholds spread waves faster. Toggle between Moore (8 neighbours including diagonals) and Von Neumann (4 orthogonal neighbours) neighbourhoods, and click or drag on the canvas to seed a fresh disturbance at any point.
Why do spiral patterns emerge from random noise?
Spirals emerge because the cyclic rule creates travelling wavefronts where each colour band chases the next. When a wavefront curves slightly due to random initial conditions, the curvature self-amplifies: the outer arc of a curve advances faster than the inner arc, rotating the entire structure into a persistent spiral. This is the same curvature-driven mechanism observed in the Belousov-Zhabotinsky chemical reaction and in cardiac reentrant arrhythmias.
What is the Greenberg-Hastings model?
The Greenberg-Hastings model, introduced by James Greenberg and Stuart Hastings in 1978, is a cellular automaton designed to capture the essential dynamics of excitable media. Each cell passes through an excited state, a refractory period, and then returns to a resting state ready to be excited again — directly analogous to a neuron firing and recovering. The CCA threshold rule is a simplified discrete version of this framework where the number of states N controls the length of the refractory period relative to the excitation.
What real-world phenomena does CCA model?
CCA is a discrete model of excitable media, capturing the dynamics of the Belousov-Zhabotinsky oscillating chemical reaction (which produces visible rotating colour spirals in a Petri dish), spiral-wave reentry in cardiac muscle (implicated in ventricular fibrillation), calcium signalling waves in cells, and retinal spreading depression. The mathematical correspondence is close enough that CCA simulations are used in theoretical biology to study how spiral waves nucleate and break down.
Is there a common misconception about how CCA spirals form?
A common misconception is that spirals are seeded directly by the random initial state — that some special initial configuration is needed. In fact, virtually any random initial condition (for low N and threshold) will self-organise into spirals within tens of generations. The spirals are an attractor of the dynamics, not a property of the initial state. Another misconception is that the simulation requires complex code: the entire rule fits in a single line of logic applied uniformly to every cell.
Who discovered cyclic cellular automata and when?
The systematic study of CCA as a mathematical object was pioneered by David Griffeath and Janko Gravner at the University of Wisconsin-Madison during the late 1980s and 1990s. Griffeath's Primordial Soup Kitchen website (1994 onwards) was an early web resource popularising CCA. Their work built on the Greenberg-Hastings (1978) excitable-media model and on Winfree's (1972) studies of spiral waves in the Belousov-Zhabotinsky reaction, unifying these strands into a rigorous probabilistic cellular automata framework.
What other simulations are related to cyclic CA?
Closely related simulations include Conway's Game of Life (binary-state CA), Brian's Brain (3-state excitable CA), the Belousov-Zhabotinsky reaction simulator (continuous reaction-diffusion), and the Greenberg-Hastings lattice model. On this site, Diffusion-Limited Aggregation explores another form of pattern emergence from local rules, while Flow Fields and Mandelbrot Set Explorer demonstrate different classes of generative pattern. Turing reaction-diffusion systems produce similar spiral and target waves through a fundamentally different (continuous PDE) mechanism.
How is CCA used in engineering or technology?
CCA-inspired excitable-media models inform the design of defibrillation protocols — cardiac spiral waves (reentrant arrhythmias) cause ventricular fibrillation, and understanding how to break or prevent them is a direct clinical application. In engineering, CCA dynamics have been applied to parallel computing (self-timed circuits that propagate signals as waves), distributed robot coordination (stigmergy-based swarm algorithms), and image processing (segmentation by wave propagation). The GPGPU implementation used in this simulation — computing thousands of cells in parallel on the GPU — reflects how reaction-diffusion simulations are run in scientific computing.
What are current research frontiers for cyclic CA and excitable media?
Active research areas include three-dimensional CCA (scroll waves and knotted filaments, relevant to cardiac 3D tissue), stochastic CCA (adding noise to study robustness of spiral formation), and heterogeneous excitable media (variable threshold across the grid, modelling tissue inhomogeneity). In physics, the connection between CCA and the universality classes of directed percolation remains an open question. Neuromorphic computing researchers are investigating whether excitable-media dynamics can implement energy-efficient wave-based computation on hardware, echoing early cellular automata proposals by von Neumann and Codd.