Skip to main content
PlayMemorize
← Back to blog

How to Master Rule 30

TLDR: Rule 30 has no score and nothing to lose. You seed the top row and each row below follows from the one above it: a cell looks at itself and its two neighbours, and the new cell is left XOR (centre OR right). From one dark cell it grows a triangle whose left side is neat stripes and whose middle never settles into anything. That contrast, from one line of arithmetic, is the whole point.

Where the number 30 comes from

A cell has a left neighbour, itself, and a right neighbour. Three cells, each on or off, gives eight possible neighbourhoods. A rule is a choice of on or off for each of those eight, so there are 256 elementary rules, and each is named by reading its eight answers as a binary number.

Thirty in binary is 00011110. Written against the eight neighbourhoods from 111 down to 000, that is:

Neighbourhood 111 110 101 100 011 010 001 000
New cell 0 0 0 1 1 1 1 0

Read the four ones and you get the short form: the new cell is on exactly when the left neighbour is off and at least one of the other two is on, plus the case where only the left is on. That is left XOR (centre OR right).

Caution · the neighbourhood is read from the row ABOVE, always. Build a whole new row from the old one and only then move down. Reading half-finished cells from the row you are writing gives a different rule entirely.

Rule 30

Why one side is tidy and the other is not

Start from a single dark cell and the triangle is lopsided, and this is not an accident.

The left flank falls into a simple repeating stripe almost immediately. Along that edge the neighbourhoods that occur are few, and they cycle.

The right flank and the interior never settle. New neighbourhoods keep occurring, and the pattern that results has no period anyone has found.

The same one line of arithmetic produces both. Order on the left and disorder in the middle are not two behaviours the rule chooses between · they are the same computation seen at two distances from the seed. This is why Stephen Wolfram made Rule 30 the emblem of simple programs producing complexity.

The centre column, and randomness

Read straight down the middle of the triangle and you get a sequence of ons and offs. That sequence passes statistical tests for randomness so well that it was used as the random number generator inside Mathematica for years.

Hold both facts at once: the centre column is completely determined · the same seed always gives the same column, and you could compute the millionth entry with paper and enough patience. And it is, by every practical test, indistinguishable from coin flips. “Deterministic” and “unpredictable” are not opposites.

What to try

Compute three rows by hand from a single cell. Write a row of mostly zeros with one 1, then apply the eight cases across it. Three rows is enough to stop the rule being magic.

Seed a random top row instead of one cell. The famous triangle needs the single seed. From a messy row you get a texture with no triangle at all, which shows how much of the picture is the seed and how much is the rule.

Change one cell in the seed and run it again. The two pictures agree for a few rows and then share nothing. That sensitivity is why the centre column makes a usable random source.

Where else this pattern turns up

The shell of the sea snail Conus textile carries a pigment pattern that looks like a Rule 30 triangle. The cells along the growing lip of the shell switch pigment on or off based on their neighbours, which is the same computation running in a living animal.

A watching path

Phase 1 · the table. Read the eight cases off 00011110 and build three rows by hand. Goal: the rule is arithmetic, not a picture.

Phase 2 · the two flanks. Run from a single cell and find where the left stripes stop being stripes. Goal: see order and disorder in one image.

Phase 3 · sensitivity. Run two seeds that differ by one cell. Goal: understand the centre column’s reputation.

The mastery metric

You have mastered Rule 30 when you can write out its eight cases from the number alone, and when the triangle stops looking like a picture and starts looking like what it is · one line of arithmetic, applied a few million times.

Advertisement
New game videos on YouTube

New game videos on YouTube We make a short video for each game. Subscribe to see the new ones.

OK