Darwinbots Forum

Bots and Simulations => Evolution and Internet Sharing Sims => Topic started by: shvarz on May 06, 2005, 02:35:37 PM

Title: Evolving Dom ternia E
Post by: shvarz on May 06, 2005, 02:35:37 PM
OK, here are the results of 57 million cycles of simulation, trying to evolve a robot that can live in highest friction environment possible in DB.

I started with Dominicus Invincibalis as hunter and Alga grexa as food.  The mutations in Alga grexa were disabled, but I tweaked it here and there at different times and at the end it changed so much, that I decided to give it a different name.  Now it is called Alga ternia.

I am attaching the archive with 4 files:
1. Alga ternia
2. Dom ternia E (this is the final result of evolution)
3. Compare.xls file to easily see the changes between starting DomInv and Dom ternia
4. Ternia evolution.set settings file for you to see the conditions

The original bot had genome of ~370 commands, the new bot has ~490 commands.  There are some deletions, some replacements, but most of mutations (from ~170 total) are obviously insertions.  Whether that is the way mutation algorithm works or it is just the fact that insertions are less likely to disrupt an efficient pre-designed DNA is not clear (I am inclined to beleive the latter).

There were no Big Berthas or cannibots for a very long time.  Big Berthas never appeared.  The final version I am posting actually is cannibalistic.  I have some intermediate evolution steps saved, so I can go and check when that developed.

The final version easily beats DomInv in sims and it is not due to the fact that Dom ternia can eat the DomInv, the non-cannibalistic versions were also able to do that.  How it beats it, I am not sure.  Those who like to pick through robot DNA may figure it out and tell us :)  One of the most curious things that I noticed was that the bot lost the ability to produce -4 shots at some point, but later gained it back.  Very strange...

Well, let me know what you think.
Title: Evolving Dom ternia E
Post by: MightyPenguin on May 06, 2005, 02:50:13 PM
*moves*

Sorry I'm late with that. Bot Tavern sounds good to me.
Title: Evolving Dom ternia E
Post by: Numsgil on May 06, 2005, 04:51:21 PM
Have you tried it against other top bots?  I'd be very interested if it manages to beat a bot Dom Inv couldn't.
Title: Evolving Dom ternia E
Post by: shvarz on May 06, 2005, 05:06:18 PM
"Top Bots" from F1 league?  No.  But I would not expect them to be "top bots" in my conditions anyway.  Well, maybe I'll give it a try.
Title: Evolving Dom ternia E
Post by: Shen on May 06, 2005, 05:07:24 PM
Well I do have one idea why is better. One of the first things my bot did was to split the waste removal gene so it constantly store *.waste .shootval store in a gene with no conditions. Remember that Dom Inv doesnt use the use powered up shots so doing that would give the curious effect of making bots more powerful as they get older and consume more energy.

Could be an explanation to why it lost its -4 shots. Havnt looked through the code yet though.
Title: Evolving Dom ternia E
Post by: shvarz on May 06, 2005, 05:34:57 PM
Just tested the top 10 bots from F1 league.  As I guessed all but two of them were able to survive these tough conditions.  One is Dom. Inv and the other is DIN.  Dom Inv kicks DIN's butt already, so there is no point in comparing Dom ternia to it.
Title: Evolving Dom ternia E
Post by: shvarz on May 06, 2005, 05:37:34 PM
Actually, the amazing part was that they actually gained -4 shots later in almost exact same condition as they were before.  I am attaching the whole comparison (with intermediate steps listed) for you to see what happened (the numbers on top are the millions of cycles)
Title: Evolving Dom ternia E
Post by: Shen on May 08, 2005, 04:17:12 PM
How often did you get crashes in your sims, how long did you run them for? I only ask because im getting overflows after 200k cycles. :/
Title: Evolving Dom ternia E
Post by: Numsgil on May 08, 2005, 06:18:34 PM
Shen, which version are you running?

