cse891

 

Using Demes

Page history last edited by Charles Ofria 2 yrs ago

Demes are groups of organisms that are selected as a unit. Providing selective pressures at the group level has two important aspects:

 

  1. Organisms can act against their direct individual interest as long as its for the good of the group.
  2. Selective pressures can be easier to create as you're looking for the group-level effect.

 

To turn on demes in Avida, decide how many demes you want (num_demes), and how big each deme should be (deme_x and deme_y). Then, in avida.cfg, set WORLD_X to deme_x, WORLD_Y to (deme_y * num_demes), and NUM_DEMES to num_demes. The reason for this is that the demes divide up the population vertically, and thus we must make sure to build them to be the correct size.

 

For example, lets imagine we want to have 400 demes, each of which is 5-by-5. We would set WORLD_X to 5, WORLD_Y to 2000, and NUM_DEMES to 400. Now try running Avida (using avida-viewer).

 

You should see only a small 5-by-5 square fill up, and that's all. This is because we currently have no way of demes replicating, and thus only one deme ever exists. Since the population size is so small (25 individuals), if you watch this long enough its reasonably likely (though far from certain) that the population will accumulate so many mutations at once that the whole thing will eventually just die out.

 

 

Next step: Add in a selective pressure for demes.

 

There are two selection methods available in the version of Avida you have available. Those events are:

 

  1. replicate_demes - This event will replicate all demes that have met a specific criteria.
  2. compete_demes - This event will use a specific criteria to measure the fitness of all of the demes, and then choose demes to be replicated based on their deme-level fitness.

 

For the moment, we will use "replicate_demes". There are three possible modes for this event.

 

  • full_deme will replicate any deme where all of the cells are occupied.
  • all will replicate all occupied demes no matter whats going on inside them. (Usually this will produce odd results unless you're trying to evolve demes that can survive a certain amount of time...)
  • corners will replicate a deme if its upper-left and lower-right corners are both occupied.

 

Go into your events.cfg file and add the line:

 

u 0:1 replicate_demes corners

 

This will test all demes every update and replicate those that have both corners full. Make sure that you also allow the organisms to choose the placement of their offspring if you want anything interesting to happen.

 

Run avida and watch what happens.

 

Lower the copy mutation rate to only 0.0025 and try again. This time you might get much more stable results.

 

Will this technique still work if we increase the deme size to 10-by-10?

 

What else can we try? You can modify the replicate_demes command by editing the files:

 

  • source/actions/PopulationActions.cc - You have to add in the keyword for the new replication type here.
  • source/main/cPopulation.cc - Edit the ReplicateDemes method to act on your new replication trigger.

Comments (0)

You don't have permission to comment on this page.