[Home]HaikuBots

Robo Home | Changes | Preferences | AllPages

Difference (from prior minor revision) (no other diffs)

Changed: 52c52,62
-- Chase-san
-- Chase-san

Hey, what about these lines:

if (ahead((angleLog[getTime()] = e.getHeading()) == angleLog[getTime()] ? 20 : 20) == null) {}

or

if (ahead(20 + (angleLog[getTime()] = e.getHeading()) - angleLog[getTime()]) == null) {}

Is these lines allow? If that allowed, I can get Shadow into Haiku! --Nat

Check out the official HaikuBot website http://tobe.homelinux.net/robocode/HaikuBots/index.html

When the race was on to create the smallest efficient bot, there were many contenders that appeared simultaneously.

What was remarkable was that they all had - or could be redefined with - the same basic structure: just four lines of active code.

For me, the HaikuBots were a revelation of beauty - poetry in robocode form. I had really good fun writing some of them.

Walls, SpinBot, Crazy, RamFire, Corners - and many more - all could be written in four lines of active code, at least as far as a first approximation goes.

--tobe


Please vote below: Are lines like:

 ahead((fireBullet(3) == null)?1:1)*100);

to be allowed in HaikuBots? Is it an imaginative way to reduce lines, or is it cheating? Please vote:

Allow them Disallow them
7 3
Kuuran Tango
Kawigi bazaam
FnH Passerby
Ph
Jonathan
TechGeek?
Chase-san

To make it easier to keep track I'd rather we put our names in the appropriate column, as I've done. Whoever put the '1' down could probably change that or add their name and increment the top counter. I think that it's a reasonable way to push the limit of haikus, similarly to all the codesize tricks you find in minis/micros/nanos. I would agree that it's cheating if it allowed significantly more code into a haiku, but that's not really the case, other than fireBullet() I believe all the 'do something' methods in Robocode (setXxx(), their equivalent blocking calls, execute(), waitFor(), etc) return void, and such a method can't be embedded in this fashion in java. -- Kuuran

The one was put by me, in the wrong collumn. I've fixed that now. -- Tango


What about lines like:

 ahead((angleLog[getTime()] = e.getHeading()) == angleLog[getTime()] ? 20 : 20);

or

 ahead(20 + (angleLog[getTime()] = e.getHeading()) - angleLog[getTime()]);

I think you see where I'm going with this... -- Simonton

Yeah, I'm pretty sure that's allowed... I think there are lines 10 times worse than that in some of these HaikuBots =) -- Voidious

My AG haiku bot is done! It loses to half the samples, but it works and it definitly has something resembling anti-gravity. I'm sure this bot might do decently well in a haiku-bot 1 on 1 match (as the anti-gravity isn't complex enough for multiple opponents). What I want to see someone do now is to make a wave-surfing haikubot. -- Chase-san

Hey, what about these lines:

 if (ahead((angleLog[getTime()] = e.getHeading()) == angleLog[getTime()] ? 20 : 20) == null) {}

or

 if (ahead(20 + (angleLog[getTime()] = e.getHeading()) - angleLog[getTime()]) == null) {}

Is these lines allow? If that allowed, I can get Shadow into Haiku! --Nat


Robo Home | Changes | Preferences | AllPages
Edit text of this page | View other revisions
Last edited February 4, 2009 17:25 EST by Nat (diff)
Search: