Robocode Rumble - Java-Battle-Bot League
jsse writes: "Robocode is a game that teaches you Java while you build killer Java-Battle-Bots that fight each other to the death in an arena. The newest Robocode league in town, Robocode Rumble has just been launched. It's a joint effort by alphaWorks and developerWorks. If you're just getting started with Robocode, don't miss "Rock 'em, sock 'em Robocode!" An excellent hands-on starter. In addition "Secrets from the Robocode masters" a collection of tips from the experts, presents more advanced techniques and strategies to help destroy all and be the Java-Battle-Bot King. Previous slashdot story on Robocode can be found here."
You don't have to cry when picking up the broken shards of code and putting them into a ragged cardboard box to take home and superglue back together.
Cheaper than real robots too (ignoring the start-up costs, of course).
I remember making a few of these in the past. I made one that was virtually unbeatable. what was the secret? It's motion was almost totally random (forward, backward, cha cha cha, left right left, cha cha cha) until there was only one other tank left... then it started hunting for real. Attrition is a great way to win!
"Your superior intellect is no match for our puny weapons!"
I played with this thing a year or so ago.
Here is what I found out; always inherit from a class slightly higher from the
standard base class.
IIRC, there were standard robot types you could extend. But the real *limitations* were
in the standard type. I remeber inheriting from the parent of the standard class, and
adding capabilities to it.
I eventually got bored with it when I couldn't figure java's type system (I am coming
from C++) I remember trying to "stalk" one other robot, and keeping his coords in static
member list, then tried to predict his next position and fire at him (taking distance into
account.)
but somehow, I could make the static members "persist" as they were supposed, and had them
get corrupted rather easily.
--
I'm still a Java newbie, and I think this is an incredibly clever way to learn the language. After spending a few minutes reading through the documentation, it already looks quite easy to get started. The Robocode API looks very well-designed and should really help out with developing Java skills.
And, being a huge nerd, this incorporates my two favourite things: coding and robots.
Which was invented by A K Dewdney of Sci American fame back in 1984. It used a special assembly code
language called Redcode. Should be easy to find some links to it in Google and theres even a
newsgroup rec.games.corewar (IIRR).
Nothing quite like re-inventing the wheel but pretending its new and flash cos its written in
a flavour of the month language.
We play Real Time Battle at work sometimes.
Its pretty much exactly the same thing, except it used stdin/stdout so you can write your robot in your favorite language - C++, Java, perl, bash, whatever. I think development on RTB is pretty much dead, though. But its still fun.
Another great Java "robot" platform is Intergalactics. Here, you right computer players for a risk-based strategy game. The best thing about this is that humans and robots all compete on the same playing field. And, the game is such that robots and humans compete fairly equally. It's pretty fun, and it's an easy API to learn and use.
Don't forget also about
www.botbattle.com
which uses a Java applet to pit the bots against each other!
Botbattle.com lets you program bots online and watch them fight online.
With around 4000 bot owners since mid Feburary the site is doing well in advancing AI algorithms for bots.
An intersting aspect of Botbattle is that everytime someone visits the page and lets battles finish thier computer is participating in paralell evolution of the fittest bots.
Thousands of battles take place everyday simply from people viewing the site.
See how your AI programming skills match up to the hundreds of bot source codes available at the site.
It is a little of this particular topic, but Ai Research (www.a-i.com) presented a "Learning Machine Challenge" where your program-agents have to compete in a game where the rules are unknown.
All you have to decide If your action or move was good or bad is a score for that move.