TOPICS
Search

Game of Life


The game of life is the best-known two-dimensional cellular automaton, invented by John H. Conway and popularized in Martin Gardner's Scientific American column starting in October 1970. The game of life was originally played (i.e., successive generations were produced) by hand with counters, but implementation on a computer greatly increased the ease of exploring patterns.

The life cellular automaton is run by placing a number of filled cells on a square grid. Each generation then switches cells on or off depending on the state of the cells that surround it. The rules are defined as follows. All eight of the cells surrounding the current one are checked to see if they are on or not. Any cells that are on are counted, and this count is then used to determine what will happen to the current cell.

1. Death: if the count is less than 2 or greater than 3, the current cell is switched off.

2. Survival: if (a) the count is exactly 2, or (b) the count is exactly 3 and the current cell is on, the current cell is left unchanged.

3. Birth: if the current cell is off and the count is exactly 3, the current cell is switched on.

The game of life is an outer-totalistic cellular automaton, and can be implemented as follows using the built-in command CellularAutomaton, where the initial conditions are specified as a (0,1)-matrix m and the results for generations g_1 through g_2 are returned. (Here, g=0 corresponds to the initial pattern.)

  Life[m_List?MatrixQ, {g1_Integer, g2_Integer}] :=
    CellularAutomaton[
      {
        224,
        {2, {{2, 2, 2}, {2, 1, 2}, {2, 2, 2}}},
        {1, 1}
      },
      {m, 0},
      g2,
      {
        {g1, g2},
        Automatic
      }] /; g2>=g1
StillLifes

A pattern which does not change from one generation to the next is known as a still life, and is said to have period 1. Several still lifes are illustrated above. The numbers of strict still lifes of n cells, counted up to translations, rotations, and reflections, for n=1, 2, 3, ... are 0, 0, 0, 2, 1, 5, 4, 9, 10, 25, 46, 121, 240, 619, 1353, ... (OEIS A019473).

Patterns that cycle through a set of configurations are called oscillators.

Puffer train

Conway originally believed that no pattern could produce an infinite number of cells, and offered a $50 prize to anyone who could find a counterexample before the end of 1970 (Gardner 1983, p. 216). Many counterexamples were subsequently found, including guns and puffer trains (illustrated above).

GardensofEden

A life pattern which has no father pattern is known as a Garden of Eden (for obvious biblical reasons). The first such pattern was not found until 1971 and many are now known (LifeWiki).

The "grandfather problem" asks whether a pattern can have a father pattern but no grandfather pattern; an example was found by mtve in 2016 (Salo and Törmä 2022, p. 131:4).

self-enforcing patch for the unique father problem

In January 2022, Ilkka Törmä and Ville Salo resolved an interpretation of the separate "unique father problem" by constructing a finite still life containing a self-enforcing patch of live and dead cells: the patch must already occur in the same location in every predecessor (Salo and Törmä 2022, pp. 131:5 and 131:14-131:15). The patch illustrated above can be completed to a still life. The first such completion had 374 live cells, subsequently reduced to 334 by Danielle Conway and then to 306 by Oscar Cunningham (apgoucher 2022).

Amazingly, life is a universal cellular automaton, in the sense that it is effectively capable of emulating any cellular automaton, Turing machine, or any other system that can be translated into a system known to be universal. The outlines of a proof for life's universality were given by Berlekamp et al. (1982) and independently by Gosper (Gardner 1983, pp. 250-253). Around 2000, a Turing machine that can be extended to a universal Turing machine was explicitly implemented in life by P. Rendell (Rendell, Adamatzky 2001). While Rendell's machine can be made into a "true" universal computer simply by making his tape infinite, he neither noted this fact nor provided an actual construction of a universal Turing machine. Subsequently, on November 11, 2002, P. Chapman constructed a life pattern based on D. Hickerson's "sliding block memory" approach that implements the actions of a universal register machine. Unlike the finite tape of Rendell's Turing machine, the values in the registers of Chapman's machine are unbounded, making it a true model of universal computation in the game of life. Chapman's construction uses 268096 live cells in an area of 4558×21469, and can calculate approximately 20 generations per second on a 400 MHz computer.

More amazingly still, as shown by Wolfram (2002), even one-dimensional cellular automata (in particular, rule 110), can be universal.

Two-dimensional cellular automaton games similar to life but with different rules have been constructed and given the names HexLife and HighLife. HashLife is a life algorithm that achieves remarkable speed by storing subpatterns in a hash table and using them to skip forward, sometimes thousands of generations at a time.

Berkovich and Buehler (2025) trained a decoder-only transformer model called LifeGPT on pairs of consecutive game configurations. On the authors' test sets, the model achieved near-perfect cellwise accuracy for one-step evolution on toroidal square grids of several sizes represented in the training data. However, occasional single-cell prediction errors caused configurations produced by recursion to diverge from exact game-of-life evolution.


