Conway's Game of Life
Personal projects | | Links: Try it | Source

A single Gosper’s glider gun creating gliders
Overview
Type : Personnal
Technology : HTML5, JavaScript
Project
Here’s a basic implementation of Conway’s Game of Life using JavaScript.
Conway’s Game of Life operates as a cellular automaton, where cells can exist in two states: alive or dead. Every cell’s status changes with each turn of the game based on the statuses of its eight neighboring cells. Neighbors are those cells directly touching the cell in question, be it horizontally, vertically, or diagonally.
To initialize the simulation, you can use the mouse to draw the initial state on the grid. Throughout each step of the game, cells follow a set of rules that determine their next state. These simple rules are as follows:
- An alive cell remains alive if it has 2 or 3 live neighbors.
- A dead cell comes to life only if it has exactly 3 live neighbors.
Conway’s Game of Life reveals a wide array of patterns, each categorized by its behavior. These patterns include still lifes that persist unchanged across generations, oscillators that return to their original state after a certain number of generations, and spaceships that traverse the grid.
Feel free to give it a try Here.