I'm a high school student in San Diego, who got interested in programming oh...I dunno, a few years ago.
I first got into Robocode thanks to an AP Compsci tournament, designed to get the class' feet wet in Java. Lo and behold, I realized that making bots that could blow the crap out of other bots was fun, and I decided to make a better bot than "gee, let's copy-paste Walls and make it shoot 3.0 bullets".
My first bot is named Valkyrie (well, it used to be SuperSlinkyWarrior?, but that name was horrible), which I will likely upload as an object lesson how not to make bots sometime in the near (e.g, when I figure out how to upload bots) future. Ah well, it came in second in the tournament.
I hate you, Kinsen.
Welcome =) That's pretty cool to hear Robocode is still getting used in schools, it seems like a great way to get people into programming. There's a boat-load of great info on this site, and feel free to post questions when you have 'em, as people are generally pretty helpful. So, why do you hate Kinsen? (By the way, you might care to know there is a team called Valkiries.) -- Voidious
Kinsen's massively long bot magically (though I think I understand most of what it does now) shredded the entire school's bots without breaking a sweat. Like lambs to the slaughter. Like the Padres against the Yankees. Like that scene from War of the Worlds where that Martian guy blows up 50 bazillion humans. Including mine. Which got second place. *mutters angrily*. Oh, and now that I've uploaded to the Respository, now what? Is there a league specifically for newbie bots, or should I just toss mine into the rumble and watch it sink? (Valkiries, huh? Well, mine's spelled right. :P) --Flare
There is no specific "newbie league", but there are bots of all skill levels in the RoboRumble. You just edit the RoboRumble/Participants page with: your bots whole name including package, space, version number, comma, (RobocodeRepository id or full URL). It's pretty clear if you look at the other entries. You can check the RoboRumble/StartingWithRoboRumble page to learn how to run a RoboRumble client, which is a distributed client for contributing CPU power to running the online competitions. That's not required, but it's of course good if you can do it sometimes, especially if/when you're posting new bots a lot.
The closest thing to different divisions, besides 1v1 / Melee / Teams, is CodeSize divisions based on the amount of compiled code in your tank. There are MiniBots, MicroBots, and NanoBots, but they can all get pretty competitive, too. (There are two MiniBots in the top 30 of General 1v1.) Your bot would automatically show up in the appropriate rankings if it is small enough to qualify for any of those. I do have one client running basically 24/7 right now for 1v1, so your bot would start getting battles immediately (within a few minutes) if you posted a version to the rumble. Best of luck =)
Thanks! Ah, why the heck not...are the weight catagories automatic or do I have to sign up seperatly? Also, I had an idea while watching a friend of mine in fencing practice...I know it's possible to mirror the enemy motion by orbiting around the center of the field so that you're on the same line as your opponent and the center, then detect if your opponent shoots by watching energy.
Would it be possible to fire a 0.1 power bullet using heads-on the moment you detect that, "parrying" your opponent's shot? - Flare
Yes, that's possible, but there are a couple things: first, they probably aren't shooting at where you are, but at where they think you will be; second, Robocode handles bullet collisions a little strangely. There's actually been some work done on the subject - see BulletShielding.
About Valkyrie, my client had trouble downloading it, and I checked it out. It is entry 3009 on the repository, not 3005, and I think your filename needs to be vft.Valkyrie_1.0.jar. (You can edit your existing entry on the repository, you don't need to create a new one.)
...ooops. Right, that...*fixes*...like so? --Flare
After changing the id to 3009 on the participants page, it seems to be working fine. Cheers ;) -- Voidious
Another question: out of all the "advanced" methods like multi-mode, pattern-matching, guessfactor, wavesurfing, antigravity, etc., which one would be the logical start for a newbie to read up on? Or is there no real starting point? -- Flare
It's tough to say... A lot of people start with simple targeters, like HeadOnTargeting, LinearTargeting, CircularTargeting, and try putting them into a VirtualGuns array. PatternMatching isn't that hard to get your head around, and is far more effective than those VirtualGuns will be. There's a nice GuessFactorTargeting tutorial up, but that might just be confusing for you at this point, I don't know. What I can suggest is to start by focusing on either 1v1 or Melee, since they are drastically different in what methods work well... If you're interested, there are a lot of OpenSource bots that can help a lot in learning new concepts. -- Voidious
So, if I'm reading this right, the key behind basic pattern-matching is to take readings of information useful to aiming (like bearing to enemy), convert the data to a symbol, superglue it onto the end of a StringBuffer?, and let Java's built-in pattern-matching tools do the rest? -- Flare.
Yeah, something like that. The basic style that I have used records velocity and change in heading for each tick, and then takes the last few ticks and looks for a match in the rest of the log; when it finds one, it "replays" the moves after that to see where the enemy would be when the bullet gets there. But you can match on other things, too, as that page mentions. I should've added before that the GamePhysics page and the BeginnersFAQ are really good references for general info about various Robocode basics, like how fast you can turn your gun and how fast bullets go. -- Voidious
Welcome. Talk to me if you need help with anything, that newbie Voidious doesn't know anything. ;-) --David Alves
Welcome to the wiki. If you are more interested in melee than that boring one-on-one, you should read the excellent MeleeStrategy page. If your only goal is to end up in the one-on-one top-10, do not waste to much time with anything else than WaveSurfing, GuessFactorTargeting and/or DynamicClustering. But it is probably more fun to pick some bots as testbed, and gradually improve your bot till it can beat them, update your testbed, etc etc, and see your bot slowly climb the rankings. And if you have any questions, ask David ;-) -- GrubbmGait
Hello. Let me guess: You are working on a one-on-one robot that will thrash my current one in the future competition. I am pleased to know that there will be some sort of competition. Other than that, if you need help, you can always talk to me at school if you don't mind. -- Kinsen
Hmm...I'm running into a bit of a roadblock. I know exactly what any of the advanced strategies is supposed to do (I could easily write you a psudocode algorithm for wavesurfing/patternmatching). The problem is: I'm new to Java. If Robocode were in, I dunno, C++ or Visual Basic (okay, yeah, I know, Robocode probably wouldn't work an anything save Jaca), I could write a buggy but functional GF gun and wavesurfing wouldn't be incredibly hard after that. Unfortunatly, my Java expertise extends to about 3 weeks of AP Compsci. The class just "learned" how to define variables last week. I don't have the coding experience to get how the heck the ideas are implemented into reality. --Flare
You could take a look at the GuessFactorTargeting/Tutorial and the WaveSurfing/Tutorial, that could help a bit. Taking it a step further, you could extract and examine any of the OpenSource tanks (that page is a long list of them). -- Voidious
You should have no problem picking up java if you know C++ well. You don't need to use any fancy language features to write a GF gun. Oh and you can always ask voidious or I if you have any Java questions, we're frequently on aim. Our contact info is on the ContactInfo page. --David Alves
Hmmm...I've been looking at Moebius' gun, and could someone explain what it's doing, in pseudocode? Thanks. --Flare
Don't look at NanoBots. Actually, don't look at anything but MegaBots until you've been robocoding for a while. The tricks that people use to reduce CodeSize make the code really hard to read. =P --David Alves
The place I started when I was 100% new to robocode was after Igot the basic head-on targeting and basic random movement down anyway was with Anti-Gravity(which I now see was a rather large leap) and linear targeting (not so big a leap). Being able to make a bot that litterally takes apart the others is rather hard. Currently i'm up to the level of working on guessfactor weapons and wave-surfing(kinda) --Chase-san