# Elementary Cellular Automata

I’ve been playing around recently with cellular automata, particularly a type of automata known as elementary cellular automata. These are the extremely simple computational models that so captures the imagination of Steven Wolfram in his book *A New Kind of Science* [1].

At its most basic, each cellular automaton can be described as a simple binary digit that lives together with two neighbors, also binary digits. Each automaton can give rise to a new automaton, the value of which depends on the current state of its “parent” automaton in combination with the current state of its parent’s two neighbors to the right and left.

So depending on whether the parent, its neighbor to the left, and its neighbor to the right are switched on or off, its child automaton will created with its own state set to either 1 or 0. The three automata that determine the state of the next generation’s automata can occur in any permutation (ie., 000, 001, 011, etc.).

Conveniently, Wolfram developed a simple system for categorizing these automata, using the binary encoding of the numbers 1-255 to capture the automata’s behavior at each new generation. Since each automaton is a binary digit, the Wolfram value simply uses the binary encoding of the numbers 1-255 to describe whether or not a given cellular automaton and its two neighbors gives “birth” to a child with a value of 0 or 1.

You can see very nice visualizations of some of the more interesting of these 255 automata in the page on elementary cellular automata at Wolfram’s MathWorld.

Using Plunker, I developed a simple interface for exploring Wolfram values, which I have embedded directly below. You can play with the starting conditions (here 000000000001000000000000), experiment with arbitrary Wolfram values, and show any reasonable number of generations produced by the Wolfram value provided in combination with the initial application state.

To see some interesting patterns, try first the numbers 26, 90 (both of which produce a pattern resembling Pascal’s Triangle), as well as the number 30.

- A New Kind of Science by Steven Wolfram (Amazon affiliate link)