Game of Life

From Canonica AI

Introduction

The Game of Life, also known simply as Life, is a cellular automaton devised by the British mathematician John Conway in 1970. It is a zero-player game, meaning that its evolution is determined by its initial state, requiring no further input from human players. The Game of Life is one of the earliest and most well-known examples of a cellular automaton, a model in computational mathematics that simulates the actions of a collection of cells on a grid.

A grid showing a pattern of black and white squares, representing a state in the Game of Life.
A grid showing a pattern of black and white squares, representing a state in the Game of Life.

Rules

The universe of the Game of Life is an infinite, two-dimensional orthogonal grid of square cells, each of which is in one of two possible states, live or dead. Every cell interacts with its eight neighbours, which are the cells that are horizontally, vertically, or diagonally adjacent. At each step in time, the following transitions occur:

1. Any live cell with fewer than two live neighbours dies, as if by underpopulation. 2. Any live cell with two or three live neighbours lives on to the next generation. 3. Any live cell with more than three live neighbours dies, as if by overpopulation. 4. Any dead cell with exactly three live neighbours becomes a live cell, as if by reproduction.

These rules, which compare the behavior of the automaton to real life, can be condensed into the following:

  • Overpopulation: if a cell is alive at time t and 4 or more of its neighbours are also alive at time t, the cell will be dead at time t+1.
  • Stasis: if a cell is alive at time t and 2 or 3 of its neighbours are also alive at time t, the cell will still be alive at time t+1.
  • Underpopulation: if a cell is alive at time t and fewer than 2 of its neighbours are alive at time t, the cell will be dead at time t+1.
  • Reproduction: if a cell is dead at time t and exactly 3 of its neighbours are alive at time t, the cell will be alive at time t+1.

Patterns

The initial pattern constitutes the 'seed' of the system. The first generation is created by applying the above rules simultaneously to every cell in the seed—births and deaths happen simultaneously, and the discrete moment at which this happens is sometimes called a tick. Each generation is a pure function of the one before, meaning the Game of Life is deterministic.

The Game of Life is best understood in terms of patterns that change from generation to generation. Commonly observed patterns in the Game of Life include:

  • Still lifes, which do not change from one generation to the next.
  • Oscillators, which return to their initial state after a finite number of generations.
  • Spaceships, which translate themselves across the grid.

Universality

The Game of Life is Turing complete. In other words, anything that can be computed algorithmically can be computed within the Game of Life. This has been proven by constructions such as a universal Turing machine, logic gates, and a high-level programming language in the Game of Life.

Impact and legacy

The Game of Life has had a significant impact on mathematics, computer science, and popular culture. It has inspired numerous variations and has been used in research for various scientific fields, including theoretical biology and microstructure modeling.

See Also