Author Topic: Results of 18 million cycles of evolution  (Read 3967 times)

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Results of 18 million cycles of evolution
« on: March 29, 2009, 09:13:52 AM »
Hi again! It's been a while since I've posted something or even logged on, but I've been reading the board pretty frequently. My time is pretty limited since in I'm in the army at the moment, but I've been running a simulation whenever I'm home.

I remember reading somewhere in the forums that viral evolution can be really fast and interesting so I decided to try it. I modified my first and only league bot to a shepherd bot to provide some evolution pressure and limit population and started a medium sized sim with modified Animal Minimalis and Alga Minimalis. I also tweaked mutation rates to preserve DNA length (default rates provide much more deleting mutations than inserting ones). Later I added a couple of shapes.

First thing I noticed that I had setup the virus all wrong and it quickly disappeared. I still decided to carry on with the sim and see where it would go. So after 17,8 million cycles and 1800 mutations I deciphered the new DNA and found the results somewhat disappointting.

The original DNA was this:
Code: [Select]
start

*.eye3 *.eye7 !=
*.eye3 *.eye7 sub .aimsx store

*.vel 10 !=
30 *.vel sub .up store

*.refeye *.myeye !=
*.eye5 0 > and
*.refvelup 30 add .up store
*.refveldx .dx store

*.eye5 50 > and
*.refvelup .up store
-1 .shoot store

*.nrg *.body >
30 .strbody store

*.body *.nrg >
100 .fdbody store

*.nrg 10000 >
33 .repro store

stop

start

*.nrg 5000 >
*.vtimer 0 = and
*.thisgene .mkvirus store

*.vtimer 1 =
50 .vshoot store

stop

And it turned into:
Code: [Select]
>

 start
 floor

 cond
 clearbool
 *.eye2 -740 ++ over *.eye7 sqr *.eye7 ++ *.eye3

 cond
 !%=
 -- start
 sub .aimleft store
 ~=
 *.trefshell

 start
 -2 abs -4 swap clearbool
 *272 -707

 cond
 start
 ~ true
 *.refeye store

 start
 *.eye5 63 *.refveldx swapbool
 clearbool
 .dx store
 >
 mod store
 ~ inc
 *.trefvelyourdn 7 dup ceil dec
 >> pyth ++ sqr 6894 dropbool
 840 .repro store
 -394 sqr !=
 1 - store
 rnd -3 -675 or
 dec
 swapbool
 dec
 >=
 *.shoot !~=
 <=
 or
 *.dx false
 !=

...which boils down to:

Code: [Select]
start
*.eye7 *.eye3 !=
*.eye3 *.eye7 sub .aimleft store

true
*.refveldx .dx store

*.refeye *.myeye = 'This was -707 ~ *.refeye store, but as alga minimalis and my shepherd have zero eyes, the errect is this.
706 .aimdx store

*.eye5 63 >
.dx inc
.shoot dec

dropbool
40 .repro store

Theres some fuzziness in aiming, but the basic idea is this.

The sims been very stabile for a long while and that probably is the reason for this little evolution. Still, I'm a bit baffled how little 1800 mutations, 18 000 000 cycles and more than 40k generations changed the DNA. On the other hand, this shows that DNA can remain pretty much the same even in highly mutating enviroment of DB and with only 100-200 population.

Next I'm going to get DNA longer by tweaking mutation rates and see if something new will emerge.

Has anyone else had same kind of sims? Also, any thougths on how to spice up the sim are very much appreciated.

The sim is attached.

EDIT: Fixed the cleaned dna, I had missed one store.
« Last Edit: March 29, 2009, 09:24:13 AM by Peksa »

Offline Numsgil

  • Administrator
  • Bot God
  • *****
  • Posts: 7742
    • View Profile
Results of 18 million cycles of evolution
« Reply #1 on: March 29, 2009, 11:16:30 PM »
I did a sim once with Enitor Comesum, which is just like Animal Minimalis but without conspec recognition (bots are smart enough to run away from a superior foe).  It was also pretty stable, with the enitor's behavior changing very little.  Eventually the algae are what evolved.  They learned to wiggle move around, and the enitor couldn't chase them as well and the population crashed so I stopped running it.

It looks like conspec recognition is still conserved in your evolved bot.  Is that right?  That's pretty unusual.

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Results of 18 million cycles of evolution
« Reply #2 on: March 30, 2009, 05:17:17 AM »
That's right, the conspec recognition is still there.

The code is very short and pretty durable, -707 ~ *.refeye store. Only two bp's that really matter are *.refeye store. The species has 5 eyes and all the others zero. So every store for non-conspec is free and even if DNA gained or lost a couple of eyes, conspec recognition would still work.

Also shephers are so effective in cutting down population that they can't afford to kill each other. (The shepherd's are activated by a fuzzy population trigger and some randomness. They don't reward for good behaviour, only kill bot's when total population goes over a limit, currently at ~170)

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Results of 18 million cycles of evolution
« Reply #3 on: March 30, 2009, 01:23:00 PM »
This is very interesting, Peksa!
In my previous sims the bots' DNA grew long pretty fast, so I'm guessing one of the reasons for the stability of your DNA is high costs for DNA maintenance. Otherwise your bots would have accumulated a lot of junk DNA. So, it's not that surprising to see your bots to preserve most of DNA functionality - they can't really mess around with it much. Any mutations that knock out basic functions will be very deleterious. Usually in evolution there is a way around this - duplication. Once the "core" functionality is duplicated, then one of the versions is free to mutate and acquire new functionality. But it could never happen in your sim.
Still, interesting result.

P.S: By the way, it's more meaningful to count sim progress in number of bots born from the beginning, not in cycles.
"Never underestimate the power of stupid things in big numbers" - Serious Sam

Offline Peksa

  • Bot Destroyer
  • ***
  • Posts: 118
    • View Profile
Results of 18 million cycles of evolution
« Reply #4 on: April 02, 2009, 03:40:03 PM »
The thing is, there isn't any costs on DNA and mutation probabilities have been tweaked to favor growing DNA from the start. It's allmost as if there's some unseen pressure towards shorter DNA.

Amplification mutations are implemented in some degree, but disabled. I remember that reimplementing them was on Eric's todo-list and pretty high at that.

Offline shvarz

  • Bot God
  • *****
  • Posts: 1341
    • View Profile
Results of 18 million cycles of evolution
« Reply #5 on: April 03, 2009, 01:49:30 PM »
That is weird indeed...
As far as I remember there are two places where DNA can have costs. One is "DNA upkeep" cost and the other is detailed costs for each type of command. Are you sure you disabled both?
"Never underestimate the power of stupid things in big numbers" - Serious Sam