Author Topic: The speciation autofork  (Read 4915 times)

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
The speciation autofork
« on: October 01, 2008, 04:18:15 AM »
I need a little help understand the settings here. Do the numbers when dragging the sliders mean the number of mutations that must occur?
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The speciation autofork
« Reply #1 on: October 01, 2008, 11:10:49 AM »
Imagine a population of bots, all of the same species.  Ignoring new sim startup conditions or manual insertion of new instances of a species, by definition, all the bots in the species are related meaning that if you go back far enough, you will find a single, probably long deceased most recent common ancestor all the extant (meaning currently alive) bots share.  Think of the relationship between extant bots and their ancestors as a tree, with bots (extant or not) as the leaves and birth events as the vertices.

Extant bots will generally be clustered in this tree, meaning all the alive bots will be closely related to one another.   Said another way, if you look at all the bots that have ever lived in a species, most of them are long dead and the ones that remain are much more closely related to each other then they are to their long dead ancestors.  The alive bots are grouped in the tree space.
 
Just to complicate matters, there are actually two ways to measure the relatedness of bots: through mutations and through generations.  The sum of the number of mutations that have occurred along their lines of descent from their most recent common ancestor is the mutational distance and the sum of the number of generations that have occurred along their lines of descent from their most recent common ancestor is the generational distance.  Imagine two extant bots of the same species, A and B.  Say A and B have a common (probably long dead) ancestor C and that 30 generations occurred from C down to A and 20 generations from C down to B.   What's more, along that line of descent from C down to A, 12 mutations occurred and from C down to B, 10 mutations.   Well, if you add up the two lines of descent, the generational distance between A and B is 50.  The genetic distance is 22.

Within the population of extant bots will be two which are most distantly related.  That is, in the population of alive bots there are two which have the most dissimilar genomes (as measured by the number of mutations).  They have the largest genetic distance.  You can think of these two bots as being located on opposite sides of the group in the tree.  Similarly, in the population of alive bots there are two which are separated by the greatest number of generations I.e. two which have the largest generational distance.  Note that the two bots with the greatest genetic distance need not be the same two as those with the greatest generational distance, but that is a digression....

Speciation occurs when a species splits into two or more separate and independent groups in the tree that persist and evolve separately.   We measure this via the Maximum Genetic Distance and Maximum Generational Distance of the original species.   When the Maximum Genetic Distance and the Maximum Generational Distance of a species grows beyond a certain level and continues to increase over time, it is an indication that there are now two subgroups within the species that are evolving independently from one another.  They are diverging in genetic and generational space.  The tree has branched.  Speciation has occurred.

The dialog lets you set the thresholds for when this occurs I.e. when the code will recognize this and give one of the two subgroups a new species name.  If a specie's Maximum Genetic Distance and Maximum Generational Distance are both above the specified thresholds and the population of the original species is above the specified limit, then the simulator will split the species in two.  How it does this is another long subject but you end up with a new species that has the same name as the old followed by a random number with the two groups of bots of the original species split between them.  When this occurs, the graphs will show the new species and species level information can be tracked independently for the new species.  Note also that species level sysvars such as *.totalmyspecies will now be a function of the new species.
« Last Edit: October 01, 2008, 11:47:28 AM by EricL »
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
The speciation autofork
« Reply #2 on: October 01, 2008, 12:41:39 PM »
Ok, sounds pretty cool. Now I have to figure out what setting would make most sense. How many mutations until it can be considered a new species? What would you recommend? Also I don't know what proliferation mean. I found the word proliferate in the dictionary, but the translation didn't seem to fit this case.  
« Last Edit: October 01, 2008, 12:43:41 PM by Testlund »
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The speciation autofork
« Reply #3 on: October 01, 2008, 12:52:53 PM »
Start with everything at 100 and watch the graphs.  My experience has been that that is probably too low, but it will give you some speciation events so you can see how it works and all that will happen is that the new species will go extinct over time.

Note that the current release only tests for the conditions once every 100 cycles.  There is a significant perf hit to doing this, so if you enable auto-forking and your sim pauses for a few seconds every 100 cycles, that's why.  It will be every 1000 cycles (or perhaps configurable) in the next release.  The graphs are also expensive to calculate, so updating those too frequently will slow you down also.  I am working on allowing different update intervals for different graphs.  That will help.

"Proliferation" as I'm using it means "to reproduce or expand excessively".  You run the risk of forking species prematurely that have not really separated into groups if you set the levels too low (this is why the minimum allowed by the dialog is 10).  With too low a settings, the code may chop your single species into a bunch of little ones that are not really separate species.

General rule - don't enable auto-speciation with either Generational or Genetic Distance below 100.  Otherwise your species will get chopped up.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
The speciation autofork
« Reply #4 on: October 01, 2008, 01:03:53 PM »
Ok, thanks for your explanation. I guess I'll learn more about it when seeing it in action.
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The speciation autofork
« Reply #5 on: October 01, 2008, 01:14:57 PM »
A couple more points:

It takes a while for the ancestor information to accumulate.  If you try this on an old sim from an older version, the graphs and such won't be correct until the sim runs for awhile since the ancestor data wasn't maintained by releases older than 2.43.1M.

There's an issue with long-lived big berthas.  If a bot mutates or something such that it lives a long long time relative to it's relatives/offspring, it can get forked by itself into it's own species.  If you see new species getting created with only a single member, this is probably what is happening.
Many beers....

Offline Testlund

  • Bot God
  • *****
  • Posts: 1574
    • View Profile
The speciation autofork
« Reply #6 on: October 01, 2008, 03:18:08 PM »
Quote from: EricL
If a bot mutates or something such that it lives a long long time relative to it's relatives/offspring, it can get forked by itself into it's own species.  If you see new species getting created with only a single member, this is probably what is happening.

I bet one may see that a lot in a new evosim, where bots can float around doing nothing for 30 M cycles just mutating. Maybe setting the sliders high in such a case might be a good idea?
The internet is corrupt and controlled by criminally minded people.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
The speciation autofork
« Reply #7 on: October 01, 2008, 04:01:31 PM »
Quote from: Testlund
I bet one may see that a lot in a new evosim, where bots can float around doing nothing for 30 M cycles just mutating. Maybe setting the sliders high in such a case might be a good idea?
Right.  Early in an evosim, or in any sim for that matter, every bot is essentially it's own species since there is no Most Recent Common Ancestor.   Until you have a functioning sim I.e. one where bots are reproducing and there is selection pressure and differential survival tied to genetics, the whole concept of species doesn't really apply.
Many beers....