Game of Life
This Java applet is not your typical computer game. Rather, it is
an implementation of a cellular automaton that mathematician John Conway
chose to call "The Game of Life." Each of the cells in the
two-dimensional grid is either populated (alive) or unpopulated (dead).
Starting with any initial pattern of cells, each successive generation
is computed using the following rules.
- If a cell is currently populated (alive):
- It survives in the next generation if it currently has 2 or 3 neighbors.
- It dies in the next generation from loneliness if it currently has
0 or 1 neighbors.
- It dies in the next generation from overcrowding if it currently has
4, 5, 6, 7, or 8 neighbors.
- If a cell is currently unpopulated (dead):
- It becomes populated (alive) in the next generation if it currently has
exactly 3 neighbors.
- It remains unpopulated (dead) in the next generation if it currently has
0, 1, 2, 4, 5, 6, 7, or 8 neighbors.
Source code
|
Go to Wilfred Tang's main page
|
Send email to Wilfred Tang
|