Darwinbots Forum
General => Leagues => Bot Challenges => Topic started by: PhiNotPi on April 28, 2011, 06:12:02 PM
-
How short can a bot be and still be fully functional? This is a competition to find out. To be considered "fully functional" the bot must meet these qualifications:
- Search for prey. This can be as simple as turning or moving foward.
- Pursue prey. This means that the bot actively tries to get the enemy within range of attack.
- Feed off of prey. This can be as inefficiant as needed, as long as the bot gains net energy from the attack.
- Not attack conspecs. It should not treat conspecs as enemies.
- Reproduce. This should be controlled with some sort of condition.
- Populate the sim in F1 conditions. It will be released into an environment of Alga_Minimalis (modified to increase *.myeye if needed).
There are various awards for this competition. These are as follows:
PLATINUM- Shortest entry out of all of the entries that meets the above qualifications.
GOLD- DNA length under 25.
SILVER- DNA length under 35.
BRONZE- DNA length under 45.
COPPER- DNA length under 60.
QUALIFIER- Bot meets above qualifications.
It may seem like I set the bar high for the awards, but some are easier than you may think.
-
I don't know if you will be able to count this... but, I think it does everything. :)
start
5 .up store 'always move up, makes it easy to follow other bots
*.eye5 0 != *.refeye *.myeye != and
*.refveldx .dx store
-1 .shoot store 'shoot and keep dx the same speed as any bot which does not have the same number of eyes as me.
*.nrg 5000 >
20 .repro store 'reproduce when energy is larger than 5000
'EDIT:it's a little cheeky of me, but no stop shortens it by one. HEHEHEHE
EDIT:It's 25 24 long, according to the DB2, but 24 23 long if you count it...
-
Exact same bot, even shorter:
start
.up inc 'always move up, makes it easy to follow other bots
*.eye5 0 != *.refeye *.myeye != and
*.refveldx .dx store
.shoot dec 'shoot and keep dx the same speed as any bot which does not have the same number of eyes as me.
*.nrg 5000 >
20 .repro store 'reproduce when energy is larger than 5000
'EDIT:it's a little cheeky of me, but no stop shortens it by one. HEHEHEHE
And even cheekier (though not tested; the behavior is a bit different)
start
.up inc
*.nrg 5000 > .repro inc
*.eye5 *. 0 != *.refeye *.myeye != and
*.refveldx .dx store
.shoot dec
I count 20 instructions... I can't get lower than that.
-
I didn't think of inc/dec!
EDIT: Some of the behavior didn't seem to work on the one that you put on Nums... :s I did some jigging around and got it to work. They were horribly slow and sometimes shoot themselves to death when the bot they were shooting at was too far away, so I changed it so it is "eye5 30 >" They don't kill themselves anymore! And they definitely survive now!
start
.up inc
*.eye5 0 != *.refeye *.myeye != and
*.refveldx .dx store
.shoot dec
*.nrg 5000 > .repro inc
-
Haha, thanks. I can write bots but I can't test them at work :P
-
I have no idea what caused it! It looked perfectly fine! Just mixing it up made it work... :)
-
I have successfully created a bot with a DNA length of 19. I seem to be entering into my own competition, but I am going to post the bot anyway.
start
*.refvelup 1 add .up store
*.refveldx .dx store
*.refeye *.myeye !=
.shoot dec
*.nrg 5000 >
.repro inc
I used a few tricks to make this bot shorter. It copies the upwards velocity, and adds one. Even when it does not see anything, it will still add one. This is its active hunting and part of pursuing. The sideways motion is also copied from any bot. The resultant swarming behavior seems to help the bot, because they are more likely to be closer to food before they spot it. The bot shoots at food, regardless of distance.
I am beginning to wonder if it is possible to create a shorter bot. The last five commands (the reproduction) may be impossible to shorten. Conpec recognition adds 3 at minimum( *.refeye *.myeye != ). Start adds 1. Shooting adds 2. The motion of searching adds 2. This means that fully functional bots must have at least 13 commands in their DNA.
Also, even though I only count 19, DB says that the DNA length is 20. I think this is due to the lack of a stop, which DB may count but isn't there.
-
I think it adds one implicit "end" basepair.
I thought about getting rid of the *.eye5 0 > check, but it's hard to get the bot to behave when it's chasing ghosts.
-
If only we can get the conspec shorter...
-
The conpec and shooting lines:
*.refeye *.myeye !=
.shoot dec
Can be shortened if we knew the enemy's *.myeye. If we knew that the enemy always had 1 eye, we shorten these lines to
.shoot *.refeye mult inc
(Even cooler) If we knew that the enemy always had 7 eyes, then we can chnge this to
*.refeye dec
Both of these take advantage of the fact that this bot has a myeye of 0. The second one takes advantage of the fact that the .shoot memory location is 7.
-
How can we stimulate DNA shortening trought evolution? I found settings "DNA upkeep cost". What is that mean?
-
How can we stimulate DNA shortening trought evolution? I found settings "DNA upkeep cost". What is that mean?
cost per turn per bp. Increase this and likelihood of deletions and shorter bots will evolve. This is not hard
Evolving a shorter "fully functional" bot is harder. If the cost of loosing a function is smaller than the gain of a shorter genome energy is gained and the functions will be lost. Evolution is lazy..
-
start
*.refvelup ++ .up store
*.refeye dec
*.nrg 5000 >
.repro inc
Okies, I used Panda's revision with PhiNotPi's adjustments, changed 1 add to ++ and also removed the line *.refveldx .dx store because veggie's won't be moving too from side to side much I don't think - 12bp now :blink:
-
Oh... I really doubt that this could get any shorter then.
-
well the reproduction gene uses almost HALF the dna... maybe there's a way to shorten that part or may haps duplicate another value and plug it in?
-
Reproduce. This should be controlled with some sort of condition.
Don't forget to check the original requirements.
-
This should work for a bot with 11 BP (It does in theory, but I haven't tested it).
start
*.refvelup ++ .up store
*.refeye dec
*.nrg 222 floor inc 'possibly replace this with *.nrg .repro ceil inc
As the nrg rises, each sysvar is incremented until it reaches 300, or the repro sysvar. The energy then becomes less than 300, and the cycle repeats. The 222 floor is to protect the sysvars below 222. This only works when the starting nrg is less than 300, because the bot would never reproduce. I also considered *.nrg 300 ceil inc instead becuase it would reproduce whenever nrg was above 300, and there would be not risk of accidently skipping 300 nrg and not reproducing, but there would not longer be any protection of sysvars less than 222. Which one is better? Both could have side affects in the bot's behavior.
With the "should be controlled with some sort of condition", I said that only to prevent .repro inc and other things that cause cancerous growth. I never imagined that it would be possible to have a conditionless function that did not cause cancerous growth or destroy the bot's functionallity, and was shorter than five bp. But since it may be possible to accomplish this with out a condition, I am going to allow conditionless reproduction as long as it is not cancerous and does not destroy functionality.
EDIT: I have tested both *.nrg 222 floor inc and *.nrg .repro ceil inc. Both cause terrible side effects. The first one malfunctions when the bot accidently skips 300 energy, and does not reproduce and becomes massive, so the bot will never reproduce. The second malfunctions when the bot triggers .fixpos, and the bot can no longer move.
-
how about seasnake? it is a very impressive MB (yes, multibot!!!) that has only 1 (yes, 1!!!) gene
-
Yes but here we're counting base pairs/commands, not genes. Seasnake is thousands of bps, if I remember right.
-
DNA length? Ohh... i thought you mean genes :blueblob:
-
ok i'm not new but i am at the same time to darwinbots, but i've been working on this challenge here recently (today) and i have a bot that fills the challenge requirements and is only 12
start
1 .up store move up can be changed if needed 4 i would say is the max speed recomended
*.refeye .shoot ceil dec shoot if vegi is in front
*.body .repro ceil inc reproduce if body is > 300
though it has to be a vegi with 7 eyes in the dna longer than the ones with 11 but they don't shoot. this bot does implement some of your guys ideas, unfortunately it likes to get stuck sometimes.
vegi i made:
cond
*.nrg 5000 >
start
50 .repro store
10 .aimsx store
stop
cond
*.eye5 0 =
*.eye5 0 =
*.eye5 0 =
*.eye5 0 =
*.eye5 0 =
*.eye5 0 =
*.eye5 0 =
end
-
ehm, your vegy does not produce it's own chloroplasts.
Also, why the eye restrictions?
In any other simulation your feeder bot will refuse to eat...
-
It's because it uses refeye => .shoot memory location 7 to id the veg, you could alter the veg as long as it has 7+ eyes and the last useless gene was because i had it in 1 gene but didn't reproduce, and i don't get the chloroplasts genes everyone is talking about, a little insight in that would be nice.
-
I'm sure I can do a post about how the chloroplasts work at some point.
-
you could alter the veg as long as it has 7+ eyes
That was my point, any robot you design will be limited to a simulation where vegys have 7+ eyes ... :)
-
Chloroplasts is our new Beta everyone is talking about, Get a copy from our Announcements section of the Forum (2.46Beta). It works very similar to other versions of the program. The only exception is for vegys you have to add a chloroplasts gene in order for them to be able to get energy from the sun. Here is a simple gene you can use:
cond
*.chlr
16000
<
start
160 .mkchlr store
stop
-
thanks for the beta and the mutation check in the neural bot challenge too never would have thought of it :)