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.