Game of life

Conway’s Game of Life is a mathematics puzzle / toy / serious bit of research that I mess with from time to time; usually when I get a new computer and want to see how fast it is compared to older ones. I wrote a basic GoL simulation for the Sinclair Spectrum back in the early 90s.

In the last few days there have been a smattering of posts on Twitter that have sparked my interest in the GoL again. First was Charles Stross linking to a GoL simulation simulated in Gol, which amazed me. I knew that type of simulation in GoL would be possible, because GoL is a Universal Turing Machine, I’d just never seen anything that complicated done in GoL.

The second spark was a post by Mark VandeWettering with a FFT based GoL simulation. His post includes example code, so I gave it a try. The output is a bunch of PGM image files, to convert these to video to see how the simulation progressed I used ImageMagick and ffmpeg.

#First off, convert the pgm files to something ffmpeg can handle
$ for f in *pgm ; do convert -quality 100 $f `basename $f ppm`.png; done

#Then set ffmpeg loose on the new images to make a video
$ ffmpeg -r 10 -b 1800 -i frame.%04d.pgm.png out.mp4

This is the resulting video – it wasn’t a particularly interesting output from the sim. If I keep playing with GoL I may post something more appealing.