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