Elementary cellular automaton
Controls
- Click or tap a cell in the first row to change its color. This works only before the simulation starts and after the field is cleared.
- "Rule" is a number from 0 to 255. Changing it clears the field and stops the simulation.
- "Cells" sets the row width from 1 to 100. Changing it clears the field and stops the simulation.
- "Generations" sets the number of rows from 1 to 100. Changing it clears the field and stops the simulation. The simulation also stops when all rows are drawn.
- "Speed" sets how often a new generation appears. The further right the slider, the faster it goes.
- "Clear" resets the diagram and stops the simulation.
- Quality sets the export resolution (1×, 2× or 3× the diagram size), frame rate and video bitrate for PNG and video files. Medium is the default.
- Record video saves the diagram as a WebM file (or MP4, where the browser supports it). Recording stops automatically after 60 seconds, when you press Stop recording, or when the field is cleared or the rule, cells or generations change.
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.