Game of Life (生命游戏)
The most famous celluar automaton is the well-knowGame of Life created by John Horton Conway in 1970, the British mathematician.
The universe of the Game of life is an infinite, two-dimensional grid of square cells, each is one of two possible states, alive or dead. Each cell interacts with its eight (Moore) neighbours. At each step in time, the following transitions occur:
- Any live cell with two or three neighbors survives.
- Any dead cell with three live neighbors becomes a live cell.
- All other live cells die in the next generation. Similarly, all other dead cells stay dead.
Here we use p5js to fulfill an example. You may also find a matlab version here.