User Tools

Site Tools


ulam:demos:coevolution

This is an old revision of the document!


ULAM demos: Coevolution

Evolution can sometimes be seen as occurring between a population of creatures and a fixed environment. Some creatures do better than others and proliferate, and over time a population emerges that is increasingly well-adapted to that environment – and the dynamics of the resulting system will tend toward a fixed point, typically quite quickly.

But just often, the “environment” is a moving target, because it contains other populations of creatures that are also evolving. In such circustances the resulting coevolutionary system dynamics can quite complex, as the evolutionary innovations of one species are countered by evolutionary counter-innovations by another species.

In 2002, Dave Ackley developed a project called Huegene for a C++ programming course. This coevolutionary model is inspired by Huegene, although this model uses RGB color encoding while Huegene used HSV. (Also, perhaps ironically, the primary pedagogical purpose of Huegene was to learn about discrete event simulation, but that is all part of the fundamental machine architecture in ULAM and the MFM, Huegene in ULAM is a much simpler project than it was in C++!)

The Huegene model

Suppose there are two species of creatures, the Plants and the Herbivores, existing in a two-dimension grid of sites that each can hold one creature. Plants are immobile, but they spontaneously grow over time and will split into empty adjacent sites if they are large enough. The Herbivores move randomly and attempt to eat any Plants they stumble over. Herbivores must eat enough Plants to avoid starving to death, and if they accumulate enough energy they can produce an offspring Herbivore in a neighboring empty site. Plant vs Herbivore

The Plants have genetic information that allows them to appear as any (24 bit RGB) color. Any given Plant has a fixed color for its whole lifetime, but if it manages to produce an offspring Plant, the child's color will be slightly modified – “mutated”, completely at random – compared to the parent. Regardless of their color, all Plants are equally efficient at growing and having offspring plants, and so on – in a world consisting only of Plants their colors are completely irrelevant to their evolutionary success.

For their part, the Herbivores also have a genetically-specified color, that determines what color Plants they are most likely to eat successfully. So a “well-adapted” Herbivore will have a color closely matching that of the nearby Plants, while a “well-adapted” Plant will have a color that's far (in the absolute distance in RGB) from the nearby Herbivores.

If we put a single Plant into an empty grid, it will produce a population of Plants around it, with increasingly mutated colors the further we get from the original “Ancestor”. What will happen if we then start injecting an Herbivore near the Plants, until we get one that “catches” – that can eat the available Plants successfully enough to produce offspring?

The video at right shows one possible result, run for several hours of real time and displayed so that about 90 events happen at each site during each displayed second.

ULAM source code

How the video was made

ulam/demos/coevolution.1444765485.txt.gz · Last modified: 2015/10/13 19:44 by ackley