Game of Life
Four rules about living neighbours give rise to gliders, oscillators, and universal computation.
Introduction
Every cell is alive or dead. A live cell with two or three live neighbours survives; a dead cell with exactly three springs to life; everything else dies or stays empty. From those four rules emerge still lifes, blinkers, travelling gliders, and patterns complex enough to compute.
Background
John Conway devised the rules in 1970 and Martin Gardner popularised them in Scientific American that October. The Game of Life became the most studied cellular automaton in history and was later proven Turing-complete: a large enough pattern can simulate any computer.
How it works
- Count the live cells among each cell's 8 neighbours.
- A live cell with 2 or 3 live neighbours stays alive, otherwise it dies.
- A dead cell with exactly 3 live neighbours becomes alive.
- Apply the verdicts to every cell at once through a double buffer.
Parameters
initial_density- Fraction of cells alive at setup. Around 0.3 gives the richest mix of still lifes, blinkers, and the odd glider; too sparse fizzles out, too dense collapses to blobs.
Open this model in the editor →