Previous Next |
The latest stable WinBoard executable can be downloaded from the WinBoard forum,Source code is available from the GNU repositories. A description of the latest new features can be found at the GNU Savannah website. There also is a special installer package available fordownload, which has WinBoard preconfigured to support Xiangqi as main variant. Did you know WinBoard is available in Chinese (simplified or traditional) and Vietnamese? (Not the docs, though.) Don't forget to tick your favorite language when installing! |
The popular Winboard GUI is now able to handle many Chess variants. This development started (as open-source software under the GPL) as the WinBoard 4.3 series, a fork of the official GNU project. But this fork has now been merged fully into the main line since version 4.4.0. From the beginning theis 4.3 series has offered some minimal supported XiangQi (supplying bitmaps for the extra pieces Xiangqi requires over international Chess, as well as knowing their moves, and supporting the required 9x10 board size). The current version 4.5.x is fully aware of all Xiangqi rules, and implements detection of perpetual check as well as perpetual chasing according to Asia rule.
WinBoard was originally designed as an interface for international Chess. The traditional oriental representation of Xiangqi looks quite different: It is played with chips inscribed with the Chinese character for the piece type, rather than with three-dimensional statue-like representations, and the pieces are placed on the intersection of grid lines rather than in the center of squares. This is reflected in the way two-dimensional representations of the game, such as in diagrams or computer interfaces, look. The WinBoard display options are flexible enough to support both representations, though: WinBoard 4.3 has inherited options from its predecessor, Winboard_x, to render pieces as arbitray symbols (which have to be provided as true-type font), and it allows the board image to be derived from an arbitrary bitmap.
Fonts for representing Xiangqi pieces in traditional representation are freely available (e.g. the XIANGQI font), and a Xiangqi grid of the desired size is easily drawn on any background texture. All one has to do is then ask WinBoard to cut both white and black squares out of this same bitmap, and set the width of the lines that enhance the borders between white and black squares to 0 (making them disappear) with the /overrideLineGap option. The bitmap for the wooden Xiangqi board shown below, optmized for '-boardSize middling', is included in the download for the UCCI2WB abd QH2WB adapters.
The built-in bitmaps of WinBoard support the westernized representation of Xiangqi: it uses the same piece symbols as customary in international Chess for Pawns, Rooks and Knights, and newly supplied symbols for Cannons, Guards, and Elephants (the latter two also used in WinBoard's representation of Shatranj). The pieces are placed inside board squares, and in stead of using light and dark squares for checkering the board, the colors are now used to indicate the board zones unique to Xiangqi, flipping the color at the river and palace boundaries). For people used to international Chess, this representation is much easier to deal with.
Westernized representation using built-in bitmaps |
Traditional Oriental representation, using the XIANGI font |
WinBoard uses standard WinBoard protocol to communicate with the engines also for Xiangqi. The only thing peculiar compared to normal Chess is that the board-rank numbering starts at 0, rather than 1 (so that single-digit numbering using 0-9 is possible). Piece indicators are only used in the setboard command, (as Xiangqi has no promotions), which transfers a FEN to the engine, and uses H=Horse, E=Elephant, A=Guard (Advisor), C=Cannon, K=King, R=Rook, P=Pawn.
The big advantage of WinBoard protocol is its simplicity, to play in engine vs. engine matches, one basically only needs to implement the 'new' command (to set up the board for a new game), the 'go' command (do a move and wait for the opponent's reply), and recognition of a move in simple coordinate notation (e.g. c3c4, perform the move, and produce a reply). Although recognizing the 'level' command if you want to not always play at the same time control is highly recommended, and recognizing the 'time' command is usually easier (and certainly more reliable) than keeping track of the time left on your clock yourself.
As output, the engine only needs to print 'feature variants="xiangqi" done=1' when it boots up, and after that only its moves, as 'move b0c2', for example.
For those that want more functionality, implementing the 'force' command (to suppress the automtic production of reply moves) and 'setboard' (for accepting an arbitrary position as FEN) would be good next candidates.
Although standardization of engine-communication protocols in Xiangqi is not nearly as common as in international Chess, there are a few protocols beside WB protocol that enjoy some popularity (and thus are a good source of engines). These are Qianhong protocol and UCCI. Engines in QH protocol are called 'plugins', but just like WB and UCCI engines, they are fully independent programs communication through standard input and outpt with the GUI. Adapters are available to run Qianhong plugins and UCCI or UCI engines under WinBoard: QH2WB.exe, UCCI2WB.exe and UCI2WB.
Qianhong protocol is rather rudimentary, though: there is no way to set the engine for using a specified time per move (average or otherwise), but in stead you can set a 'level', indicated by a number, which means something else for every plugin. So to play QH plugins through QH2WB against other engines, it is better to not enforce any time control on the QH plugins (/autoCallFlag=false), and just let them play at their 'level' set by QH2WB, however much time that takes.
UCCI is a fully functional potocol similar in spirit (but different in details) to UCI for international Chess, although no description of it is available in any Western langage. UCCI engine should play through the UCCI2WB adapter under WinBoard just as if they are native WB engines. Note that many UCCI engines are buggy, though, and are hard-wired for using one specific time control, lie about the units they require for time reporting, and don't react to setting options they say they support. So it might require some experimenting with the UCCI2WB option settings to get such none-compliant UCCI engines running.
UCI is also used by some Xiangqi engines, mainly commercial ones such as Cyclone or ggChess (Gaga). The detailed command use differs a bit from the UCI protocol used in Chess, and is known as the Cyclone dialect. UCI engines can be run under WinBoard with the aid of the UCI2WB adapter, developed from scratch by myself.
Previous Next