How to Develop an Arimaa Bot

An Arimaa playing program is often referred to as an Arimaa bot.

You can develop an Arimaa bot in any language you wish. Programming languages such as C, C++, Java or just about any other language can be used.

There are two steps to developing an Arimaa bot.

  1. Write a program which reads the current game state from a file and prints out the move that it wants to make.
  2. Interface the program written in step 1 with the Arimaa gameroom so that it can play against other programs and humans over the Internet.

Step 1 - write a 'getMove' program
Begin by writting a program which reads a given file with the current board position and move list and prints to standard output the move that it wants to make. The name of the game state file is passed as a command line argument. In order to do this you will need to know:

Here is an example of how your program should work.

> getMove position
Ra2 Rb2 Mc2 Dd2

In this example 'getMove' is the name of your program. The file 'position' contains the current board position as defined on the notation page. Your program prints the move it wants to make using the defined move notation.

Sample getMove programs are available which can serve as a good starting point. Sample bot written in Java. Sample bot written in C.

Also a perl script which generates all the possible moves for a given board position is avalible. This serves as an example move generator and can be used to check against your own move generator.

Step 2 - interface the program to the Arimaa gameroom

Once you have written the 'getMove' program as described above, you can easily have the program play in the Arimaa gameroom. There is an bot interface kit which makes it very easy to do this.

The bot interface kit contains a Perl script called 'bot'. When you run the 'bot' script it reads a 'bot.cfg' configuration file that tells it the path your 'getMove' program and various other parameters. The 'bot' script connects to the Arimaa gameroom and starts a new game or joins a game that you have specified. Whenever it needs to make a move it starts your 'getMove' program with the current game state to get the next move. The move given by your 'getMove' program is posted back to the Arimaa gameroom. The 'bot' script then waits for the opponent to make the move and so on. When the game is over the game is over the 'bot' script automatically stops.

After downloading and unpacking the bot interface kit, besure to read the 'README.1st' file.

To obtain a copy of the bot interface kit, click here.

Additional Resources

If you click on the 'Downloads' link you will find additional resources such as the Arimaa Games Archive and a Windows Arimaa program which may also be of help when developing your bot.

Also if you click on the 'Forum' link you will find a discussion area for bot developers. This is a good place to ask questions and share ideas with other bot developers.

Good luck.

www.arimaa.com