Recommend
2 
 Thumb up
 Hide
12 Posts

TZAAR» Forums » News

Subject: New version of computer AI implementation rss

Your Tags: Add tags
Popular Tags: [View All]
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
Hello,

I've made a new version 0.9 of my TZAAR computer AI player available on my web page:

http://www.dcc.fc.up.pt/~pbv/stuff/hstzaar

This page includes links for the source code and a Windows 32-bit binary installer.

The new version fixes some AI bugs and plays a lot better. There is also the option to play white or black.
The windows version also redraws much faster (that was a library bug) has a more "native" look-and-feel to the menus, etc.

The new version adopts an human-readable XML format for saved games; this is unfortunately not backwards-compatible with the previous version. I will strive to ensure forward compatibility from now on.

As usual, I'm interested in comments and general feedback.

Pedro
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Rex Moore
United States
Woodbridge
Virginia
flag msg tools
mbmbmbmbmb
I can't install the GHC compiler, because when I try it says: "Please install Xcode developer tools first." Yet, I just downloaded and installed Xcode... and even restarted the Mac.

Have you heard about this problem?

Thanks,

Rex
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
I am not sure if you tried this, but I would suggest you follow the instructions for installing the "Haskell platform" (the compiler plus a set of blessed tools and libraries):

http://hackage.haskell.org/platform/mac.html

Please note that you will also need the GTK library and associated Haskell bindings; this is unfortunately not included in the above but can be obtained from:

http://projects.haskell.org/gtk2hs/download/

I use Ubuntu GNU/Linux myself but a friend of mine that uses MacOS was able to get it all working sometime ago.

Bear in mind that if you're only interested in playing but not in actual programming it would much simpler just to run the Windows binary under a virtual machine or even the Wine emulator.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Rex Moore
United States
Woodbridge
Virginia
flag msg tools
mbmbmbmbmb
pbvas wrote:
Please note that you will also need the GTK library and associated Haskell bindings; this is unfortunately not included in the above but can be obtained from:

http://projects.haskell.org/gtk2hs/download/


Ah, that must be the problem.

I only wanted to play against it, but I don't happen to have a Windows machine in the house. Ah well, I guess I'll stick with boardspace.net.

Thanks....
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
orangeblood wrote:
[q="pbvas"]
I only wanted to play against it, but I don't happen to have a Windows machine in the house. Ah well, I guess I'll stick with boardspace.net.


Another option is to use Wine, a compatibility layer that allows running some Win32 apps on Unix-like systems including MacOS. It runs the Windows version of HsTZAAR under Linux with no problems. Plus, it's free software.

The official page is http://www.winehq.org/; for information on installing on the Mac check http://wiki.winehq.org/MacOSX/Installing.

Pedro
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Johannes S
Germany
krefeld
Deutschland
flag msg tools
I installed the current version with the Windows-Installer using Wine and Ubuntu.

When starting the program, I got the following message:
hstzaar.exe: unable to open glade file "C:\\Programme\\HsTZAAR\\hstzaar-0.9\\hstzaar.glade"

So I added the following link in drive_c/Programme/HsTZAAR:
ln -s data/ hstzaar-0.9

After that HsTzaar started smoothly. Thank you for this fine program.
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
JohannesS wrote:
I installed the current version with the Windows-Installer using Wine and Ubuntu.

When starting the program, I got the following message:
hstzaar.exe: unable to open glade file "C:\\Programme\\HsTZAAR\\hstzaar-0.9\\hstzaar.glade"

So I added the following link in drive_c/Programme/HsTZAAR:
ln -s data/ hstzaar-0.9

After that HsTzaar started smoothly. Thank you for this fine program.


Hello Johannes,

I didn't experience that glitch when installing using Wine. My guess is that is is caused by some localization issues (i.e. "Programme" instead of "Program Files").

In any case I'm glad that you managed to get it to run.

Best regards,
Pedro
1 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Alan Kwan
Hong Kong
Hong Kong
Unspecified
flag msg tools
mbmbmbmbmb
Nice work.

I could imagine that it is not easy to write an evaluation function for Tzaar. Did you just use simple "material" evaluation and rely on the tree search to do the rest?
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
Alan Kwan wrote:
Nice work.

I could imagine that it is not easy to write an evaluation function for Tzaar. Did you just use simple "material" evaluation and rely on the tree search to do the rest?


Alan, I was very much influenced by your articles on strategy for Tzaar (particularly the concept of the "zone of control" of each player) while developing the AI for my implementation!

The current evaluation function is a sum both material and positional information. The material score sums stacks heights for each piece kind weighted by relevance (i.e. the kinds with fewer stacks are worth more). The positional score sums stacks heights in each player's zone of control i.e. pieces that can be captured in two moves (one turn).

I also tried with simpler evaluation functions but due to the large branching factor/depth of the game tree this was either prohibitely slow or played poorly.

Pedro
2 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pavel Veselý
Czech Republic
flag msg tools
Hello,

your Tzaar computer AI is quite impressive.

I would like to test your program against mine. Is it somehow possible that hsTzaar loads a position (from standard input, file ...), computes best move and returns the best move (or saves position after executing that move)?

For information about my AI, see http://boardgamegeek.com/thread/796393/new-tzaar-robots-on-b... You can play against it on http://www.boiteajeux.net

Thanks for the answer,
Pavel
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pedro Vasconcelos
Portugal
Porto
flag msg tools
mbmbmbmbmb
PavelVesely wrote:
Hello,

your Tzaar computer AI is quite impressive.

I would like to test your program against mine. Is it somehow possible that hsTzaar loads a position (from standard input, file ...), computes best move and returns the best move (or saves position after executing that move)?


Glad you liked my program. I have to admit tuning the AI was challenging and earlier versions played both slower and a lot worse.

There is already the possibility for saving and loading games in an XML format; it should be easy to add a command line option to read a game file and output the best move.

Unfortunately I am currently busy with academic duties and won't be able to assist you there, but you can download the source code and attempt it yourself (or get someone who knows Haskell to do it).

Best regards, Pedro
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Pavel Veselý
Czech Republic
flag msg tools
Thanks, Petro. I can't program in Haskell, but some of my friends are good at it.

I will send you the results of matches between our programs ;-)
 
 Thumb up
 tip
 Hide
  • [+] Dice rolls
Front Page | Welcome | Contact | Privacy Policy | Terms of Service | Advertise | Support BGG | Feeds RSS
Geekdo, BoardGameGeek, the Geekdo logo, and the BoardGameGeek logo are trademarks of BoardGameGeek, LLC.