Simulations and growth

Cellular automata

A grid of cells, each looking at its neighbours by one rule over and over: spirals, mazes, coral and Wolfram's triangles grow out of random noise.

  • GPU simulation
  • tile (approximate)
Open in the editor →

A cellular automaton is a grid of cells, each looking at its neighbours at every step and deciding what to become by one fixed rule. Out of this grow Sierpiński triangles, spiral waves, mazes and “creatures” crawling about.

How it works

“Elementary 1D” is a row of cells, 0 or 1. A cell's new value depends on itself and its two neighbours: eight cases, whose eight answers form the bits of the rule number, 0 to 255. Each generation is drawn a row below the last: a space-time diagram.

In the “cyclic” automaton N colours stand in a circle, and a cell moves on to the next colour when enough neighbours already have it. Each colour preys on the one before, and random noise self-organises into spiral waves, as in the Belousov–Zhabotinsky reaction.

In Life, B/S lists how many live neighbours out of eight bring a dead cell to life (B) and keep a live one alive (S). Generations rules add dying states: a cell fades over several steps and cannot be reborn meanwhile.

1D: new = bit no. (4·l + 2·c + r) of the rule rule 30: l XOR (c OR r) rule 90: l XOR r cyclic: k → (k + 1) mod N if at least T neighbours have colour k + 1 Life B3/S23: born on 3, survives on 2–3

A bit of history

In the late 1940s John von Neumann, with Stanisław Ulam, built a self-reproducing automaton on a cell grid; it needed 29 states. In October 1970 Martin Gardner described John Conway's Life in Scientific American, and that same year Bill Gosper found a “gun” firing gliders forever; gliders were later wired into a universal computer. From 1983 Stephen Wolfram surveyed all 256 elementary rules, work that culminated in A New Kind of Science (2002). Rule 30 is so chaotic that Mathematica used it to generate random numbers, and its pattern clads Cambridge North station. Matthew Cook proved rule 110 universal: it can compute anything computable. David Griffeath studied the cyclic automaton in the late 1980s; Brian Silverman invented Brian's Brain.

What to tweak

  • With “Automaton” “elementary 1D”, “1D rule” 90 and “Start” “centre” grow a Sierpiński triangle from one cell; 30 gives chaos, 110 moving structures on a periodic background.
  • For cyclic spirals try “States” 14, “Neighbourhood range” 1, “Threshold” 1 and a von Neumann “Neighbourhood”.
  • “Life rule” set to “Maze” grows corridors out of noise; “Coral” is best grown from the centre.
  • “Colouring” “history” leaves melting trails behind dying cells; “Cell shape” “circles” plus a “Gap” makes an LED board.
  • Animated, the 1D automaton scrolls up like a chart recorder, and Brian's Brain under the “Kaleidoscope” effect becomes a living ornament.

Parameters

Automaton
elementary 1D · cyclic · Life & Generations
1D rule
Wolfram rule number 0–255: 30 is chaos, 90 Sierpiński, 110 universal (1D mode)
States
How many colours go round the cyclic automaton
Neighbourhood range
How far a cell sees its neighbours (cyclic)
Threshold
Neighbours in the next colour needed for a cell to advance (cyclic)
Neighbourhood
A square around the cell or a diamond (cyclic) Moore (square) · von Neumann (diamond)
Life rule
When a cell is born and survives (B/S); Generations rules add dying states Conway's Life B3/S23 · HighLife B36/S23 · Day & Night B3678/S34678 · Maze B3/S12345 · Mazectric B3/S1234 · Coral B3/S45678 · Vote B5678/S45678 · Anneal B4678/S35678 · Diamoeba B35678/S5678 · Morley B368/S245 · Walled cities B45678/S2345 · Brian's Brain B2/S/3 · Star Wars B2/S345/4 · Frogs B34/S12/3 · Spirals B234/S2/5 · Flaming Starbows B23/S347/8 · Belousov–Zhabotinsky B23/S23/8 · Lava B45678/S12345/8 · Swirl B34/S23/8 · Fireworks B13/S2/21 · Bombers B24/S345/25
Cells
Cells across the short side
Steps
Generations before the picture is done (1D always fills the frame)
Start
Noise over the whole field or a seed in the centre (a single cell in 1D) noise · centre
Noise density
Share of live cells in the starting noise (Life, 1D)
Cell shape
squares · circles · rounded
Gap
Space between cells, as a share of a cell
Colouring
Gradient: by state, neighbours or neighbourhood; history: by age, with trails of dying cells flat · gradient · history