🟦 Wolfram 1D Cellular Automata

An elementary cellular automaton consists of a 1-D row of binary cells. Each cell's next state depends on itself and its two neighbours — 3 cells produce 2³=8 patterns, each mapping to 0 or 1, giving 2⁸ = 256 possible rules. Stephen Wolfram classified them into four classes: uniform, periodic, chaotic, and complex. Despite the simplicity, Rule 110 is Turing-complete (proven by Matthew Cook, 2004). Rule 30 is so unpredictable it is used as a random-number generator in Mathematica. Rule 90 produces the Sierpiński triangle. Type any rule number (0–255) or choose a famous preset.

🇺🇦 Українська

Rule Number

Famous Rules

Initial Condition

Display

Rule30
Class
Cells / row
Generations

Wolfram's Four Classes

Stephen Wolfram (in A New Kind of Science, 2002) classified cellular automata into four classes: Class I — converge to a uniform state (e.g. Rule 0, 255); Class II — periodic or stable structures (Rule 4, 108); Class III — chaotic, pseudo-random patterns (Rule 30); Class IV — complex, localised structures that persist — the most computationally interesting (Rule 110). The Rule 184 CA is a traffic flow model: 1s represent cars, showing jam formation above a critical density. The cone snail Conus textile bears a shell pattern that closely resembles Rule 30 — evolution found the same cellular automaton!

About Wolfram Elementary Cellular Automata

Elementary cellular automata (ECA) are the simplest class of one-dimensional, two-state cellular automata: each cell is either 0 or 1, and its next state depends only on its current value and the values of its two immediate neighbours. Because a cell and its two neighbours form a 3-bit neighbourhood with 8 possible patterns, and each pattern can map to 0 or 1, there are exactly 2⁸ = 256 possible rule tables — numbered 0 to 255 in the Wolfram classification. Despite this extreme simplicity, Stephen Wolfram's exhaustive study in A New Kind of Science (2002) revealed that some rules produce behaviour of astonishing complexity: Rule 30 generates output so irregular it is used as a random-number source inside Wolfram's Mathematica; Rule 110 was proved Turing-complete by Matthew Cook in 2004, meaning it can in principle simulate any computation.

This simulator renders all 256 rules as 2D space-time diagrams (rows = generations, cells = columns). You can select any rule number, toggle the initial condition (single-cell seed or random), adjust the grid width and speed, and observe how local uniformity (Rules 0, 255), periodicity (Rules 1–4), fractal self-similarity (Rule 90 — the Sierpiński triangle), and apparent randomness (Rule 30) all emerge from the same three-cell neighbourhood logic.

Frequently Asked Questions

Why are there exactly 256 elementary cellular automaton rules?

A cell's next state depends on the 3-bit pattern formed by itself and its two neighbours. There are 2³ = 8 such patterns (000 through 111), and each can independently map to 0 or 1. The complete mapping — a lookup table of 8 bits — is therefore one of 2⁸ = 256 possible tables. Wolfram numbers each rule by interpreting its 8 output bits as a binary number: Rule 110 has binary output 01101110, which equals 110 in decimal.

What makes Rule 110 special compared with other rules?

Rule 110 is the only elementary cellular automaton (and one of very few simple rules anywhere) proved to be computationally universal — capable of simulating any Turing machine given an appropriate initial configuration. Matthew Cook published this proof in 2004 after a 15-year embargo by Wolfram. The proof constructs gliders (persistent moving patterns) that act as data and signals, and uses collisions between them to implement logical gates. This makes Rule 110 a minimal substrate for universal computation.

Why does Rule 90 produce the Sierpiński triangle?

Rule 90's update rule computes the XOR of a cell's two neighbours (ignoring the cell itself). Starting from a single "on" cell, this is equivalent to computing Pascal's triangle modulo 2 — and by Lucas's theorem, the entry in row n column k of Pascal's triangle is odd if and only if k is a bitwise subset of n. The resulting pattern of odd/even entries is precisely the Sierpiński triangle, a fractal with Hausdorff dimension log₂3 ≈ 1.585.

How is Rule 30 used as a random number generator?

Rule 30, starting from a single live cell, produces output so irregular that it passes standard statistical tests for randomness. Wolfram's Mathematica uses the central column of a Rule 30 automaton as a pseudorandom bit source (the function RandomInteger[] historically used this). Unlike LFSR-based generators, Rule 30 has no known short-period structure; however, it is deterministic and therefore not suitable as a cryptographic RNG — an attacker who reconstructs the full cell row can predict future output.

What are Wolfram's four classes of cellular automaton behaviour?

Wolfram categorised all ECA rules into four qualitative classes based on their long-term behaviour from random initial conditions. Class 1: evolution to a uniform fixed state (e.g., Rules 0, 255). Class 2: stable or periodic simple structures (e.g., Rule 4, Rule 108). Class 3: chaotic, seemingly random patterns (e.g., Rule 30, Rule 45). Class 4: complex localised structures and interactions — the only class capable of universal computation (e.g., Rule 110). These classes are analogous to fixed-point attractors, limit cycles, strange attractors, and complex dynamical systems respectively.

Can a 1D cellular automaton simulate physics?

Several ECA rules exhibit analogs of physical phenomena. Rule 54 and Rule 110 support gliders (soliton-like structures) that propagate and scatter. Rule 90 with periodic boundaries models quantum-mechanical interference patterns. More practically, Lattice Boltzmann methods — used in fluid dynamics simulation — are higher-dimensional, multi-state generalisations of cellular automata that provably recover the Navier-Stokes equations in the continuum limit, and are widely used in computational fluid dynamics for complex geometries.

