Cellular Automaton Simulator - Game of Life & Elementary CA

Elementary Cellular Automaton Simulator & Rule Table

Explore all 256 Elementary Cellular Automaton (ECA) rules with the simulator and complete output mapping table. Enter any rule number to watch its pattern evolve in real time, and compare every rule's output at a glance. Notable rules include Turing-complete Rule 110 and chaotic Rule 30. For a detailed explanation of how ECA works and Wolfram's four classes, see the sections below.

Null rule — all cells die

Initial state

Rule table
Current 3 cells111110101100011010001000
Next generation00000000

Rules

An elementary cellular automaton works in the following steps:

  1. Start with a row of cells as the initial state. Each cell holds a state of 0 (dead) or 1 (alive). The cells at each end wrap around to the opposite side, forming a ring (periodic boundary conditions)
  2. For each cell, look at the 3-cell neighborhood: its left neighbor, itself, and its right neighbor
  3. Look up the 3-cell combination in the rule table (a lookup table that defines the next value for each combination) to determine that cell's value in the next generation
  4. Update all cells simultaneously to produce the next generation (compute the next value for every cell first, then replace them all at once)
  5. Repeat steps 2–4 to advance through generations. In this simulator, each generation is drawn as one row from top to bottom

How rule numbers work

There are 2³ = 8 possible 3-cell combinations (111 through 000), and a rule is a lookup table that specifies the next-generation value (0 or 1) for each. For example, Rule 110:

Current 3 cells111110101100011010001000
Next generation01101110

The 8 outputs lined up give 01101110₂, which converts to 110₁₀ in decimal — this becomes the rule number. There are 2⁸ = 256 possible rules in total

Step-by-step example

1. Prepare the initial state

  A row of cells, each holding 0 or 1.

  Gen 0: [0] [0] [1] [0] [0]
2. Look at each cell's neighborhood

  For each cell, look at left, center, and right as a set.
  The cells at each end wrap around to the opposite side, forming a ring (periodic boundary conditions).

       left center right
          ↓    ↓    ↓
  [0]  [0]  [1]  [0]  [0]
3. Look up the next state in the rule table

  Match the 3-cell combination against the rule table to get the next value.

  e.g. Rule 110:
  (0,1,0) → rule table lookup → 1
4. Update all cells simultaneously

  Apply the rule to every cell at once to produce the next generation.

  e.g. Rule 110:
  Gen 0: [0] [0] [1] [0] [0]
                ↓ all cells update at once
  Gen 1: [0] [1] [1] [0] [0]
5. Repeat

  Repeat 2→3→4 to advance through generations. Stacking them vertically creates a 2D pattern.

What is an Elementary Cellular Automaton?

Elementary Cellular Automata (ECA) were systematically studied by Stephen Wolfram in the 1980s and represent the simplest form of cellular automaton. Despite having only 256 possible rules, their behavior is remarkably diverse. Wolfram classified this behavior into four classes.

Class 1 — Uniform
Regardless of initial conditions, all cells converge to the same state within a few generations. All information from the initial state is completely lost — the simplest possible behavior.
Class 2 — Periodic
Settles into stable patterns such as stripes or fixed points and repeats them indefinitely. Some influence from the initial conditions is preserved locally, but overall behavior remains predictably orderly.
Class 3 — Chaotic
Generates aperiodic, random-looking patterns indefinitely. Tiny differences in initial conditions lead to entirely different outcomes, making long-term prediction impossible. Yet because these patterns are generated by deterministic rules, they can be used as pseudorandom number generators.
Class 4 — Complex
Sits at the boundary between order (Classes 1–2) and chaos (Class 3). Information neither freezes as in Classes 1–2 nor disperses as in Class 3. In this delicate balance, "gliders" — structures that maintain their shape while moving — emerge spontaneously. Gliders can carry information, and their collisions produce new patterns. This ability to preserve, transmit, and transform information is what makes computation possible.

