Author Topic: On Evolution and Population Decline  (Read 5055 times)

Offline asterixx

  • Bot Neophyte
  • *
  • Posts: 48
    • View Profile
On Evolution and Population Decline
« on: March 30, 2008, 07:27:40 PM »
I was not sure whether a topic like this already existed, and I couldn't find one, so I decided to devote my official second topic on this forum   to the issue of evolution and population decline. First of all, I've had a sim running about 50 hours now and I've noticed that overall, average mutations increase as population increases. This makes sense. I've also noticed that with decreases, the relationship is the same, which also makes sense. My dillema is this: How could one expect to see evolutionary changes in a population that remains relatively stagnant? Furthermore, how could a ".totalmyspecies bot" evolve in a way that doesn't lead to the aforementioned "stagnation"? Does it just take a VERY VERY long time?? Perhaps I'm still unfamiliar with this  

Anyway, I was wondering if anyone had any ideas about this and if there are any predictions on the evolutionary patterns/cycle, and things like that. EricL, your 1000 zerbot write-up still astounds me, and was very helpful: Did you save a long-term graphs on that sim? I was thinking about doing an evosim and keeping full record of all of the data to get an idea of the long-term patterns, if such patterns even exist.

Thanks in advance,

Asterixx
« Last Edit: March 30, 2008, 07:28:38 PM by asterixx »
"Tell a man there are 300 billion stars in the universe and he'll believe you.  Tell him a bench has wet paint on it and he'll have to touch it to be sure."

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
On Evolution and Population Decline
« Reply #1 on: March 30, 2008, 07:44:35 PM »
Evolution very often will get stuck in a local maxima (or minima, depending on which way your fitness landscape is oriented ).  Basically they'll evolve to local conditions, shed every last feature that isn't immediately useful, and then stop evolving, more or less.  To prevent this, you'll want to change up the settings from time to time.  Increasing costs is an option, as is increasing friction, etc.

Another solution, if you can, is to run in IM.  Something magical happens when you have different strains of bots competing for control of a local food source.

Offline asterixx

  • Bot Neophyte
  • *
  • Posts: 48
    • View Profile
On Evolution and Population Decline
« Reply #2 on: March 30, 2008, 08:19:47 PM »
Quote from: Numsgil
Another solution, if you can, is to run in IM.  Something magical happens when you have different strains of bots competing for control of a local food source.

Well, it just so happens that the bot in question was Shrinking Violet 2, and I have been running it in IM since the start. I played around with the costs a little bit but I can't find the right balance: Either 1)the Shrinking Violet 2 is unnaffected by the NRG and cost changes, or if that isn't the case, then 2) I border on wiping out the entire population. I should also mention that I had mutations enabled and maxed.

[attachment=830:Shrinkin...etGraph1.JPG]: A Variation on that pattern repeats over and over again. I hate Veggies!  
« Last Edit: March 30, 2008, 08:23:57 PM by asterixx »
"Tell a man there are 300 billion stars in the universe and he'll believe you.  Tell him a bench has wet paint on it and he'll have to touch it to be sure."

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
On Evolution and Population Decline
« Reply #3 on: March 30, 2008, 08:55:31 PM »
Mostly it just takes patience.  If your mutation rates are too high, genetic drift is stronger than selection, and your bots devolve.  Your goal should be:

1.  Maintain as high a population as possible -and-
2.  Maintain as low a mutation rate as possible (ie: before you lose patience).

A good mutation rate to start at is 1 change per 2 generations, or something in that neighborhood.

Offline asterixx

  • Bot Neophyte
  • *
  • Posts: 48
    • View Profile
On Evolution and Population Decline
« Reply #4 on: March 30, 2008, 09:02:57 PM »
Ok, thank you. Enlightening words!

