You are invited to Log in or Register a free Frihost Account!

Robot War AI Contest

In this contest you should implement an AI that control robots to fight other robot teams using Java.

First you will have to download the Robot War program. The zip file contains a directory named RobotWar with some java files inside. Before you can run the program you will have to compile it. If you use the command line you can compile all files with the command javac *.java and run the program with java RobotWar.

When the program starts you will see a small window where you can select the AIs to be used for the two teams. Before you have added your own AI there is only one AI, named StupidRobot, in the list. Press "Run simulation!" to start the match.

A match consists of two teams with ten robots in each team. The Robots can move around, fire bullets, etc. Below each robot you can see the hit points and the reload time. If all robots of a team is destroyed the other team wins. If there is no winner after 6 minutes the match is stopped and a winner is selected as follows in this order
  1. The team with the most robots.
  2. The team with the highest sum of hit points of all robots in the team.
  3. The away team.

To add your own AI you need to create a new class that extends RobotAI and overrides the makeMove method. Read the documentation (javadoc) for more information. You can also take a look at the code for StupidRobot to see how it is done.

You also have to add a map for your AI that will be used when playing at "home". The map should be stored inside the maps directory as a text file with the same name as your AI class, with the .txt file extension. Without this file the program will not list your AI. The file should contain 8 rows with 16 columns. # (hash) is used for black (solid) tiles and . (dot) is used for white (walkable) tiles. The grid in the program is 16x16 tiles so it will use the same map file for both upper and lower half, with the lower half rotated 180 degrees. You are free to design your map in whatever way you want as long there is space for all robots and all robots can reach each other.

When the deadline of the contest has passed a match schedule will be made. Each AI will play all other AIs two times (once at home and once away). Each match will be recorded and uploaded on YouTube so that everyone can watch. The AIs will be ranked by the following parameters in this order:
  1. The number of wins.
  2. Robot difference (Robots killed minus robots lost)
  3. Hit point difference (Hit points destroyed minus hit points lost)

When all matches has been played the three highest ranked AIs will receive prizes.
  • First prize is 100 coins.
  • Second prize is 50 coins.
  • Third prize is 25 coins.

To take part in the contest you should send an email to PeterDenBra{at}gmail{dot}com containing
  • Your Frihost username.
  • A .java file with your AI code.
  • A map file.
You can submit your AI as often as you like but only the latest version of your AI will be used in the tournament.

The preliminary deadline is 10 January 2013. I might give you more time if it's needed. If there are less than 3 contestants the deadline will be extended until there are at least 3 contestants.

Your code must be compatible with Java SE 6. All input and output of your AI must go through the parameters of the makeMove method. It is not allowed to communicate between other AI instances in any other way. You are not allowed to use static variables (except constants) or use any classes/methods related to IO, threads, GUI. All exceptions must be catched. If your makeMove throws an exception the team will lose automatically.

Each instance of your AI class should not consume more than 50 MB and a call to makeMove should not take more than 25 ms on avarage on my 2 GHz computer (AMD Athlon 64 3000+). It is difficult to messure these things exactly so I will have to make a decision from case to case. If I find that you are well above these limits I will ask you to fix it.

You can ask question in this thread but try to not give hints that could help anyone build their AI. Posting code is strictly forbidden. You can always send questions to me by PM.
Have you made this game? How many months you have finished it? I am jus currios.
It's not really a game. It's more like a simulation. It was created to be used in this contest and took just a few days to finish. Do you plan to take part?
Is there friendly fire?
I am very interested to take part in this contest. Is it still open? How many participants so far?
The contest is still open and it will stay open until I have at least 3 participants. No participants so far unfortunately.
That's disappointing. Now I'm not sure whether I should start programming the AI. I think if some more people show eagerness, I am always ready to begin coding. Very Happy
Contests very cool and very specific

I am also very interested to take part in this contest.
Nice game btw. i like classic rpg's.
Hello, I just saw this so I downloaded it and verified I could build a "think alike" clone of StupidRobot and have it work. I wondered what kinds of techniques would be practical in building a smarter robot. My guess is that you can do a lot of feedback loops and capture a pretty good map of the area you have traversed, and still stay within the 25 ms processing limit you specify.

Other similar environments I've seen (a long time ago) imposed a substantial cost, in power used or in time, for getting info and maintaining state information. That seemed appropriate, because cpu processing was a lot more expensive then. I looked for comparable simulators and didn't find much -- mostly "robot wars" with physical robots using AI or systems that modeled detailed laws of motion.

I wondered if this would interest more people if we posted some code for various strategies and built a few "crowd-sourced" robots for it. Of course the choice of top-level logic and setting of priorities would be the key to the most effective robots. I'll bet we could make shared tools and still have individuals cleaning house on the other robots as they came up with a better idea.

I'm not sure how this would fit in with the original idea of a contest, however. Perhaps there could be a pool of coins set aside for innovative ideas, and when a new robot did well the code would be disclosed and participants could vote to give awards. Probably we should let you make the final decisions on awards, but others could make recommendations.
Peterssidan wrote:
The contest is still open and it will stay open until I have at least 3 participants. No participants so far unfortunately.

If there's still no participants could the whole program and contest be converted to javascript to run in a specific web browser? For me the reason why I didn't enter is because java isn't my thing and it seems daunting to prepare a proper development environment for it.

If it used javascript, curious forum users could see your default bots moving around stupidly in their web browser. The users who have a website and know some js would probably already have everything to tinker with and run the code so they could enter.
jmraker wrote:
If there's still no participants could the whole program and contest be converted to javascript to run in a specific web browser? For me the reason why I didn't enter is because java isn't my thing and it seems daunting to prepare a proper development environment for it.

Still no participants and I fear it will remain that way. JavaScript isn't really my thing. Converting it to JavaScript would mean a lot of extra work and I'm not even sure how to draw graphics like that in JavaScript.
Related topics
Most original website contest
contest idea
New contest idea
Frihost banner contest
Funny Contest
What do you think about WAR of the WORLD?
National Poetyry Contest
Who are your favriote Frihosters?
Website Header design contest - [CLOSED-No suitable entries]
home made robots
Website Header design contest
J'ai perdu mon nom de domaine
Is Lua a suitable script for AI?
Reply to topic    Frihost Forum Index -> Miscellaneous -> Contests

© 2005-2011 Frihost, forums powered by phpBB.