global variable declarations: 1 line (why use more?) radar: 2 lines (I may be able to bum this one down one more yet, I haven't decided if I will yet, though) movement: 3 lines (turn, drive, set max velocity) targeting: 2 lines (aim/fire, setAdjustGunForRobotTurn) VB management: 4 lines (variable declarations, removing the custom event, adding the custom event, returning from the test method, using PEZ's event-style bullet) Finding the bearing to shoot at from my stat buffer: 0 lines (ha!) File I/O (melee-compatible) : 2 lines (ha again! You'd thought it would be more, eh? Could have been 1, but I need to close my output stream...)
It should essentially be equivalent to FloodMini without DynamicDistancing (as that would take at least about 3 more lines to do right. I suppose I could fudge it, but it would be too much effort to save the distancing data, too). Current codesize is 1920 bytes.
Update: I found the bugs in the gun now I'm pretty sure, it works much closer to where I expected. I also added some melee logic in there, and it's becoming quite a bloated Sonnet, over 3000 bytes currently. Getting close to releasing it here... -- Kawigi
And the classic templated page:
14 lines of Flood-style power. An interesting example of statistical targeting, including file I/O, in a Sonnet. I hope it will be a competitive Sonnet for quite some time (right now, it's only the 5th officially competing Sonnet, so it will at least be in the top 5). If it doesn't win the Sonnet division, at least it will win some Obfuscated Java Contests or something.
It's also the first MegaBot designed for the RobocodeLittleLeague, the first version (version 0.9) is 3281 bytes.
https://www.robocoderepository.com/BotDetail.jsp?id=1779
Among current Sonnets, it's probably the best over a lot of rounds one-on-one. And since it saves data it doesn't lose that. It is ok in melee, but not spectacular. Just good enough to beat the bots not designed for melee I suppose.
In duels, it uses a movement based on FloodMini's movement. In melee, it uses a simplified MinimumRiskMovement, trimmed from the more complicated algorithm used by FloodHT.
Basically a variant on FloodMini's gun. Differences are that it doesn't interpolate scans like FloodMini, it seperates melee stats from one-on-one stats, and it doesn't fire a wave every scan in one-on-one battles (it does still in melee).
By picking a new speed and direction when its fired upon (sometimes).
Movement is different, FloodMovement in OneOnOne, MinimumRiskMovement in Melee. It also spins and locks its radar in melee, and (of course) only locks in one-on-one battles.
Generally tries to avoid everyone and tries to target those close to it (without complete success)
Targeting information - a 6-dimensional array of ints.
Flood from my Flood series of robots, and Sonnet from the lines count.
If you can figure out what it does, kudos. It's mostly open-source to be eligible for the RobocodeLittleLeague line-based competition, not so that people can learn from it.
Fix it up, find any bugs, improve melee tracking and movement.
I suppose SonAsh would be the current bot to beat in its division, even if it's less consistent (i.e. - doesn't beat weaker bots as readily) as MicroAspidSonet?