Conway's "Game of Life."
One of these days, I'll post more of an explanation here. But for now, this "game"
(whose rules were set down by mathematician John Conway) doesn't really have
any players. You just set down the pieces to start with, and sit back
and watch. It is played on a grid (the grid above is 90 X 120, but it
could be any rectangular shape, the bigger the better). Each cell on the grid
is "alive" or "dead". An assignment of "alive" or "dead" to
each cell is called a "generation". Each generation uniquely determines a
successor generation, according to the following rules. A cell that is dead
in generation t becomes alive at generation t+1 only if exactly 3 of its
eight neighbors are alive; if more than that are alive, it remains dead.
A cell that is alive in generation t remains alive in generation t+1 if
exactly 2 or 3
of its neighbors are alive; otherwise it dies. As summarized
in the definitive reference for this game ("Winning Ways", by Berlekamp,
Conway, and Guy, Academic Press 1982, Volume II):
Just 3 for BIRTH
2 or 3 for SURVIVAL
Simple rules, but what complicated behavior results!
See for yourself. The buttons above serve the following functions:
- "Start" starts the game; the same button will stop it.
- "Random" creates a random start.
- "Clear" clears the board, so you can set down your own starting configuration
with the mouse.
- "Save" saves the current configuration (only possible if the game is stopped).
- "Restore" restores the most recently saved configuration.
The grid is also mouse-sensitive while the game is running. Pressing the mouse on the
grid will stop the evolution, and dragging it will introduce "mutations".