About

Conway's Game of Life


Julia Kozak - Feb 2022

I was introduced to Conway's Game of Life sometime last year, and I took a recent interest in it while learning C++. It's based on a cellular automaton structure which, simply put, is a set of cells given some possible states and some set of instructions to follow based on their state.

With this idea, Conway's Game of Life is meant to simulate life structures with rules representing underpopulation and overpopulation. In a grid of cells, each cell's state is dependent on the cell's "neighbors," which are the eight cells surrounding it. In this model, each cell has two states: alive or dead. Each cell progresses through generations in a certain state depending on its number of living neighbors at a given point, with rules as follows:

* Alive with < 2 living neighbors -> dead, by underpopulation
* Alive with > 3 living neighbors -> dead, by overpopulation
* Alive with 2 or 3 living neighbors -> alive
* Dead with 3 living neighbors -> alive
* Otherwise, dead cell stays dead

Conway's cellular automaton is pretty cool in itself, and all trials eventually stabilize into having just a few different periodic structures, such as:

The first shows still structures, like a 2x2 square. The second shows structures which oscillate with period two. The third has period three. And the last is the famous gosper glider gun which produces glider structures that move down and right.

These are screenshots/gifs made from my program, which runs in the terminal and displays alive and dead cells with text background colors, grey/white meaning alive.

What I found most interesting was that, with the random arrangements of live cells that my program would produce, it seemed near impossible to track what was really going on until the very end, when these recognizable structures would form. And upon research, I couldn't find any mathematical model or algorithm that could otherwise predict what would happen to a given grid of cells in Conway's Game of Life. Cellular automata are mathematical models on their own, and they're reflective of how computer processing works.

Take the gosper glider gun structure, for instance. It outputs a glider every 30 generations, and we can say each traveling glider is analogous to a '1' in binary, and the lack of presence of a glider is a '0'. It's possible to arrange two glider guns perpendicular to each other such that each of their gliders annihilate each other, and that is enough to construct all the logic gates that computers use, 'and,' 'or,' and 'not,' as well as switches. This makes the model Turing complete, meaning these gates can be chained together to mimic any binary operation that computers do.

It's also interesting to observe the growth patterns with different cell instructions, such as when you change the life condition to one neighbor, or you don't allow death for less than two neighbors:

Here's a video of an 8-bit computer computing fibonacci numbers, made within Conway's model by Nicolas Loizeau in 2016 (YouTube): this

And here's Conway's Game of Life within Conway's Game of Life, via Phillip Bradbury (YouTube): this

3D cellular automata, cubes.io: this
The C++ file for my project (yes it's one file): this

Sources:

* Berto, Francesco, and Jacopo Tagliabue. “Cellular Automata.” Stanford Encyclopedia of Philosophy. Stanford University, August 22, 2017. https:// plato.stanford.edu/ entries/ cellular-automata/.
* “Elementary Cellular Automaton.” from Wolfram MathWorld. Accessed February 25, 2022. https:// mathworld.wolfram.com/ ElementaryCellularAutomaton.html.