What are your thoughts about the zerobot sim?
« Last Edit: March 30, 2008, 09:04:23 PM by asterixx »
"Tell a man there are 300 billion stars in the universe and he'll believe you.  Tell him a bench has wet paint on it and he'll have to touch it to be sure."

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
On Evolution and Population Decline
« Reply #5 on: March 30, 2008, 09:08:20 PM »
Eric's 1000+ hour one?  I think it shows exactly what I'm talking about.  They learned the exact bare minimum to survive, and shortened their genome of anything that wasn't necessary for that goal.  Evolution is really, really good at breaking things.  If you want constructive behavior, you have to mix things up a bit.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
On Evolution and Population Decline
« Reply #6 on: March 30, 2008, 11:11:56 PM »
Quote
I've noticed that overall, average mutations increase as population increases. This makes sense. I've also noticed that with decreases, the relationship is the same, which also makes sense.

That, actually, does NOT make much sense. Not to me and not in this form, anyway.  Population size does not directly relate to average number of mutations. Neither do the changes in population size.

Normally you should always see average number of mutations go up (in the long term), no matter what your population size is. This is simply due to genetic drift and silent mutations.

In some special cases population size may correlate with average mutations (but not determine it!). For example, if for some reason you suddenly have an excess energy in the sim and energy is easy to come by, then even unfit organisms will survive and the average number of mutation will go up. If you turn the energy spigot off, then all those unfit mutants will die off quickly and the average number of mutations will go down (non-mutated bots are more likely to survive). I see this kind of relationship a lot in my sims.

"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
On Evolution and Population Decline
« Reply #7 on: March 31, 2008, 12:08:56 AM »
Quote from: asterixx
I've noticed that overall, average mutations increase as population increases. This makes sense. I've also noticed that with decreases, the relationship is the same, which also makes sense.
Normally, average mutations should always increase over the long run in mutating bots as Shvarz points out.  BUT....   the Shinking Violet 2 I released in Internet Mode is marked mutations disabled.   SV2 was also designed NOT to evolve.   It is coded to commit suicide if it's DNA length changes.  Thus, the "mutations" you see in the Average Mutatiosn graph in IM are in fact multiple viral infections of a few individuals - those individuals where the initial virus managed to disable the suicide DNA.  This is likely the cause of the relationship you are seeing.  I.e. higher populations mean higher virus production rate which means higher probability of an infection happening in the right way to kill off the suicide DNA which will translate into a larger number of alive, infected individuals in which infections can accumulate and spoof the Average Mutations graph into showing a higher average mutation value for larger populations.   But in reality, only some SV2's have been infected and remained alive.  The rest are mostly pristine uninfected, unmuated bots.  Most successfully commit suicide when they get infected.   Veggy population restrictions tend to prevent those infected bots without the suicide code from taking over.   In short, don't expect the Average Mutations graph for SV2 in IM to be representitive for mutating bots in evo sims.

Also, I shoudl poitn out that even if you are running SV2 outside IM with mutations enabled, it still won't mutate like you'd expect, at least not at first.  Not until mutations manage to kill off the suicide code and that lineage takes over, which is what happened to the original Shrinking Violet which was released into IM with mutations allowed.



Quote from: asterixx
EricL, your 1000 zerbot write-up still astounds me, and was very helpful: Did you save a long-term graphs on that sim?
Thanks.  Unfortunatly, I did not keep any long term graphs.  I haven't run any evo sims in a while but it may be time again now that .sexrepro works and we have .totalbots, .totalmyspecies and virus immunity so that shepard/preditor bots can really come into play.  I bet the Conditional Logic Prize could be claimed in fewer than 1000 hours through the use of well crafted preditor shepards...
« Last Edit: March 31, 2008, 12:18:12 AM by EricL »
Many beers....

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
On Evolution and Population Decline
« Reply #8 on: March 31, 2008, 04:03:21 AM »
I prefer oscilating mutations rates, with something like 100-200 cycles of strong mutation and 2000 with low mutations... that gives you a chance for more radical changes with good room for natural selection...

