BrunoP.Blog

I fell down a Game of Life rabbit hole — and couldn't stop tinkering

Four tiny rules, zero players, and yet the screen comes alive on its own. I spent a whole night just watching colonies be born and die — and I'll tell you why it fascinates me so much.

The other night I was falling asleep and, for no reason I can explain, I started remembering something I'd seen years ago: little black squares on a screen, moving on their own. Nobody playing. No goal. Just… living. I went to sleep with that in my head and by the next morning I had twenty tabs open about cellular automata. Welcome to my latest rabbit hole.

The thing is called the Game of Life, and the first joke everyone makes is that it isn't really a game. No levels, no score, and you don't technically play it. You draw a tiny spark of life at the start and hit play. The rest happens by itself.

Four little rules and nothing else

It was invented by British mathematician John Conway, back in 1970. It didn't debut in some stern paper — it showed up in Martin Gardner's column in Scientific American, and became a craze among the few people who had access to a computer back then. The board is an infinite grid of cells. Each cell is alive or dead. And on every “tick of the clock”, every cell looks at its 8 neighbours and decides its next state from just this:

  • A live cell with 2 or 3 live neighbours stays alive.
  • A live cell with fewer than 2 neighbours dies (loneliness).
  • A live cell with more than 3 neighbours dies (overcrowding).
  • A dead cell with exactly 3 live neighbours comes alive.

That's it. In the jargon we sum it up as B3/S23 — Born with 3, Survive with 2 or 3. You could write the whole rule on a sticky note. And yet…

…the screen comes alive

This is where I got genuinely floored. Out of those four silly rules emerge things that look alive. Some patterns blink forever in place — the oscillators. Some patterns walk across the screen like little creatures — the most famous being the glider, a five-cell cross that crawls diagonally forever. And then there are absurd things like the Gosper glider gun: a structure that spits out a brand-new glider every 30 generations, forever. A factory. That nobody programmed to be a factory.

Nobody wrote “make a ship that walks”. The ship is simply a consequence of the rules. There's a beautiful word for this: emergence.

And it doesn't stop there. In 1970 Conway offered a prize ($50 at the time) to anyone who could prove whether a pattern existed that grows forever. They proved it did — that very glider gun. Decades later, people built logic gates, counters, and even entire computers inside the Game of Life. The Game of Life is Turing-complete: in theory you can run any program inside it. People have run the Game of Life inside the Game of Life. Someone rebuilt a working digital clock out of nothing but colliding gliders. I watch those videos at three in the morning.

Why this hits me so hard as a dev

Because it's exactly the dream behind every system I try to build: simple rules at the bottom, rich behaviour on top. Good software is like that. You don't hand-code every case — you define a few well-chosen laws and let the complexity emerge. Microservices talking to each other, a whole team coordinating without a boss dictating every step, the traffic of a city: it's all local, each part only looks at its neighbours, and the whole thing organizes itself.

The Game of Life is the cleanest reminder I know that complexity doesn't require complication. When some code of mine is turning into a monster of a thousand ifs, I think of Conway's four little rules and ask myself: what's the simple rule I haven't seen yet?

One curiosity to close with

Conway, ironically, spent his life a bit annoyed at being “the Game of Life guy”. He did serious, deep mathematics across many fields, yet it was a board-game pastime that made him famous. He died in 2020, of COVID. And there's a quietly poetic coincidence in it: the man known for a model of cells living and dying… anyway. Hit play down there in his honour.

Go play 👇 — click and drag to draw your own cells, or drop in a ready-made pattern and press play. Try the glider gun and just watch. I did.

conway-game-of-life.js

Click and drag to draw. With the board focused: arrows move the cursor, Space/Enter toggles a cell, P plays/pauses.

If you made it this far and lingered a bit longer watching colonies be born and die — welcome to the club. This is the kind of thing that makes me love programming: turning an idea that won't leave your head into something you can actually touch.