Evolving mutation rate during invasion

Summary

The experiment presented here was inspired by the publication Evolving mutation rate advances the invasion speed of a sexual species by Marleen M. P. Cobben, Oliver Mitesser and Alexander Kubisch. The original paper can be found here.

In this work we present the result of invasions where creatures (individuals) are faced with 5 different types of environment stresses. For each environment stress we compare the adaptation of populations with a fix mutation rate, between 2% and 0.005%, versus populations with evolving mutation rate allowed to vary between 50% and 0.05%. The adaptation is measured as the density of living creatures at the end of the simulation.

A total of 7 different environments were tested. For each environment tests were made to calculate the fix mutation rate giving the highest population density. Results show that the fix mutation rate depends on the environment and varies from the lowest end of the scale (0.005%) to the highest end of the scale (2%).

Each environment was also tested with an evolving mutation rate. Results show that the fitness with evolving mutation rate is nearly always identical to the best fix mutation rate.

This work shows that when a population is facing different types of stresses during a land invasion, the population with evolving mutation rate can adapt to any type of stress. Hence evolving mutation rate compared to fix mutation rate is not an advantage in a stable environment, but is a clear necessity in a constantly changing environment.

Simulation model

In this simulation the ground (landscape) consists of a grid of 250 (X) by 20 (Y) patches or lattices. The landscape is not wrapped, neither in X or Y. In the publication the landscape is wrapped along Y axis. The picture below shows the initial landscape occupied with 3,000 randomly positioned creatures.

Creatures (individuals) are initially prevented from going beyond X = 39. At step 2,000 of the simulation, creatures are not blocked anymore. This is actually simulating an invasion of the rest of the landscape, from X = 40 till the far right end X = 249.

Creatures have 3 attributes of interest in this model:

  • Temperature (optimal temperature in the paper), linearly encoded in the DNA from 0 to 10, 0 being the default when all bits of the DNA are 0,
  • Movement probability, linearly encoded in the DNA from 0 to 1, 1 being the default when all bits of the DNA are 0. This defines the probability of a creature's dispersion, i.e. moving to a nearby patch of the ground, and
  • Mutation rate, either fix or encoded in the DNA.

Each lattice of the landscape has an associated temperature. The smaller is the difference between the lattice temperature and the creature temperature, the higher is the chance of survival of the creature, and the probability to reproduce.

In the publication survival is defined through a number of conditions causing death of a simulated individual. This can either be based on density of individuals in the patch, mortality risk, extinction probability per generation, and probability of dying during dispersion. Although all this can be simulated in Evo(rand), the typical way of defining mortality in Evo(rand) is through a specific individual attribute, such as Energy, reaching a certain limit, for example below 0.

Flat environment

In the flat environment, the ground temperature is set to 0 everywhere. The fitness (i.e. density of creatures per lattice) is calculated at step 5,000. The graph shows the average fitness over 100 simulations for each fix mutation rate tested.

The best fitness 3.54 live creatures per lattice is reached for a mutation rate of 0.005%.

The fitness with evolving mutation rate is 3.54 live creatures per lattice.


Note: 10 billion creatures were simulated to generate the graph.

Ramp environment

In the ramp environment, the ground temperature goes up from 0 (on the far left side) to 10 (on the far right side). The fitness is calculated at step 6,000. The graph shows the average fitness over 100 simulations for each fix mutation rate tested.

The best fitness 2.70 live creatures per lattice is reached for a mutation rate of 0.1%. The reason why the fitness is low with small mutation rates is because by step 6,000 the population has not managed to invade the whole landscape.

The fitness with evolving mutation rate is 2.70 live creatures per lattice.

Mountain environment

In the mountain environment, the ground temperature is symmetric along the X axis, going up from 0 to 15.7 in the middle (X = 124) and then down to 0. The temperature gradient is geometrically increasing, simulating a mountainous peak of temperature to be crossed in order to invade the entire world.

To give sufficient time for the landscape to be completely invaded, the fitness is calculated at step 20,000.

