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!
I'm sorry, but some things seem to be VERY similar to Robot Battle, a pretty old game with the same concept: www.robotbattle.com
Not trying to troll.. just wanted to point out.
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.
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.
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
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.