Talk:Robocode Guidebook

From Robowiki
Revision as of 17:55, 31 July 2011 by Blubex (talk | contribs)
Jump to navigation Jump to search

Initial discussion

The other day I was thinking it was a pity that it isn't that easy to get into Robocode really. Sure, we have a "Getting Started" page but that's pretty loose. I was then reminded about Wikibooks. So here's a question: Who thinks it might be a good idea to make a fairly self-contained "Robocode Guidebook" of a similar style to the things on Wikibooks? Many existing tutorials could probably be moved in or adapted, though trying to organize things in that format might, 1) Reveal things that need tutorials still, and 2) Make it easier for a newcomer to follow. Thoughts? --Rednaxela 13:37, 12 May 2010 (UTC)

I need to check out Wikibooks to see the "style", but it sounds like a great idea if we can find people with the time. I'd certainly be happy to contribute. I try to visit the RoboWiki with a "newbie mind" sometimes, and there is definitely a lot of work to be done... --Voidious 13:52, 12 May 2010 (UTC)
It sounds like a good idea to me. I started robocode less than a month ago and I could tell you what I would find helpful / not helpful etc. If you decide to do it and need me help feel free to ask :) --Exauge 21:03, 12 May 2010 (UTC)
I think your input would be very useful. Many of us have been at this for months/years, so it's easy to lose perspective. =) --Voidious 21:49, 12 May 2010 (UTC)
Which brings up another point I wanted to make... It seems important to consider target audience, since there's such a wide range of backgrounds of people that come to Robocode. They may have Java experience and fresh-in-mind trig knowledge, or be new to programming entirely and don't know/forgot trig and other maths. Of course, ideally we write something that anybody can learn from, but target audience definitely affects the style and pace. --Voidious 21:49, 12 May 2010 (UTC)
I think there are a lot of basic of Java book out there, so I don't think we need to write about Java or OOP. But we should have basic trig cuz even programmers may have forgotten about trig already (if you didn't work with geometry/graphics that is) --Nat Pavasant 05:43, 13 May 2010 (UTC)
Yes! ... " Robocode cookbook " ?? :) I would highly suggest a collection of sample AdvancedRobots (in their own directory) packaged with robocode. With a link in the help menu to the "Guide". Include a sample AdvancedRobot with a decent 'base' for melee. It took me 5 years of fighting with ways of storing info for melee. (homeMade silliness) because API's are difficult to understand... (Only to make use of module after) Include useful utils like 'project'.. helps make Trig easy... and If I knew eclipse would of made learning java easier I would switched over from the robocode editor much sooner.. (just some pointers... I gotta run:) -Jlm0924 22:36, 12 May 2010 (UTC)

Well, what I had in mind was making it a relatively linear book-like guide, and progress through the basics very gradually like follows:
Part 1: The basics

  1. How to get Robocode and run a battle in it
  2. How to set up an environment for making a robot in:
    1. With builtin editor in Robocode
    2. With a text editor command line compilation
    3. With Eclipse
  3. How to make a do-nothing robot
    • Optional Java Sub-Lesson: Anatomy of a Java class
  4. Overview of robocode physics, and anatomy of the robocode turn and execution cycle
  5. How to make the robot move in a straight line, and then how to make it move in a circle
  6. How to turn the gun and fire
  7. How to scan, and fire directly at the scanned robot
  8. How to perform very simple ramming
  9. How to perform very simply orbiting
  10. How to to respond to hitting the wall (bounce off)
    • Optional Geometry Sub-lesson: Perpendicularity and how moving perpendicular
  11. How to print to the robot console and make debugging graphics, and how to view them in the battle
  12. How to find the coordinates of a scanned enemy, and paint a box around them in debugging graphics
    • Optional Trigonometry Sub-lesson: How to convert an angle and distance, into relative coordinates
  13. How to perform iterative linear targeting using this
    • Optional Trigonometry Sub-lesson: Pythagorean Theorem - How to get the distance between coordinates
    • Optional Trigonometry Sub-lesson: How to get the angle of a vector
    • Sub-lesson: Concepts of iterative prediction
  14. How to perform approximate non-iterative targeting
    • Optional Trigonmetry Sub-lesson: The math behind the non-iterative approximation
  15. More?

