liveBook · Manning

Game of Life

As explained in Fabulous Adventures in Data Structures and Algorithms

Life is Conway's Game of Life, a two-dimensional cellular automaton whose cell states evolve according to neighboring-cell rules.

Life is a two-dimensional cellular automaton: a grid evolves in discrete steps, with each cell’s next state determined by the arrangement of its eight neighbors. Its appeal is both recreational and algorithmic, because simple local rules produce unexpectedly complex behavior. section 4.0 section 4.1

Apply the rules independently at every tick:

  • A cell with three living neighbors is alive on the next tick. section 4.1
  • A cell with two living neighbors stays the same; otherwise, it is dead. section 4.1
  • Repeated application creates still lifes, oscillators, spaceships, guns, and patterns capable of simulating computation. section 4.1

From stillness to motion

A still life remains unchanged because every living cell has two or three neighbors and no dead cell has three. The blinker alternates between two states forever. The glider repeats its shape every four ticks while moving one square diagonally. section 4.1

Figure 4.3 The blinker is the simplest oscillator.

Use the blinker figure to inspect the simplest oscillating pattern and its two repeating states. section 4.1

How Fabulous Adventures in Data Structures and Algorithms covers it

How deep it goes
Defines local transition rules and surveys pattern behavior, then stops before implementing the beginner or HashLife algorithms.
Examples
Uses death from loneliness, still lifes, the blinker, the glider, guns, and digital-circuit patterns as concrete examples.
What it assumes
Assumes only a grid, cell states, neighboring cells, and discrete steps, while defining the transition rules from those ideas.
What you can do after
Evaluate Life generations by applying neighbor-count rules and recognizing still, oscillating, and moving patterns.
How it connects
Connects Life to cellular automata, quadtrees, memoization, recursive data structures, and Turing completeness.

Also explained in

Compare how 2 books explain Game of Life →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Fabulous Adventures in Data Structures and Algorithms. The section links point to the parts of the book it draws on.