Frequently Asked Questions

Frequently is a bit misleading, since most of these have only been asked once. Some of them are questions that I predict will be asked.

  1. Q: How can I test my AI?

    A: The manager program doesn't just play the games and print results. It includes features that let you play against your own AI, or watch it play against others, log games to files and replay them. The best way to test your AI is to play against it. Another good way to test your AI is to have it play against one of the sample AIs.

  2. Q: Where can I get the sample AI programs?

    A: Download the newest versions from the git repository. The sample AI programs should be located in the subdirectory "agents", with one directory for each agent, containing the full source.

  3. Q: Where is the manager program?

    A: The manager program is available in the git repository. It is located in the subdirectory "judge/manager". The executable name is "stratego" (not "manager").

  4. Q: How do I compile the manager program / The manager program will not compile, what do I do?

    A: The manager program is compiled by running "make" in the directory "judge/manager".

    If the manager program fails to compile, it is probably because you do not have the SDL and OpenGL libraries, and are compiling with graphics enabled. You can either obtain SDL and OpenGL developement libraries, or disable graphics and compile the program without them.

    These processes are described in the manual page of the manager program. The manual page can also be found as "web/doc/manager_manual.txt" or "judge/manager/manual.txt" (the latter is a symlink).

  5. Q: What the hell is git, and how do I use it?

    A: git is version control software. Every time any of the programs (including samples) or documentation files for the competition are altered, the changes will be "committed" to git. git allows programmers to revert any changes which break things horribly and go back to their last working version, among other things.

    As a contestant, all you really need to do is obtain the manager program and sample AI programs from the git repository. This page should give you a list of all the changes to the competition. Next to the most recent, click on the "snapshot" link to download an archive of the most recent version of every file.

    Of course, if the competition is updated, you will then have an out of date version. It is far better to "clone" the git repository, and periodically run "git pull" to download any changes. Since the purpose of this page is not to be a reference manual for git, learning how to do this is left as an excercise for the reader.

  6. Q: Do I have to keep checking the git repository for updates?

    A: No, the mailing list will be emailed every time there is a major change.

  7. Q: I don't know anything about AI programs, where should I start?

    A: The sample AI programs provide a fairly basic strategy; perhaps start by copying a sample AI program and altering it slightly to see if you can improve it.

    Generally AI programs for board games play by always choosing an optimal move. The sample AI programs adopt this approach by allocating scores to various moves, with the score indicating how "good" the move is. They then sort the moves by score, and choose the move with the highest score.

    Of course, then the problem becomes "What scoring algorithm should I use?", which you will have to find out for yourself.

    Chess AIs usually look at many future possible board states as a result of each move. In stratego, this approach is less likely to be effective since the strength/abilities of opponent pieces is not known, and must be determined. There is also a time limit to responses by AI programs.

  8. Q: What is in "judge/simulator"?

    A: "judge/simulator/simulate.py" will be used to run the competition. You can use it yourself if you want to run a mock competition between various sample AIs and your own AI.

    The script generates html files containing the results, in the directory "web/results". It also stores log files of every game played in "web/log", which you can replay at your leisure using the manager program.

  9. Q: The language I want to write in does not have any sample AIs, or does not have as advanced sample AIs as other langauges.

    A: Try and rewrite a sample from another AI in your chosen language, or, if you really don't know any other langauges, email matches@ (and be very nice) and ask for him to write a sample in your chosen language.

  10. Q: I don't know how to program, but am interested in the competition, what should I do?

    A: You will have to learn how to program; the best way to do this is by a combination of the internet and trial and error. Look at the sample AI programs for a reference.

  11. Q: Is windows supported?

    A: One day, when I am feeling particularly cheerful and need depressing, I will attempt to get things to work on windows.

    (tl;dr NO)

General tips and Advice

  1. Print your debug information to stderr to allow your AI to be debugged whilst playing a game

Return to the main page.