Adapted from pmav.eu‘s implementation under an MIT license.
How to play
Conway’s Game of Life is a simulation of cells growing and dying in a petri dish. Living cells are represented by a filled in square on the grid above. Click on the squares you want to populate with cells. Alternatively, you can click the “Random” button to start with a random set of populated cells.
Click the “Step” button to have the cells advance to the next generation. A “generation” is a turn in the game. With each new turn, squares are filled and cleared to represent cells being born and dying. Life and death for a cell is determined by four simple rules that evaluates its neighbors (cells in the eight surrounding squares):
- Birth: An empty square with exactly three neighbors becomes populated with a cell.
- Survival: A cell with two or three neighbors lives on to the next turn.
- Death: A cell with fewer than two neighbors die from loneliness.
- Death: A cell with more than three neighbors dies from overcrowding.
Each turn, all the cells in the grid are updated simultaneously using those four rules.
Click the “Step” button several more times to advance the cells several more generations. Any cells that survive more than one generation will darken with age. Click the “Run” button to have the generations automatically advance. While the generations are automatically running, you can still click on the grid to add more cells.
Complex behaviors can arise despite the simplicity of the game’s rules. For example, there is a five-cell group called a “glider” (see image to the right) that repeats its shape, shifted one square on the diagonal, every fourth generation. This “movement” is what gives gliders their name. The glider shape can be manually setup prior to starting the game and running through its generations. But even when it is not specifically created by the player, glider shapes often arise unexpectedly as the game’s cells grow and die.
Click on “Stop” to pause the generation advancement and click on “Clear” to reset the grid. Manually add a glider to the grid and click on “Run” to watch it move on the screen.
About the game
Conway’s Game of Life is a “sandbox” game. A sandbox games emphasize play that centers on exploratory changes to the game state rather than a dogged pursuit of a victory condition. Conway’s Game of Life does not present the player any set goals, but that does not necessarily mean that it is an aimless pursuit. As you play with it, you may find yourself projecting goals onto it—for example, you might find yourself striving to developing patterns that never die off or become static.
Conway’s Game of Life is a particularly early (dating back to 1970) and influential example of emergence. Emergence grows out of game mechanics that are designed to be as responsive to one another as they are to the actions of the player. Generally speaking, emergent systems have a simple set of rules that interact in complex ways. Any game can have emergent qualities, but sandbox games have them almost by definition.