John Conways game of life is a 'cellular automaton', where cells live in a 2D-grid. For every time-step taken, a simple set of rules determines if a cell lives or dies in the next timestep. The rules are:
- Overpopulation. Each cell with more than three neighbours dies.
- Underpopulation. Each cell with less than two neighbours dies.
- Survival. Each live cell with two or three neighbours survives.
- Reproduction. Each dead cell with exactly three neighbours becomes alive.
Following these rules, a randomly populated grid will show some interesting behaviour:
A simple line on the grid will develop into a mesmerizing pattern:
Clone the repository by unzipping or:
git clone https://github.com/DanielDondorp/GameOfLife.git
In your preferred python environment, install the dependencies
pip -r install requirements.txt
For saving gifs of the simulations, imagemagick is used. On ubuntu this can be installed with apt (apt-get install imagemagick
), or follow the instructions on the imagemagick website.
- write setup.py
- write class that can be used easily outside of jupyter notebook
- create small interactive application where users can draw or define startconditions (Either using streamlit or Qt5)