Author Topic: Unnatural Evolution  (Read 3158 times)

Offline Pascal666

  • Bot Neophyte
  • *
  • Posts: 25
    • View Profile
Unnatural Evolution
« on: November 27, 2009, 11:55:34 AM »
I just finished writing the code to turbo evolve bots, and wanted to ask if anyone else has done something similar already, or has other idea's which I could work out.

My first technique is to reset the pond every 10000 cycles and use darwinbot 's existing fittest() function to store the best bot, everytime it starts a new round it adds the last 5 stored bots from the last 5x10000 cycles and starts a new 10000 cycles.
I will let it run for a while and post the results...

But I also want to ask about if anyone else tryed something similar or if anyone can come up with a similar idea which I could add.

Offline Moonfisher

  • Bot Overlord
  • ****
  • Posts: 592
    • View Profile
Unnatural Evolution
« Reply #1 on: November 27, 2009, 12:10:56 PM »
Not sure I have any similar ideas, I think the other ways I could think of would be alge spreading viruses with usefull code fragments (But thats cheating), or using the rna sysvars to inherit properties (Although that would only allow very limited evolution)

But you may want to consider reevaluating the best bot function. It has a tendency to pick "broken" bots faily often. Like bots who eat their own offspring... they gain a lot of energy all the time from eatings their own spawn and have plenty of offspring (None alive, but I don't think the evaluation takes that into account).

I made a mod for evolving bots with neural networks (Think it's in the bot challenge section somewhere). But never realy finished it properly, and the last version posted has problems loading old sims I think (And there was no parser for regenerating the NN structure from a bots code).
And overall DB code is faster and just as good at achieving the same results... and if DB3 introduces locking bp's from mutations I think regular evolution with DB code should start to show slightly more complex NN like struktures over enough time.

Offline Pascal666

  • Bot Neophyte
  • *
  • Posts: 25
    • View Profile
Unnatural Evolution
« Reply #2 on: November 27, 2009, 02:40:52 PM »
About the fittest function I looked it up before and it uses the function score() which if I read it correctly looks up all bots and checks who's their parent, and the parent with the highest amount of alive children*children energy has the highest score.
Quote
For t = 1 To MaxRobs
    If rob(t).exist Then
      If rob(t).parent = rob®.AbsNum Then
        If reclev < maxrec Then score = score + score(t, reclev + 1, maxrec, tipo)
        score = score + InvestedEnergy(t)
So this should work correctly.

I will update later.

Offline Pascal666

  • Bot Neophyte
  • *
  • Posts: 25
    • View Profile
Unnatural Evolution
« Reply #3 on: November 28, 2009, 08:36:49 AM »
Animal_Minimalis quickly evolved into a much better bot, at the end of every 10000 cycles animal minimalis would have had about 30 bots and the new bot 200+
Though it seems limited to its original dna count so I will try manually adding empty genes and wait for the results  

Quote
'#generation: 19
'#mutations: 7
 cond
 *.eye5 -20 >
 *.refeye *.myeye !=
 start
 *.refveldx *.refvelup store
 4 30 add .up store
 stop
''''''''''''''''''''''''  Gene:  1 Ends at position  17  '''''''''''''''''''''''
 cond
 *.eye5 50 >
 *.refeye *.myeye !%=
 start
 -1 .shoot store
 *.refveldx .dx store
 *.refvelup .up store

''''''''''''''''''''''''  Gene:  2 Ends at position  34  ''''''''''''''''''''''' else

''''''''''''''''''''''''  Gene:  3 Ends at position  35  '''''''''''''''''''''''
 cond
 *.eye5 0 =
 *.refeye *.myeye =
 or
 start
 314 rnd .aimright store

''''''''''''''''''''''''  Gene:  4 Ends at position  48  ''''''''''''''''''''''' else

''''''''''''''''''''''''  Gene:  5 Ends at position  49  '''''''''''''''''''''''
 cond
 *.nrg 17388 >
 start
 10 .repro store
 stop
''''''''''''''''''''''''  Gene:  6 Ends at position  58  '''''''''''''''''''''''

'#hash: you}iq!*%J04WI4Noh'&:#

Edit: I also wanted to show you the graphs of the evolution progress...
« Last Edit: November 28, 2009, 09:20:43 AM by Pascal666 »