Chess Forum
Promoting chess discussion.

Free Avlerchess Glass Chess Set - Find out how you can get a free glass chess set from us.


Main
Date: 09 Aug 2003 11:49:32
From: Noah Roberts
Subject: First bitboard chinese chess engine?
Forgive my intrusion, but since this is (AFAIK) the first time this has
been done I think some of the people in these newsgroups could be
interested. There will be no future posts like this as those that are
interested can watch the site once they know it exists.

I have just placed a pre-alpha version of a bitmap based Chinese Chess
engine on http://sourceforge.net/projects/xiangqi-engine . All other
Chinese Chess engines that I am aware of use char or small int arrays to
represent the board and complex move generation algorithms. This engine
uses the C++ standard library construct "bitmap< >" to represent the
board and generate moves for the alphaBeta search (yes, it currently
uses a simplistic search algorithm). I used techniques modeled after
the Western Chess engines Crafty and GnuChess. There where some minor
difficulties with the Horse and the Elephant but I have come up with a
solution that seems to work, is relatively fast, and does not require an
enourmous amount of additional memory.

This has *greatly* increased the speed at which the search operates. I
feel this experiment has passed with great success and I encourage other
developers to use similar (or better should not be hard) techniques in
their own Chinese Chess engines. The code is fairly readable and simple
enough that it could be used as a base for comming up with nice ideas (I
wouldn't mind hearing them either).

Since this is using a C++ object template instead of integers it is of
course not as fast as Western Chess counterparts that can use word sized
integers (For those that don't know, Chinese Chess has a 9x10 board).
Profiling has revealed that indeed the largest impact on speed is the
bitmap< > construct. This template could probably be replaced by
something faster, but after running the program I am happy enough with
the speed increases to leave optimizations to the library for now.

Bitboards are not only for Western Chess anymore.

NR

PS. If you actually want to use the thing you may want to download the
interface program as well. If you just want to review the code this is
not necissary. The news item on the project page and release notes for
the engine tell it more completely.



 
Date: 12 Aug 2003 21:44:17
From: Pham Hong Nguyen
Subject: Re: First bitboard chinese chess engine?
Hi Noah Roberts,

I am really impressed about your work. I believe that it is the first
bitboard one for Xiangqi (I know some have tried but then all gave up
soon).
I think you have been probably starting a new wave of
designing/creating Chinese chess programs :)

We highly appreciate your contribution.
Keep up your excellent work,
Pham


  
Date: 12 Aug 2003 23:01:06
From: Noah Roberts
Subject: Re: First bitboard chinese chess engine?
Pham Hong Nguyen wrote:
> Hi Noah Roberts,
>
> I am really impressed about your work. I believe that it is the first
> bitboard one for Xiangqi (I know some have tried but then all gave up
> soon).
> I think you have been probably starting a new wave of
> designing/creating Chinese chess programs :)
>
> We highly appreciate your contribution.
> Keep up your excellent work,
> Pham

Thanks a lot. Actually it was your VSCCP that allowed me to get started
on this project. My first proof of concept (proving to myself that I
could do it :P) engine was very similar to vsccp and later I continued
using many of the concepts in that engine in my tsito engine.
Eventually that engine outgrew its architecture and I decided I really
wanted to try bitboards; I was too scared of them before. I have
finally learned enough from the process that I can begin heading off in
my own direction, but had it not been for VSCCP I probably would not
have made it this far.

NR