The Game of Life
version 1.03, released 16 July, 2005.
If you have Java installed on your machine,
you can "open" the file rather than saving it to
the disk if all you want to do is run the program.
HolubLife.jar contains an implementation of
John Conway's game of Life, as described in my
Holub on Patterns.
The .jar contains an executable version of the program,
the source code presented in the book (with known bugs fixed),
and javadoc documentation.
Execute the downloaded program with java -jar HolubLife.jar.
You don't have to unpack the jar unless you want to look at the sources
I've tested using both Java 1.4.2 and Java 5, the
enclosed .class files are 1.4 files, so should run fine with either JVM.
There are no known bugs in the current release, but if you should
find one, please
I'll post a note to the
if I discover any new bugs.
The book contains a very detailed description of this implementation.
Get the Life implementation from the book by following the directions
Game of Life is probably the most widely implemented application in the universe.
Here are some links to follow to get more information:
a great introduction to Life on the
math.com web site.
- Paul Calahan's
has lots of links to Life-related information (and other life-related web sites).
There's also a nice visual catalog of life patterns.
- Alan Hensel's
applet implementation of Life, available at
provides a fully-featured implementation of the game.
(It's not the world's best Java, but it's a great implementation to use.)
The buttons, below, fire off Hensel's applet.
- My favorite book about life is William Poundstone's The Recursive Universe.
Unfortunately, it's out of print, but you can find copies on the usual used-book sites
Book Finder, etc.)
I strongly recommend that you play with the game to get an understanding of how it works.
To make things easy, the following buttons launch Hensel's applet,
preloaded with a few of my favorite "seed" patterns. The main thing to keep in mind as
you watch things work is that the behavior that you see is all "emergent." For example,
the notion of a "glider" is not programmed into Life. All that is programmed
is the behavior of an individual cell, which decides whether it will be alive or
dead on the next clock tick based on the number of live neighbors on the current
clock tick. These simple rules yield very complex and interesting behavior, however.
The notion of emergence is critical to OO thinking. You design (and build)
around use-case scenarios, and you don't design for every possible scenario.
Nonetheless, scenarios that you hadn't thought of are handled by the program.
A good (layman's) introduction to emergence is Steve Johnson's
Emergence: The Connected Lives of Ants, Brains, Cities, and Software
As an interesting aside,
Paul Rendell has constructed a
Turing Machine in the Game of Life.
Since a Turing machine can, in theory, model the behavior
of any computer, you can infer from Rendell's work that Life can
simulate the behavior of any computer program.
That is, the behavior of
all computer programs can be viewed as emergent behavior.