Exploring Conway’s Game of Life with PyScript
Life in Life, by Phillip Bradbury https://youtu.be/xP5-iIeKXE8

Exploring Conway’s Game of Life with PyScript

A few years ago, while on a nostalgic quest for the Hasbro board game I cherished during childhood, I unexpectedly stumbled upon another game with the same name. Conway’s Game of Life wasn't about colorful wheels and life choices but a mathematical simulation that's both intricate and fascinating.

No alt text provided for this image
In Hasbro’s Game of Life, going 'bankrupt' meant retiring to the countryside as a philosopher. Honestly, that always sounded like winning to me!

Introduced in the “mathematical games” column of Scientific American in 1970, this "zero-player game" was the brainchild of John Horton Conway, a mathematician from the University of Cambridge.  The game operates on three simple rules:

  1. Birth: An empty cell with three neighbors becomes alive.
  2. Death: A live cell with too few or too many neighbors dies.
  3. Survival: A live cell with two or three neighbors stays alive.

These straightforward rules give rise to patterns that many see as a testament to mathematical beauty, and have caught the attention of many in the art world. These patterns are celebrated in an online exhibition at the Kate Vass Gallery in Zurich, titled “The Game of Life, Emergence in Generative Art.” Additionally, it's gained a following of dedicated programmers, known as "Lifenthusiasts," who enjoy exploring and creating new patterns within the game.

The Exploratorium - a stamp-collection pattern created by the ConwayLife.com community to mark the game’s 50th anniversary


The Game of Life isn't just a captivating visual display; its theoretical underpinnings are profound. It is Turing complete, meaning it can algorithmically compute anything computable (in theory). This versatility has been applied in physics and complexity science, with cellular automata simulations modeling everything from ants to traffic, clouds to galaxies. Philosophers like Daniel Dennett have used Life as an analogy to explore complex concepts like consciousness and free will, suggesting that intricate designs can emerge without a designer.

Its rise in popularity coincided with more accessible computer technology in the 1970s, turning it into both a programmer's challenge and a philosophical muse. This fascination has persisted, with enthusiasts even emulating complex computer systems within the Game of Life's framework. In 2016, Nicolas Loizeau crafted an 8-bit programmable computer starting from only four basic patterns!

My Dive into PyScript with the Game of Life

I was looking for a simple project to get hands-on with PyScript, and the Game of Life seemed like a good fit. 

PyScript is a new framework that allows you to use Python, with or without JavaScript, to build interactive websites that don’t necessarily have to communicate with a server. There were some challenges, like not having the Tkinter module available. So, I used D3.js for the visualization and added a bit of JavaScript to make it all work. You can play around with it here and check out the code here (still WIP!)

It's been a good learning experience, and I plan to keep working on it. If you've got any thoughts or feedback or played around with PyScript or the Game of Life yourself, I'd love to hear about it.

To view or add a comment, sign in

Others also viewed

Explore content categories