The best fitness 2.14 live creatures per lattice is reached for a mutation rate of 0.1%. For mutation rates 0.03% and 0.05% the creature invasion does not always manage to cross the mountain. For mutation rates 0.01% and below the creature invasion never crosses the mountain.

The fitness with evolving mutation rate is 2.12 live creatures per lattice.

Season environment

The season environment is identical to the mountain environment, except that:

  • The peak temperature is 3.2 instead of 15.7.
  • The temperature in the whole environment varies between 0 and its maximum with a period of 400 steps.

The varying temperature simulates the effect of a season. This is causing additional stress on the creatures which need to change its temperature in tens of generations in order to adapt to the quickly changing environment, especially in the middle of the landscape.

The fitness is calculated as an average between steps 8,000 and 10,000.

The best fitness 2.17 live creatures per lattice is reached for a mutation rate of 0.7%.

The fitness with evolving mutation rate is 2.17 live creatures per lattice.

Day / night environment

The wave environment is identical to the mountain environment, except that:

  • The peak temperature is 1.75 instead of 15.7.
  • The temperature in the whole environment varies between 0 and its maximum with a period of 20 steps.

The varying temperature simulates the effect of day and night. This is causing a different stress on the creatures which need to change its temperature in a couple of generations in order to survive.

The fitness is calculated as an average between steps 6,000 and 8,000.

The best fitness 1.56 live creatures per lattice is reached for a mutation rate of 0.05%.

The fitness with evolving mutation rate is 1.54 live creatures per lattice.

Cataclysm environment

The cataclysm environment is identical to the flat environment, except that every 10 steps all creatures within a 10 lattices radius of a randomly selected location are killed.

It simulates the effect of cataclysm.

The fitness is calculated as an average between steps 4,000 and 6,000.

The best fitness 3.07 live creatures per lattice is reached for a mutation rate of 0.005%.

The fitness with evolving mutation rate is 3.07 live creatures per lattice.

Ice Ages environment

The ice ages environment is a mix of and season environments. The temperature is identical throughout the landscape, but varies between 0 and 4 at a period of 1,000 steps. It simulates glacial and interglacial cycles.

The fitness is calculated as an average between steps 8,000 and 10,000.

The best fitness 1.63 live creatures per lattice is reached for a mutation rate of 2%. Below 0.1% the population does not survive to such a harsh environment!

The fitness with evolving mutation rate is 1.47 live creatures per lattice.

Comparing all 7 environments

The graph shows the accumulated fitness for each tested mutation rate and for each environment. In order not to privilege one environment over another, the scale is in percentage of the highest fitness reached in each environment.

The graph shows that the best overall performance is obtained with the evolving mutation rate.

Conclusion

A total of 7 different environments were tested. For each environment tests were made to calculate the fix mutation rate giving the highest population density. Results show that the fix mutation rate depends on the environment and varies from the lowest end of the scale (0.005%) to the highest end of the scale (2%).

Each environment was also tested with an evolving mutation rate. Results show that the fitness with evolving mutation rate is nearly always identical to the best fix mutation rate.

Wen a population is facing different types of stresses during a land invasion, the population with evolving mutation rate can adapt to any type of stress. Hence evolving mutation rate compared to fix mutation rate is not an advantage in a stable environment, but is a clear necessity in a constantly changing environment.

Comment or suggestions?

Don't hesitate to contact me at mailto:herve.g.noel@gmail.com if you have any comments or suggestions.

Sample videos

Ramp environment with evolving mutation rate

This video shows a sample simulation with Ramp environment and evolving mutation rate: the top shows the individuals (initially all created with a DNA set to 80 bytes of 0s) and the bottom shows the average mutation rate along the X axis.

Cataclysm environment with evolving mutation rate

Ice ages environment with evolving mutation rate

The bottom shows the graph over time of a number of indicators. As can be seen, for each cycle of temperature there are 2 peaks of population, one at the maximum of temperature and one at the minimum of temperature.

Evo(rand) configuration

In this section we provide details of how Evo(rand) was configured for the experiments.

Configuring creatures

