Author Topic: Mutation Rates  (Read 7567 times)

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Mutation Rates
« on: February 15, 2006, 12:59:45 PM »
What are the best mutation rates to use for a mutation sim?

I find that the default settings are too low. After 120,000 cycles I ended up with two mutations:
Quote
Changed cond at pos 13 from  != to  !=
Changed val at pos 45 from 0 to 0
And I had increased the mutation factor by 2x!

 :(

I've had some sucess in the past from using 4-8x mutation rates.

What settings have you lot had sucess with?

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #1 on: February 15, 2006, 02:24:54 PM »
you have to resist the urge to bump up the mutation rates too high.
Ideally we only want one mutation every few generations otherwise you just end up with a screen full of robots with nothing in common with each other when what we really need is evolution of a species as a whole.

I normally use somewhere between 1000 and 2000 for pretty much all of the values. Even this can appear painfully slow though.

I actually just had the weirdest thing happen while continuing with my quest to get "firstbot" (a bot made by "Bots-are-us" that travels excusively in straight lines) to develop rotation.

What actually happened was that one or more of them figured out how to make and fire viruses, then promptly forgot how to move and died out so I never actually saw their DNA. :(
When I checked back in I found that some of my veggies (not mutating) were constantly shooting. Further investigation showed that the primary movement and shooting gene from Firstbot had been transferred to them.

Now I have a few that have somehow become 2-bot MBs and are even sharing energy. I can't figure out how though  :unsure:
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Mutation Rates
« Reply #2 on: February 15, 2006, 02:40:03 PM »
You want an upper bound of, on average, one mutation that actually does anything once per generation.  More than that and you introduce some seriously weird effects (which theoretical biology has been aware of for quite some time).

The lower the mutation rates, the stronger natural selection forces will be to weed out mutations, but the longer you have to run the sim to see anything.

I usually aim for one mutation per 2 or 3 generations if my bot has a shorter genome (say, under 100 bp).

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Mutation Rates
« Reply #3 on: February 15, 2006, 02:49:51 PM »
How odd ... viruses

No wonder I wasn't getting much. My mutation rates were all set to 5000. I seem to have a comfortable mutation rate at the moment, between 1000-3000 with an 8x multiplier. Slightly high but the bot I am using is rather cannibotistic and bad mutations get eaten  :evil:

Some bots somehow found a way of unfixing vegs (which still mystifies me  :huh: ). Now all the vegs are unfixed.

Here's what I started with:
Code: [Select]
cond
*.eye5 0 !=
start
-1 .shoot store
stop

cond
*.eye5 0 !=
start
20 .up store
*.eye6 *.eye4 sub .aimdx store
stop

cond
*.eye5 0 =
start
314 rnd .aimdx store
stop

cond
*.nrg 10000 >
start
10 .repro store
stop

cond
*.numties 0 >
start
32000 .tielen1 store
stop

end

Here's a random bot now after around 250,000cy:
Code: [Select]
cond
  *.eye5  0 !=
start
 -1  .shoot store
stop

'''''''''Gene  2: Last 'stop' at position  9'''''''''

cond
start
 add -668  20  1  *146 rnd store
  *.refshoot  *.veldn  *.eye4 sub  5  786 store
stop

'''''''''Gene  3: Last 'stop' at position  26'''''''''

cond
  *.eye5  0 !=
start
  20  .up store
  *.eye6  *.eye4 sub  .aimdx store
 store
 rnd
stop

'''''''''Gene  4: Last 'stop' at position  42'''''''''

cond
  *.eye5  0 =
start
  314 rnd  .aimdx store
 add
stop

'''''''''Gene  5: Last 'stop' at position  53'''''''''

cond
  *.nrg  10000 >
start
  10  .repro store
stop

'''''''''Gene  6: Last 'stop' at position  62'''''''''

cond
  *.numties  0 >
start
  32000  .tielen1 store
stop

'''''''''Gene  7: Last 'stop' at position  71'''''''''

end
« Last Edit: February 15, 2006, 02:51:45 PM by Elite »

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Mutation Rates
« Reply #4 on: February 15, 2006, 02:57:57 PM »
Firstbot, hmm, I was playing with that idea, the absolute minimal starting bot.

Code: [Select]
cond
start
-1 .shoot store
20 .up store
stop

cond
*.nrg 4000 >
start
40 .repro store
stop

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #5 on: February 15, 2006, 03:07:52 PM »
This is th egenome that I am using right now.

Code: [Select]
'Perfect Bot for evolution
'FirstBot is the official name

'/*****proper reproduction 1

cond
*.nrg
20000
>
start
50
.repro
store
'if time to reproduce store it
1
972
store
stop

cond
'/after robot reproduces it reproduces more until energy less then 3000
*972
1
=
start
50
.repro
store
stop

cond
*.nrg
3000
<
start
0
972
store
stop

'\*****proper reproduction 1

cond
start
-1
.shoot
store
10
.up
store
stop

'poop gene added because these stupid idiots
'keep getting altzheimers and getting fixed in place
cond
*.waste 10 >
start
-4 .shoot store
10 .shootval store
0 .fixpos store
stop
end

I had to add the waste disposal and unfixing gene to the end because otherwise they always ended up fixed to the spot after a while.

I am also running with scripts enabled and set to detect, pause and highlight any bot that evolves any kind of turning command.

So far, one bot developed a gene that stored 0 into setaim when its energy got lower than 3000. The trait didn't last long though as the thing constantly reproduced because it lost one of the repro conditions in the process. For a while though, there was a huge mass of similar bots all heading to the right and pumping out babies. It was quite funny.
Another bot replaced .up with .aimdx and just sat spinning and shooting for a while. There were briefly about 10 of these but again the trait didn't last.

The sim just paused again. better go and look at what's happened.

Another one just did the same thing. I have a group of rotating gun turrets for the moment.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #6 on: February 15, 2006, 03:08:30 PM »
I need to add a notification sound when the sim pauses. That would be cool.  B)
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Mutation Rates
« Reply #7 on: February 15, 2006, 03:39:33 PM »
Quote
I need to add a notification sound when the sim pauses. That would be cool.  B)
yes. nice you have scripts to pause when something happens.
that's the big problem for me ... finding mutated bots with useful dna
changes or interesting behaviour that I might be able to save or enhance
with a minor tweak  before they are superceded by what may be a more
'successful' bot,  [whatever one determines that to be].

