Welcome

Jump to navigation Jump to search
Revision as of 14 September 2012 at 15:49.
The highlighted comment was created in this revision.

Welcome to the Robowiki! Feel free to ask any questions you might have.

I'd say going for a surfer this early in your robocoding if fairly ambitious but doable! I'd suggest you make sure to test a lot against something like HawkOnFire that just fires straight at you, because this is good for getting some for making sure you don't have certain types of common bugs. Hope it goes well :)

    Rednaxela21:49, 14 May 2012

    Thank you!

    I changed my mind a lot over time (even if I created my profile yesturday!), and I decided that it is better to start with a safe and proven firing and moving technique. I think you are right that I could make it, but it would be to frustrating for me, after taking a look at DrussGT code ^^.

    I never thought anyone would notice my profile, and I am happy you stopped to say something :). I am really impressed by the play-style of your Lunar Twins, seriously.

    So, for Exode, I thought I could use random Stop and go moving. For the firing system, I don't know. Maybe multi-mode later, but for the first version I want something more valuable than Head-on.

    And, yes, I do have some questions :

    Can you tell me more about the kd-tree? What is it? How can it improve a bot? How can I save information between rounds and between matches (Like little black book)? How long it took you to release your first bot?

      Discan22:09, 14 May 2012
       

      No problem. Ahh, well as a note, DrussGT is not the easiest surfer to read IMO.

      Hmm.. for the questions:

      1) A kd-tree is a data structure used to do a "k-nearest-neighbor" search fast. What the "k-nearest-neighbor" search does, is it allows you to search a history for the past situations most similar to the current situation. You give numeric values to different aspects of the situation, and it finds the most similar several past situations, and this can be used in either targeting or movement to predict the opponent, based on the premise that they'll react to the situation similarly both times.

      2a) To save between rounds, you just use a "static" variable in Java. The "static" keyword makes it so the value is is common between all instances of a class, such as between separate rounds. Basically all bots that learn use this.

      2b) To store between matches you need to use some robocode APIs for writing and reading files. I don't like using it because it makes a bot rank more favorably in the rumble if fewer clients are running at a time, due to learned information being separate between each client. Note that LittleBlackBook is different because it only reads this way, because it's whole strategy is having a pre-written data file. I would also note that relatively few robots use cross-round data saving.

      3) Well... my first robot was a weird multi-mode thing that took several weeks to make, but I never released it. The first bot I ever released was LunarTwins. For LunarTwins it took 24 hours for "the inspiration to ferment", and the first released version of the code was finished within a 36 hour period of time. Really though, LunarTwins was fast to write because it's a non-learning robot. My second publicly released robot was RougeDC which was my first surfer. I don't remember how long that bot took, but I know I spent most of Summer 2008 working on various versions of it.

        Rednaxela03:06, 15 May 2012
         

        Yeah, DrussGT isn't designed to be easy to read. There are a lot of things that could be done simpler, but it is optimized for fast execution so the code is a lot larger than it could be. Also, I have a very messy coding style =)

          Skilgannon09:10, 15 May 2012
           

          To be fair I doubt any of the top 10 to 20 are easy to read. Having thrown out easy to read for performance. Not sure about Diamond or Dookious, I think Voidious might have made a fair attempt at both.

            Chase-san08:57, 14 September 2012
             

            This came up in another thread recently, but I'd say good/readable code vs good performance is a false dichotomy. I think it's more good code vs "I'm addicted to Robocode and just want to cram in this latest feature right now instead of taking a few minutes to refactor anything, and I'm the only one working with this code anyway so who cares." =) Most of the CPU time in top bots is in the trig for precise prediction and the targeting algorithm. Whether you have good or messy code in the rest of your bot doesn't have much relative impact on performance.

            Dooki's code is pretty good, but I haven't looked at it in a while. I'm quite happy with the state of Diamond's code after the latest huge refactor. Chalk's code is pretty clean, and there are some open source newcomers in the top 25 that I've never really looked at.

              Voidious16:49, 14 September 2012