The Game of Life, is a cellular automation, a zero-player game, devised by John Horton Conway. The game evolves solely based on its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. It is Turing complete and can simulate a universal constructor or any other Turing machine.
The universe of the Game of Life is an infinite, two-dimensional grid of square cells, each of which is in one of two possible states, live or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent.
- Any live cell with two or three live neighbours survives.
- Any dead cell with three live neighbours becomes a live cell.
- All other live cells die in the next generation. Similarly, all other dead cells stay dead.
gol starts by randomly initializing a universe state, drawing and updating it every 40 milliseconds.
Window creation and drawing is done through pixel library.
Install the latest version in $GOBIN
or $GOROOT/bin
by
go get github.com/viswa/gol@latest
To run the simulation
gol
Gol is licensed under MIT License.