Cellular Automata Simulator: Emergent Complexity from Simple Rules

simulator beginner ~10 min
Loading simulation...
Rule 110 — complex structures emerge after 200 generations

Rule 110 with random initial conditions produces persistent structures, gliders, and interactions that are proven capable of universal computation.

Formula

s(i, t+1) = f(s(i-1, t), s(i, t), s(i+1, t))
Rule R: 8-bit binary encodes all 2³ neighborhood outputs
H = -Σ p(s) · log₂(p(s)) (Shannon entropy)

Simple Rules, Complex Worlds

A cellular automaton is a grid of cells that evolves by purely local rules — each cell looks only at its immediate neighbors to decide its next state. Yet from this simplicity, staggering complexity emerges: fractals, turbulence-like chaos, self-replicating structures, and even universal computation. Stephen Wolfram's systematic exploration of all 256 elementary (1D, binary, radius-1) rules revealed that complexity is not a product of complicated rules but of the right simple ones.

The Wolfram Classification

Wolfram grouped the 256 elementary rules into four behavioral classes. Class I rules collapse to uniform states. Class II rules produce periodic, predictable patterns. Class III rules generate chaotic, apparently random output (Rule 30 is the archetype). Class IV rules — the 'edge of chaos' — produce the most fascinating behavior: localized structures that propagate, collide, and interact, reminiscent of particles in physics.

Computation at the Edge

Rule 110, a Class IV automaton, was proven Turing-complete by Matthew Cook in 2004. This means a one-dimensional grid of binary cells, updating by a trivially simple lookup table, can in principle compute anything a laptop can. The proof works by encoding a cyclic tag system — a known universal computation model — into Rule 110's glider collisions. It is perhaps the most striking demonstration that complexity and computation require almost no ingredients.

Beyond One Dimension

Two-dimensional CAs, most famously Conway's Game of Life, exhibit even richer behavior: glider guns, self-replicating patterns, and engineered Turing machines built entirely from cellular interactions. CAs have found practical application in modeling traffic flow, crystal growth, wildfire spread, and lattice-gas fluid dynamics, bridging the gap between abstract computation theory and physical simulation.

FAQ

What is a cellular automaton?

A cellular automaton (CA) is a grid of cells, each in one of a finite number of states, that evolves in discrete time steps according to local rules. Each cell's next state depends only on its current state and its neighbors' states. Despite this locality, CAs can produce complex global behavior including fractals, chaos, and universal computation.

What is Rule 110 and why is it important?

Rule 110 is an elementary (1D, 2-state, 3-neighbor) cellular automaton that Matthew Cook proved Turing-complete in 2004. This means it can simulate any computation, making it the simplest known Turing-complete system. It demonstrates that computational universality requires remarkably little complexity.

What are Wolfram's four classes of cellular automata?

Stephen Wolfram classified elementary CAs into four classes: Class I (uniform/fixed), Class II (periodic), Class III (chaotic/random), and Class IV (complex, edge-of-chaos). Class IV rules like Rule 110 produce the most interesting behavior, including localized structures and long-range interactions.

How are cellular automata used in practice?

CAs model traffic flow, crystal growth, forest fire spread, fluid dynamics (lattice Boltzmann methods), urban growth patterns, and biological morphogenesis. They are also used in cryptography (Rule 30 for pseudorandom generation) and procedural content generation in games.

Sources

Embed

<iframe src="https://homo-deus.com/lab/automata-theory/cellular-automata/embed" width="100%" height="400" frameborder="0"></iframe>
View source on GitHub