This project is an implementation of Conway's Game of Life.
Conway's Game of Life is a cellular automaton devised by the British mathematician John Horton Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input.
- Any live cell with fewer than two live neighbours dies, as if by underpopulation.
- Any live cell with two or three live neighbours lives on to the next generation.
- Any live cell with more than three live neighbours dies, as if by overpopulation.
- Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.
To install the project, just clone the repository and navigate to the project directory:
To run the Game of Life, execute the following command:
python gameOfLife.py
or
python gameOfLife.py --size 100 --seed 10 --mutation_rate 0.001 --fps 100
where:
size
is the size of the gridseed
is the seed for random initializationmutation_rate
is the mutation rate. Every pixel has a probability ofmutation_rate
to change its statefps
is the number of epochs per second
To mutate the population just click 'm' on the keyboard.
To quit the game just click 'q' on the keyboard.