This is a short little project where I implemented Conway's Game of Life (GoL) in python using Matplotlib to visualize it.
The code itself is nothing special. It was important for me to write it with as little help as possible from outside sources.
My implementation simulates the game with some hardcoded variables like the number of frames and a 100x100 array. Maybe I'll change that in the future.
To run this project, you'll need Python and these libraries:
- Matplotlib
- NumPy (comes with matplotlib)
-
Initialization: The first frame gets randomly generated with a predefined probability.
-
Simulation: The game will use the first frame to generate the next one until we reach the last frame using the GoL rules:
- Any live cell with fewer than two live neighbors dies.
- Any live cell with two or three live neighbors lives on.
- Any live cell with more than three live neighbors dies.
- Any dead cell with exactly three live neighbors becomes a live cell.
- Visualization: I used Matplotlib to display the frames. I took a template from their website which you can find here
This project is licensed under the MIT License. See the LICENSE file for details.