Offline asterixx

  • Bot Neophyte
  • *
  • Posts: 48
    • View Profile
On Evolution and Population Decline
« Reply #9 on: March 31, 2008, 05:55:33 PM »
Thank you for your responses. Perhaps I should have been more clear. What I should have said was that the simulation that I was running with SV2 was the simulation in which I was noticing the pattern. I also should have saved the Avg. mutations graph  ; they correlated strongly.  The reason I simply stated the correlation, and not a general conclusion about causation (although it may have sounded like that) was because I really did not know what was in fact causing the pattern. Evidently it was how the bot was designed that I was uncertain about, so thank you for clearing that up.

Quote
I prefer oscilating mutations rates

As for this, I'm going to try that right now and see how it works  
« Last Edit: March 31, 2008, 05:57:48 PM by asterixx »
"Tell a man there are 300 billion stars in the universe and he'll believe you.  Tell him a bench has wet paint on it and he'll have to touch it to be sure."

Offline JossiRossi

  • Bot Neophyte
  • *
  • Posts: 31
    • View Profile
On Evolution and Population Decline
« Reply #10 on: April 01, 2008, 04:44:21 AM »
I'm working on a new zerobot sim. I had a 200 hour one recently but it ran so long that my bots began to lose all their DNA due to random deletions, I just wasn't lucky enough to get virus shots bumping up the DNA lengths as I did in a lost zerobot sim I had going a while back. That's always a disappointing thing, but it can happen where you spend a long time waiting for a zerobot sim to take off and it kind of just fizzles.

Also with zerobots getting the initial settings right is a REAL pain.

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
On Evolution and Population Decline
« Reply #11 on: April 01, 2008, 01:38:05 PM »
For zerobot sims, make sure once you have a replicator that your mutation rates are low enough.  That early in their evolution selective pressure is more like a sneeze than a hurricane.  You have to be extremely careful not to overpower it.

Offline EricL

  • Administrator
  • Bot God
  • *****
  • Posts: 2266
    • View Profile
On Evolution and Population Decline
« Reply #12 on: April 01, 2008, 01:59:22 PM »
Quote from: Moonfisher
I prefer oscilating mutations rates, with something like 100-200 cycles of strong mutation and 2000 with low mutations... that gives you a chance for more radical changes with good room for natural selection...
IMHO, mutation rate oscilation is counter productive.  Peaks of high mutation rate are almost as bad in my opinion as a sustained high mutation rate. It's like trying to evolve in an evironment prone to solar flares.  There is little bots can do to adapt to it and all it really does is destroy good DNA.  

Mutations are nearly almost always a bad thing.  The probability of a benifical mutation is maybe 1 in a million or similar.  When that rare event happens, you want that mutation to fixate in the population.  That takes time.  If the mutation rate is too high, whether it is constant or periodic, you run the significant risk of destorying that benificial mutation before it can fixate in the population.

Bascically, you want the mutation rate to be high enough that you have some diversity (but not total diversity - having some significant percentage of bots be identical is a good thing - a benificial mutation may be fixating...) within the population for selection to operate on and no higher.
Many beers....

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
On Evolution and Population Decline
« Reply #13 on: April 01, 2008, 02:18:29 PM »
Quote
IMHO, mutation rate oscilation is counter productive. Peaks of high mutation rate are almost as bad in my opinion as a sustained high mutation rate.

I second that.

One way to help somewhat alleviate the problem of high mutation rate breaking all good DNA is to create a large "cache" of bots using a local teleporter. If the periods of high mutation rate are infrequent and short, then they would mutate only those bots currently in the sim. Teleporting bots back from the cache allows population to recover any good DNA that may have been broken. But, as Eric pointed out, beneficial mutations need time to spread through population and they need deterministic population behavior. You have to have large population sizes and a lot of time under stable environmental conditions.
"Never underestimate the power of stupid things in big numbers" - Serious Sam