Bots and Simulations > Evolution and Internet Sharing Sims

A little evolution for everyone!

(1/13) > >>

Greven:
Following my recent "succes" with mutating bots, I began some extensive experiments, this is far from finished, and I like anybody to help out here, but check this out:

I wanted to make some experiments and find some answers:
* What mutation rate is best?
* Which sim size is best? (Not finished yet)
* Is conspecies gene essentiel?My start bot were in all sims PY simplebot, without the conspecies gene.

OBS! OBS!
I have not analyzed the evolved bots, and thus I dont know why they are better than its ancestor, if anyone would like to help me out with this one..????

[span style=\'font-size:14pt;line-height:100%\'][you]Mutation rates[/you][/span]
Okay I wanted to check if low mutation rates truely were so bad for evolution in Darwinbots. Becuase DB is not truely based on real life, mutations aint nesessary bad, and I want to confirm my hypothesis with evidence, thus making it theory.
A bad mutation may decrease the fitness in the individual in short time, but if a possibly new mutation combined with the old bad one my give an increase in fitness, and therefore a bad mutation is not always deadly in the long term.

I made 4 experiments:
2 with mutation 1500, one with timer number and one with a set seed value.
2 with mutation 5000, same as above

All with sim size 5, 5 nrg/cycle/veggie, waste threshold 50, Max Vegs 100, Friction 1.0, unblocked veggies and anything else as normal.

My evidence is the following: (you are welcome to retry these)
Mutations with 5000 are to slow, if you have a super massively parellel computer and you are able to simulate millions of bots a time, this might be the best setting, but we only have at max 3.4-4.0 GHz.

Evolve bot from orignal, in 1500 mutation mode.

--- Code: ---cond  
*.eye3  *.eye8  >
start  
div  *413  *720  sub  rnd  *413  *720  rnd  *581  746  *332  store  
*840  inc -25  .aimdx  store  
sub  mult  add
stop

cond  
*.eye7  *.eye5  >
start  
*954  25  .aimdx  store
stop

cond  
*.ploc  0  >  
*.ploc  0  >  
*.in1  0  >  
*.veldx -1  <  
*.aim  0  >
start
-2069  *587  *136 -56  rnd  *136 -56  div  
rnd  2092  rnd  *136 -56  rnd  *.veldx  427  
516  2  div  921  201  *56  dec  mult  *.eye5  
sub  *976  mult  div  *.eye5  sub  sub  *.maxvel  *782  
div  *.in1  482  rnd  *.pwaste  200  add  rnd -39  1431  div  
rnd  dec  *344  *.shoot  add -40 -773 -646  dec -773 -647  dec  store  
1790  dec  div  510 -640 -580  201 -962  *157  8
stop

cond  
*.veldx  0  !%=  
*.veldx  0  !%=  
*.sharewaste  0  !=
start  
*.memloc  rnd  *.fixlen  *.veldx  2  rnd  *.trefage  mult  200  add  mult  dec  store  
mult  *264  dec  store  
div  sub  *25  dec -1142  *170  551  *100  sub  *.myshoot  rnd  sub  *.myshoot  rnd  
214  789  add  *863  .nrg  store  
789  add  .trefvelmydn  store -144  92  dec -439  936  *636  *.reftie  *565  mult  inc  
*170  dec  sub  *344  107  add  rnd  107  div  add  rnd  sub  dec -40  store
-40  store
-40  store
-775  1839  dec  *.setboy  7 -237
stop

cond
start  
5  1501  1321  mult  rnd  .up  store  
1531  inc -147
stop

cond  
*.eye5  41  >
start  
916  rnd  rnd -1  add  7  *374  878  rnd  
*854 -40  *514  *.refsx -690  *.fdbody  *417  store  
rnd  store  
dec  mult -1  .shoot  store  
add
stop

cond  
*.nrg  5000  =
start  
*260  1158  50  *.tieloc  inc  140 -1117  *975  .slime  store
stop

cond  
*.nrg  5100  >
start  
50  300  store
stop

end
--- End code ---
(Evolved bot 1)

After the experiments were finished (around 1 million cycles), I took the most abundant bots it the sims and made a F1 fight, and the above won (it were from random seed 1500 mutation sim).

I then took this one and made a F1 fight against the original bot, and it won by 5-0.

[span style=\'font-size:14pt;line-height:100%\'][you]Conspecies[/you][/span]

This table shows want the F1 fight turned out:

                       Original bot   EBot 1     EBot 2
Original bot            NA            0-5          0-5
Evolved bot 1         5-0           NA           0-5
Evolved bot 2         5-0           5-0           NA

All bots did lose 5-0 to their conspecies-cousins.

But interesting enough did EBot 1 win 5-0 against OBot w/conspecies.
And EBot 2 did likewise.

I have yet to test EBot 1 and EBot 2 with and without the conspecies against each other.

Actually I think the evolved bots is behaving much better than the original!

Hope you have any comments....


The evolved bot 2, were evolved in a new sim with the same 1500 mutation conditions.

(Evolved bot 2)

--- Code: ---cond
*.eye3  *.eye8  >
start  
*568  store  
div  *568  store  
div  *413  *720  sub  rnd  *720  sub  rnd  *.poison  *720  rnd  *581  746  *332  store  
dec  *840  store
-25  .aimdx  store
-25  5  rnd  store  store  
*416  mult  inc  add
stop

cond  
*.eye7  *.eye1  >
start  
*954  25  add  .aimdx  store
stop

cond  
*.ploc  0  >  
*.in1  0  >  
*.mydx -1  <
start
-2070  *.dnalen  *.refveldn -56  *240  rnd  rnd  *136  381 -1193 -56  sub  
rnd -56  div  rnd  2092 -132  *742  dec  store  
*136 -56  rnd  *.veldx  427  mult  dec  *162  801  516  2  div  914  201  
*56  *535  sub  dec  *917  mult  dec  *917  mult  rnd  *.eye5  sub  *940  mult  
*.eye5  sub  *976  dec  mult  div  *.eye5  sub  mult  rnd  *.aimsx  *17  *782  div  
*.in1  492  rnd -122  *.mass  200  add  rnd -40  1431  div  rnd  sub  rnd  *.tmemval  
*.shoot  add  mult  *.shoot  add  mult -40 -773  div  529  store
-646  dec -186 -773 -647 dec  dec  454  23  store
-647  dec  store  
div  dec  store  
div  dec  store  
div  327  1783  dec  div  dec  524 -640 -580  201 -962  *157  rnd  sub  8
stop

cond  
*.veldx  0  !%=  
*.sharewaste  0  !=
start  
*.memloc  rnd  *.memloc  *924  rnd  *.fixlen  *.veldx  .dn  store  
*.trefvelyourdx  mult  div  dec  inc  200  div  mult  *.mysx  dec  store  
mult  *264  dec  1725  store  
sub  1725  store  
sub  rnd  store
stop

cond
start  
5  1501  1321  mult  rnd  1321  mult  rnd  .up  store  
1531  inc -147
stop

cond  
*.eye5  41  >  
*.eye5  41  >
start  
916  add -347  rnd  rnd  mult -1  64  add  7  259  *374  878  rnd  *854  40  store  
*514  *.refsx  add -690  inc  *.fdbody -35  *417  div  store  
rnd  store  
dec  mult -1  .shoot  store
-1577  div  add
stop

cond  
*.nrg  5000  =
start  
*260  div  *368  1158  50  *.tieloc  add  140 -1115  *975  store  
821  mult  821  dec  mult  div  mult  store  
div  store  
*.mkshell  *353
stop

cond  
*.nrg  5100  >
start  
50  .repro  store
stop

end
--- End code ---

Greven:
I did actually evolved yet another bot, with over [span style=\'font-size:21pt;line-height:100%\']4000[/span] DNA commands! Can this be true? Didnt count them? But this were of course a way for evolution to stop the deletious mutations, because I did set them really high, around 500 and the rest 2500, to check if deletion were so bad, and with an increase by a factor of 10 in the DNA, must indicate that they are. The bot itself were not better than the ancestor.

I have attached the bot.

Greven:
I actually think we need alot more experiments to see if DB is heading in the right way and to confirm DB as a science tool for artifical lifer.

Also make some specific experiments, to test whatever a newer version of DB is better than or equal the older (which it always should be), but we need some serious thoughts on this one!

Numsgil:
A couple of comments on your experiment with mutation rates:

1.  Mutation rates are expressed as 1 in X chance per bp, so quite obviously mutation rates are "high" or "low" depending on the length of the genome, which itself is a function of the mutation rates and time.

2.  Comparing two species in a F1 battle to the death doesn't give you any clues as to how well each species adapted to its environment (that is, how strong the Darwinian evolution was).

Imagine if aliens came today, picked the most successful human, and made him (or her) battle to the death with father Adam in the Garden of Eden.  I think you see my point.

Natural selection is only selecting against what the world currently is.  That is, you only have to compete against the previous one to three generations.

A better way perhaps is to measure the total energy in the system.  It seems to me the better adapted an ecosystem is to its physical environment, the more efficient it becomes, and so the higher the vested energy will be in the system.  (That's a supposition that may or may not be true, shvarz might know better than I).

Currently there isn't really a way to measure this though.  (Maybe through snapshot?)  And also, since there needs to be a veg cap for practicality, that could complicate matters.  When vegs evolve the .aimdx rnd store thing, they become more fit, but the total energy of the system decreases as the bots die and the vegs can't reproduce to fill in the gap.

3.  You need to collect more data points.  I would collect information on the bots at 5000, 50000, 500000, and 1 million cycles.  I would also try mutations rates of all 5s (not practical, it slows the simulation down to a crawl), 50, 500, 5000, 50000, and 0 (for a control.  I know, nothing will happen.  But that's how a good experiment is run).

4.  Only using 1 bot means your results are of limited proof.  I would use at least a few bots.  Perhaps my cannibot Comesum, Dominator Invicibalis, PY's simple bot, and shvarz's evolved Dom.  That gives you a broad spectrum of bot types to try with.

5.  Since you're testing the mutation rates, be sure to set the rate of change of mutation rates to 0.

Carlo:

--- Quote ---2.  Comparing two species in a F1 battle to the death doesn't give you any clues as to how well each species adapted to its environment (that is, how strong the Darwinian evolution was).
--- End quote ---

I understand you point, but that's not completely true. Bots adapt to the environment, which is made of, say, the physics settings AND the other bots; however, you can suppose that, except from particular cases, most of the adaptation is towards the physical environment. Otherwise, you'd not understand why the evolved robot "does better" against the unevolved version and not vice-versa: both are unadapted to the other, since the evolved should be adapted, as you noted, only to two-three generations before.


--- Quote ---Imagine if aliens came today, picked the most successful human, and made him (or her) battle to the death with father Adam in the Garden of Eden.  I think you see my point.
--- End quote ---

No, that's wrong. Humans have a great variability, so you can take very successful humans and suppose that they have something tha makes them so successful. But robots are much simpler, their behaviour is totally determined by the dna (and they have no sexual reproduction, so no dna remixing) so thata  successful robot is successful either by pure chance or because it is, alone, a new species, in the sense that it has some important mutation.


--- Quote ---5.  Since you're testing the mutation rates, be sure to set the rate of change of mutation rates to 0.
--- End quote ---

Why instead, as I suggested, don't you try to run a looong simulation with mutrate of mutrates at 1 or so, so to evolve the best mutation rates?

Navigation

[0] Message Index

[#] Next page

Go to full version