Conway's Game of Life
Conway's Game of Life is a very basic artificial life simulator. It arranges a grid of dead or alive cells, and for each generation, applies a set of rules to determine if the cell will be dead or alive.
The rules are as follows:
- If the cell is alive and has more than three neighbors, it dies from overcrowding.
- If the cell is alive and has less than two neighbors, it dies from loneliness.
- If the cell is dead, but has three living neighbors, it becomes alive.
- All other cells retain their state.
This specific implementation treats the board as a toroid. That means that the board can be thought of as extending from the bottom to the top, and from left to the right (and vice versa)- think pacman.
I have the board colorized so that any dead cells with three neighbors are tinted light blue, any alive cells with two or three neighbors are blue, any other alive cells are dark gray, and any other dead cells are pure white. The darkness of the border reflects how many neighbors the cell has.
To change the cell state, click on it.