Author Topic: Evolving PY's Simplebot  (Read 3505 times)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Evolving PY's Simplebot
« on: May 24, 2005, 04:12:33 PM »
OK, so I got tired from all the whining about how "evolution does not work in DBs" and decided to show off my skillz!

People have been complaining that bots don't evolve and eventually just die off completely.  So I took PY's Simplebot and his Rabbit bot as food and started running some simulations.  First, I was getting the same result as he (and some others) did - make mutation rate very small an bots don't evolve anywhere, make it larger - they die off.  Also, I could not strike a good balance to make "predator/prey" cycles.

But after several (really, not that many - between 5 and 10) tries I finally tuned the conditions and the mutation rate.

And here we go!  Simplebot population survived for at least 1 million cycles (when I stopped the sim) and they were evolving too!  Overall evolution resulted in 10 changes in the DNA.  Just like me and PY were predicting, bots lost any limitation on top speed, and they also acquired some more stuff.  I suck at bot programming, so I'll let you figure the changes out.  One thing I noticed was that they had some weird gene structure, two conditions in a row.

When put in competition with the original Simplebot, the mutant does very well.  It lags behind in the beginning, but eventually catches up and wins.

So, there - I don't want to hear any more "bots just die" or "nothing good evolves" or anything along those lines!

Attached is an excel file with DNA comparison of original Simplebot and three mutants and also my settings file.  Enjoy!
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Evolving PY's Simplebot
« Reply #1 on: May 24, 2005, 05:41:52 PM »
A serious question that obviously arises is this:

If we want to create a more or less universal set of settings that provide more or less universally worthwhile mutations, what sort of settings should this be?

It seems to me that the current mutation rates are still way too high.  Probably by a factor of ~10.

Also, perhaps we can add an option to automatically and incrementally decrease the mutation rates after an auto restart.  So you can start with them too high and eventually the simulation will figure out a good value by the simple fact that the bots actually start surviving.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Evolving PY's Simplebot
« Reply #2 on: May 24, 2005, 05:55:22 PM »
I don't think there is a universal setting for good simulation.  It really depends on your bot and on things you want to achieve.

But there is some kind of optimal mutation rate.  From my estimates it is between 50 and 100 per DNA command.   When I was evolving Dom ternia, its DNA was ~400 commands and the rate I was using was 25,000.  That comes to ~60/command.  When evolving Simplebot, the DNA was ~50 and the rate was 3750, so that comes to 75/command.

Basically, it comes down to how many offspring would get at least one mutation and that is different for different bots.  That's why I (and someone else) were asking for a tool that would take a bot and tell you the number of mutated off-spring at a given mutation rate.  Or, better yet, a tool that would adjust all mutation rate according to the desired frequency of mutants appearing.  Something like this:

I input:
-Bot DNA
-1 in 10 should be mutated
-10% of mutations should be insertions
-10% of mutations should be deletions
-80% of mutations should be substitutions

Click OK - the program sets all mutation rates.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Botsareus

  • Society makes it all backwards - there is a good reason for that
  • Bot God
  • *****
  • Posts: 4483
    • View Profile
Evolving PY's Simplebot
« Reply #3 on: May 31, 2005, 06:51:48 PM »
First off: Shvartz good work on finding a way to evolve robots in DB. The Predator-Pray Cycles and the optimal mutation rates are all excellent scientific breakthroughs.



I can evolve robots for you guys in any settings and with any ristrictions you like. Let it be multibot. , Let it be no shot feeding, ... (em sry , mutations are all done behind the curten so wont be setting any rates (But they are still fully random))

(got to run evolve first bot in F1 settings finaly)
« Last Edit: May 31, 2005, 06:52:55 PM by Botsareus »