Robocode Guide vie explanation of a top robot
The highlighted comment was created in this revision.
I have been thinking about writing a guide for robocode for a while and was wondering what you guys thought. My initial plan was to go through Gilgalad and explain how everything works. I've been cleaning up Gilgalad's code so it could be used as a frame work and the new users could just mess about with different classifiers, but now I'm wondering if there Diamond on Xandercat would be better. Obviously, I have a better understanding of Gilgalad than I have of these bots, but on the other hand, reading through their code would help me get the perspective of someone who didn't write the robot.
Any thought?
Seems like a great idea. We may be in one of those phases where top bots are way ahead of any formal documentation of what they're doing, like Wave Surfing in early 2006.
I do think Diamond is a very clean and presentable code base that would serve this purpose well. But more than that, I think the main barrier to this is just someone having the time / understanding / motivation to do it. So if you're most comfortable with Gilgalad, that would definitely get my vote. And maybe your write-up would inspire some other folks to do the same with their bots. (I'd love to do it for Diamond, it's just a matter of time / priorities.)
Well I'm not sure if some of them are the best idea. I know the current gun I use is pretty simple code wise (not even having any virtual guns, etc). But the movement is a bit of a mess. I was working on a new movement, but its nowhere near ready for something like this (but I am endevouring to keep it just as simple as the gun).
I know Diamond is almost scary in its structure imho, but if it can be neatly explained then I am all for it.
I would guess the code in XanderCat is quite a bit different from the code in most other robots. Though it uses a lot of the same concepts as other robots, the code is almost entirely home grown without using other robots as a reference.
I wrote XanderCat on top of my own framework I call the Xander Framework, which I did create a wiki page on, but it doesn't get into specifics.
I do include source with XanderCat if anyone ever wants to look at it.
Well if we are going to do it, I think we should try and go K.I.S.S. with it as much as possible. A lot of structure is just going to confuse people who are not used to dealing with it. Of course a complete lack of structure is equally difficult.
With all that said. I would say GresSuffurd is probably the best bet in that area.
I don't know, I think it depends on the goal. I like the idea of something like Melee Strategy/Understanding Coriantumr, with the insight and personal touch of an author writing about his own bot.
I certainly agree there's pros/cons to choosing a simplistic design (GresSuffurd) vs a typical / robust design (Gilgalad). And neither seems like a replacement for the generic "Robocode Guidebook" idea. My vote still goes for whatever choice is most likely to actually get written. :-)
I've been thinking about doing this for DrussGT for a looong time now as a motivation for cleaning up the internals, possibly making a new BasicGotoSurfer as well which incorporates a bunch of the things I've learned about GoTo surfing along the way.
Hmm, so I'm fine with using a robot other than Gilgalad since it will mean I have a better perspective on what someone who didn't write the robot would need explained, but it would also make the project take longer. I find Diamond fairly easy to understand, but I was thinking of a tutorial for 1v1 since I haven't tried melee yet, and that would mean there would be a lot of "melee code, ignore this:" going on. I'm willing to put quite a bit of time into this, so I'm more interested in what people think the best bot for a detailed explanation is? How hard is it to understand Gilgalad? Also, this will probably mean that there will be a bunch of new robots based on the one for which the guide is made. How efficient are the other top robots, and how important should speed be? If I did use Gilgalad, perhaps I should make modifications such as using Rednaxela's kd-Tree?
Quick note, I'd tend to advise against using my kd-Tree (espescially the "3rd gen' one) in a bot which is meant for use in such a guide as is being discussed here, especially if the guide wishes to touch on what the kd-Tree itself does. While I tried to keep readability reasonable, there are plenty of places where I sacrificed simplicity for raw performance.
For a bot used for this type of purpose, it might be fine to go with a simple linear k-NN search even. For 35 round battles, it's normally not too slow if implemented well, and it a tiny fraction of the amount of code to implement a kd-tree.
I guess the idea isn't totally clear to me, so I'm not sure what to suggest. Is the chosen bot analogous to BasicSurfer in the Wave Surfing Tutorial, or Coriantumr in Melee Strategy/Understanding Coriantumr? Or neither? And is the goal to explain some of the latest Robocode bot features that aren't well explained on the wiki, or to give an idea what goes into developing a full-featured modern 1v1 bot?
If it's more like an AdvancedDueler / Advanced Dueling Tutorial, I would just write a new bot with BasicSurfer + distancing + multiple waves + gun heat waves + precise intersection + bullet shadows + reasonable stats (either VCS or KNN) and gun with KNN + VG (main/antisurfer) + MEA. And simplify as much as possible within each of those features.
If it's more about exploring concepts / code in a real world example of a top bot, I wouldn't expect lots of clones coming out like we have with BasicSurfer, since it would probably be complex enough that you'd still have to write a lot of code yourself to have a complete bot. (E.g., Understanding Coriantumr/HawkOnFire don't seem like a basis for clones, though they are super useful for learning about Min Risk.) I know Diamond is pretty clean code, and Gilgalad / XanderCat sound like they are too, but I haven't actually looked at their code to know for sure and give an endorsement. I think having a really high ranked bot would give it a lot of cred, too, and all 3 of those are in the top 5.
Sort of between the two, but more like Coriantumr. I think someone who really wants to can learn how top Duelists work from reading the wiki, but I want something that shows how it all fits together and puts the reader in a position to write an advanced wave-surfer in a short period of time without saying "just do, it's too complex to explain now". So sort of like if you wanted to explain how Diamond works to someone with a programming background who hasn't heard of robocode before. I would probably start the guide with background information, possibly just copying the wikipages for GF's etc. and then jump into the robot.
Part of my idea for this comes from trying to explain robocode to friends. I'm not really interested in explaining how java works, or how trig works, just robocode specific stuff. I really appreciate the tutorials and I find the evolution of robocode strategy over time fascinating, but I think that getting a single, detailed, guide to robocode strategy, integrated with a top robot, would make learning a lot easier (or at least faster). Once they start robocoding they'll spend all of their free time (and more) reading the tutorials anyways... (mad scientist laugh)
Thanks Chase for pointing out that GresSuffurd has a complete lack of structure ;-)