Game of Life

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Horton Conway in 1970. The "game" is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input. One interacts with the Game of Life by creating an initial configuration and observing how it evolves. This jQuery Game of Life project developed by @huseyinbabal during a #coderetreat event organized by @lemiorhan.


Rules

  1. If cell is alive and has more than 3 alive neighbours, it dies
  2. If cell is alive and has 2, or 3 alive neighbours, it survives
  3. If cell is alive and has less than 2 alive neighbours, it dies due to low population
  4. If cell is dead and has 3 alive neighbours, it reproducts

How to use

You can set your initial state by clicking on the board above, then Run in order to see what is next states. Also, you can see the next states one by one, use Step button. Furthermore, you can Stop simulation, or Refresh game of life completely. You can see example initial states below.

Fork me on GitHub