Elementary cellular automaton

What you see here

This is a simulation of an elementary cellular automaton. Picture a row of cells, each one either black or white. The first row sets the starting state, and every next row is calculated from the one above it using the same rule. Rows go from top to bottom, and each row is a new generation.

How the picture is built

Each cell looks at itself and its two neighbors and decides what color it will be in the next generation. The rule number from 0 to 255 is written in binary, and its eight bits give the answer for each of the eight possible neighbor combinations. That is why the same rule and first row always produce the same picture.

Who came up with it

Stephen Wolfram studied these automata systematically in the early 1980s. In 1983 he sorted all 256 rules into classes by how they behave, from patterns that quickly fade to uniform states up to chaos and complex structures. Rule 30 became the classic example of chaos. Later it was shown that rule 110 can perform universal computation.

Why it is interesting

A single black cell can grow into a triangle, a striped pattern or chaos, depending on the rule. Starting from one cell, rule 90 draws a symmetric triangle, while rule 30 gives an almost random picture. Change the rule, the number of cells or generations, and see what happens.