The Space bar will pause or resume the running of the game.
Press R to reset the game to a random initial state.
Press C to clear the entire grid.
You can click on a cell with the mouse to toggle its state. You can also click and drag the cursor across multiple cells to toggle their state as you move the mouse over them.
To ensure that a cell only becomes or remains alive, hold down the number 1 on your keyboard at the same time as you click and drag the mouse. Likewise, to ensure that a cell only becomes or remains dead, hold down the number 2 on your keyboard while clicking and dragging the mouse.
If you want to start the game from an entirely custom state, first press the Space bar to pause the game, then press C to clear the entire screen, use the mouse to set the cells and finally press the Space bar again to resume.
To save the current state of the game to a file press S. You can then press L to load that state from the saved file at any time.
Press and hold ] to make the simulation run through each frame faster. Press and hold [ to make it run slower.
Press G to toggle the visibility of gridlines.
Press P to download a photo of the current frame.
The Esc key will return you to the main menu.
The Game of Life was first created in 1970 by British mathematician John Conway, who was working at the University of Cambridge (before he was later appointed to the John von Neumann Chair of Mathematics at Princeton University). It is a zero-player game, which means that it naturally evolves from an initial state and requires no more input.
It is interesting, however, to see how different initial states evolve and which sort of patterns regularly tend to emerge.
The gameboard consists of a grid of square cells: each one can be either alive or dead. The evolutionary lifecycle of each cell over the course of the game depends on the state of its neighbouring cells.
If a cell is currently alive, it can be killed by overpopulation if more than three of its neighbouring cells are also alive; likewise, it can be killed by underpopulation if fewer than two of its neighbouring cells are alive. If a cell is currently dead, it can come back to life by reproduction if exactly three of its neighbouring cells are alive.
The three simple rules listed above (i.e. overpopulation, underpopulation and reproduction) are enough to create all of the complex interactions that you will see in the game.
In order to make patterns easier to spot, I have introduced a colour-coding system. Cells that are currently alive and were also alive in the previous frame are painted black. Cells that have recently come to life (i.e. they are currently alive and were dead in the previous frame) are painted dark red. Cells that have recently died (i.e. they are currently alive and were dead in the previous frame) are painted light violet. Cells that are currently dead are were also dead in the previous frame are simply white.
For more information, please read this blog post.
If you enjoy this game or just want to support my work,
please consider making a donation.
Anything you can possibly give will be greatly appreciated.