Elementary 1D Cellular Automata in Java

a CS 490 Independent Research project

by Yee Yang Li Hector

This page demonstrates the principles of simple one dimensional cellular automata.

A 1D cellular automaton can be thought of as an infinitely long tape with the symbols 0 or 1 on it. The state of any cell on the tape depends on the state of itself and it's surrounding neighbours.

For this simple automaton, we are considering the cell itself, and the two adjacent cells to the left and right as its neighbours. Thus, there are 2^3 or eight different possibilities of states per neighbourhood.

We can represent the rules of a particular 1D cellular automaton as an 8-bit binary number. For example, rule number 110 = 0110 1110b. This means:

 

Neigh-

bour

LMR

111

LMR

110

LMR

101

LMR

100

LMR

011

LMR

010

LMR

001

LMR

000

Next

State

0

1

1

0

1

1

1

0

The Random button randomizes the inital automata state, the Regular button creates an even alternation of states and the One button creates a single state in the 1 state in the middle.

Some of the elementary rules which have been well studied in the scientific literature are: Rule 4 a simple rule, Rule 22 a chaotic rule, Rule 54 a complex rule, Rule 110 another complex rule, and Rule 30 a random rule. I personally like rule 54 best.

Warning: Some Java implementations on the Apple Macintosh have problems with handling threads. If you don't see anything during the simulation, try moving the mouse.