A Chess forum. ChessBanter

Go Back   Home » Chess Newsgroups » rec.games.chess.computer (Computer Chess)
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

First bitboard chinese chess engine?

LinkBack Thread Tools Display Modes
Old August 9th 03, 07:49 PM
Noah Roberts
external usenet poster
Posts: n/a
Default 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.


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.

Old August 13th 03, 07:01 AM
Noah Roberts
external usenet poster
Posts: n/a
Default 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
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,

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.



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

All times are GMT +1. The time now is 12:35 PM.

Powered by vBulletin® Copyright ©2000 - 2018, Jelsoft Enterprises Ltd.
Copyright 2004-2018 ChessBanter.
The comments are property of their posters.