4946

Conway's Game of Life has been a staple of computer programming and exploration since the 1970s. It simulates a rectangular array of cells which live, die, or are born based on the number of neighbors each cell has. This simple scheme generates remarkable visual results. There are 262,144 possible sets of rules for the game - each giving a unique visual effect. This project allows you to explore this exciting space with a mesmerizing 32x64 tri-color LED panel.

Using the Adafruit 32x64 RGB LED matrix and the Adafruit Matrix Portal, this project simulates all possible rule sets for Conway's game of life. Conway's game of life is a cellular automata simulation with a rectangular array of locations that can be filled with a cell or not. Whether a cell lives, dies, or a new cell is born depends on the number of neighbors each cell has. The result is a dramatic and compelling visual display of moving and changing patterns that has fascinated people since it was first described in the 1970s.

Each rule set can be specified as an 18-bit binary number where a 1 or 0 specifies the state of the cell in the next generation. The high order 9 bits specify the next generation if a filled cell has 0 through 8 neighbors (that is, which cells survive) and the low order 9 bits specify the next generation if an empty cell has 0 through 8 neighbors (that is, when cells get born). These 18 bits can be expressed as 6 octal digits; 3 for the high order bits and 3 for the low order bits. For example, the "standard" Conway rules are expressed as 014 010 in this format. 

There are therefore 262,144 (2^18) different ways to play this game, each giving a unique and compelling pattern on the display. Users can explore this space and it's remarkable visual diversity. I have posted short videos on the YouTube site to give you an idea of the possibilities and how different the results can be. Elektor users could share their favorite rule sets as we explore all 262,144 possibilities.

In addition, I have adapted Conway's original color scheme to be more visually compelling. In Conway's original version, cells are colored (filled) or black (empty). In my project, empty cells are black, newborn cells are blue, blue cells turn green after one generation, and cells that have just "died" leave a dark purple "ghost" for one generation.

The top set of thumbwheels sets the pattern for filled cells, the middle set sets the pattern for births, and the bottom set controls some parameters: the % of cells that will be filled when the simulation resets, the number of generations to run before resetting, and the delay between generations.