How to participate in game programming contests

What is a game programming contest? It is a specific programming contest, where you are to implement an AI for some given game. The game itself could be of almost any kind. Rules of every specific game are published on this site and in the testing system when the contest starts.

To take part in the contest you should register on this site (if you don't have login already). When you will have you login, you need to register for the contest you want to participate in. It could be done from competitions page. When the problem statement will be available, you will be able to download it from the testing system (and submit your solutions there). You can find help on using the testing system here.

About game problems archive.

You can use game problems archive at any time. It contains game problems from all previous competitions. All you need for that is to register for contest "Game problems archive" from here and download statements and other stuff (like local game running kits) from archive page.

Local game running kits.

Almost every problem has local game running kit to run games between programs on your PC (it is suitable for testing your strategy before submitting it to the server).

Local game running kit for Windows.

You should have Visual C++ 2008 Redistributable Package installed for the local game running kit to work.

To use the kit you need:

  1. Download the kit.
  2. Extract it somewhere.
  3. Replace player1.exe and player2.exe with executables of programs you want to play.
  4. Run game_run.exe. After it will finish, you will have game.log in the folder - log of the game.
  5. If the kit contains visualizer.exe - you can run it. It will parse game.log and display the game process in human-friendly manner. Visualizer's controls are intuitive (at least I hope so). You will need .NET framework for visualizer to work.

You can tune players' running parameters by editing game_run.cfg. You can change following:

  1. IdlenessLimit - maximal amount of time waiting for output from program (milliseconds)
  2. TimeLimit - CPU time usage limit (milliseconds)
  3. MovesToDoInTL - amount of moves player need to do during one TimeLimit
  4. MemoryLimit - limit for memory usage (bytes)
  5. Player1 - first player executable file name
  6. Player2 - second player executable file name
  7. Checker - move verifying program file name
  8. Player1CommandLine, Player2CommandLine, CheckerCommandLine - command lines for running corresponding programs
  9. GameNumber - number of game you want to run (in some games initial game state depends on this)

If you want to test solutions in Java, you need to compile your program into runnable JAR file, set Player1 in game_run's config and set something like "java -Xmx256M -Xss64M -jar yourfile.jar" as Player1CommandLine in that config. If you are writing in Perl, Python or PHP, set Player1 as name of your script (like "yourscript.pl") and Player1CommandLine like "perl yourscript.pl". Make sure that paths to script interpreters are in your PATH environment variable.

When your program runs, it will receive an argument in command line. This argument will be 1 if it plays as the first player and 2 if it plays as the second player. The same argument your program will receive from testing system as well.

Local game running kit for Linux.

Working principle and configuration file is the same as in kit version for Windows, but this tool distributes as source code, so you will need to build it. Just download the archive and type "make". If you encounter any errors, leave a comment to this page, we will investigate that.

After game_run tool builds, you can use it the same way as for Windows.

Frequently appearing troubles.

During the contest (and in game problems archive too) you can see your solution's testing log (in the testing system on "Status" page). It contains list of games played by your program and checker's (or testing system's) comment about game result.

  1. There's "Compilation error" in all games. Solution loses all games.
    Make sure, that your solution really compiles by the compiler you have selected while submitting.
  2. There is "Idleness limit exceeded" in testing log.
    Most frequest reason of such comment is that you forgot to output empty line after outputting your move to standart output. Your output after every move should finish with two newline characters.
    Also that comment could appear when you forgot to flush output buffer in your program.
    Also that trouble appears when you output many moves at once. Please output only one move at a time.
  3. There is "Player #N terminated" in testing log.
    This problem appears when your program terminates after outputting a move. Please note, that your program will be started only once and will receive current game state via stdin before every move. You can use it as advantage, for precomputing something maybe.

 Комплект для запуска локальных партий (windows) (*.zip, 37 Kb)

 Комплект для запуска локальных партий (linux, src) (*.zip, 12 Kb)

Leave a comment





Printable version