Conway's Game of Life
A few days ago, I saw this video "it's in Spanish" about Game of Life Conway which show this idea of a simple "game" created by John Horton Conway. Which simulate a cellular automaton.
To me, this is not a usual game because there is no way to win or end goal. And it doesn't need any player. I would say it's a simulation of a grid life. The idea of this simulation is to have a grid "2D matrix" with cells of 1s and 0s. Where a cell with one means alive and a cell with zero means dead. Then, apply two simples rules in the grid to calculate a new grid in the next time frame:
- Rule 1:
if the cell is dead and there are three cells a life close, will be revived
- Rule 2:
if the cell is alive and there are less than two or more than three cells alive, will be died
But the amazing fact of this game is that represents a turing machine.
In the tutorial, he creates a python solution of the game using pygame. I followed the video and replicate my version. But I decided to go forward and create an implementation in javascript to embed in a web page.
Both implementations are in this GitHub repository