Skip to content

Systems

256 rules, one byte each

Elementary cellular automata look like a toy: a row of black and white cells and a lookup table. Read one rule number bit by bit and you see why such small rules can be boring, periodic, chaotic or even universal.

A rule is not its description. The same eight-bit table can stay silent forever or compute anything; you only find out by running it.

Eight neighbourhoods, one byte

Take a row of cells, each black or white. To get the next row, every cell looks at three cells above it: its left neighbour, itself and its right neighbour. Three cells with two states each give 2 × 2 × 2 = 8 possible patterns, from 111 down to 000.

A rule is nothing more than an answer for each of those eight patterns: black or white, which makes 2⁸ = 256 possible rules. Eight yes-or-no answers is exactly one byte, so every rule fits in a single number from 0 to 255.

How to read a rule number

Wolfram's convention lists the eight neighbourhoods in descending order, 111, 110, 101, 100, 011, 010, 001, 000, and writes the new cell under each. For Rule 30 the answers are 0, 0, 0, 1, 1, 1, 1, 0.

Read those eight answers as a binary number, 00011110, and you get 30: the name of the rule is its own lookup table. The same trick works backwards. Rule 204 is 11001100, which copies the middle cell and changes nothing; Rule 0 turns everything white in one step.

Same size, very different worlds

Start each rule from a single black cell and the 256 tables stop looking alike. Many die out or freeze. Some settle into stripes that repeat. Rule 90, which sets each cell to its left neighbour XOR its right neighbour, draws a perfect Sierpinski triangle.

Rule 30 grows a pattern whose right side never seems to settle; its centre column is irregular enough to have been used as a random-number generator. Rule 110 grows localized structures that travel and collide, and Matthew Cook proved those collisions can carry out any computation. Wolfram grouped the behaviours into four classes: uniform, periodic, chaotic and complex.

256 is really 88

Mirror a rule left to right and you get a rule that behaves the same, just facing the other way. Swap every black for white and you get the same behaviour in negative. Rule 30, for example, mirrors into Rule 86.

Once mirror images and colour swaps are counted as one, the 256 rules collapse into 88 genuinely different ones. The number of names was never the number of ideas; most of the list is the same idea seen from another side.

Run it to know it

What stays with me is the gap between how small the rule is and how hard it is to predict. You can hold Rule 30 or Rule 110 in your head, yet in general there is no shortcut that tells you what row one million looks like without computing the rows before it.

The fastest way to understand a rule is not to stare at its table but to run it. The Cellular Automata Lab lets you type any number from 0 to 255 and watch it unfold, and the Conway's Game of Life page takes the same idea into two dimensions.