Usage:
This
is a non interactive implementation of a cellular automaton pattern
generator. Watch the pattern evolves into demons (the term demon refers
to: a stable pattern of
spirals). It may take a while for the demons to emerge on a slower
machine (recommended machine is 133 Mhz or
faster). Click the Restart
button to rerandomize the pattern.
Hotkeys:
(click on the applet first if these key des
not work).

The A
key can be used to to zoom in;

The Z
key can be used to to zoom out;

The D
key toggles stepping mode;

While in stepping mode, use >
or SPACE
key to go to the next generation. You can also click RESTART
while stepping mode is active to see a progression from the
beginning.
Background:
This is an
implementation of a cyclicspace model of cellular automata
(CA). A CA evolves by a set of rules to determine the state of the next generation.
This CA uses the following rules:

Determine a maximumvalue (maxval).

Initialize a 2D array with random values between 0 and
maxval.

If a cell has at least one neighbor which value is higher by
1, that cell is eaten by the neighbor (the value changes to the value of the neighbor).

A cells with a value of maxvalue can only be eaten by cells
with a value of 0. In that case, the value cycles to 0, thus the name
cyclicspace.

Repeat the last 2 steps
and eventually a stable pattern will emerge.
Acknowledgement:

This type of cellular automaton was developed by David
Griffeath (University of Wisconsin).

The term cyclic space was coined by A. K. Dewdney
(Scientific American, August 1989).