Lifebricks - A Distributed Computing Cellular Automota project
Introduction - a life-long obsession
So I’ve been working on a new project and it is slowly growing more complicated, I figured it’s time to finally start documenting it.
When I was a teenager I read the book Jurrasic Park and became obsessed with Chaos Theory - from there I read the book Chaos by James Gleick which introduced me to Fractals, and for months my mind was lost in a world of imaginary numbers. My parents had just bought me a TI-81 graphing calculator which had a very rudimentary BASIC progrmming language and I coded up a fractal generator on my calculator. This was not a fast processor, and it would run for hours generating a 96x64 pixel fractal - I went through so many AA batteries!
From there I discovered the textbook Chaos and Fractals - New Frontiers of Science - and it was the only thing I asked for for my birthday. The book was full of fractals, example code, and introduced me to cellular autonoma - specifically Conway’s game of life.
The Game of Life
The Game of life has very simple rules. The environment is composed of “cells” - each cell is a pixel in an X-Y grid. You know, like displays, computer monitors etc.
- Each cell can be alive or dead (1 or 9), and knows the state of it’s 8 neighbors.
- If 1 or 0 of the cell’s neigbors are alive, the cell dies.
- If the cell is alive, and 2 or 3 of it’s neigbors are alive, it stays alive.
- If a cell has 4 or more live neighbors, it dies.
- A dead cell with exactly 3 neighbors alive, becomes alive.
You iterate the cells in a loop. Each iteration the cells look at their neighbors and live or die according to the rules. Like a clock tick.
The rules are very simple, but the behavior that emerges is complex. You can populate the cells randomly alive and dead, and given a large enough XY grid, a vast array of complex objects self-assemble.
- Static objects like blocks, beehives boats and tubs - objects that are stable over infinite iterations, until they are interfered with by other objects
- Oscillators like blinkers, toads and pulsars that stay in a fixed area and repeat through a complex pattern over time (iterations)
- Spaceships, like gliders and their variants that can move across the board and collide with other objects.
When objects collide crazy things can happen. This emergent behavior is interesting enough, but it turns out that complicated structures can be built and their interactions can perform useful calculations. Turns out Conway’s game of life is turing complete. This basically means that you can build a whole computer, inside of a sufficiently large XY grid.
Back in the 90’s it was computationally intensive to simulate a large XY grid - nowadays it’s trivial, but still fun :) I’ve been obsessed with this all of my life, and many of my electronics and coding projects have been somehow centered around this.
The Idea
So I have an idea. What if each cell (pixel) in an X/Y grid was a full, powerful computer in it’s own right (or possibly even a collection of logic gates dedicated to the GoL computation), and each cell is connected directly to it’s 8 neighbors.
There is no overarching ‘program’ that is scanning the grid and performing the calculations - each cell performs it’s own simple calcuations by looking at it’s neigbhors and choosing if it lives or dies. Maybe they’re synchronized by a shared clock signal, maybe they’re not.
Microprocessors have gotten so cheap and so fast that it’s financially possible to build hundreds of individual pixel modules, each with it’s own processor running at 10s or hundreds of mhz, and it’s own IO to connect to it’s neighbors. Because they’re re-programmable you can even experiment with different CA rules - or do something entireley different like have them run fractal calculations.
Aside Yeah, this is where I realize it’s kind of like neurons in a brain, each one interconnected with it’s neigbhors running some kind of calculation, self-organizing without a central program controlling them. There is a small difference - the input and output state is only on or off, to better simulate a neuron they’d have to be a variable voltage - but that’s just an idea for 2.0 :)
The Project - First Revision
So I fired up Kicad and started building. First revision was a 48x48mm square board with an ATTiny404 microprocessor. The cell’s states would be sent to pins along the edge of the board, to be soldered to it’s neigbors, and there are input pins along the edge to read the neigbors state - through a a PCF8574AP I2C IO expander. The LED was to be a WS2812 so that it could be different colors.
 instead of the game of life. A whole new world of programmable options opens up!
So the next version is going to include a 74HC95 IO output expander. Sure it’ll add $15ish to the project, but it opens up sooo many options. Plus to save on costs I had switched from a WS2812B to a basic red LED. I think I’m going to switch back to the WS2812B - more cost - but with all of the new options it would be great to be able to indicate more than OFF/ON.
So there we are. Be sure to stay tuned for more revisions and more lengthy blog posts. And someday, hopefully, actual pictures of an actual physical grid of these things installed on my wall, performing masivley overpowered parallel computation - so many blinkey lights!