Arimaa Forum (http://arimaa.com/arimaa/forum/cgi/YaBB.cgi)
Arimaa >> Bot Development >> Program for offline bot games
(Message started by: omar on May 5th, 2005, 7:17pm)

Title: Program for offline bot games
Post by omar on May 5th, 2005, 7:17pm
I've added a program on the Arimaa download page which allows running games between bots offline. The package also contains the sample bot (contributed by Don Dailey) and a modified version of the sample bot to play completely randomly. I've only tested it on a Linux system, but it might work on other systems too.

This might be of use to developers.

Eventually we will need this to develop a rating scale anchored on the random bot.

http://arimaa.com/arimaa/download/

Look for 'matchOffline'.


Title: Re: Program for offline bot games
Post by jdb on May 5th, 2005, 7:33pm
I downloaded the file and tried to unpack it, and got some error. (Likely due to some mistake of my own) Could you please post a zip file version?

I have half a dozen or so random bots, that play at different levels of skill. I would be more than happy to set them up so they would work for your offline player, so people could experiment with them.


Title: Re: Program for offline bot games
Post by omar on May 6th, 2005, 6:06pm
I've posted a ZIP version, Jeff. Let me know if you have any problems with it. I've never tested it on Windows; so there might be some.

We will need many bots that fit in between the pure random bot and the P1 type bots I recently added. So if you can make your better-than-random bots available that would be great.

Eventually we will need to run lots of games between them to measure the winning probabilities between each pair.

Title: Re: Program for offline bot games
Post by jdb on May 6th, 2005, 8:08pm
The zip file worked under Windows. Thanks. I'll take a closer look at the contents in the next couple weeks.

Title: Re: Program for offline bot games
Post by envertigo on Jun 24th, 2005, 4:24pm
What a grand idea!  The bots work in linux, but not in Windows (the perl bot does).  Even though a serious bot developer would make their bot compile where he/she wants to, some pointers to get the current samples to compile in Windows or Cygwin would be great for some of us who are just tinkering with the idea at this point.
Thanks!

Title: Re: Program for offline bot games
Post by PMertens on Jun 24th, 2005, 5:39pm
I develope in windows and my code is based on the sample bot ... I needed only minor adjustments to get it running.

If anyone is interested in the code I might share it :-)

Title: Re: Program for offline bot games
Post by BlackKnight on Jun 24th, 2005, 6:01pm
Same for me!
And please use Dev-C++ (Bloodshed Software) for example! ;)

Some adjustments I made to compile it under Windows are:
- you don't need to include <sys/resource.h>
- but include <sys/timeb.h>
- replace the original function static u64 wall_time() by
static u64 wall_time(){
 struct timeb tb;

 u64 result;
 ftime(&tb);
 result = 1000 * (u64) tb.time;
 result += ((u64) tb.millitm)/1000;

 return(result);
}
Works fine for me, I hope it's correct ...
- forget about the function static u64 process_time()
- If the compiler complains about void strlwr(char *s),
 then just take it out (see string.h).
- srandom should be replaced by srand
- random by rand

I think that's it.

Title: Re: Program for offline bot games
Post by PMertens on Jun 24th, 2005, 6:19pm
sounds like the changes I made  8)

(but using Visual Studio ...)

Oh and then I deleted that one unused function from the sample :-)

Title: Re: Program for offline bot games
Post by envertigo on Jun 25th, 2005, 8:51pm
worked like a charm!  Thanks!



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