A simple interactive implementation of Conway's Game of Life using HTML5 Canvas and JavaScript. Checkout the demo: isuruk2003.github.io/conways-game-of-life/
Conway's Game of Life is a cellular automaton devised by mathematician John Horton Conway. It is a zero-player game, meaning its evolution is determined by its initial state, requiring no further input. The game consists of a grid of cells, each of which can be alive or dead. The state of the grid evolves in discrete steps according to a set of simple rules.
At each step, the following transitions occur for every cell:
- Underpopulation: Any live cell with fewer than two live neighbors dies.
- Survival: Any live cell with two or three live neighbors lives on to the next generation.
- Overpopulation: Any live cell with more than three live neighbors dies.
- Reproduction: Any dead cell with exactly three live neighbors becomes a live cell.
These simple rules can lead to surprisingly complex and beautiful patterns over time.