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."

10 of 129 comments (clear)

  1. Robocode's Rival by FortKnox · · Score: 4, Informative

    Robocode is great. Its a neat exercise to get people intersted in OOP and Java.

    Being a Java programmer, I've also looked at C# and seen what MS did to improve the language (lets face it, C# took the good things of Java, and fixed the bad things in Java).

    The C# version of robocode?
    Terrarium, and damn is it fun (I just wish you could change the stats of your offspring to 'adapt' instead of/in addition to just passing off AI)!

    --
    Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
    1. 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.

  2. Similar skillsets by Tablizer · · Score: 3, Funny

    The Robocode Rumble is over and the winners have been declared. Who are they and what are the secrets of their success?

    When the slashdotting slows, I expect something like:

    Champ: "Well, I write a lot of viruses. The skillsets are very similar actually. You set it loose and it needs self-contained smarts to destroy anything and everything without getting caught or stopped."

  3. something similar - MelBotWars by theoramus · · Score: 4, Informative

    There's a similar AI robotic combat program Tech tv did a story on called MelBotWars.
    It's basically a plugin for maya which uses the MEL(Maya Embedded Language) programming language for coding your bot's AI, and uses the rigidBody dynamics in Maya for the physics.
    Also, take note that you only need the Maya personal learning edition to use it, which is free.

  4. 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 Pentagram · · Score: 3, Informative

      I assume the orginal poster meant to evolve programs before the contest. This is difficult though; what measure are you going to use to select the best robots? The sample ones? Your other generated robots? I don't think a genetic approach like this would work very well. I imagine there must be quite a bit of psychology in programming these robots - a robot that is devastating against one robot is likely to be very susceptible against the tactics of another. How do you avoid the rock-paper-scissors vulnerability?

      And evolving the bytecode would be hard. Much easier to use a higher level evolving system. You could constrain the programs you generate to a certain grammar at least to eliminate your problem of evolving syntactically-incorrect programs.

      There have been successful GP systems evolving programs at the machine code level, but none that I'm aware of based on Java bytecode.

      An idea that occurs to me: maybe you could use a simple GA system with a small number of parameters (gun fire rate, shot power, attraction to certain corners etc.) and try and measure your opponents' values for these (maybe hard, I forget how much information you have access to in the game) and try and combine the parameters of the best robots in your tournament. This might take a lot of rounds though before you found the best combination. Or if you were allowed to enter several robots and have them swap genetic material at the end of a round.

      I've played with the system, and it's a lot of fun. Especially if you can get a few friends to enter robots.

    3. Re: genetically generated code? by Slak · · Score: 3, Informative

      This is possible. Robocode does *not* need to run with graphics and in fact has a whole API to control battles. I've done some of it with BeanShell. And there is RoboLeague software which does the same thing. Combined with the ability to write to the filesystem, and you can store result values. I believe the JollyNinja bot determined sundry parameters this way, though most of the algorithms were designed and implemented by the biological agent known as Simon Parker.

      Regards,
      Slak

    4. Re:genetically generated code? by Hast · · Score: 4, Informative

      You wouldn't get results in this millenium if you did that. First of you want to make sure that you only generate valid code, and from what I've heard bytecode is a bit of a bitch to do by hand so generating java files which you compile is probably a better idea. (Or just use parameters which you tweak, that is the usual way of doing genetic programming.)

      You need to feed the generator with a lot of domain info too, otherwise it will just produce garbage. (Even if it is compilable garbage.)

      If you are interested in this stuff check genetic-programming.org.

      I know that some guy used genetic programming to generate bots for Quake1. They were really stupid though. (He had a sort of blog where he told what had happened lately.) He got bots which would kill you right away if you circle strafed to the left. If you circle strafed to the right they would be completely lost. It's fun but not very usable.

  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?