Slashdot Mirror


Robocode Rumble: Tips From the Champs

Jason writes "The Robocode Rumble is over and the winners have been declared. Who are they and what are the secrets of their success? Dana Barrow talks shop with some of the mad scientists behind the winning Javabots and with Mat Nelson, who reveals what he has planned for Robocode 2.0. You can get the free download here."

7 of 129 comments (clear)

  1. I tried this... by Bobulusman · · Score: 2, Interesting

    I don't have a lot of java experience, but I tried this to try to get that experience. Unfortunately, no matter what cool stuff I put in my bot, the tutorial bots beat it on a regular basis. :(

    I think one of the problems was that the way I wrote it, it could fire more shots than average. Unfortunately, you lose a bit of energy with every shot, so all my missed shots led to my bot typically just shooting until a single shot by an opponent killed it. D'oh

    --
    Cogito ergo sum in Slashdot.
  2. Re:Robocode's Rival by dmorin · · Score: 3, Interesting

    Say what we want about java's failure to do true "write once, run anywhere", but MS has its own version of that. I tried to run Terrarium on my NT box and couldn't do it because I can't get the most recent DirectX. So there. That never happens with Java. Don't ask why my office machine is NT. I don't want to talk about it.

  3. genetically generated code? by ceswiedler · · Score: 4, Interesting

    Why not do it genetically? I'm not an expert on the subject, but the way I've always thought is that it's clearly possible to "breed" programs to do a particular task, as long as the task is very "ratable", i.e., you have a separate algorithm which will evaluate how well the program did. In this case, the "arena" program which pits the bots against each other serves very well. Generate random Java bytecode, run it as a bot, look at the points scored. Breed well-performing bots with each other by combining bytecode together in various fashions. Repeat several billion times...

    Obviously, the first N iterations wouldn't be syntactically correct bytecode (though I would suggest that you hard-code the 0xCAFEBABE prefix) and would probably throw exceptions almost immediately (resulting in disqualification). Eventually, however, you'd get a program which would at least not produce errors, even if it did nothing productive like moving and shooting.

    What's the best way to combine two bytecode programs to produce offspring which are similar-yet-different, and have the best chance of doing well? You would obviously want a chance of mutation (possibly reducing over time).

    1. Re: genetically generated code? by FortKnox · · Score: 3, Interesting

      I don't think the issue is with 'Java' as much as it is with 'Robocode'. Robocode does its battles graphically. To really get a good genetic AI going, you want it all done in memory so you can whip through a ton ov evolutionary steps ASAP.

      A good friend of mine did a genetic algorithm problem as a senior design project in school. It was REALLY cool (but was not done graphically).

      Perhaps if you modified Robocode itself to have a 'memory' mode, then after a buncha evolutionary steps, bring the latest one in for a graphical battle?

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    2. Re: genetically generated code? by FortKnox · · Score: 2, Interesting

      Geez, it was years ago, but he's an open-source type of guy (actually he introduced me to /. and has a lower UID than me). I'll email him and see if he'll release the whole project out so you can read it.

      I know it was a game where two bots fought one another... it was a linux game (something to do with hacking memory? I never played it, so I can't remember the name). Anyway, IIRC, he pitted two different bots together and fought them. Each bot had 5 chances to win before becoming removed... once removed, it was genetically altered 1 line, then reintroduced.

      He graphed all their behavior (in gnu-plot) and there was VERY noticable steps when one made a genetic breakthrough. He let it run on his machine for months, and I think the end result even beat him using the most obscure technique you could think of (which, IMHO, is the coolest part of genetic AI. It comes up with ways to win that normal people wouldn't even think of).

      Anyway, my name is Josh Marotti, so email me at <firstname>@<lastname>.com, and I'll get back to you on it.

      --
      Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
  4. Re:Java slow by Procyon101 · · Score: 2, Interesting

    Your generalizing too much here. There are many types of AI, and many languages to do them in. Each language is an abstraction of the problem space you are working in, so rather than making a blanket statement about a good language for AI, you should pair up the AI your talking about with a preferred language.

    1) Genetic algorithms are probably in the category you are talkng about. Good ones take massive processor power to come up with. Once they are done though, the end result is generally small and fast. This type of AI is usefull fr finding a near optimal solution in a complex but static problem space, ie What is the best wing design for this airplane. C, C++, Assembly are typically good languages.

    2) Neural networks. These can take up alot of processing power, or not, depending on their complexity. There is a rather large family of these also, existing in both asynchronous and synchronous forms. These are used to pattern match and generalize. Good for things like handwriting recognition. C++, Java are pretty good languages.

    3) Pattern matching knowledge databases. These are good at cross referencing data by finding subtle patterns in it. The construction of the database and pattern finding is intensive, but use typically is not. Lisp, Java, SQL, Perl can be good here.

    4) Expert systems. Used to categorize information for retrieval based on a information given by the user. Not at all processor intensive. Lisp, java good for this.

    5) State machines. This is where our Robocode fits in. Very object like, I can hardly think of a better language than Java for it's simplicity. These are not very processor intensive. C++, or C# might be good candidates.

    6) High level applied systems, lumping in natural language processing, vision recognition, etc.. These are generally heavy duty specialized systems that can be very data and processor intensive. C++ is a good general purpose choice for these, but each needs to be looked at individually.

  5. Re: RealTimeBattle by Antity · · Score: 3, Interesting

    RealTimeBattle is cool. BTW, you can write your Bots in any language since communication is done using stdio.

    I wrote a bot for RealTimeBattle once ("Defensive Attack" - funny that this beast is still available) and found it to be real fun. I was a bit distracted that for the IBM project you could only use Java. With new experiments like this, I like to be able to use the language I'm best in.

    --
    42. Easy. What is 32 + 8 + 2?