Rule space · 28 vertices · 1024 edges

One Bit Away

Pick a rule. Flip one output bit. Watch the qualitative class jump.

The 256 elementary CA rules sit at the vertices of an 8-dimensional Boolean hypercube. Two rules are neighbours if their lookup tables differ in exactly one output bit. From any rule, there are exactly 8 neighbours — and the qualitative class of a rule does not change smoothly under those bit-flips. Class IV rules often sit one step from Class I. The structure of rule space is jagged.

Section 1

Eight bits, 256 rules, 8 neighbours each

Each elementary CA rule is an 8-bit integer — the lookup table for the function f(left, center, right) → next state. The eight input patterns are 111, 110, 101, 100, 011, 010, 001, 000 (Wolfram numbering: bits 7 down to 0). Each bit independently specifies the output for one neighbourhood.

Flipping any single output bit produces a neighbouring rule. The 256 rules are the vertices of an 8-dimensional Boolean hypercube: 28 = 256 vertices, each with 8 edges, giving 8 · 27 = 1024 edges total. Every pair of neighbours is connected by a single bit-flip in each direction.

Wolfram's behavioural classes assign a qualitative label to each rule — Class I (uniform), Class II (periodic), Class III (chaotic), Class IV (complex). Those labels are not smooth over the hypercube. The walker below makes the jaggedness tangible.

How does the Wolfram numbering work?read in layers

Start here Each elementary CA rule is just a small lookup table: for each of the 8 possible 3-cell neighbourhoods, it says whether the centre cell lives or dies. Wolfram numbered the rules by reading those 8 outputs as a binary number. Rule 110, for example, outputs 01101110 in binary — that's 110 in decimal, hence "Rule 110".

High school The 8 input patterns are ordered from largest to smallest: 111 (7), 110 (6), …, 000 (0). Bit k of the rule number is the output when the neighbourhood encodes to decimal k. So rule R's output for neighbourhood k is (R >> k) & 1. Flipping bit k of R changes only the output for that one neighbourhood — nothing else.

Undergrad The bit-flip metric on {0,1}8 is the Hamming metric. The hypercube graph is the Cayley graph of ℤ28 under generators e0, …, e7. The 256 rules under the standard mirror and state-complement symmetries reduce to 88 inequivalent classes (Wolfram 1983). The symmetry group has order 4, so each equivalence class has size 1, 2, or 4. The hypercube's symmetry group is much larger (order 28 × 8! = 10,321,920) and does not preserve Wolfram classes — which is why walks in Hamming space can cross class boundaries so easily.

Going deeper The distribution of Wolfram classes across the hypercube is neither random nor clustered. Wuensche and Lesser (1992) mapped the "basin of attraction fields" of all 256 rules and found that the Class IV rules cluster near the boundary between the Class I/II and Class III regions in various parameterisations — Langton's λ parameter being the most studied. But λ is itself a smooth function on the hypercube (it counts 1-outputs), and the class boundaries it predicts are approximate. The empirical observation is that Hamming-distance-1 class transitions are common, even across the most dramatic class gaps.

Section 2

Walk the hypercube

The current rule is on the left. Its 8 neighbours — one per bit-flip — are on the right. Click any neighbour to make it the centre. The previous centre becomes one of its own 8 neighbours (every edge is bidirectional).

Rule 110 01101110 Class IV

Walk history

Start walking to see your path.

Section 3

Class doesn't change smoothly

Rule space is not smooth. Four rules make the point concretely. The neighbours listed are all exactly one bit-flip away.

Rule 110 Class IV

Cook's universal rule. Provably Turing-complete.

Flip bitNeighbourClassCharacter
0Rule 111Class IIperiodic
1Rule 108Class IIperiodic
2Rule 106Class IVcomplex
3Rule 102Class IIIchaotic
4Rule 126Class IIIchaotic
5Rule 78Class IIperiodic
6Rule 46Class IIperiodic
7Rule 238Class Iuniform

5 of Rule 110's 8 neighbours are Class I or II. Flip the right bit and universality collapses to a fixed point. Cook's universal rule is a knife-edge in the hypercube.

Rule 30 Class III

Wolfram's canonical chaotic rule; used in Mathematica as a pseudorandom number generator.

Flip bitNeighbourClassCharacter
0Rule 31Class IIperiodic
1Rule 28Class IIperiodic
2Rule 26Class IIperiodic
3Rule 22Class IIIchaotic
4Rule 14Class IIperiodic
5Rule 62Class IIperiodic
6Rule 94Class IIperiodic
7Rule 158Class IIperiodic

7 of 8 neighbours are Class II. Rule 30's chaos is a single island — surrounded almost entirely by periodic rules.

Rule 90 Class III

The XOR rule. Additive, self-similar; produces the Sierpiński triangle from a single cell.

Flip bitNeighbourClassCharacter
0Rule 91Class IIperiodic
1Rule 88Class IIperiodic
2Rule 94Class IIperiodic
3Rule 82Class IIperiodic
4Rule 74Class IIperiodic
5Rule 122Class IIIchaotic
6Rule 26Class IIperiodic
7Rule 218Class IIperiodic

The XOR rule's exact self-similar structure vanishes with any single bit-flip. 7 of 8 neighbours are periodic.

Rule 184 Class II

The traffic flow rule. Models single-lane highway density with a sharp phase transition.

Flip bitNeighbourClassCharacter
0Rule 185Class IIperiodic
1Rule 186Class IIperiodic
2Rule 188Class IIperiodic
3Rule 176Class IIperiodic
4Rule 168Class Iuniform
5Rule 152Class IIperiodic
6Rule 248Class Iuniform
7Rule 56Class IIperiodic

Two of the 8 neighbours collapse immediately to Class I. The traffic rule's structure evaporates in two different directions.

The pattern holds across the whole hypercube. Class boundaries are not walls — they're more like faults: sharp, local, and pervasive. Walking the hypercube reveals this at every step.

Section 4

What the hypercube contains

The 256 vertices are not evenly distributed across classes. The vast majority collapse quickly. Genuinely interesting behaviour is rare.

Class I
24
Class II
192
Class III
26
Class IV
14

192 of 256 rules are periodic. Class IV — the behaviour that supports localized interacting structures and, in the case of Rule 110, universal computation — covers only 14 rules.

Langton's edge-of-chaos framing is one attempt to explain why the 14 exist where they do: Class IV rules cluster near the boundary between the ordered and chaotic regions when the rules are parameterised by the fraction of 1-outputs (the λ parameter). That framing is productive but contested; not all researchers accept it as an explanation rather than a restatement. Measure the metrics directly on the .

Class labels follow Wolfram's qualitative classification expanded through mirror and state-complement equivalences per Martínez (2013). Rules 41, 54, 106, and their equivalents are sometimes listed as Class III in other sources. The classification here follows the Martínez survey table. The boundary is genuinely ambiguous at those rules.