Elementary cellular automaton
Generate space–time diagrams, edit Wolfram rules and explore finite or periodic boundaries.
About this tool
Generate starts from the current binary row and computes the chosen number of generations immediately (80 by default). Step pauses and advances exactly once; Run and Pause preserve the current generation. Reset returns to the initial row. Initial state, rule table and diagram settings are in collapsible menus.
Each new cell depends on its left neighbor, itself and its right neighbor. The index is 4 × left + 2 × center + right; the bit at that index in the rule number becomes the new center. The eight patterns run from 111 to 000, and every cell reads the previous row. Click a result bit in the rule table to construct another rule. Periodic boundaries join the ends. Fixed outer zeros keep only neighbors outside the finite row at 0. Rule 90 turns 100 into 011 with periodic boundaries, or 010 with fixed outer zeros.
The initial row is generation 0. Enter exactly one 0 or 1 per cell, or toggle the cell buttons; surrounding whitespace is allowed, internal whitespace is not. Random replaces the initial row according to the chosen density; One cell creates one central 1. Changing rule, boundary, width or initial row discards later generations. Width changes center only the initial row by padding with zeros or cropping symmetrically, with an odd extra cell on the right. Confirm the width or select an action to apply it. Only relevant settings validate: density for Random, interval for Run, generation count for Generate. Unused animation or random parameters do not block Step.
The diagram uses dark cells for 0 and light cells for 1; time increases downward. Zoom and grid affect only the view. At most 280 rows are retained; the absolute generation keeps increasing. The first retained generation appears only after older rows have been discarded. Large diagrams scroll locally; Generate centers a wide view horizontally. Hiding the page or tool pauses playback. Returning within the app retains the history, paused; reload restores input drafts and the initial row at generation 0 without running.
Rules 0…255, widths 3…400 cells, density 0…1, interval 16…2000 ms and batch size 1…1000 generations. Browser scheduling can slow playback. A step costs O(width), a batch O(generations × width), stored history at most 280 × width cells. This finite model is not an infinite evolving background. Source: Wolfram: CellularAutomaton.
Raw inputs, including invalid drafts, are saved locally. Older valid settings remain readable. Reload returns to generation zero, while navigation within the app retains the paused session history. Very large drafts keep the previous saved copy and show a warning.