Among the 256 rules, several stand out: Rule 30 is used for chaotic random number generation, Rule 110 has been proven Turing complete, Rule 90 generates the Sierpinski triangle, and Rule 184 models traffic flow. Below, we explore these and other notable rules by class.

Learn more about the history and applications of cellular automata

Notable Class 1 & 2 Rules — Orderly

In Class 1, rules like Rule 0 (all cells converge to 0) and Rule 255 (all cells converge to 1) cause every cell to reach the same state within a few generations. Class 2, on the other hand, contains many interesting rules — including Sierpinski-family rules that generate fractal patterns and rules that simulate traffic flow.

Sierpinski Triangle

One of the most famous patterns in ECA is the Sierpinski triangle (Sierpinski gasket). Starting from a single ON cell, a self-similar fractal triangle emerges.

Exact Sierpinski triangle
Rules 18, 90, and 146 produce symmetric Sierpinski triangles. Rule 60 produces a right-leaning triangle, and Rule 102 produces a left-leaning triangle (these two are mirror equivalents).
Sierpinski from single cell only
Rules 26, 154, 210, and 218 produce a Sierpinski triangle from a single-cell initial condition, but exhibit different behavior with random initial conditions.
Sierpinski-like fractals
Rules 22, 122, 126, and 150 produce fractal patterns that resemble the Sierpinski triangle but are not strictly identical to it.

Traffic Model

Rule 184 is a particle-conserving rule used for traffic flow simulation. Treating black cells as cars and white cells as empty space, a car advances one cell if the space ahead is empty, and stops if blocked.

Notable Class 3 Rules — Chaos

Produces aperiodic, random-looking patterns. Rule 30 is famously used in Mathematica's random number generator. Rules 45 and 106 also exhibit chaotic behavior.

Notable Class 4 Rules — Complexity

The "gliders" described above can be observed in action by running Class 4 rules in the simulator. In Rules 110 and 54, structures that maintain their shape emerge within the periodic background pattern, moving at different speeds. When gliders collide, they produce complex interactions — annihilation, merging, and splitting.

Class 4 Supplement — Turing Completeness

Turing completeness means the ability to perform any computation given the right initial conditions. Class 4 (complex) is neither too orderly nor too chaotic, which makes this possible. In orderly rules, information becomes fixed; in chaotic rules, information disperses and is lost. In Class 4, gliders can preserve and transmit information, enabling computation.

Rule 110
Proven Turing complete by Matthew Cook in 2004, demonstrating that this simple rule can simulate any computation.
Rule 54
Conjectured to be Turing complete, but not yet proven. Like Rule 110, it produces gliders. From a single-cell initial condition, it produces left-right symmetric output.

What are Equivalent Rules?

Among the 256 rules, there are "equivalent rules" that generate patterns with the same structure. Equivalent rules are related by the following three transformations:

Left-right symmetry
Swapping the left and right cells in each neighborhood pattern (swap) produces a left-right symmetric pattern. When a rule produces symmetric output from a single cell (e.g., Rules 26 and 82, Rules 30 and 86), the transformation looks identical, so use random initial conditions to see the difference.
Black-white symmetry
Reversing the bit order and then flipping each bit (reverse+flip) produces a black-white symmetric pattern. This is different from a simple bit-flip (complement). When the initial condition is also color-inverted, the output becomes the color-inverted version of the original pattern. However, some pairs such as Rule 110 and Rule 137 produce color-inverted patterns even from the same single-cell initial condition.
Left-right + Black-white symmetry
Combines the two transformations above. First swaps left and right cells in each neighborhood pattern, then reverses the bit order and flips each bit.
Special Case of Black-White Symmetry — When the Rule Is a Palindrome
When a rule's bit string is a palindrome (reads the same forwards and backwards), flipping the input bits alone causes the output bits to flip as well. Normally, black-white symmetry requires reverse+flip (reversing the order then flipping), but for palindrome rules the bit string is unchanged when reversed, so flip alone is sufficient. For example, Rule 90 (01011010) is a palindrome, so 255 - 90 = Rule 165 (10100101) is its equivalent.