Is there a rule that is its own complement?

Yes — several rules are self-complementary (swapping all 0s and 1s produces the same pattern) or are colour-symmetric. For example, Rule 51 simply flips every cell every generation (a trivial complement). More interestingly, Rule 105 is the complement of Rule 150. The full symmetry group of the 256 rules under complementation, reflection, and conjugation generates equivalence classes that reduce the 256 rules to 88 qualitatively distinct behaviours.

How many rules are Turing-complete?

Among the 256 elementary rules, only Rule 110 has been rigorously proved Turing-complete (Cook, 2004). Rule 124, 137, and 193 are conjugates or mirrors of Rule 110 and inherit its universality. Whether other class-4 rules (such as Rule 54) are Turing-complete remains an open question. Beyond ECA, two-dimensional automata like Conway's Game of Life are long-known Turing-complete, and even some one-dimensional two-colour three-state rules have been proved universal.

What happens when ECA rules are run on a ring (periodic boundary) instead of an infinite tape?

With periodic (toroidal) boundary conditions the automaton's state space is finite: there are 2ⁿ possible configurations for an n-cell ring, so the system must eventually cycle. For most rules the transient is short and the eventual period is a small fraction of 2ⁿ. Some rules that appear chaotic on an infinite tape become perfectly periodic on even modestly-sized rings. This distinction between finite and infinite behaviour is important when using ECA for pseudorandom number generation or studying emergent complexity.

What is the connection between Rule 90 and Pascal's triangle?

Starting Rule 90 from a single live cell at position 0, the value of cell k at generation n equals the binomial coefficient C(n, k) modulo 2. By Lucas's theorem, C(n, k) ≡ 1 (mod 2) if and only if every bit of k is also a bit of n (k is a bitwise AND subset of n). This is the exact condition for a cell to be coloured in the Sierpiński triangle. The fractal therefore emerges naturally from the modular arithmetic of Pascal's triangle, a connection first noted by Édouard Lucas in 1878, long before cellular automata were formalised.

Can two different rules produce identical space-time diagrams?

Yes, through the symmetries of complementation and left-right reflection. Reflecting a rule's neighbourhood mapping gives its "mirror rule"; swapping 0s and 1s gives its "complement rule"; applying both gives its "conjugate". These four operations partition the 256 rules into 88 equivalence classes. Rules within the same class produce patterns that are reflections, negatives, or reflected negatives of each other — visually different but structurally identical. For example, Rules 2, 16, 64, and 128 form one such class, all producing very sparse, simple structures.

About this simulation

This simulator renders elementary cellular automata: a single row of binary cells whose next generation is decided purely by each cell and its two neighbours. Since 3 neighbouring cells form 2³ = 8 possible patterns, and each pattern maps independently to 0 or 1, there are exactly 2⁸ = 256 possible rules — the complete set Stephen Wolfram catalogued and numbered in the 1980s. Despite this simplicity, some rules like Rule 110 are proven Turing-complete, capable of universal computation.

🔬 What it shows

Each row of the canvas is one generation, stacked top to bottom, so the picture is a space-time diagram of the automaton unfolding from its initial row. Depending on the rule, the pattern settles into blank space, repeats periodically, dissolves into apparent randomness, or forms the localised moving structures that make Rule 110 computationally universal.

🎮 How to use

Type any rule number from 0–255 into the Rule Number field (or drag the slider) and press Run, or jump straight to a famous rule with the preset buttons (30, 90, 110, 54, 184, 45, 18, 150). Choose the Initial Condition — a single live cell, or a row seeded 50% or 10% at random — then adjust cell size and switch between the B&W, Green and Fire colour schemes.

💡 Did you know?

Rule 30, run from a single live cell, produces output so statistically unpredictable that Wolfram's own software Mathematica has used its central column as a source of pseudo-random numbers. Rule 90, meanwhile, computes XOR of two neighbours and reproduces Pascal's triangle modulo 2 — visually, the Sierpiński triangle.

Frequently asked questions

What is an elementary cellular automaton?

It is the simplest class of cellular automaton: a single row of cells, each either 0 or 1, that updates in discrete time steps according to a fixed rule depending only on the cell and its immediate left and right neighbours. Stacking each generation beneath the previous one produces the space-time patterns shown in this simulator.

Why are there exactly 256 possible rules?

A cell's next state depends on a 3-cell neighbourhood, and 3 binary cells produce 2³ = 8 distinct patterns, from 000 to 111. Each of those 8 patterns is independently mapped to an output of 0 or 1, and there are 2⁸ = 256 ways to make all eight assignments — one for every elementary rule, numbered by reading the 8 outputs as a binary number.

Why is Rule 110 special?

Rule 110 is the only elementary cellular automaton proven to be Turing-complete, meaning it can in principle carry out any computation a general-purpose computer can. Matthew Cook published the proof in 2004, showing that colliding glider-like structures within Rule 110's pattern act as logic gates.

What are Wolfram's four classes of behaviour?

Stephen Wolfram grouped all 256 rules into four qualitative classes: Class 1 rules die out to a uniform state, Class 2 rules settle into stable or periodic structures, Class 3 rules generate chaotic, seemingly random patterns (like Rule 30), and Class 4 rules produce complex localised structures capable of computation (like Rule 110).

How does the Initial Condition setting change the result?

Starting from a single live cell shows how a rule builds structure from nothing, which is the classic way to reveal fractals or triangular patterns. Starting from a row seeded randomly at 50% or 10% instead shows how the same rule processes noisy input, which for chaotic or complex rules can reveal domains, gliders and boundaries that a single-cell start never produces.