Muuuh Wildlife Tales

Creatures - Simulation of Evolution

A simulation of evolution and natural selection in a pool with virtual organisms, called creatures, competing against each other, propagating while undergoing mutations, gene swaps and crossover. Fitness is a function of how well a creature is able to recognize and categorize the creatures surrounding it.

I have been inspired to create a P5.js version of “Creatures” having enjoyed the artistic beauty of different P5.js sample, in particular this one Flocking.

The original program has been written in QBASIC which allowed me to observe raise and fall of species in the virtual pool. Unfortunately, the original program has been lost and with none of the following approaches I was able to reproduce the dynamics.

The underlying model is quite simple. A creature has 4 genes producing markers used to detect a neighbour and to characterize a neighbour as either ally or rival.

  • A creature can always see its neigbours
  • Perception of a neighbour is determined by one gene serving as receptor and ligand (locA vs locA')
  • Perception of a neighbour is determined by one gene serving as receptor docking with another gene of the neighbour (locA vs locB')
  • Perception of a neighbour is determined by one gene serving as receptor docking with another gene of the neighbour (locA vs locC')

In all cases, locC determines if a seen neighbour is an ally or rival.

With a mutation or crossover an offspring suddenly may not be seen by its neighbours anymore and/or stop being able to see its neighbours. It may also turn it and/or them from ally to rival or vice versa.

Versions

In descending order of having been programmed.

Github