As for the creatures, they have 3 attributes of interest in this simulation:

  • Mutation rate, using a logarithmic encoding in the DNA from 0.5 (50%) to 0.0005 (0.05%), 0.5 being the default when all bits of the DNA are 0.
  • Temperature (optimal temperature in the paper), linearly encoded in the DNA from 0 to 10, 0 being the default when all bits of the DNA are 0.
  • Movement probability, linearly encoded in the DNA from 0 to 1, 1 being the default when all bits of the DNA are 0. This defines the probability of a creature's dispersion, i.e. moving to a nearby patch of the ground.

In the publication survival is defined through a number of conditions causing death of a simulated individual. This can either be based on density of individuals in the patch, mortality risk, extinction probability per generation, and probability of dying during dispersion. Although all this can be simulated in Evo(rand), the typical way of defining mortality in Evo(rand) is through a specific individual attribute, such as Energy, reaching a certain limit, for example below 0.

So Evo(rand) was configured to use Energy < 0 as the criteria for death:

  • The Energy at birth is 1, less the absolute difference between creature and landscape temperatures.
  • As the creature gets old, it gains Energy (let's say from the patch) which is shared among all individuals on the patch (living and dead).
  • As the creature gets old, it loses Energy, part of which is proportional to the absolute temperature difference with the patch.
  • Finally, some energy is also lost when a creature moves to another patch (dispersion).

Note: Aging in Evo(rand) simulates the widely accepted theory that without death there is no evolution, and death ultimately comes from a decreased efficiency in the body metabolism, although there are exceptions. Here Aging is 1 at birth and gradually decreases by 10%.

Finally, the last bit of the simulation to be defined is the action of the individual. In Evo(rand) individuals take decisions which can be influenced by their own state or the environment. For this simulation the actions are random:

  • 50% chance to reproduce. The Energy must be at least 1 to succeed.
  • 50% chance to move (disperse) to one of the 8 neighbouring patches.

Success of moving to a neighbouring patch depends on the movement probability. If successful, the movement is costly in Energy.

Configuring invasion

Creatures are initially prevented from going beyond X = 39. At step 2,000 of the simulation, creatures are not blocked anymore. This is done by defining a Blocked Boolean attribute for each ground lattice and preventing the Move action to a lattice where Blocked is true.

This is actually simulating an invasion of the rest of the landscape.

Configuring Flat environment

In the flat environment, the ground temperature is 0.

The creature Temperature is linearly encoded in the DNA from 0 to 10, 0 being the default when all bits of the DNA are 0.

Configuring Ramp environment

In the ramp environment, the ground temperature varies from 0 (on the far left) to 10 (on the far right).

The creature Temperature is linearly encoded in the DNA from 0 to 10, 0 being the default when all bits of the DNA are 0.

Configuring Mountain environment

In the mountain environment, the ground temperature has a peak in the middle of the X extent of the terrain, at X = 125. The peak of temperature being 15.7.

The creature Temperature is linearly encoded in the DNA from 0 to 16, 0 being the default when all bits of the DNA are 0.

Configuring Season environment

In the season environment, the ground temperature has a peak in the middle of the X extent of the terrain, at X = 125. The peak of temperature being 3.2. And then it varies at the same frequency throughout the entire landscape at a period of 400 steps.

The creature Temperature is linearly encoded in the DNA from 0 to 3.2, 0 being the default when all bits of the DNA are 0.

Configuring Day / night environment

In the day / night environment, the ground temperature has a peak in the middle of the X extent of the terrain, at X = 125. The peak of temperature being 1.75. And then it varies at the same frequency throughout the entire landscape at a period of 10 steps.

The creature Temperature is linearly encoded in the DNA from 0 to 4, 0 being the default when all bits of the DNA are 0.

Configuring Cataclysm environment

The cataclysm environment is identical to the flat environment, with configuration of the cataclysms.

The creature Temperature is linearly encoded in the DNA from 0 to 10, 0 being the default when all bits of the DNA are 0.

Configuring Ice Ages environment

The ice age environment is identical to the flat environment, but with the temperature of the entire landscape varying between 0 and 4, at a period of 1,000 steps.

The creature Temperature is linearly encoded in the DNA from 0 to 4, 0 being the default when all bits of the DNA are 0.