The Conway’s Game of life
Three simple rules:
Each cell looks around in its Moore neighborhood (that is, its 8 immediate neighbors) and decide whether to stay in the same state, become alive, or die according to how many alive neighbors it has:
- if at least 2 of the neighboring cells are alive, stay what you are
- if at least 3 of the neighboring cells are alive, become alive
- otherwise, die
(Source: https://www.youtube.com/)