Cellular Automaton

by Malcolm Mclean Homepage

A cellular automaton is a device that moves over a landscape, obeying simple rules.

In this case, the landscape consists of four colours, black, red, green, and blue. It is 64*64 square, with wrap around. When the automaton is on a square it examines the colour of the square, and changes it to a different colour. The in move up, down, left or right, and sets itself into a different state.

The use of four colours and a two-dimensional grid is simply to give the simulation some visual impact. Every four-state pixel can be emulated by two pixel states.

Buttons

Load - load a saves simulation from disk.
Save - save a simulation, machine and field.
Help - prints out a help message.
Stop - halts the suimulation.
Run - restarts the simulation.
Clear - resets the field.

Editing the machine

Add State - add a new state to the machine.
Delete State - remove a state. This is for convenience only, an unreachable state will have no effect on the computation.
Colour Buttons - show the new colour to set the pixel to.
Arrow buttons - show the direction in whcih to move the machine.
Numbers - show the nes state into which to se the machine.
State - select the state your are currently editing.

Editing the field

Left-click to change the colour of a pixel.
Double right-click to move the machine.

What will it do ?

When you load the program up, it will start with a completely black field and a machine with three random states. The machine always starts in state zero. It will then, usually, proceed to draw patterns on the machine. Sometimes these will be relatively simple, and the machine will get stuck in a tight loop. Other times they will be complicated, or veer off into randomness.

automaton.exe

Try out Langton's ant