pychess-variants icon indicating copy to clipboard operation
pychess-variants copied to clipboard

Implement Asian Xiangqi Notation (AXN)

Open ugoproto opened this issue 4 years ago • 2 comments

The AXN is different from the PGN. It's a relative notation. An opening example:

Red Black C2=5 H8+7 red Cannon moves from file 2 to file 5, black Horse in file 8 advances and switches to file 7 H2+3 R9=8 red Horse in f2 advances and switches to f3, black chaRiot moves sideway from f9 to f8 R1=2 H2+3 red chaRiot in f1 moves sideway to f2, black Horse in f2 moves up and switches to f3

Is it possible to implement that notation in PyChess for Xiangqi and games related to Xiangqi?

A first step would be to adjust the boards: a Xiangqi board has a series of files, from 1 to 9, on the top (black players) and from 9 to 1 at the botton (red player); clockwise, it goes from 1 to 9 (top), and 1 to 9 again (bottom). That could be added without removing the algebraic notation.

A second step would be to record moves according to the AXN. I understand StockFish is based on PGN, but AXN would be added (not a replacement for PGN).

Here is an example from a Chinese software: http://xiangqibowl.org/?p=1568

ugoproto avatar Jan 14 '21 23:01 ugoproto

We plan to change to WXF notation as default, see https://github.com/gbtami/pychess-variants/issues/332

gbtami avatar Jan 15 '21 10:01 gbtami

WXF File format https://www.wxf-xiangqi.org/images/computer-xiangqi/chinese-chess-file-format.pdf

gbtami avatar Aug 26 '22 17:08 gbtami

Fixed via https://github.com/gbtami/pychess-variants/commit/a2ef7cf45580c3c7665b0ef4789178d2875017a6

gbtami avatar Sep 10 '23 09:09 gbtami