1-dimension Cellular Automata

Neighborhood Rules

(click on the buttons to change the output)

Your browser does not support the <canvas> element.

This is a JavaScript implementation of a cellular automaton, a type of algorithm where "cells" change state according to given rules. In particular, this example is a two-state, one-dimensional automaton.
It has been called the Elementary Cellular Automaton by Stephen Wolfram, who studied this type of automata.
In this program, we consider a one-dimensional space of cells that can only have one of two states - here, "black" or "white". Each automaton is defined by a set of "rules" which specify, for each cell, the next state of the cell, depending on its own current state and that of its two neighbours.
Despite the apparent simplicity of the algorithm, some rules can provide interisting results. Notably, Rule 110 has been proved to have the property of universality.
On this page, you may run a cellular automaton, defining the neighboorhood rules and whether to use a simple initial condition (I.C.) of only one black pixel, or a random I.C.

Some rules:

(Note: most rules produce more impressive results with "Simple I.C.")

Class 1 (Uniform)

Class 2 (Pattern)

Class 3 (Random)

Class 4 (Complex)