Darwinbots Forum

General => Leagues => Bot Challenges => Topic started by: PhiNotPi on February 16, 2014, 04:31:21 PM

Title: Write the best Nano-Bot (max DNA length of 32)
Post by: PhiNotPi on February 16, 2014, 04:31:21 PM
This is a straightforward challenge:  Write a bot which beats the other bots.

Rules:


Why 32?  I had to decide on a number, and I figured that 32 was a power of 2 which was about the right size.

To kick things off, here is my starting entry.   It is basically a highly-compacted version of Animal_Minimalis.  It measures 30 base-pairs in length.

Code: [Select]
start
 *.eye5 0 >
 *.refeye *.myeye != and
 *.refveldx .dx store
 -6 .shoot store
 *.refvelup 30 add .up store
 not
 314 rnd .aimdx store
 *.nrg 20000 >
 .repro inc
end
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: Peter on February 16, 2014, 05:49:55 PM
Nice idea, and doesn't take too much effort. :P

Code: [Select]
start
 *.refshell 1 <
*.refage 5 > and
 *.refveldx .dx store
 *.refvelup 15 add .up store
 -6 .shoot store
 .mkshell inc
 not
 100 .aimdx store
 *.nrg 5000 >
 .repro inc
end
31 bp
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: PhiNotPi on February 17, 2014, 10:15:34 AM
Your bot was actually pretty good.  It seems to beat anything which doesn't have shell.

Here is my new version, which is a tie-feeder.  It almost always beats the other two entries, with the only losses occurring because the two opponents randomly spawned too far from each other.

Code: [Select]
start
 .mkshell inc
 32000 .sharenrg store
 15 .up store
 *.numties 0 =
 *.refshoot *.myshoot !=
 *.refeye *.myeye != or and
 .tie inc
 not
 100 .aimdx store
 *.nrg 5000 >
 .repro inc
end
32 bp
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: Peter on February 17, 2014, 01:40:03 PM
Is that the right code? Both bots beat it when I select F1 conditions.
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: PhiNotPi on February 17, 2014, 01:41:06 PM
Let me check.....

EDIT: Can you describe to me what "losing" looks like?  Are they losing in combat, are they losing because one starves to death faster, etc?  Also, what version of DB are you using?
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: Peter on February 17, 2014, 01:58:15 PM
Starve, generally at first they are ahead in numbers and then it slowly declines till zero. It makes a lot of offspring, big portion dies quickly. Later in the fight nearly all offspring a bot makes dies.

Version 2.45.01
Title: Re: Write the best Nano-Bot (max DNA length of 32)
Post by: PhiNotPi on February 17, 2014, 03:30:21 PM
EDIT: I have been running this in 2.46.02BetaI. To see the difference I just ran in 2.45.03, and it's not even close the same!  Everything's different!  To be honest, my submissions don't work at all anymore in the older version!

EDIT 2:  The main differences appear to be:  2.46 has a population cap, when I press "set F1 settings."  Second, it does not require for there to be a veggy, whereas 2.45 seems to require there to be a veggy.  Third, shell does not slow the bot down as much in the newer version.

Original answer:
Okay, I honestly don't know what happened, because I couldn't repeat my earlier success either.  So, I put some more work into it, and this is my new and improved entry:

Code: [Select]
start
 *.numties 0 >
 32000 .sharenrg store
 not *.refshoot *.refeye add 0 > and
 100 .mkshell store
 .up store
 .tie inc
 not
 .aimdx store
 *.nrg 100 <
 .fdbody inc
end
30 bp

Hopefully, this one actually works.

I'm actually quite surprised at the amount of stuff I was able to accomplish in so little room.  Tie shooting, energy "sharing", rotation / forward movement, creating shell, feeding off of body when needed, etc.  I decided to ditch the reproduction gene, because it did not seem to make much difference.