Mostly Harmless

A blog about science, art, coding, life,... mostly harmless stuff.

Some Experiments in Artificial Life and Chaotic Systems

In a previous post I teased about a tiny experiment I did recently. It revolves around something call chaotic systems, which are systems whose development is heavily influenced by the initial conditions. Conway’s Game of Life, for instance. In my case, is something simpler, but with some random mechanisms that make it interesting.

Leaving all the implementation details aside, the basic system works like this (bear with me, pictures come later…): At the beginning of time we have a single cell. This cell has random chance of reproducing (call it alpha), and after a random time interval (call it delta), it decides whether to reproduce or not. At this point God rolls a die, and if the odds are on its favor, the cell reproduces, effectively creating a clone of itself, with the same reproduction chance (but different random intervals). The new cell lives the same miserable existence, trying to reproduce every once in a while (at random intervals). So the system grows, as new cells are added. When a cell’s reproduction time comes, and it decides not to reproduce (with a probability 1 - alpha), it becomes inert, never again having the chance the reproduce, and dies after a while.

With this mechanics, the system grows and shrinks as new cells are born and old cells die, until someday they all die. For practical more than theological reasons, the population of the entire universe has an upper cap. When the maximum number of cells available are alive, new cells can simply not be created, and all new reproduction attempts will fail (thus killing the corresponding parents). This has the effect of controlling unstable populations, with alpha values too big.

The question then becomes: what is the optimal value for alpha which produces the most stable and long lived populations? Extremes values are easy to discard. With a value of less than 0.5 every cell has a greater chance of dying without leaving descendants, than ever giving birth to a single child. It is also not hard to see that values very big will tend to overcrowd very fast, and die of overcrowding. A wild guess might tell us that 0.5 should be the optimal value. However, it is not, it is actually slightly higher than that.

I actually ran this experiment, with all values in the interval [0.5, 1] with a step size of 0.001, and recorded 30 full iterations (that is, until all cells die). The following graph shows the average number of generations (total cells ever created) for each of these numbers.

A chart!

If you are asking which is that value with the highest average, it’s very near 0.527. The following video shows one of these optimal runs. After two failed starts, the population appears to reach a significantly stable pace. We can see sub-populations emerge and decay, and moments of massive overpopulation followed by huge extinctions. However, 5 minutes and 112 thousand generations into the future, it still looks bright.

The whole purpose of this experiment is of course to reflect about the meaning of life, and the insignificance of one’s own desires in the bigger picture of the Universe. These tiny creatures carry on with their miserable destiny, build civilizations that crumble to dust, only to be rebuilt again. They wage wars, watch commercials and go shopping on Black Friday. And in the end, they all die. But no matter how insignificant each and every tiny life is, the whole system is something of extreme beauty and complexity. To a superior being watching their lives unfold in the matter of seconds, all their problems seem no more than tiny scratches in the ever evolving ether.

If you ever feel your life is devoid of all meaning, please yourself in the infinite contemplation of this marvelous universe here (like, click this sentence). It takes a while to load so be patient. Anyway, what else have you left to do?.