Conway’s “Game of Life” Implemented in Javascript

Click here to play:
Instructions:
- Click the “Fill Random” button
- Click the “Play / Pause” button
- If things get boring, click “Spawn a Random Glider”
What is Game of Life?
Each cell has 8 neighbors. Based on the number of neighbors:
- If a cell has more than 3 neighbors, it dies of overcrowding
- If a cell has fewer than 2 neighbors (1 or 0) it dies of loneliness
- If a dead cell has exactly 3 neighbors, a new cell is born
- If a cell has 2 or 3 neighbors, it continues to the next generation
Each “generation” results in these rules being applied to every cell on the game board, resulting in a new game board. The new game board is then analyzed to produce the next generation, and so-forth.
The point of all of this, is that a few simple rules can create amazing complexity.
When mathematician John Conway came up with this in the 1970’s, it became extremely popular, despite having to be largely computed by hand on graph paper. John Conway, who passed away in 2020 at age 82, is known for dozens of innovations in math, science, and computer science.
