Author Topic: Evosim in size 2 environment  (Read 6401 times)

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« on: December 21, 2009, 04:41:57 PM »
Well, in the name of speed, I decided to run an evosim in a size 2 environment. It's currently running at a little over 100 cps, with a bot population at about 50 and a veggy population at about 5. However, the best part is that they're actually developing new, interesting behaviors. I started with Animal_archaea, since SS bots seem to be more along the lines of what evolution would choose to make.

The main evolved behavior I've noticed is that their reproduction is now conditional upon tiefeeding. Basically, they will reproduce ONLY if their tie with an algae is broken (while tiefeeding). They then reproduce a couple times, and one of the child cells usually finds the original algae again; quite a good way to find your food you just lost, huh?

The other behaviors (conspec, don't-kill-veggies) remain intact. Although, I think I saw some tiefeeding on each other, but I don't think that was intended.
I'm thinking, if you tiefeed on your own kind, you may lose energy instead of gaining it... Maybe a good conspec? Also, if you kill your veggy, then you instantly reproduce yet none of your children are near a veggy, so I guess it's advantageous to keep that behaviour too...

I originally thought that a large size sim is required to induce decent evolution, to prevent genetic drift, but apparently that doesn't happen or doesn't disrupt evolution very much; it probably has to do with my very low mutation rate as well (32 mutations average over 1.9 Mcycles).

In conlusion, (I feel like I'm writing an essay  ) it seems that there are three requirements for good evolution: time, size, and mutation rate. If one of these is off, however, I guess it doesn't hurt it too bad...

EDIT: Actually, they do seem to tiefeed on each other, but it doesn't last very long since both start reproducing like mad...
« Last Edit: December 21, 2009, 04:45:51 PM by jknilinux »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evosim in size 2 environment
« Reply #1 on: December 21, 2009, 05:27:30 PM »
Quote from: jknilinux
Well, in the name of speed, I decided to run an evosim in a size 2 environment.

Larger sims are actually faster if you have the same bots as in the size 2 environment, because the bots are more spread out.

Quote
I originally thought that a large size sim is required to induce decent evolution, to prevent genetic drift, but apparently that doesn't happen or doesn't disrupt evolution very much; it probably has to do with my very low mutation rate as well (32 mutations average over 1.9 Mcycles).

What's the mutation rate per generation?  That's the important number.  But 32 mutations seems like a reasonable number.  50 bots is about at the edge of sustainability, though, so something to watch for.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #2 on: December 21, 2009, 05:32:58 PM »
Well, I increased the sim size to 4, and had the most awful population bottleneck occur, it was hovering around 10-15, I had to baby it back up to 30, it should remain stable enough until it gets back up to 50. The mutation rate is 1/32x, with point and major deletions disabled. F1 costs.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #3 on: December 21, 2009, 05:42:01 PM »
ugh, hovering around 10... that population bottleneck really messed things up... I think I'll increase mutation rates to 1/4 and put it on no costs for a while, let evolution rediscover the behaviours it lost.


EDIT @nums All in all though, a smaller sim should be faster because there are fewer bots, right?
« Last Edit: December 21, 2009, 05:44:26 PM by jknilinux »

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #4 on: December 21, 2009, 05:54:24 PM »
OK, figured it out: This variety will wait for something to bump into it before it severs its tie with the veggy, so it only reproduces when someone else has reproduced and their children knock it off... with a population of 10, that rarely happens. costs are at o, mutx = 1, waiting a while...

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #5 on: December 21, 2009, 06:32:36 PM »
Uh, I had mutx = 1 for a long time and the mutations graph remained at 34 mutations... Is DB not applying my changes?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evosim in size 2 environment
« Reply #6 on: December 21, 2009, 07:05:10 PM »
Quote from: jknilinux
EDIT @nums All in all though, a smaller sim should be faster because there are fewer bots, right?

Fewer bots will always run faster.  But assuming you have a strong cap on the amount of energy going in to the sim so that energy is the limiting growth factor instead of space, so that increasing the sim size won't increase the population, a larger sim will run faster.

Quote from: jknilinux
Uh, I had mutx = 1 for a long time and the mutations graph remained at 34 mutations... Is DB not applying my changes?

Possibly.  Try finding example bots in your sim and checking to see how many mutations they have.  Maybe the graph is messed up.  It's also possible that that slider isn't connected to anything...

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #7 on: December 21, 2009, 08:21:44 PM »
well, in either case, they found a way to get back up to about 50 pop. However, something weird happened. When their DNA split into 2 genes:

Code: [Select]
''''''''''''''''''''''''  Gene:  1 Begins at position  1  '''''''''''''''''''''''
 start
 0 dup sgn abs 1 sub abs 600 600 *.eye5width sub sgn mult mult dup sgn 1 sub abs 50 *.nrg 1092 swap 0 floor mult 50 *.eye5 sub sgn 0 *.body mult floor 250 0 sub floor mult mult drop *.timer sgn abs 1 sub *.numties *.tiepres abs sgn mult 500 *.trefnrg sub sgn 0 floor mult ^ mult add dup sgn 1 sub abs 98 *.numties sgn mult *.multi mult *.trefnrg 500 sub sgn 0 floor mult mult add dup sgn abs 1 sub abs 1 1 sub abs mult *.numties sgn *.eye5 50 sub sgn -16 floor mult *.refeye sgn sub *.myeye abs -- mult 750 *.trefnrg sub sgn mult ceil 0 mult add dup sgn 1 sub abs 100 *.eye5 sub 2 div dupbool
 1 add 10 sgn 0 *.vel sub floor mult mult add dup 1 abs sgn sub abs 10 260 *.body sub floor 0 sgn mult *.nrg 1000 sub 0 angle mult mult add 0 dup sgn 1 sub 535 600 *.eye5width sub sgn mult mult add dup 1 abs sgn or
 sub abs 300 *.nrg 1000 sub sgn 0 floor mult 50 *.eye5 sub sgn 0 floor mult *.body 250 sub rnd 0 floor mult mult add dup sgn abs 1 sub abs 467 *.numties sgn mult 500 *.trefnrg sub sgn 0 floor mult mult add dup sgn abs 1 sub abs 830 *.numties sgn mult *.multi mult *.trefnrg 525 sub sgn 0 floor mult mult add dup sgn abs 1 sub abs 330 *.numties sgn ~ abs mult *.eye5 50 rnd sub sgn 0 floor mult *.refeye *.myeye add sgn abs mult 750 *.trefnrg
''''''''''''''''''''''''  Gene:  1 Ends at position  274  '''''''''''''''''''''''
''''''''''''''''''''''''  Gene:  2 Begins at position  275  '''''''''''''''''''''''
 start
 sub sgn 0 floor mult mult add dup sgn abs 1 sub abs 1 10 *.vel sub sgn 0 floor mult mult add dup sgn abs 1 sub abs 313 260 *.body sub sgn 0 floor mult *.nrg 1000 sub sgn 0 floor mult mult add store
 stop
''''''''''''''''''''''''  Gene:  2 Ends at position  323  '''''''''''''''''''''''

It looks like gene 1 is never used, since there is no store... yet they retain the same behaviours they had when there was only 1 gene...

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #8 on: December 22, 2009, 12:45:14 AM »
Quote from: Numsgil
Fewer bots will always run faster.  But assuming you have a strong cap on the amount of energy going in to the sim so that energy is the limiting growth factor instead of space, so that increasing the sim size won't increase the population, a larger sim will run faster.

-Wait, how do you set an energy cap? what energy cap settings would you recommend?

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evosim in size 2 environment
« Reply #9 on: December 22, 2009, 01:42:31 AM »
There isn't an outright way to do it.  Rather, you set a hard limit on the number of veggies and feed them a certain amount of nrg per cycle.  That way there's a strict upper bound.

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #10 on: December 22, 2009, 11:42:46 AM »
Oh, OK, I already have a veggy cap at 5. . .

Anyway, reached 6 Mc, population oscillates between 30 and 60. . . 4 genes now, 65 mutations

Offline jknilinux

  • Bot Destroyer
  • ***
  • Posts: 468
    • View Profile
Evosim in size 2 environment
« Reply #11 on: December 22, 2009, 12:58:11 PM »
bah! gave up, I can't induce high mutation rates to get them out of the rut they're in.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Evosim in size 2 environment
« Reply #12 on: December 22, 2009, 01:21:49 PM »
I was doing an evosim recently it got to about 5-7mcycles and most of the bots died, 1 left, I had mutation rates low on the mutations tab, is there anyting else I can to to lower the mutation rates

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evosim in size 2 environment
« Reply #13 on: December 22, 2009, 05:27:23 PM »
Keep in mind that there are two factors that affect mutation rate: there's the per species (actually, per individual) mutation screen where you specify mutation rates of individual things like deletions and insertions.

Then there's the slider in the options tab that acts as a global modifier.

So if your mutation rates are still too high even with the slider set to its lowest value, you'll want to go in to the species tab and set the mutations there to be lower.  Note that this only affects newly spawned individuals.  Existing individuals each have their own mutation rates.

Offline Panda

  • Global Moderator
  • Bot Destroyer
  • *****
  • Posts: 476
  • Computer Science Undergraduate (nerd)
    • View Profile
Evosim in size 2 environment
« Reply #14 on: December 22, 2009, 06:02:15 PM »
What can I do on the per species to lower it, what would you advise?