The Game of Life is a cellular automaton devised by the British mathematician John Conway in 1970. The universe of the game is a two-dimensional orthogonal grid of square cells, each of which is in one of two possible states - alive (shown in black) or dead (shown in white). Every cell interacts with its eight neighbors, which are the cells that are horizontally, vertically, or diagonally adjacent. On each step, the next state is determined by applying the following rules.
Any live cell with fewer than two live neighbors dies, as if caused by underpopulation.
Any live cell with two or three live neighbors lives on to the next generation.
Any live cell with more than three live neighbors dies, as if by overpopulation.
Any dead cell with exactly three live neighbors becomes a live cell, as if by reproduction.
Press Play to allow the system to operate on its own. Press Pause to pause operation. Press Step to advance one step.
Changing the initial state of the system can change the way the system evolves. In some cases, the system reaches quiescence, i.e. nothing changes from step to step. In some cases, the system oscillates. With an infinite universe, it is possible for a system to run forever without repeating any state.
With the game paused, create a new state by clicking cells to toggle their statuses between live and dead. Once you are done, click Play to see what happens with your new state. Reload the page to return to the initial state.
Now, let's see how we can describe this system using operation definitions.