Conway's Game of Life

July 11, 2026

The closest I got to a teacher was as a student assistant in college. But if I was, Conway's Game of Life would be my all time intro to programming project. (Check out the Wikipedia link for more GIFs like the ones I got for this post.)

An animated Game of Life pattern moving across a grid.

Let's go over the world you build.

  1. In a grid of cells, a cell is either alive or dead. On or off.
  2. At each time step, every cell alive or dead updates based on its 8 neighbors (all the cells touching it).
A cell and the eight neighboring cells that determine its next state.

The rules

  1. A live cell with < 2 live neighbors dies. (Underpopulation)
  2. A live cell with > 2 but < 3 neighbors stays alive. (Survival)
  3. A live cell with > 3 neighbors dies. (Overpopulation)
  4. A dead cell with exactly 3 live neighbors becomes alive. (Reproduction)

To start the game, you bring to life any live cells and then hit play with each time step applying the rules above.

A Game of Life grid before advancing to the next generation.The Game of Life grid during the next generation.The Game of Life grid after another generation.

The Stages of Acceptance

At first when you get this working, in a terminal, you appreciate that you got something working. But then when you start entering patterns, you find that you made something bigger than you intended.

To a novice, you would think such simple rules would eventually lead to a dead world. But with the right initial conditions, you bring to life some unintuitive cell cultures.

You'll find some instant blinkers and pulsars. Ones which hit a steady state back and forth between the same states.

An animated blinker oscillator in Conway's Game of Life.An animated beacon oscillator in Conway's Game of Life.An animated pulsar oscillator in Conway's Game of Life.

When I first did this project, this felt like an accomplishment, until they started moving.

An animated glider moving across a Game of Life grid.An animated lightweight spaceship moving across a Game of Life grid.

It's an optical illusion, but it's also not. All that's happening is different cells are turning on or off with different rules, the same ones above. But again with the right initial conditions, you get...life.

This is one of the projects that makes you sit back and realize how beautiful computers are and how biology might not be so different.

5 Stages of Excitement about the Game of Life

  1. Boredom: (The rules are simple, and I'd rather party than do this problem set.)
  2. Intrigue: (Oh, these cells are going for longer than I thought)
  3. Wonder: (They're moving????)
  4. Excitement & Existential Spiral: (What else is moving on simple rules?)
    1. How many other things in life are like this?
    2. Cells are complicated, but are the axioms tractable for a person to understand?
    3. What are the initial conditions to life?

Why I wrote this

I did this project back in 2018, 8.5 years ago today.

Back then:

  • We couldn't talk to computers in English like we can today.
  • They couldn't reason through a camera.
  • They couldn't explore the internet.

All we did was introduce a simple rule (over-simplifying):

  • Predict the next word.

And I can't stop thinking about Conway's Game of Life. I think I know what's going to come out of this (abundance of software). But...I never predicted a glider when I read the rules.

What are the initial conditions that are going to light up the world?

RIP John Conway (1937–2020), I wish you made it another 2 years to see what computers were about to do.

Bonus

If you want to grab my example implementation, here's a project in ~500 LOC, when I was learning C.

View the project on GitHub

The source files for my C implementation of Conway's Game of Life.