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!
Does anyone know about any other competitions, or similar AI programming games? I did a couple classes in college where you designed real-time and turned based AIs for games, and it was a lot of fun. RTSes interest me the most... I don't suppose there's an open starcraft clone or something with a good AI interface?
"Probably the toughest time in anyone's life is when you have to murder a loved one because they're the devil." -Philips
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."
Table-ized A.I.
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.
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.
So much for big iron, snicker.
The difference between Canada and the USA is that in Canada healthcare is a right and gun ownership is a privilege.
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.
Java
seems
fast
to
me.
Really.
Sincerely, Shellon Turtlebum
Table-ized A.I.
No matter how good you try to code it in Java, a similar c++ version will run SO MUCH faster...
I really hate how everyone keeps saying that Java is slow.
C++ is faster, but not by much. Several years ago, Java was slower than dirt. You had a right to complain, then. Since then, most people won't even try it, believing its still that 'slow old Java'. The speed difference between the newest version of Java and C++ is negligable on modern technology.
And AI doesn't depend on each clock cycle to be effective. Especially when every cycle is even in robocode.
Good quote, too many chars. Seriously, the slashdot 120 char limit sucks!
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).
Your statement that C++ will always run faster than Java clearly is based on hearsay, not experience. Ignorant coding will make any language slow. I've seen unoptimized java code run faster than C++ equivalents. Why? Because the VM can profile the code while running and recompile on the fly, unlike statically compiled C++. A statically compiled program will never know if loops are long or short and cannot unroll them to greatest advantage.
(Reality reasserts itself sooner or later.)
I'm no expert on the subject but last I know there were some GL bindings for Java. It would be cool to have the robots battle in 3D space (with some real physics thrown in). Maybe in Robocode version 20.
Blender And Linux Fan
ah, another one attains enlightenment.
Another Robots Battle prog (http://realtimebattle.sourceforge.net/)
The biggest advantage of this one is that you can program your robot in any langages by interacting with stdin/stdout. Another good thing is realtime. And like it's written in C, it's quite portable
Some robots of Robocode have parameters optimized by genetic evolution.
I hope to see better robots with new technologies like Animat with sensor/actuator, Evolutionnary Neural Network, Multi-Agent (for team battle)
Open Starcraft clone? Well, the closest that I can think of is Free Craft. Right now it is being based on Warcraft, and I don't know about the AI currently, but I'm sure they would be glad to have some more help.
And so we go, on with our lives
We know the truth, but prefer lies
Lies are simple, simple is bliss
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.
This is a topic I've been interested in for a while, but I've yet to see any good information to start me off...
credo quia absurdum
the coolest part of genetic AI. It comes up with ways to win that normal people wouldn't even think of
On that note, I can't help but mention this story.
I used to code robots for RoboWar (for the Mac) in the early 90's. It was great fun. It's so old you need the wayback machine to see a page:
RoboWar
bp
Rumblecode creator Mat Nelson: "Today, Java is fast, though many people still do not realize it. Computer speed has increased at an amazing rate, JVMs are faster than ever, Java has matured, and we even have hardware-accelerated graphics. Java is ready for the client now, and I hope Robocode can help to prove it."
c-hack.com |
Hi
If anyone's interested, here is a description of Fermat's movement algorithm described more clearly along with other silly questions. This is the original set of answers I submitted to them.
And if you're even more interested, visit Robocode Repository for all the test bots and related information you will ever need.
Arun Kishore
[about to sleep...]
blah blah blah, blah blah blah blah.
CORE WARS, devised in the 60's, played in the mid 80's, this was what you did!
Now the sadness: I had both corewars and robo war for my mac plus. Guess which one I wrote bots for? That's right! NEITHER.
Is there anything worse than a lazy geek?!
In the future, I would want to not be isolated from my friends in the Space Station.
(* Better or worse than what? You "lack decent evidence" that you are comparing OOP to anything in particular. *)
Anything. The literature often brags about how OO improves stuff, makes maintenance allegedly easier, etc. You tell me what they are comparing. I did not write all that.
I generally compare it to procedural with liberal usage of a database. Databases and OOP tend to fight over territory. In procedural/relational the "noun model" is mostly in the database or reduced to relational formulas. In OOP the noun model is mostly via code structure. Databases are overall superior IMO than code for managing noun models and noun-related structuring. At least for me. Databases are more powerful than code when things scale or change. In summary:
OOP:
tasks: In code
noun model: Via code structures
P/R:
tasks: In code
noun model: Via relational database and formulas
BTW, I never compared them WRT robot games. However, the literature implies that OOP is for every domain.
Table-ized A.I.
Boson has very pretty looking screenshots but has no AI yet, so you could try to write some for them. If you do, try to make it modular so people can easily write their own AI and get them to compete.
Freecraft are advertising for some much needed artists to help them, but look good otherwise.
--
If you laid all the MicroSoft users in the world end to end around the equator, 2/3 of them would drown.