Saturday, May 31, 2008

MicroPond v1

My first real foray into AL was what I'm now calling MicroPond v1. The original inspiration was the book Chaos by James Gliek, specifically the part where he discussed the chaotic nature of predator/prey populations. I set about to try to simulate this, and then realized that the predators needed rules. It was purely an afterthought to allow those predator rules to randomly mutate, but it soon became the main subject of my interest.

In both MicroPond v1 and v2, "critters" are simple worm-like creatures on a 256 x 256 pixel 2D grid. They have a head which can be oriented up, down, left or right, and can contain multiple segments. They cannot travel over each other.

In MicroPond v1, each critter contains a series of instructions which are executed sequentially, restarting at the beginning after the last instruction. Each critter is as long as the number of instructions. For example, "MZ>" would be a three pixel long critter that would move, sleep, turn right and repeat.

Critters gain energy by moving over green dots, which are randomly distributed, and lose energy each turn. If a Critter's energy level goes negative, it will die. If it exceeds an energy threshold, it produces a copy. If mutation is enabled, the copy may have a random mutation, which can be either randomly losing an instruction, gaining an instruction or having an instruction randomly changed.

The executable (Windows only) can be downloaded here:

You'll need to insert a critter to get the ball rolling. Start with "M", which will simply move forward, hit food and produce copies. Add mutation, and interesting results occur. Click on "Instruction Set" to view and enable/disable certain instructions.

1 comment:

cliftut said...

I like this program. It's rather elegant; simple and straightforward, whereas some simulators are either overly complex or too simple to hold much interest. I've amused myself with v1 for a while, experimenting with different settings.

I would like to suggest this; a population graph functionality. It could be turned on with a button maybe. I've read most of Chaos and I'm also fascinated by population fluctuations. I'm curious about what different patterns would emerge under different settings.

Regardless, I'm having fun with this, so thanks! :)