2.36.5 should be 99.9% stable.  The only overflows I've managed to find since that release have been fairly obscure.
Title: Evolving Dom ternia E
Post by: Shen on May 09, 2005, 06:05:51 AM
Yup Im running 2.3.5. I have a wierd feeling it might be somethig to do with the graphs, it seems to run a lot longer when I dont open the at all. Oh well Ill do some investigating.
Title: Evolving Dom ternia E
Post by: shvarz on May 09, 2005, 10:53:37 AM
I ran the sim for 57 million cycles.  Only once it crashed and it was due to a known bug (means I could have avoided it).  The average run between times when I had to stop a sim (to reboot or just to adjust something in Alga ternia) was 3 million cycles.
Title: Evolving Dom ternia E
Post by: shvarz on May 09, 2005, 11:32:05 AM
Here is something very interesting.  As I mentioned, I did not see cannibots dominating in my evolution sim.  It does not mean that they never appeared, just that they died out pretty quickly.  It turns out that the Dom ternia E that I posted just happened to be a cannibot, which spread in high numbers right before I decided to post the results of evolution.

What does it mean?  It means that if you start the sim with settings I supplied, you will see that a cannibot will be replaced by a non-cannibot quite and it will happen quickly, in less than 0.5 million cycles (in fact for me it happened in just 200,000 cycles).  Try it!  Post your results here!  Post your thoughts on why that happens!  (I know why, but I won't tell you unless you beg me :) )
Title: Evolving Dom ternia E
Post by: Shen on May 09, 2005, 02:43:49 PM
Hmm its not something to do with waste is it? They seem to store a value into memloc 1 which is .up. So do they just run past each other?
Title: Evolving Dom ternia E
Post by: Botsareus on May 09, 2005, 04:23:56 PM
I dont know; This is top of the line stuff; If any one can tell me all the new ways that mutated robot beats its endsestor(love the spelling), I will be glad to read.
Title: Evolving Dom ternia E
Post by: shvarz on May 09, 2005, 04:48:55 PM
:help:  WTF is endsestor?  :help:
Title: Evolving Dom ternia E
Post by: Endy on May 09, 2005, 10:00:01 PM
I think he means ancestor :rolleyes:

Endy B)
Title: Evolving Dom ternia E
Post by: Numsgil on May 10, 2005, 01:13:28 AM
It's spelled phonetically!

Huked on Fanecs Wurked for Mee.
Title: Evolving Dom ternia E
Post by: PurpleYouko on May 10, 2005, 09:13:29 AM
I thawt it wuz huked on fonniks.
Title: Evolving Dom ternia E
Post by: Old Henk on May 10, 2005, 11:11:42 AM
Screw Ancestor! Endsestor is way cooler!  :boing:

 :redface: whoops... off topic...

er...

 ;)
Title: Evolving Dom ternia E
Post by: shvarz on May 10, 2005, 11:47:35 AM
You are all wrong,  it is "Phucked by Fonics"
Title: Evolving Dom ternia E
Post by: shvarz on May 10, 2005, 03:04:31 PM
OK, getting back to the topic.  Can someone help me out to make Alga ternia a harder catch for Dom ternia E?  It needs to be something that can be introduced gently and increased in small steps.  What direction would be fun?  Allowing it to make some slime?  Or shell?  

Something like

cond
start
*shell 5 sub
.mkshell
store
stop

Seems a bit boring, don't you think?  Any ideas for interesting food beahviour?
Title: Evolving Dom ternia E
Post by: Carlo on May 10, 2005, 03:58:52 PM
Why not something related to the way it moves. For example, it could suddenly move laterally at random or change direction, trying to escape from the predator. Or it could turn back and shoot a few shots.
Title: Evolving Dom ternia E
Post by: shvarz on May 10, 2005, 04:11:29 PM
Hmm, maybe change direction when shot?

Would this work?

cond
.shootup 0 !=
start
10 rand .aimdx store
stop

The value of 10 can be slowly increased to allow turns to become more and more random.
Title: Evolving Dom ternia E
Post by: Numsgil on May 10, 2005, 05:00:05 PM
You could take the revel movement from animal minimalis and reverse it, so that the vegs run away from bots that it sees.

This would encourage your bots to sneak up behind a veggy perhaps.

The small steps could be something simple, like:

*.refvelup 10 div .up store instead of *.refvelup .up store.

Then just decrease 10 to 1 over several steps.
Title: Evolving Dom ternia E
Post by: PurpleYouko on May 10, 2005, 05:02:36 PM
The idea is sound but your coding isn't I'm afraid.

Try this

cond
*.shup 0!=
start
20 rnd 10 sub .aimdx store
stop

This way it can turn in either direction with zero being the middle point for the .aimdx command.

Here is a useful little robot food species that I have been using for mutation sims.

Code: [Select]
'Rabbit bot. Food species. Set as autotroph
'practice your chasing skills on this one

