Doug's Workshop

8 x 8 x 8 RGB Qube Software

Instructions for Game of life

I decided to create a separate page of instructions for the Game of Life. That's because it is interesting, and I want to discuss it in more detail than I usually do for a single animation. Game of Life is built on the Version 7 template.

This is the Conway Game of Life in 3D. It's a simulation of life called a cellular automation. In a cellular automation, each cell is either alive or dead based on a set of rules. And we let the process proceed through a number of generations to see if our rules produce growth, death, or a stable pattern.

The original Conway Game of Life is 2 dimensional. You can read about it here:'s_Game_of_Life

The original version has many interesting patterns, like gliders that move through space and glider guns that produce a stream of gliders (as shown on the left). Many different 3 dimensional versions have been conceived. None have gliders or glider guns, but they are still very interesting in themselves.

Now let's discuss how this actually works in our 8x8x8 RGB cube. Each LED in the cube represents a potential life. A newborn life is represented by a violet LED. A life lasting more than a single generation is represented by a blue LED. A recently deceased life is represented by a dull red LED.

The simulation starts with some random births near the center of the cube. The simulation than proceeds with up to a maximum of 150 generations. Each new generation is based on these rules:
1. A dead cell (LED) with exactly 4 living neighbors is born into the next generation.
2. A live cell with exactly 4 living neighbors continues to live to the next generation.
3. A cell with less than 4 or more than 4 neighbors dies in the next generation.

Most random birth patterns will die out before reaching the maximum of 150 generations. But some will continue and still be going strong at the end. Still others will degrade to a fixed or oscillating pattern that persists through all 150 generations. At the end of 150 generations or when there are no more living cells the simulation will end, and a new random birth pattern will be presented.

As we have already said, the 3D version I have used says 4 neigbors is the magic number to be born and to stay alive. It works very well, but I have experimented with other rules that also work well. You can see these others for yourself by just substituting other rules in the code. Find the line in the Main tab that says
"if (count==4){ // if the number of neighbors is 4" and try replacing (count==4) with:
(count>5 && count<9) or
(count>6 && count<12) or
(count>7 && count<18)
These all work and produce different results. For example, count==4 produces many generations, but most births result is quick deaths. In contrast, the alterative above tend to produce longer lives, and somewhat more stable and oscillating patterns.