General > Bot Challenges

Shortest Fully Functional Bot

(1/6) > >>

PhiNotPi:
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.

Panda:
I don't know if you will be able to count this... but, I think it does everything. :)


--- Code: ---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

--- End code ---

EDIT:It's 25 24 long, according to the DB2, but 24 23 long if you count it...

Numsgil:
Exact same bot, even shorter:


--- Code: ---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

--- End code ---

And even cheekier (though not tested; the behavior is a bit different)


--- Code: ---start
.up inc
*.nrg 5000 > .repro inc
*.eye5 *. 0 != *.refeye *.myeye != and
*.refveldx .dx store
.shoot dec

--- End code ---

I count 20 instructions...  I can't get lower than that.

Panda:
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!


--- Code: ---start
.up inc
*.eye5 0 != *.refeye *.myeye != and
*.refveldx .dx store
.shoot dec
*.nrg 5000 > .repro inc
--- End code ---

Numsgil:
Haha, thanks.  I can write bots but I can't test them at work :P

Navigation

[0] Message Index

[#] Next page

Go to full version