Game of Life: Features of This Implementation

The parent of this page is: Conway's Game of Life: a Java Applet with Autodetection of Patterns.


There are several other implementations of cellular automata (and Conway's Game of Life in particular) available in the Web (see references). So, why providing another one? There are a number of reasons to mention:

OK, what about speed?

The features listed above do not come without a price. In particular, the ability to auto-detect patterns makes the present not the fastest possible implementation. If all you want is raw speed, you may take a look at some other programs listed in the references (specifically, I recommend Alan Hensel's superfast applet). However, I consider this program to be the first step towards writing a fully automated explorer of "universes" of cellular automata, so the emphasis was on the detection of patterns. On the other hand, this applet is not a terribly slow implementation it's faster than some other web-applets anyway: try running "Acorn" (select it from the "open file" button: ), which is easy to hand-type in other applications if they do not already include this simple 7-cell pattern, and compare its speed; or, try "Line puffer", and notice how the speed of this program remains nearly constant, in spite of the profusion of generated patterns, because it works only in active areas (you'll see them marked in red color, as opposed to magenta gliders and multi-colored oscillators). Many other programs slow down with "Line puffer"-type of inputs because they update the entire expanding space at each step.

Why the colors cannot be changed?

Colors in this program are not random but play an important role: they reveal the nature of the patterns that have been detected by the program. Thus,

Gliders are displayed in magenta
Still lives (oscillators of period 1) in deep blue
Oscillators of period 2 in cyan
Oscillators of period 3 in green
Oscillators of period 4 in yellow
Oscillators of periods between 5 and 16 in various hues of yellow and orange
Any other active patterns are displayed in red

Hence, changing the colors of patterns would generally interfere with the visual display, so color-setting is not included as an option.

The above display shows a number of oscillators with periods from 2 to 16, arranged rectangularly at the border, and color-coded after their period has been detected. There is also a star-gun in the center, producing gliders (in magenta color) that manage to slip through the oscillators without hitting them. The "numbers" (in blue color) show the period of the oscillator to their right, and are oscillators themselves (of period 1, often called "still lives"). The above figure is a fully functional instance of the applet, and you can pause it and run it just like other instances of the applet in the rest of these pages.

Why was this applet created?

This program was created to address several issues:


Back to the main page