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. The game is played on a grid of cells, where each cell can be either alive or dead.
The universe of the Game of Life is an infinite, two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead (or populated and unpopulated, respectively). Every cell interacts with its eight neighbors, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:
1- Underpopulation: Any live cell with fewer than two live neighbors dies.
2- Survival: Any live cell with two or three live neighbors survives to the next generation.
3- Overpopulation: Any live cell with more than three live neighbors dies.
4- Reproduction: Any dead cell with exactly three live neighbors becomes a live cell.
These rules create fascinating patterns and behaviors, making the Game of Life a classic example of emergent complexity.
Conway's Game of Life has various applications and uses:
1- Simulation: It's often used as a simulation tool in biology, ecology, and other fields to model population dynamics and spatial interactions.
2- Algorithmic Exploration: The Game of Life provides an interesting platform for exploring and developing algorithms, especially for tasks like pattern recognition and optimization.
3 - Visualizations: Many artists and designers use the Game of Life to create visually stunning patterns and animations.
4- Educational Tool: It serves as an educational tool for teaching concepts like cellular automata, emergent behavior, and algorithmic thinking.
Here are a few examples of patterns that can emerge in Conway's Game of Life:
1- Still Life: Patterns that remain unchanged throughout generations.
2- Oscillators: Patterns that oscillate between two or more states.
3- Spaceships: Patterns that move across the grid in a consistent direction.
4- Glider Gun: A pattern that continuously produces gliders, which are spaceships moving diagonally. (You can find the codes in the jupyter notebook.)
In order to begin the simulation you need to have these libraries installed:
NumPy
, Matplotlib
and PIL
You can easily install the libraries via the following command:
pip install [name of the library]
You can also manipulate the rules of the game to see what will happen if you chanhe the rules of the game. A few examples are included in the file, like game of life considering the second neighbor, dead cells have a chance to come to life and etc.
Feel free to share your opinions regarding this project.