×
About One-Line Life
A row of cells, each black or white. Every new row is made from the one above it: each cell looks at three cells, the one straight above and its two neighbours, and a rule says what those three make. Three black-or-white cells can be arranged 8 ways, so a rule is 8 answers, and there are 28 = 256 rules. Row after row, the page weaves them into cloth.
RULE : type a rule number (0 to 255), or click one of the eight cards to flip its answer (a punched hole makes a black cell) and the number follows. Under them are the rule's twins and its class. The famous rules are below. START : one black cell in the middle, a random row (how full, and a seed that makes the same row every time) or your own: click or drag cells in the first row, above the cloth. Pick how many cells across, and whether the ends join up (WRAP ROUND) or have white beyond them. WEAVE weaves the cloth row by row; tick Keep weaving to roll the cloth on for ever. ALL 256 shows every rule at once: click one to open it. Point at any cell of the cloth to see the three cells it came from and the card it used.
Keys: Space weaves or stops, ← and → go to the rule before or after (not while typing in a box).
THE STORY
Cellular automata go back to John von Neumann and Stanisław Ulam in the 1940s, who used grids of cells to study machines that could build copies of themselves. In 1983 Stephen Wolfram set out to study the very simplest kind, a single line of two-colour cells with these three-cell rules, and gave each rule the number used here (his paper "Statistical mechanics of cellular automata" in Reviews of Modern Physics ). The next year he sorted their behaviour into four classes: class 1 dies out to one colour, class 2 settles into stripes or simple repeats, class 3 stays messy for ever, class 4 builds structures that move about and collide. The classes are judged by eye, and lists differ over a few rules (41, 73 and 106, for example).
Rule 30 surprised him: one cell and a simple rule give a pattern that never settles and looks random down the middle. Wolfram used its centre column as the random number generator for whole numbers in his program Mathematica. In 2019 he offered prizes for three open questions about that column: does it ever repeat, do black and white come equally often in the long run, and can the n-th cell be found without working out all the rows above. Patterns much like Rule 30's appear on the shell of the textile cone snail. Rule 110 is universal: Wolfram suggested it in 1985, Matthew Cook proved it in the 1990s and the proof was published in 2004, so a single row of cells under this rule can, with the right start, carry out any computation a computer can. Rule 184 is the simplest model of traffic and has been used as one since the 1990s. Rule 90 draws the Sierpiński triangle, which is Pascal's triangle with the odd numbers coloured.
The loom is not just decoration. Joseph Marie Jacquard's loom of 1804 wove its pictures from a chain of punched cards, one card for each row of weft: where the card has a hole, a hook lifts that warp thread and it shows on the face of the cloth. Charles Babbage meant to drive his Analytical Engine with punched cards for the same reason, and in 1843 Ada Lovelace wrote that it "weaves algebraical patterns just as the Jacquard-loom weaves flowers and leaves".
HOW IT WORKS
Read the three cells as a binary number, black = 1: 111 is 7, 110 is 6 and so on down to 000, which is 0. The rule number written in binary gives the eight answers, the first digit for 111 and the last for 000. Rule 30 is 00011110: 100, 011, 010 and 001 make black, the rest white. The cards are in that order, so the holes read the rule's binary from left to right.
Twins: look at a rule in a mirror (swap left and right) and you get another rule that draws the mirror picture; swap black and white and you get one that draws the colour-swapped picture. Rule 30's twins are 86 (mirror), 135 (colours swapped) and 149 (both). Some rules are their own twins, and only 88 of the 256 behave differently from the rest.
The classes on this page come from a simple test, not from Wolfram's own list: each family of twins is run from the same random row of 149 cells, ends joined, for 600 rows. If the last row is all one colour it is class 1; if the last rows repeat an earlier row (within 64 rows, perhaps slid sideways) it is class 2; otherwise class 3. That test can't tell class 4 from class 3, so only 54 and 110 (and their twins), the two class 4 rules most often given, are marked 4. It gives 8, 65, 13 and 2 of the 88; Wolfram's own count of class 1 is also 8.
WRAP ROUND joins the two ends of the row into a ring, so a pattern that reaches one edge comes back from the other. WHITE EDGES pretends there are white cells beyond both ends. The random bits come from Rule 30 on an endless white row, so they never meet an edge.
FURTHER WATCHING AND READING