More experiments with Game of Life

As promised in my recent post “Experiments with Conway’s Game of Life”, I have been been looking into how to improve my first implementation. The new version which you can now find on Github is fully contained in one Python script which runs in the QGIS console. Additionally, the repository contains a CSV with the grid definition for a Gosper glider gun and the layer style QML.

Rather than creating a new Shapefile for each iteration like in the first implementation, this script uses memory layers to save the game status.

You can see it all in action in the following video:

(video available in HD)

Thanks a lot to Nathan Woodrow for the support in getting the animation running!

Sometimes there are still hick-ups causing steps to be skipped but overall it is running nicely now. Another approach would be to change the layer attributes rather than creating more and more layers but I like to be able to go through all the resulting layers after they have been computed.

  1. Anita you’re unstoppable, thx 4 sharing! Did you know I owe my career to a little old lady? The GoL link is line 2

    I took Comp Sci 101 @ Uni of Calgary in W Canada (the year after Jim Gosling left for Calif and started Java @ Sun Micro) and our lab test was a skin disease simulation not unlike GoL. Way back then it ran on a Multix (JCL card decks on small mainframe in the basement), and I just couldn’t get it to work by Friday deadline almost exactly 35 yrs ago. So the TA told me work on it over the WE, and I’d get marks if I finish by Monday. So who else would be in uni on a Sunday night mainframe time share, but a desperate student and a second-age student? She cussed that “the letter O and the number 0 looked the same to my failing eyesight”… and I went: aha! I’d mistyped my zeroes and my lab test was saved… I had been on the verge of giving up on what was not at all an obvious play in the late 70s (a geology prof insisted I take that class, as he had that foresight most of us didn’t in natural sciences, and the only reason I took it was that I needed an option LOL).

    • Hi Andrew,
      Thanks for sharing! I can only imagine running GoL on a Multix. Must have been fun :-)

%d bloggers like this: