General > Bot Challenges

Shortest Fully Functional Bot

<< < (2/6) > >>

Panda:
I have no idea what caused it! It looked perfectly fine! Just mixing it up made it work... :)

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

--- Code: ---start
*.refvelup 1 add .up store
*.refveldx .dx store
*.refeye *.myeye !=
.shoot dec
*.nrg 5000 >
.repro inc

--- End code ---
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.

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

Panda:
If only we can get the conspec shorter...

PhiNotPi:
The conpec and shooting lines:

--- Code: ---*.refeye *.myeye !=
.shoot dec

--- End code ---
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

--- Code: ---.shoot *.refeye mult inc

--- End code ---
(Even cooler) If we knew that the enemy always had 7 eyes, then we can chnge this to

--- Code: ---*.refeye dec

--- End code ---
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.

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version