Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> How to start: Very basic questions
(Message started by: Stanley on Nov 12th, 2006, 4:19pm)

Title: How to start: Very basic questions
Post by Stanley on Nov 12th, 2006, 4:19pm
Hi.

I may try to write an Arimaa engine. The first thing I did is download Ola Hansson's Fairy. I compiled it and it runs.

Question 1. Is this a standad bot? Is that .txt input/output file format the way robots communicate with your system? Is it documented?

Question 2. Is this a Linux challenge? I use Borland's Turbo C++ for Windows. What exactly do I need to provide to participate in a computer challenge?

Question 3. Is there any (Windows) board program that can be used for testing engines?



BTW: I found a bug in fairy light: file search.c, function Show_Search_Info(), lines 35-37 (absolute)
           if (evals==0)
           {
                 sprintf(message,"===%3d/    /  ",depth,(double)sum_eval_depths/evals,max_depth);

produces a division by zero since (evals == 0).

Title: Re: How to start: Very basic questions
Post by jdb on Nov 14th, 2006, 2:15pm

Quote:
Question 1. Is this a standad bot? Is that .txt input/output file format the way robots communicate with your system? Is it documented?


There is a bot interface kit. It can be downloaded from the downloads section at arimaa.com/arimaa. It contains info on how to connect to the server.



Quote:
Question 2. Is this a Linux challenge? I use Borland's Turbo C++ for Windows. What exactly do I need to provide to participate in a computer challenge?


Every year so far has been under Linux. As far as I know, this year is Linux too. But Omar would have the final say on that.


Quote:
Question 3. Is there any (Windows) board program that can be used for testing engines?


There are numerous bots available to play online. I usually test by playing against them.

Good luck!




Title: Re: How to start: Very basic questions
Post by Stanley on Nov 15th, 2006, 11:31am
Thank you.

1. I understand that the format is the format described in:
"Notation for Recording Arimaa Games" and "... Positions"

The position does not contain the whole game. How do you handle position repetition?

(I may have a biased impression because I am such a weak player, but when both sides feel comfortable at defensive positions in the back of the board, since clueless attacks are very penalized, board position repetition may happen sooner or later.)

2. The bot interface kit is a Pearl script. Is the protocol documented? Did someone implement it in C?

Title: Re: How to start: Very basic questions
Post by jdb on Nov 15th, 2006, 2:51pm
1) Part of the bot interface is a gamestate file. In that file is everything the bot needs to know about the current gamestate. It includes time remaining, current position, and all previous moves. Its up to the bot to read the file and figure out if the move will be an illegal repetition or not.

2) The Perl script will run under windows or linux. If you want to run under windows, install the version of perl recommended in the bot interface package. It just runs as a command line option. There is no need to know perl. To get your bot to play on the server a single command like, "perl bot play bot_arimaazilla" is all that is required. Of course there is the minor matter of writing the bot as well.

Title: Re: How to start: Very basic questions
Post by Fritzlein on Nov 15th, 2006, 3:39pm

on 11/15/06 at 11:31:26, Stanley wrote:
(I may have a biased impression because I am such a weak player, but when both sides feel comfortable at defensive positions in the back of the board, since clueless attacks are very penalized, board position repetition may happen sooner or later.)

Yes, if neither player wants to attack, then they can shuffle pieces around forever.  Techinically, the repetition rule will eventually end the game when players run out of new positions, but this will not happen before the sun burns out.  This problem doesn't affect humans very much, but does affect some bots.

An interesting question is what happens if only one player wants to stay in a defensive position and prevent a loss, rather than trying to win.  Current theory suggests that it is impossible to stay safe, because the defensive player's rabbits can eventually be pulled out by the other player.

That leaves one more question: Is it too dangerous to pull out the other player's rabbits, because if you try to do that you will give him time to hurt you in some other way?  The answer right now seems to be that if you want to attack a defensive player, you don't have to open yourself up too much to counter-attack.

In other words, it seems that totally defensive play can be punished, not as quickly as a poor attack can be punished, but just as surely.  We will see if Arimaa theory continues to support this idea in the future.

Title: Re: How to start: Very basic questions
Post by Stanley on Nov 17th, 2006, 4:01pm
Thank you.

2. The Perl script is working fine.

1. The game history:

The game position does not contain the history, but the Perl script  creates a .gameLog file with the history. I understand this is the place to search. Correct me if I'm wrong.

Fritzlein wrote: "..but this will not happen before the sun burns out." Of course, but only if the bot DOES check for repetitions, else it will happen soon.

Title: Re: How to start: Very basic questions
Post by 99of9 on Nov 17th, 2006, 5:11pm

on 11/17/06 at 16:01:51, Stanley wrote:
1. The game history:

The game position does not contain the history, but the Perl script  creates a .gameLog file with the history. I understand this is the place to search. Correct me if I'm wrong.


You're wrong.

The program has 3 input files if I remember right:
pos###
move###
gamestate###

One is the current position, one is the whole move history, the other has assorted information about the game, including details of the opponent, the event, and the time control.  Use all 3 files.

Title: Re: How to start: Very basic questions
Post by jdb on Nov 17th, 2006, 5:27pm

Quote:
Use all 3 files.


Everything is in the gamestate file. The other two files are redundant.




Arimaa Forum » Powered by YaBB 1 Gold - SP 1.3.1!
YaBB © 2000-2003. All Rights Reserved.