def topspeed 5
def directionchange 100
def counter 101

cond
*.vel .topspeed <
start
.topspeed *.vel sub .up store
stop

cond
start
.counter inc
stop

cond
*.counter 100 >
start
600 rnd 300 sub .aimsx store
0 .counter store
stop

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

cond
*.body 200 >
start
100 .fdbody store
stop

end

You can change the angle and frequency of direction changes using the defined constants. Note that these don't necessarily have to be used as memory locations. They work as constant values too.
Top speed is also adjustable.
This bot will also never get fat and slow.

I use this to try and develop relatively simple bots so that they learn to chase a moving target.
Title: Evolving Dom ternia E
Post by: shvarz on May 13, 2005, 03:10:13 PM
Wow!  I put this gene:
Code: [Select]
cond
*.shup 0!=
start
20 rnd 10 sub .aimdx store
stop

into Alga ternia and that made it completely resistant to Dom ternia, which died very quickly!  

A new challenge, huh???  Exciting!
Title: Evolving Dom ternia E
Post by: shvarz on May 13, 2005, 03:29:35 PM
Khm, there was a typo in the gene.  Never mind, Dom ternia still kicks ass.
Title: Evolving Dom ternia E
Post by: Botsareus on May 14, 2005, 11:57:44 AM
getting back to "endsestor" , So I gess there is not enough difference between the robots worthy of discussion ; no one can tell me how the different features new robot works...
Title: Evolving Dom ternia E
Post by: shvarz on May 14, 2005, 01:37:02 PM
Bots:  There certainly is a very big difference!  Just no one cared enough to go through the code and trace the effect of every new command.  Figuring out how evolved bot works is hell - they don't do stuff logically :)


Back to the way to improve the Alga ternia - I tried the gene suggested by PY and it had no effect.  Turns out Dom ternia feeds through ties, not through shots.  OK, I changed the condition to start the gene when a tie is formed - still no effect.  The gene is activated all right, but Dom ternia shoots out a tie when it is very-very close to the victim, and at that point it is too late to change direction.  I even tried to change the gene so that Alga ternia could run in all 360 degrees when it feels the tie, but still no help.  Dom ternia eats it as easily as before.

So I am waiting for some more suggestions.
Title: Evolving Dom ternia E
Post by: PurpleYouko on May 14, 2005, 01:53:09 PM
Give it a bit of slime so that DOM has to work a bit harder to attach the tie.

cond
*.slime 100 <
start
100 *.slime sub .mkslime store
stop

Just adjust the 100 to a suitable value. The veggie will now throw as much of its energy as needed into maintaining the slime barrier at this exact level. It is even possible that the veg will burn itself completely out before DOM can get attached.

After the tie is attached it is too late. nothing but a leach gene is going to save the veggie after that.
Title: Evolving Dom ternia E
Post by: Numsgil on May 15, 2005, 01:12:37 AM
I agree with PY, but I would add an inhibitor so that slime is only produced gradually at first, until the Dom has a chance to adapt a bit.

100 *.slime sub 10 ceil .mkslime store
Title: Evolving Dom ternia E
Post by: shvarz on May 16, 2005, 01:18:50 AM
OK, I'll try that.  What is the maximum slime amount allowed?  100?  Any limits on how much can be made per cycle?  I think not.  New goal - evolve Dom ternia to be able to hunt alga that has 100 slime all the time!

Anyone want a race?
Title: Evolving Dom ternia E
Post by: Light on May 16, 2005, 03:18:35 AM
There are no limits on the amount slime a bot can have.
Title: Evolving Dom ternia E
Post by: PurpleYouko on May 16, 2005, 08:54:48 AM
But it can't make more than 100 per cycle.

There used to be limits to the amount it could have but thay were removed for V2.35.
Title: Evolving Dom ternia E
Post by: shvarz on May 16, 2005, 01:18:54 PM
What's the downside then to having lots of slime?  If I remeber correctly it "washes off" and needs to be maintained constantly.  Right?
Title: Evolving Dom ternia E
Post by: PurpleYouko on May 16, 2005, 01:45:14 PM
That is right.
Originally, it washed off at a constant rate but I think Num changed it so that it washes off at a rate proportional to its value now. This means the more you have, the more it costs to maintain.
Title: Evolving Dom ternia E
Post by: Numsgil on May 17, 2005, 12:36:19 AM
That sounds right.