Conway's Game of Life in Python

Built with and

illustrations illustrations illustrations illustrations illustrations illustrations illustrations

In 1970 the British Mathematician John Conway created his «Game of Life» – a set of rules that mimic the chaotic yet patterned growth of a colony of biological organisms. The «game» takes place on a two-dimensional grid consisting of «living» and «dead» cells and the rules to step from generation to generation are simple:

Overpopulation: if a living cell is surrounded by more than three living cells, it dies.
Stasis: if a living cell is surrounded by two or three living cells, it survives.
Underpopulation: if a living cell is surrounded by fewer than two living cells, it dies.
Reproduction: if a dead cell is surrounded by exactly three cells, it becomes a live cell.
By enforcing these rules in sequential steps, beautiful and unexpected patterns can appear.

To test and play the game make sure you have Python 2.7 and Pygame installed.

Published on Apr 04, 2017 by Simen Daehlin