Conway's Game of Life

Simple mathematical rules to implement a cellular automaton.

launch button

Overview

This is a "game" devised by John Conway to simulate cellular life. He wanted to create a machine that could have a life of its own, continuously evolving and creating copies of itself using some very basic algorithms. It sounds a bit like Skynet, but it's more of a primordial Sims.

If you find fractals interesting then this sort of stuff will be right up your alley. The beauty lies in the richly complex behaviour that can arise from a deceptively simple set of mathematical rules.

The Rules

The game is played out on a rectangular grid of cells that can be alive or dead. Each turn of the game involves figuring out what happens to each cell. Does it remain in its current state? Does a dead cell spring to life? Does a living cell die? We determine this by looking at the cells' eight neighbours.

The classic implementation of Conway's Game of Life involves seeding the world with some living cells. This is the only aspect of the entire game that can be random. We then apply a small set of rules to determine what happens to a cell.

Observations

If we play this out one turn at a time, we see a mass of cells twinkling on and off. It appears chaotic in some places, where we witness a sea of population explosion and extinction. Yet in other places things seem to remain orderly, at least until a nearby group of cells strays too close and the order is disrupted.

It's the little pockets of order that are the most interesting. Using the set of rules above, we will quite often see a common set of patterns that spring from chaos but evolve in an entirely predictable way - at least until they collide with another group of cells.

Common Patterns

One of the most common of these patterns is called a Still Life. Once the cells are arranged in a certain way, the rules will always result in the same state for the next turn. They are like a little cluster of frozen cells, not dead but not evolving in any way.

A more interesting pattern is known as the Oscillator. A group of cells will cycle between two (or sometimes 3 or more) different arrangements. Without interruption they will keep doing this forever.

A variation of Oscillators that will actually move across the grid is referred to as a Spaceship, with the most common variant known as the Glider. What these guys are really doing is creating a copy of themselves in their neighbouring cells.

If you watch closely enough, you will observe other varieties such as Guns, Puffers and Rakes which will actually emit other shapes. Some of these are quite rare and not often seen in the wild.

Variations

The classic rules used for Life were devised because they result in population growth that is not too explosive but isn't prone to extinction. That doesn't mean we have to stick to them, in fact the numbers can be tweaked for some interesting behaviour. Oddly enough, predicting what sort of behaviour will arise given a different variation of the rules isn't as easy as it would seem. You really need to play it out to see what will happen. Luckily this can be done with a few mouse clicks...

Software

John Conway and others before him were able to watch Life play out by using nothing more than a pencil and paper. This isn't 1970 anymore so you can find Life implemented in software all over the web, including here which is my own implementation in Java. Some features of note:

I recommend just pressing the "Start" button to get things running, using the pre-seeded grid. You can then just sit back and watch your little cells come to life. Eventually the grid will reach a state of equilibrium, where nothing exists except a few Still Life patterns. Feel free to click and drag on the grid to inject some new life or set up some complex patterns of your own to experiment with.