Note The swap in left-right symmetry swaps the left and right cells of each neighborhood pattern (3 bits). For example, neighborhood pattern 110 (position 6) becomes 011 (position 3) when left and right are swapped, so bit positions 6 and 3 are exchanged in the rule's bit string (8 bits). Similarly, 100 (position 4) and 001 (position 1) are exchanged. Symmetric patterns (111, 101, 010, 000) remain unchanged. For example, Rule 110 (01101110): bit positions 6 and 3 are both 1 (unchanged), while bit position 4 (0) and position 1 (1) are swapped, giving 01111100 = Rule 124.

The 88 Independent Rules

Applying the three equivalence transformations above reduces the 256 ECA rules to 88 independent representatives. Every other rule is equivalent to one of these.

All 256 Rules — Output Mapping Table

Complete output mapping for all 256 ECA rules
RuleClass111110101100011010001000Notes
0100000000Independent rule — Null rule — all cells die
1200000001Independent rule
2200000010Independent rule
3200000011Independent rule
4200000100Independent rule
5200000101Independent rule
6200000110Independent rule
7200000111Independent rule
8100001000Independent rule
9200001001Independent rule
10200001010Independent rule
11200001011Independent rule
12200001100Independent rule
13200001101Independent rule
14200001110Independent rule
15200001111Independent rule
16200010000Equivalent to Rule 2 (left-right symmetry)
17200010001Equivalent to Rule 3 (left-right symmetry)
18200010010Independent rule — Sierpinski triangle
19200010011Independent rule
20200010100Equivalent to Rule 6 (left-right symmetry)
21200010101Equivalent to Rule 7 (left-right symmetry)
22200010110Independent rule — Sierpinski-like fractal
23200010111Independent rule
24200011000Independent rule
25200011001Independent rule
26200011010Independent rule — Sierpinski from single cell — differs from true Sierpinski with random input
27200011011Independent rule
28200011100Independent rule
29200011101Independent rule
30300011110Independent rule — Chaotic — used in Mathematica RNG
31200011111Equivalent to Rule 7 (black-white symmetry)
32100100000Independent rule
33200100001Independent rule
34200100010Independent rule
35200100011Independent rule
36200100100Independent rule
37200100101Independent rule
38200100110Independent rule
39200100111Equivalent to Rule 27 (black-white symmetry)
40100101000Independent rule
41200101001Independent rule
42200101010Independent rule
43200101011Independent rule
44200101100Independent rule
45300101101Independent rule — Chaotic
46200101110Independent rule
47200101111Equivalent to Rule 11 (black-white symmetry)
48200110000Equivalent to Rule 34 (left-right symmetry)
49200110001Equivalent to Rule 35 (left-right symmetry)
50200110010Independent rule — Periodic alternating pattern
51200110011Independent rule
52200110100Equivalent to Rule 38 (left-right symmetry)
53200110101Equivalent to Rule 27 (left-right + black-white symmetry)
54400110110Independent rule — Complex — universality candidate
55200110111Equivalent to Rule 19 (black-white symmetry)
56200111000Independent rule
57200111001Independent rule — Complex regular pattern
58200111010Independent rule
59200111011Equivalent to Rule 35 (black-white symmetry)
60200111100Independent rule — Sierpinski triangle (leans right) — additive rule
61200111101Equivalent to Rule 25 (left-right + black-white symmetry)
62200111110Independent rule — Transient chaos settles into a stable repeating pattern
63200111111Equivalent to Rule 3 (black-white symmetry)
64101000000Equivalent to Rule 8 (left-right symmetry)
65201000001Equivalent to Rule 9 (left-right symmetry)
66201000010Equivalent to Rule 24 (left-right symmetry)
67201000011Equivalent to Rule 25 (left-right symmetry)
68201000100Equivalent to Rule 12 (left-right symmetry)
69201000101Equivalent to Rule 13 (left-right symmetry)
70201000110Equivalent to Rule 28 (left-right symmetry)
71201000111Equivalent to Rule 29 (left-right symmetry)
72201001000Independent rule
73301001001Independent rule — Locally chaotic (Li-Packard)
74201001010Independent rule
75301001011Equivalent to Rule 45 (black-white symmetry)
76201001100Independent rule
77201001101Independent rule
78201001110Independent rule
79201001111Equivalent to Rule 13 (black-white symmetry)
80201010000Equivalent to Rule 10 (left-right symmetry)
81201010001Equivalent to Rule 11 (left-right symmetry)
82201010010Equivalent to Rule 26 (left-right symmetry)
83201010011Equivalent to Rule 27 (left-right symmetry)
84201010100Equivalent to Rule 14 (left-right symmetry)
85201010101Equivalent to Rule 15 (left-right symmetry)
86301010110Equivalent to Rule 30 (left-right symmetry)
87201010111Equivalent to Rule 7 (left-right + black-white symmetry)
88201011000Equivalent to Rule 74 (left-right symmetry)
89301011001Equivalent to Rule 45 (left-right + black-white symmetry)
90201011010Independent rule — Sierpinski triangle
91201011011Equivalent to Rule 37 (black-white symmetry)
92201011100Equivalent to Rule 78 (left-right symmetry)
93201011101Equivalent to Rule 13 (left-right + black-white symmetry)
94201011110Independent rule
95201011111Equivalent to Rule 5 (black-white symmetry)
96101100000Equivalent to Rule 40 (left-right symmetry)
97201100001Equivalent to Rule 41 (left-right symmetry)
98201100010Equivalent to Rule 56 (left-right symmetry)
99201100011Equivalent to Rule 57 (left-right symmetry)
100201100100Equivalent to Rule 44 (left-right symmetry)
101301100101Equivalent to Rule 45 (left-right symmetry)
102201100110Equivalent to Rule 60 (left-right symmetry) — Sierpinski triangle (leans left)
103201100111Equivalent to Rule 25 (black-white symmetry)
104201101000Independent rule
105201101001Independent rule — XNOR rule — NOT(p XOR q XOR r)
106301101010Independent rule — Chaotic, (p AND q) XOR r
107201101011Equivalent to Rule 41 (black-white symmetry)
108201101100Independent rule
109201101101Equivalent to Rule 73 (black-white symmetry)
110401101110Independent rule — Turing complete
111201101111Equivalent to Rule 9 (black-white symmetry)
112201110000Equivalent to Rule 42 (left-right symmetry)
113201110001Equivalent to Rule 43 (left-right symmetry)
114201110010Equivalent to Rule 58 (left-right symmetry)
115201110011Equivalent to Rule 35 (left-right + black-white symmetry)
116201110100Equivalent to Rule 46 (left-right symmetry)
117201110101Equivalent to Rule 11 (left-right + black-white symmetry)
118201110110Equivalent to Rule 62 (left-right symmetry)
119201110111Equivalent to Rule 3 (left-right + black-white symmetry)
120301111000Equivalent to Rule 106 (left-right symmetry)
121201111001Equivalent to Rule 41 (left-right + black-white symmetry)
122201111010Independent rule — Near-Sierpinski fractal — amphichiral (symmetric output)
123201111011Equivalent to Rule 33 (black-white symmetry)
124401111100Equivalent to Rule 110 (left-right symmetry) — Turing complete
125201111101Equivalent to Rule 9 (left-right + black-white symmetry)
126201111110Independent rule — Sierpinski-like fractal
127201111111Equivalent to Rule 1 (black-white symmetry)
128110000000Independent rule
129210000001Equivalent to Rule 126 (black-white symmetry) — palindrome
130210000010Independent rule
131210000011Equivalent to Rule 62 (black-white symmetry)
132210000100Independent rule
133210000101Equivalent to Rule 94 (black-white symmetry)
134210000110Independent rule
135310000111Equivalent to Rule 30 (black-white symmetry)
136110001000Independent rule
137410001001Equivalent to Rule 110 (black-white symmetry) — Turing complete
138210001010Independent rule
139210001011Equivalent to Rule 46 (black-white symmetry)
140210001100Independent rule
141210001101Equivalent to Rule 78 (black-white symmetry)
142210001110Independent rule
143210001111Equivalent to Rule 14 (black-white symmetry)
144210010000Equivalent to Rule 130 (left-right symmetry)
145210010001Equivalent to Rule 62 (left-right + black-white symmetry)
146210010010Independent rule — Sierpinski triangle
147410010011Equivalent to Rule 54 (black-white symmetry)
148210010100Equivalent to Rule 134 (left-right symmetry)
149310010101Equivalent to Rule 30 (left-right + black-white symmetry)
150210010110Independent rule — Additive rule — fractal but not Sierpinski
151210010111Equivalent to Rule 22 (black-white symmetry)
152210011000Independent rule
153210011001Equivalent to Rule 60 (left-right + black-white symmetry)
154210011010Independent rule — Sierpinski from single cell — differs from true Sierpinski with random input
155210011011Equivalent to Rule 38 (black-white symmetry)
156210011100Independent rule
157210011101Equivalent to Rule 28 (left-right + black-white symmetry)
158210011110Equivalent to Rule 134 (black-white symmetry)
159210011111Equivalent to Rule 6 (black-white symmetry)
160110100000Independent rule
161210100001Equivalent to Rule 122 (black-white symmetry)
162210100010Independent rule
163210100011Equivalent to Rule 58 (black-white symmetry)
164210100100Independent rule
165210100101Equivalent to Rule 90 (black-white symmetry) — palindrome
166210100110Equivalent to Rule 154 (black-white symmetry)
167210100111Equivalent to Rule 26 (black-white symmetry)
168110101000Independent rule
169310101001Equivalent to Rule 106 (black-white symmetry)
170210101010Independent rule
171210101011Equivalent to Rule 42 (black-white symmetry)
172210101100Independent rule
173210101101Equivalent to Rule 74 (black-white symmetry)
174210101110Equivalent to Rule 138 (black-white symmetry)
175210101111Equivalent to Rule 10 (black-white symmetry)
176210110000Equivalent to Rule 162 (left-right symmetry)
177210110001Equivalent to Rule 58 (left-right + black-white symmetry)
178210110010Independent rule
179210110011Equivalent to Rule 50 (black-white symmetry)
180210110100Equivalent to Rule 154 (left-right + black-white symmetry)
181210110101Equivalent to Rule 26 (left-right + black-white symmetry)
182210110110Equivalent to Rule 146 (black-white symmetry)
183210110111Equivalent to Rule 18 (black-white symmetry)
184210111000Independent rule — Traffic model — particle conservation
185210111001Equivalent to Rule 56 (left-right + black-white symmetry)
186210111010Equivalent to Rule 162 (black-white symmetry)
187210111011Equivalent to Rule 34 (black-white symmetry)
188210111100Equivalent to Rule 152 (left-right + black-white symmetry)
189210111101Equivalent to Rule 24 (left-right + black-white symmetry)
190210111110Equivalent to Rule 130 (black-white symmetry)
191210111111Equivalent to Rule 2 (black-white symmetry)
192111000000Equivalent to Rule 136 (left-right symmetry)
193411000001Equivalent to Rule 110 (left-right + black-white symmetry) — Turing complete
194211000010Equivalent to Rule 152 (left-right symmetry)
195211000011Equivalent to Rule 60 (black-white symmetry) — palindrome
196211000100Equivalent to Rule 140 (left-right symmetry)
197211000101Equivalent to Rule 78 (left-right + black-white symmetry)
198211000110Equivalent to Rule 156 (left-right symmetry)
199211000111Equivalent to Rule 28 (black-white symmetry)
200211001000Independent rule
201211001001Equivalent to Rule 108 (black-white symmetry)
202211001010Equivalent to Rule 172 (black-white symmetry)
203211001011Equivalent to Rule 44 (black-white symmetry)
204211001100Independent rule
205211001101Equivalent to Rule 76 (black-white symmetry)
206211001110Equivalent to Rule 140 (black-white symmetry)
207211001111Equivalent to Rule 12 (black-white symmetry)
208211010000Equivalent to Rule 138 (left-right symmetry)
209211010001Equivalent to Rule 46 (left-right + black-white symmetry)
210211010010Equivalent to Rule 154 (left-right symmetry) — Sierpinski from single cell, differs with random input
211211010011Equivalent to Rule 38 (left-right + black-white symmetry)
212211010100Equivalent to Rule 142 (left-right symmetry)
213211010101Equivalent to Rule 14 (left-right + black-white symmetry)
214211010110Equivalent to Rule 134 (left-right + black-white symmetry)
215211010111Equivalent to Rule 6 (left-right + black-white symmetry)
216211011000Equivalent to Rule 172 (left-right + black-white symmetry)
217211011001Equivalent to Rule 44 (left-right + black-white symmetry)
218211011010Equivalent to Rule 164 (black-white symmetry)
219211011011Equivalent to Rule 36 (black-white symmetry) — palindrome
220211011100Equivalent to Rule 140 (left-right + black-white symmetry)
221211011101Equivalent to Rule 12 (left-right + black-white symmetry)
222211011110Equivalent to Rule 132 (black-white symmetry)
223211011111Equivalent to Rule 4 (black-white symmetry)
224111100000Equivalent to Rule 168 (left-right symmetry)
225311100001Equivalent to Rule 106 (left-right + black-white symmetry)
226211100010Equivalent to Rule 184 (left-right symmetry)
227211100011Equivalent to Rule 56 (black-white symmetry)
228211100100Equivalent to Rule 172 (left-right symmetry)
229211100101Equivalent to Rule 74 (left-right + black-white symmetry)
230211100110Equivalent to Rule 152 (black-white symmetry)
231211100111Equivalent to Rule 24 (black-white symmetry) — palindrome
232211101000Independent rule
233211101001Equivalent to Rule 104 (black-white symmetry)
234111101010Equivalent to Rule 168 (black-white symmetry)
235111101011Equivalent to Rule 40 (black-white symmetry)
236211101100Equivalent to Rule 200 (black-white symmetry)
237211101101Equivalent to Rule 72 (black-white symmetry)
238111101110Equivalent to Rule 136 (black-white symmetry)
239111101111Equivalent to Rule 8 (black-white symmetry)
240211110000Equivalent to Rule 170 (left-right symmetry)
241211110001Equivalent to Rule 42 (left-right + black-white symmetry)
242211110010Equivalent to Rule 162 (left-right + black-white symmetry)
243211110011Equivalent to Rule 34 (left-right + black-white symmetry)
244211110100Equivalent to Rule 138 (left-right + black-white symmetry)
245211110101Equivalent to Rule 10 (left-right + black-white symmetry)
246211110110Equivalent to Rule 130 (left-right + black-white symmetry)
247211110111Equivalent to Rule 2 (left-right + black-white symmetry)
248111111000Equivalent to Rule 168 (left-right + black-white symmetry)
249111111001Equivalent to Rule 40 (left-right + black-white symmetry)
250111111010Equivalent to Rule 160 (black-white symmetry)
251111111011Equivalent to Rule 32 (black-white symmetry)
252111111100Equivalent to Rule 136 (left-right + black-white symmetry)
253111111101Equivalent to Rule 8 (left-right + black-white symmetry)
254111111110Equivalent to Rule 128 (black-white symmetry)
255111111111Equivalent to Rule 0 (black-white symmetry) — palindrome — Identity rule — all cells survive

Related Tools & Games