At the height of self-isolation during the COVID-19 pandemic, one might hope that this would give me more time to focus on my hobby projects, to keep myself sane if nothing else. No such luck. The project I’d been hoping to work on—an artificial-life simulation from 1989—stalled out pretty aggressively, and I had very little motivation to work on it directly.
I did still want to investigate the simulation, though, so I gave up on the “retrocoding” part of it and implemented it directly in C. This both let me validate the design and explore some of the space it suggested. Fixing up the design to be more friendly to modern implementations also ended up being interesting.
So today, let’s look at taking a very old design and bringing it a bit into the modern world.
The Original Design
The original program I’m cloning and modifying here was a program named Simulated Evolution, created in the late 1980s by a high school teacher named Michael Palmiter. This program was written up by A.K. Dewdney in is column Computer Recreations, and the column in which he did so was published in the May 1989 issue of Scientific American. That column was republished, with some extended detail, in his collection The Magic Machine: a Handbook of Computer Sorcery. This collection is where I first encountered the program.
The basic idea is pretty simple; there is a 150×100 “primordial soup”. Plankton randomly appear in the soup at a steady rate. Bugs swim around the soup, eating any plankton they come across. Plankton lives forever unless eaten, but bugs will starve to death if they don’t eat for long enough. Bugs that eat well and live long enough will fission into two bugs.
Where things get interesting is that bug motion is determined by their genome. Each bug carries with it a weighted set of probabilities determining what it will do each time unit; each time unit it will turn some multiple of 60 degrees and then advance one unit. When a bug divides, a random one of the six possibilities will end up weighted twice as heavily, and the other will have a (possibly different) random option weighted half as heavily.
The starting conditions include 100 plankton and ten bugs with random genomes and a nutrition level consistent with having consumed a single plankton. This means that bugs begin by just kind of twitching in place, more or less, and as the simulation continues selection pressure produces bugs that move in more directed ways.
The article doesn’t specify exactly how it works, but it also mentioned that Palmiter’s original program had a “garden” setting that would set aside a small part of the soup to receive much more plankton than the rest, and that doing this could encourage speciation amongst the bugs, with the “cruisers” being supplemented with “orbiters” that would turn tight circles within the garden.
I have successfully replicated that result in my own system:
I’ve uploaded the source code to the Bumbershoot Github. The full program requires SDL2, but it should build with “make” alone on any system where that’s immediately available – so, any Linux-like system, or macOS running Brew, or Windows running MSYS2.