See also

Cellular Automaton, Rule 110, Totalistic Cellular Automaton, Universal Cellular Automaton, Universality

Explore with Wolfram|Alpha

References

--. "The Game of Life." Math Horizons. p. 9, Spring 1994.Adamatzky, A. (Ed.). Collision Based Computing. Mult.-Valued Log. 6, pp. 397-514, 2001. Yverdon, Switzerland: Gordon and Breach, 2001.apgoucher. "29-Year-Old Conway Conjecture Settled." Jan. 14, 2022. https://cp4space.hatsya.com/2022/01/14/conway-conjecture-settled/.Bays, C. "A Note on the Game of Life in Hexagonal and Pentagonal Tessellations." Complex Systems 15, 245-252, 2005.Berkovich, J. A. and Buehler, M. J. "LifeGPT: Topology-Agnostic Generative Pretrained Transformer Model for Cellular Automata." npj Artificial Intelligence 1, 23, 2025. https://doi.org/10.1038/s44387-025-00014-w.Berlekamp, E. R.; Conway, J. H.; and Guy, R. K. "What Is Life?" Ch. 25 in Winning Ways for Your Mathematical Plays, Vol. 2: Games in Particular. London, England: Academic Press, 1982.Callahan, P. "Patterns, Programs, and Links for Conway's Game of Life." http://www.radicaleye.com/lifepage/.Chapman, P. "Life Universal Computer." http://www.igblan.com/ca/.Flammenkamp, A. "Game of Life." https://wwwhomes.uni-bielefeld.de/achim/gol.html.Gardner, M. "The Game of Life, Parts I-III." Chs. 20-22 in Wheels, Life, and Other Mathematical Amusements. New York: W. H. Freeman, 1983.Hensel, A. "PC Life Distribution." http://www.mindspring.com/~alanh/lifep.zip.Hensel, A. "Conway's Game of Life." Includes a Java applet for the Game of Life. https://www.ibiblio.org/lifepatterns/.Koenig, H. "Game of Life Information." http://pentadecathlon.com/lifeInfo.php.LifeWiki. "Garden of Eden." https://conwaylife.com/wiki/Garden_of_Eden.LifeWiki. "Unique Father Pattern." https://conwaylife.com/wiki/Unique_father_problem.Update a linkMcIntosh, H. V. "Life." http://www.cs.cinvestav.mx/mcintosh/oldweb/life.htmlNumberphile. "Does John Conway Hate His Game of Life?" Mar. 3, 2014. https://www.youtube.com/watch?v=E8kUJL04ELA.Numberphile. "Inventing Game of Life (John Conway)." Mar. 6, 2014. https://www.youtube.com/watch?v=R9Plq-D1gEk.Poundstone, W. The Recursive Universe: Cosmic Complexity and the Limits of Scientific Knowledge. New York: Morrow, 1985.Rendell, P. "This Is a Turing Machine Implemented in Conway's Game of Life." http://www.rendell.uk.co/gol/tm.htm.Resnick, M. and Silverman, B. "A Zoo of Life Forms." https://web.archive.org/web/19981203150351/http://lcs.www.media.mit.edu:80/groups/el/projects/emergence/life-zoo.html.Salo, V. and Törmä, I. "What Can Oracles Teach Us About the Ultimate Fate of Life?" In 49th International Colloquium on Automata, Languages, and Programming (ICALP 2022) (Ed. M. Bojańczyk, E. Merelli, and D. P. Woodruff). Dagstuhl, Germany: Schloss Dagstuhl-Leibniz-Zentrum für Informatik, pp. 131:1-131:20, 2022. https://doi.org/10.4230/LIPIcs.ICALP.2022.131.Sloane, N. J. A. Sequence A019473 in "The On-Line Encyclopedia of Integer Sequences."Toffoli, T. and Margolus, N. Cellular Automata Machines: A New Environment for Modeling. Cambridge, MA: MIT Press, 1987.Wainwright, R. T. LifeLine: A Quarterly Newsletter for Enthusiasts of John Conway's Game of Life. Nos. 1-11, 1971-1973.Wainwright, R. T. "The Unique Grandfather Problem." Lifeline 6, p. 1, Oct. 1972.Wainwright, R. T. "LifeLine." https://web.archive.org/web/20080719173912/http://members.aol.com/life1ine/life/lifepage.htm.Weisstein, E. W. "Eric Weisstein's Encyclopedia of the Game of Life." http://www.ericweisstein.com/encyclopedias/life/.Wolfram, S. A New Kind of Science. Champaign, IL: Wolfram Media, 2002.

Referenced on Wolfram|Alpha

Game of Life

Cite this as:

Weisstein, Eric W. "Game of Life." From MathWorld--A Wolfram Resource. https://mathworld.wolfram.com/GameofLife.html

Subject classifications