Part 2: Improved Techniques

  1. How to randomly change direction in a simple way
    • Allude to possible improvements, like factoring in bullet-flight-time Raiko-style
  2. How to detect enemy firing, to make a simple stop-and-go movement
  3. Simple pattern matching
  4. Wall smoothing
  5. Melee enemy tracking and target selection
  6. Anti-gravity movement
  7. Competition (Roborumble) and testing (general testing advice)
  8. More?

Part 3: Advanced Techniques

  1. Some common ways to make bot code more modular
  2. Minimum risk movement
  3. Introduction to "Waves"
  4. Simple unsegmented guessfactor targeting
  5. Segmented guessfactor targeting
    • Mention non-guessfactor segmented targeting (i.e. PastFuture)
  6. Simple (no trees) DC targeting
    • Both Guessfactor and PIF based
  7. Simple 'Virtual Guns'
  8. How to deal with rammers
  9. More?

Part 4: Elaborate Techniques

  1. Timing nitpicks, revisiting the execution cycle
    • Consider how enemies see you with a delay, and vice versa
    • Consider how one's own gun rotation is for one's location next turn, not this turn
    • How to predict one's next location, for extra precision
    • Very Briefly mention imaginary gunheat waves maybe?
  2. Basics of team robots
  3. Wave surfing
  4. Anti-surfer techniques
  5. Precise wave intersections
  6. Neural targeting
  7. Wisdom on combining many VCS buffers, combining multiple targeting systems, etc
  8. More?

All sections using AdvancedRobot/TeamRobot, never plain Robot of JuniorRobot. Any thoughts? :) --Rednaxela 06:17, 13 May 2010 (UTC)

Wow, I see you've already put a lot of thought into this. Cool! I'd be happy to start working on drafts for whatever sections if you want to take the lead in handing out assignments. =) Though I may be pretty busy with work for a few days here.

Just brainstorming - I'm not necessarily 100% in favor of any of these ideas:

  • It might be neat to have a few challenges sprinkled in, maybe to end chapters or sections. For instance, "beat this RamBot", or "out-survive sample.MyFirstRobot without firing" (I think I stole that one from Kawigi).
  • Why completely exclude Robot/JuniorRobot? I think a lot of Robocode beginners are using these. Sometimes they have no choice, since it's specified as part of their assignment.
  • RoboResearch might be a good topic. It can be a pain to setup and get running, but it is just such a must-have tool, imo.
  • Wave Surfing could practically be its own top level section as we get more advanced. It's a pretty broad category of movement.
  • It might be fun to touch on a few random topics somewhere, like Twin Duel, large battle fields, Droids, "perceptual" bots. But of course that seems like a low priority.

--Voidious 15:52, 13 May 2010 (UTC)

This is an excellent and I really love the idea! I have had something similar in mind for some time, but never had the time for it. I think you experienced Robocoders will be much better at writing this guide book than me, as I don't go deep into robot developing, but put most efforts into developing the game itself. If you need me to write parts of this guide, please tell be which parts you have in mind, and I will see what I can do. :-) I will definitely keep an eye on this page, which I think will be VERY important for newcomers and as a kind of reference book when it is finished. :-) Don't forget pictures! ;-) --Fnl 20:32, 13 May 2010 (UTC)

I'm not sure I like Wikibooks' use of a Copyleft license, though: GNU Free Documentation License. I imagine a lot of the content going into this book could be related to content on this wiki, either derived from a RoboWiki article, or it could form the basis of a new/revised article. I'm not sure about committing everything on this wiki to that license, which would be required for the latter... (unless just those specific RoboWiki articles use that license, which I guess is do-able, but seems like a big headache.) --Voidious 21:50, 13 May 2010 (UTC)

Actually I'd like CC-BY-SA license with this wiki (see Robowiki_talk:Copyrights). One thing I'd like to comment about the outline, I don't think the Elaborate Techniques part is required. If you understand basic of the first three parts, you should be able to understand the fourth part with information on this wiki. Anyway, many, many interesting things on this wiki are hidden under the massive talk on the old wiki. --Nat Pavasant 05:32, 14 May 2010 (UTC)

