The Game of Life

As I have written about before, I have always been interested in numbers and mathematics. Although my formal studies of the subject have not gone beyond the courses that I needed to attend for a science degree, my fascination with the beauty of mathematics and numbers has been life long. I have found, on a number of occasions, that I encounter a simple idea or set of rules, then find that, years later, it is still easy to bring to mind. This is a contrast to my memory for many everyday things – names, phone numbers, dates … – where is am very forgetful.

I clearly recall a visit from a friend one evening in the late 1970s …

I was a student at university and my friend was aware of my interest in puzzles and mathematical oddities and shared that interest himself. So he brought along a magazine article about a “game” that he had not previously encountered. The game was simply called “Life”. I would later learn that its full name: Conway’s Game of Life. It is named after its inventor, John Conway, who had come up with the idea about a decade before I heard about it.

Like so many fascinating things, the idea of the game is incredibly simple. The game takes place in a notionally infinite square matrix of cells. At any one time, a cell is either alive or dead, so there is a clear pattern of live cells. The game takes place as a sequence of cycles, when some specific rules are applied to all the cells simultaneously, which determine their state after the cycle. These rules appertain to the 8 immediate neighbors of each cell:

  • if a live cell has 2 or 3 live neighbors, it continues to live; otherwise it dies
  • if a dead cell has exactly 3 live neighbors, it comes alive; otherwise it remains dead

That is it.

To play the game, you simply define a starting pattern and start running the cycles. Most smaller patterns die out after a few cycles or reach a fully stable state – either fixed or alternating between 2 states. Here is an example, which reached a stable [alternating] state after 9 cycles:

IMG_0146

IMG_0147

IMG_0148

IMG_0149

IMG_0150

IMG_0151

IMG_0152

IMG_0153

IMG_0154

IMG_0155

IMG_0156

IMG_0155

The game gets really interesting when patterns behave in more complex ways. My example above is curious, IMHO, as it starts off asymmetric, then acquires symmetry in each dimension after a couple of cycles; later it becomes fully symmetric. Other patterns do many odd things. Perhaps they disassemble and reappear a few cells across the matrix. In some extreme cases, small shapes are ejected periodically from a larger one.

When my friend and I started out playing the game, we just used squared paper and ran the rules “by hand”. I soon realized that I could apply my hobby to the problem and write a computer program to do the work for us. And that is what I did. It was written in Fortran and ran on a DEC PDP11/03, which was the only computer that I had access to with a VDU screen. My “universe” was 80 cells horizontally and 25 vertically. Anybody with a long memory, who used one of the VT series terminals may be able to guess why I had this size.

Nowadays I have one of the numerous Life apps on my iPad and I still find it fascinating as these simple rules sometimes produce such a complex and unpredictable result …

Want to stay up to date on news from Siemens Digital Industries Software? Click here to choose content that's right for you

Leave a Reply

This article first appeared on the Siemens Digital Industries Software blog at https://blogs.sw.siemens.com/embedded-software/2015/02/05/the-game-of-life/