Game
of Life is a cellular automaton and is run by placing a
number of filled cells (alive cells) on a two-dimensional grid.
Each generation then switches cells on or off depending on the
state of the cells that surround it. The rules are simple and
defined as follows. All eight of the cells surrounding the current
one are checked to see if they are on or not. Any cells that
are on are counted, and this count is then used to determine
what will happen to the current cell.
1. Death: if the count is less than 2 or greater
than 3, the current cell is switched off.
2. Survival: if (a) the count is exactly 2, or
(b) the count is exactly 3 and the current cell is on, the current
cell is left unchanged.
3. Birth: if the current cell is off and the count
is exactly 3, the current cell is switched on.
| You
can copy the javascript program of the cellular automaton...
Feel free to modify it or improve it! We would appreciate
to receive any comments or suggestions concerning this script.
Have fun! |
|