tnSuperman tanktn oParticles uExtrusion j3d sandy flExtrusion fuelyoursenses meshCam bufferSnake dMap2 dMap pv2 cursorFire opticks faceGame FPSnake pv preOpticks painty youtuber fractalFIngers 2dbals

March 9, 2012

Life is beautiful

Filed under: analytics,doodles,Games — Tags: , , , , , , , , , , — Brandel Zachernuk @ 8:05 am

This is a general implementation Game of Life,  preloaded with John Conway’s ‘B2S34′ variant in Flash. It’ll run by itself, but you  can click-drag on pixels to force them to ‘toggle’ the cell in the universe.  You can change the world rules with the ‘born on’ and ‘stay on’ checkboxes and increase or decrease the number of ‘seed’ cells at the outset. Enjoy!

Get Adobe Flash player


I recently signed up to an online course called “Model Thinking” by the University of Michigan and it is amazing. It’s all about making use of analytical models to understand things that happen in the world. They set the tone at the start with a neat quote from George E. P. Box: “Essentially, all models are wrong, but some are useful.”

As a programmer, making models is my stock-in-trade. I built the model of a picture that gets cut up and pasted together weirdly in Kaleidoscoper, and I made a simplified model of a musical instrument in an app at work. In both cases, the models exist to bring about some outcome – Kaleidoscoper makes the image so you can see the image or share it on Facebook, the instrument model exists so you can play it like an instrument and show off to your friends. What I hadn’t realized, though, is that these models can be used for predictive or explanatory purposes – and that in order to have this predictive power, the models don’t have to be perfect. I can learn something about real instruments by creating these simple models – I could compare the reported enjoyment of playing an instrument with the number of notes it can play in order to find out whether people want more notes or a simpler instrument. I could measure the difference in complexity between the real instrument and the simulation to see if people want to play something that’s realistic or something that lets them produce music easily. For any given question I’d probably want to use a different model to answer it, but that’s fine – it just means that I don’t have to make one model that answers every question, which would be extremely difficult anyway.

Among the many models that the course talks about is John Conway’s Game of Life. You can’t get very far in computing without encountering a discussion of Life, but I had never gotten around to implementing the algorithm to actually play with it first-hand.  I implemented it this today, and have been captivated by the results despite (or maybe because of) how ludicrously simple the rules are. I love the churning, explosive quality of the wavefronts that open up, and the way that even after a region has been all but cleared, a structure can sweep through it leaving a fresh and seemingly random patch of debris in its wake. The patterns are extremely evocative of early video games and Japanese top-down space shooters in particular. Wikipedia goes into some of the patterns that can emerge from the system at some length, and this kind of Cellular Automaton still an area of active research in computer science and other fields worldwide. Not bad for something with only three rules!


The algorithm does a fantastic job of illustrating two things:
1. Seemingly complex systems can often be controlled by surprisingly simple rules, and

2. There is a world of difference between being aware of something and experiencing it first-hand – computer programs included. There is definitely merit in implementing things you have seen before because you never know what you will learn by getting that much closer. I’m definitely going to continue implementing ‘standard’ algorithms like this to understand them better.


[UPDATE: I have replaced the first app that ran Conway’s Life with a  more general version that supports different rules. Conway’s version is based on three rules:

1. If I am off and three neighbours are on, I will turn on (Born 3)

2. If I am on and two neighbours are on, I will stay on (Stay 2)

3. If I am on and three heighbours are on, I will stay on (Stay 3)

Conway’s life can be described as Born 3, Stay 2, 3 or (B3S23). Try running B0, or B0 S8




1 Comment

  1. [...] say about a combination of Schelling segregation and Conway’s Game of Life – I have an expanded version of that  that may be of interest to you as well. I made these simulations because of a free online course [...]

    Pingback by Fun with (Schelling) Segregation – with source! « — May 16, 2013 @ 10:41 am

RSS feed for comments on this post. TrackBack URL

Sorry, the comment form is closed at this time.

Powered by WordPress