@Voidious: Well, personally, I feel that JuniorRobot and plain Robot are no easier than AdvancedRobot, and the mindset/thinking required to code each effectively is very different. About licence, I wasn't thinking of putting this guide on Wikibooks, just on this wiki like any other articles. I was only mentioning Wikibooks for the general style of how to organize a 'book' on mediawiki and such.
@Fnl: Alright. Indeed, pictures are good ;)
@Nat: Well, I'm not sure the "elaborate techniques" section is as needed either, but for completeness I think would be nice to include it. I do definitely consider the earlier sections to be much higher priority than the later sections personally.
--Rednaxela 06:02, 14 May 2010 (UTC)

I played around in photoshop a little bit and made somewhat of an icon or w/e to put on first page of the guidebook. If you don't like it feel absolutely free not to use it. anyways here it is.

Robocookbook.png

--Exauge 21:10, 14 May 2010 (UTC)

Cool! ... I think if you changed just the "Robo" to the same style as used for "Robocode"; It might be irrestible... ;) (Hey, If they don't take it ; You'll have the snaziest Snippet Page :).. Good job... -Jlm0924 is jealous ;) 23:45, 14 May 2010 (UTC)

Alright made the change, how's this look?

Robocodecookbook.png

--Exauge 00:00, 15 May 2010 (UTC) -

- dame your fast! I liked what you had better, though :) I meant if Robo was thicker and divided up like it is on the up screen..(or web page) -Jlm0924 00:15, 15 May 2010 (UTC)
you mean like the top one only the robo wider? and ya i came to check about 2 minutes after u made the comment ;) the change wasnt too hard to do. --Exauge 00:33, 15 May 2010 (UTC)

- no. non.. like in Robocode logo ... sorry dude.. don't take my opion as gospel truth.. :) I liked what yeah had. :) I got company . cheers

I'd suggest Robocode JGAP-like logo. I'd make one when I'm home. --Nat Pavasant

I agree the elaborate techniques sections are not as important as the earlier stuff, but I still think we should include them. There could be lots of would-be Robocoders that would dive into that kind of stuff if it were included, but would not be inclined to seek it out on the wiki. And we could use it to form some more Tutorials on the wiki. Anyway, I think we should have a page for this outline somewhere and move the discussion to the talk page...

And by the way, y'all heard of Code Complete? It's a pretty widely regarded programming book. I'd like to nominate "Robocode Complete" as a possible title. =) --Voidious 02:22, 18 May 2010 (UTC)

(...above migrated from Talk:Main Page...)

Void, Honestly I think that the most helpful name that would best describe it is something like Robocode Guidebook or The Guide to Robocode etc because while Code Complete might be a widely regarded programming book, many people who start robocode won't know that. Anyways don't take my word as law - it's just a comment :) --Exauge

Sorry I've been quite for a while, been busy lately but am still interested in working on this idea. About the name... I kind of like both... maybe a subtitle format like the following would make sense "Robocode Complete: The Robocode Guidebook". Just a thought. Hmm... --Rednaxela 03:44, 4 June 2010 (UTC)

I think it would be more helpful to make some guide on the math behind coordinates and angles and stuff like that.
The programming of bots itself is pretty basic knowledge which even a ten year old could start doing, with a bit of understanding how programming languages work, but the math behind things makes it much harder.
For example see "Ceebot" its a children game my 8 year old brother plays (and without knowing it, learning a C#/Java like syntax:

object item;<br>
item = radar(Titanium);  // find metal
goto(item.position);     // goto to the metal
grab();     // pick up the metal
move(-10);  // reverse 10 meters
drop();     // put the metal down

As kids progress, new things will be introduced, like loops.
Anyone has an opinion about this?

(So what i mean is, while the rest of the points described above is nice, shouldn't this be more covered?) --KiraNL 20:49, 15 September 2010 (UTC)

On a related note, I recently was at a Robocode tournament and took my friend, who had never programmed in his life. Once we were there, he sat in the back and just worked on a robot. He got 2nd place! Later I examined his code, and all it was was static movement. He had written about 50 lines of movement(i.e. turnLeft(30); ahead(100); ). It was really cool to see how he learned it just by looking at the sample bots. --Blubex (Sorry, this is my first edit and I'm not quite sure how to.)