What if the life was governed by three laws ?
Check the code »
Report Bug
•
Request Feature
The game of life is a automaton where each cell is represented as a simple square. If the square is black, the cell is alive, if not, the cell is dead. The goal is to simulate the evolutions there life cycle using the following simple rules:
- Any live cell with fewer than two live neighbours dies (referred to as underpopulation).
- Any live cell with more than three live neighbours dies (referred to as overpopulation).
- Any live cell with two or three live neighbours lives, unchanged, to the next generation.
- Any dead cell with exactly three live neighbours comes to life.
You will just need python >= 3.0. You can check the version by using the following command.
> python -V
> 3.0.0
You can follow the different steps inorder to get the programm working on your computer
- Clone the repo
git clone https://github.com/VictorGoubet/GameOfLife.git
- Install python packages
pip install -r requirements.txt
- Be free to modify the parameters in the GameOfLife.py class
game = GameOfLife(epochs=50, n_cells=20, windows_size=600)
- Execute the python script
python GameOfLife.py
The windows should appear! The interface is pretty intuitive, have fun!
Victor Goubet - victorgoubet@orange.fr