btw ... for Perfect Bot ... are you using 2.37.6 or 2.4?
same question to Elite for his Evo bots ...
using his StoreBreedDie bots in 2.37.6 vs 2.4 gives results
that are completely different.

so I want to be sure I use your bots in the same sim you do ...
and with similar settings or it's a completely different ball game.

thanks for all the bot codes ...
all good stuff to check out.
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #8 on: February 15, 2006, 03:54:37 PM »
I always use 2.37.6 as it is more stable than 2.4.
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #9 on: February 15, 2006, 04:19:07 PM »
here is one that mutated a virus gene. Doesn't seem to be firing it though. Possibly because it is trying to shoot gene 50.  <_<
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Mutation Rates
« Reply #10 on: February 15, 2006, 04:33:45 PM »
Aaaaaaaaaagh ... who's been tampering with the alga ...

Somehow, the bots have been:
1) Unfixing the alga
2) Giving the alga shooting genes
Vegetables aren't meant to fight back ...  :blink:

Somehow, a few vegs ended up with this in their gene code ...
Code: [Select]
cond
  *.eye5  0 !=
start
 -1  .shoot store
stop
And more alga in other parts of the field are doing it too  :blink:

There's something really weird going on ...

Offline Elite

  • Bot Overlord
  • ****
  • Posts: 532
    • View Profile
Mutation Rates
« Reply #11 on: February 15, 2006, 05:11:21 PM »
At nearly 5 hours exactly all the bots died  :(  due to harrassment by the mysterious evil vegs  :blink:
Still, a rather interesting introduction to the weird world of evosims  :)

Here's a virus I hope will help gene transfer between species:-
Code: [Select]
cond
*.nrg 1000 >
start
*.genes rnd .mkvirus *.vtimer -1 mult 1 add mult store
100 .vshoot *.vtimer 1 sub abs 1 sub -1 mult mult store
*.mkvirus 1 add  .delgene *.mkvirus *.thisgene sub dup mult sgn mult store
stop

Which I will be running with a virus-immune veg:-
Code: [Select]
cond
start
 50 .repro *.nrg 6000 sub sgn mult store
 15 .aimdx *.nrg 6000 sub sgn mult store
 .delgene inc
 .delgene inc
stop
end

Offline Griz

  • Bot Overlord
  • ****
  • Posts: 608
    • View Profile
Mutation Rates
« Reply #12 on: February 15, 2006, 05:39:48 PM »
Quote
At nearly 5 hours exactly all the bots died sad.gif due to harrassment by the mysterious evil vegs blink.gif
creature from the Black Lagoon ... or the Blob!!! ;)
Poison Ivy?

hey, evolution is evolution. congrats. ;)
不知
~griz~
[/color]
   "The selection of Random Numbers is too important to be left to Chance"
The Mooj  a friend to all humanity
[/color]

Offline Endy

  • Bot Overlord
  • ****
  • Posts: 852
    • View Profile
Mutation Rates
« Reply #13 on: February 16, 2006, 03:15:11 AM »
I've been having some oddball effects myself. The bots appear to be benneficialy losing their deletion gene, then gaining too many genes and dying out. Maybe setting the deletion gene level higher will help out some more. :unsure:

Are your veggies able to mutate? I've had alga occasionally use:

(0) 314 rnd store

and manage to become mobile. Any time the sim repops them, it'll restore them to their initial dna; so maybe you can use that to check wether its the plants dna or the bots doing it.

Offline PurpleYouko

  • Bot God
  • *****
  • Posts: 2556
    • View Profile
Mutation Rates
« Reply #14 on: February 16, 2006, 08:47:17 AM »
My veggies are non-mutating and the shooting gene that a bunch of them started using (on two seperate occasions now) was lifted straight out of "Firstbot".
There are 10 kinds of people in the world
Those who understand binary.
and those who don't

:D PY :D