Chinese Chess

Home * Games * Chinese Chess

Chinese Chess, or Xiangqi 象棋, is a chess variant which is very popular in East Asia, especially in China and Vietnam. The Chinese Chess set includes a board and 32 pieces for two players. The board has ten horizontal lines called ranks and nine vertical lines called files. Pieces are located not in the cells but intersectional points of ranks and files which are 90 in total. In the middle of the board the central seven files are interrupted by a horizontal space called the “River”, which splits the board into two parts. Each side of the board has a “Palace” a 3x3 area in the central base. The two sides are usually distinguished by colors, traditional names are red or black but now they can be called white and black as chess. Sometimes the Xiangqi board could be considered as the presentation of the war between two countries when the standard chess presents for a battle only.

=Pieces= There are 7 types: King, Advisor, Elephant, Rook, Cannon, Horse, and Pawn. Typically those pieces are made from small, simple wood pieces which some symbols (new way) or Chinese characters (traditional way) written on them. As the Chinese characters, pieces on the white side may use different characters than their counterparts on the black side. They are the same pieces, but names on the White side are subtly more noble than those on the Black side.

Cannon is the most interesting piece in Chinese chess.

=Rules=

Basic
Basic rules are similar to chess with some modifications. Pieces can move and capture according to their individual ability and restriction along the lines including the “Riverbanks”. Xiangqi doesn’t have rules such as castles, en-passants, promotions. Instead it has some limitations such as King, Advisors must move inside their own Palaces, Horses and Elephants can be blocked (from moving), two King cannot “face” each other (stands in the same column without any piece between). The object of the game is to checkmate or stalemate (is a win as well) the opponent King aka General.

3-Folk Rules
When a position repeated 3 time (3 folks) the game will be terminated too. However, partly due to the freedom and power of the Rook over other pieces, and the limited freedom of the King, it is forbidden to repeat perpetually a direct thread (i.e. a perpetual check 長將, perpetual thread of capture 長捉, a check and then a threat of mate 一將一殺, or a combination of these). If no side violates the forbidden, game will be ruled as a draw.

Ruling the game when 3 forks happen is the hardest thing for fully understanding, installing for both players and software.

=Notations=
 * FEN: Chinese Chess can use Forsyth-Edwards Notation to save down positions, ignored some fields such as Castling and En passant target square. Here is FEN of the starting position: rheakaehr/9/1c5c1/p1p1p1p1p/9/9/P1P1P1P1P/1C5C1/9/RHEAKAEHR w - - 0 1


 * Traditional Chinese Chess Notation
 * SAN
 * WXF

=Programming= Chinese chess is quite similar to chess in multi-aspects thus its software can be developed and tested in similar ways. It can use almost all chess techniques, from traditional methods using Board Representation, Alpha-Beta search, Evaluation, Opening book... to new ones using NNUE, AlphaZero methods...

However its programming is a bit harder to gain high levels due to some reasons:

a) The board is significantly larger (90 vs 64, 40% larger)

b) Even there’s no diagonal slide moves (such as Bishops), its pieces have more limitations, been blockable, Cannons have a special way to capture... The board size (90) can't fit 64-bit integer either, the number of columns 9 can't help quick devices... All may make move generators be more complex and slower

c) The search trees are usually larger. For example, when comparing Perft results at deep 7, Xiangqi number is 72 times as large

d) Evaluation of positions may require more knowledge, especially endgame positions

e) Rules 3-fork repetitions are hard to implement and maybe so slow


 * Chinese Chess Board Representation
 * Chinese Chess Perft Results

=Sub variants=
 * Banqi
 * Jeiqi

=Engines=
 * Xiangqi Engines

=Computer Olympiads=
 * 1st Computer Olympiad, London 1989
 * 2nd Computer Olympiad, London 1990
 * 3rd Computer Olympiad, Maastricht 1991
 * 4th Computer Olympiad, London 1992
 * 6th Computer Olympiad, Maastricht 2001
 * 7th Computer Olympiad, Maastricht 2002
 * 8th Computer Olympiad, Graz 2003
 * 9th Computer Olympiad, Ramat Gan 2004
 * 10th Computer Olympiad, Taipei 2005
 * 11th Computer Olympiad, Turin 2006
 * 12th Computer Olympiad, Amsterdam 2007
 * 13th Computer Olympiad, Beijing 2008
 * 14th Computer Olympiad, Pamplona 2009
 * 15th Computer Olympiad, Kanazawa 2010
 * 16th Computer Olympiad, Tilburg 2011
 * 17th Computer Olympiad, Yokohama 2013
 * 18th Computer Olympiad, Leiden 2015
 * 19th Computer Olympiad, Leiden 2016
 * 20th Computer Olympiad, Leiden 2017

=Photos= Xiangqi winners in Graz 2003, Pascal Tang, Zhi-Jian Tu and Shun-Chin Hsu Xiangqi winners Taipei 2005 with TD Jaap van den Herik and representative of the sponsor [https://en.wikipedia.org/wiki/Acer_Inc. Acer Inc.], Mingyang Zhao (Gold), Ming-Cheng Cheng (Silver) and Jiao Wang (Bronze) Yokohama 2013, Wen-Jie Tseng, Shi-Jim Yen, Harm Geert Muller and Jaap van den Herik

=Publications=

1981 ...

 * Y.T. Zhang (1981). Application of Artificial Intelligence in Computer Chinese Chess. M.Sc. thesis, Department of Electrical Engineering, National Taiwan University (Chinese)
 * Shun-Chin Hsu, D.H. Huang (1985). Design and Implementation of a Chinese Chess Knowledge Base. Proceedings of NCS, pp. 505-509. (Chinese)
 * Robert Nisonoff, M. Stephanie Ricks (1988). To Catch a King: East Meets West in the Game of Chess. PC Magazine, October 31, 1988, pp. 506 » EGA Chess, Xian
 * Nick Jacobs (1989). Xian, a Chinese Chess Program. Heuristic Programming in AI 1

1990 ...

 * Shun-Chin Hsu (1990). Introduction to Computer Chess and Computer Chinese Chess. Journal of Computer, Vol. 2, No. 2, pp. 1-8. (in Chinese)
 * Kuo-Ming Tsao, Jen-Hsuan Li, Shun-Chin Hsu (1991). Design and Implementation of a Chinese Chess Program. Heuristic Programming in AI 2
 * Shun-Chin Hsu, Kuo-Ming Tsao (1991). Design and Implementation of an Opening Game Knowledge-Base System for Computer Chinese Chess. Bulletin of the College of Engineering, N.T.U., No. 53, pp. 75-86. (in Chinese)
 * Chun Ye (1992). Experiments in Selective Search Extensions. MSc. thesis, Department of Computing Science, University of Alberta, pdf
 * Chun Ye, Tony Marsland (1992). Experiments in Forward Pruning with Limited Extensions. ICCA Journal, Vol. 15, No. 2, pdf
 * Chun Ye, Tony Marsland (1992). Selective Extensions in Game-Tree Search. Heuristic Programming in AI 3, pdf
 * Yi-Fan Ke, Tai-Ming Parng (1993). The Guard Heuristic: Legal Move Ordering with Forward Game-Tree Pruning. ICCA Journal, Vol. 16, No. 2
 * Mei-En Chen, Yo-Ping Huang (1995). Guard heuristic by dynamic fuzzy reasoning model for Chinese chess. Proceedings of ISUMA-NAFIPS '95

2000 ...
2002 2003 2004
 * Jr-Chang Chen, Shun-Chin Hsu (2001). ELP wins Chinese Chess tournament. ICGA Journal, Vol. 24, No. 3 » 6th Computer Olympiad
 * Haw-ren Fang, Tsan-sheng Hsu, Shun-Chin Hsu (2001). Construction of Chinese Chess Endgame Databases by Retrograde Analysis. CG 2000
 * Ren Wu, Don Beal (2002). A memory efficient retrograde algorithm and its application to solve Chinese Chess endgames. More Games of No Chance edited by Richard J. Nowakowski
 * Jr-Chang Chen, Shi-Jim Yen, Shun-Chin Hsu (2002). ELP wins Chinese Chess tournament. ICGA Journal, Vol. 25, No. 3 » 7th Computer Olympiad
 * Haw-ren Fang, Tsan-sheng Hsu, Shun-Chin Hsu (2002). Indefinite Sequence of Moves in Chinese Chess Endgames. CG 2002
 * Jr-Chang Chen, Shi-Jim Yen, Shun-Chin Hsu (2003). ZMBL wins Chinese Chess tournament. ICGA Journal, Vol. 26, No. 4 » 8th Computer Olympiad
 * Haw-ren Fang, Tsan-sheng Hsu, Shun-Chin Hsu (2004). Checking Indefinitely in Chinese-Chess Endgames. ICGA Journal, Vol. 27, No. 1
 * Shi-Jim Yen, Jr-Chang Chen, Tai-Ning Yang, Shun-Chin Hsu (2004). Computer Chinese Chess. ICGA Journal, Vol. 27, No. 1, pdf
 * Haw-ren Fang (2004). Rule-Tolerant Verification Algorithms for Completeness of Chinese-Chess Endgame Databases. CG 2004
 * Kuang-Che Wu, Tsan-Sheng Hsu, Shun-Chin Hsu (2004). Contemplation wins Chinese Chess tournament. ICGA Journal, Vol. 27, No. 3 » 9th Computer Olympiad

2005 ...
2006 2007 2008 2009
 * Haw-ren Fang (2005). The Nature of Retrograde Analysis for Chinese Chess, Part I. ICGA Journal, Vol. 28, No. 2
 * Haw-ren Fang (2005). Nature of Retrograde Analysis for Chinese Chess, Part II. ICGA Journal, Vol. 28, No. 3
 * Jr-Chang Chen, Shi-Jim Yen, Shun-Chin Hsu (2005). XQMaster wins Chinese Chess tournament. ICGA Journal, Vol. 28, No. 3 » 10th Computer Olympiad
 * Kuang-Che Wu, Shun-Chin Hsu, Tsan-sheng Hsu (2006). The Graph-History Interaction Problem in Chinese Chess. Advances in Computer Games 11
 * Xinhe Xu (2006). Principle and Methodology of Computer Games of Chinese Chess. ISDA 2006
 * Bo-Nian Chen, Pangfeng Liu, Shun-Chin Hsu, Tsan-sheng Hsu (2008). Abstracting Knowledge from Annotated Chinese-Chess Game Records. CG 2006
 * Shi-Jim Yen, Shun-Chin Hsu (2006). NEUChess wins Chinese Chess tournament. ICGA Journal, Vol. 29, No. 2 » 11th Computer Olympiad
 * Chun-Bin Hsu (2006). Pattern Recognition in Chinese Chess. Master thesis, National Chiao Tung University, pdf (Chinese)
 * Changming Xu (2007). NEUChess wins Chinese Chess tournament. ICGA Journal, Vol. 30, No. 2 » 12th Computer Olympiad
 * Chin Soon Ong, Hanyang Quek, Kay Chen Tan, Arthur Tay (2007). Discovering Chinese Chess Strategies through Coevolutionary Approaches. IEEE Symposium on Computational Intelligence and Games, pdf
 * Bo-Nian Chen, Pangfeng Liu, Shun-Chin Hsu, Tsan-sheng Hsu (2008). Knowledge Inferencing on Chinese Chess Endgames. CG 2008
 * Jiao Wang, Xinhe Xu (2008). Intella wins Chinese Chess tournament. ICGA Journal, Vol. 31, No. 3 » 13th Computer Olympiad
 * Bo-Nian Chen, Pangfeng Liu, Shun-Chin Hsu, Tsan-sheng Hsu (2009). Conflict Resolution of Chinese Chess Endgame Knowledge Base. Advances in Computer Games 12, pdf
 * Guofeng Tong, Ying Qu, Tong Cheng (2009). Human-computer interactive gaming system - a chinese chess robot. IROS 2009, pp. 984-987 » Robots
 * Jr-Chang Chen, Bo-Nian Chen, Tsan-sheng Hsu (2009). TMSK wins the Chinese-Chess tournament. ICGA Journal, Vol. 32, No. 2 » 14th Computer Olympiad
 * Wei-Lun Kao (2009). The Automatically Tuning System of Evaluation Function for Computer Chinese Chess. Master thesis, National Chiao Tung University, pdf (Chinese)

2010 ...
2011 2013 2014
 * Jiao Wang, Si-Zhong Li, Xin-He Xu (2010). A Minors Hash Table in Chinese-Chess Programs. ICGA Journal, Vol. 33, No. 1
 * Bo-Nian Chen, Bing-Jie Shen, Tsan-sheng Hsu (2010). Chinese Dark Chess. ICGA Journal, Vol. 33, No. 2
 * Bo-Nian Chen, Pangfeng Liu, Shun-Chin Hsu, Tsan-sheng Hsu (2010). Knowledge Abstraction in Chinese Chess Endgame Databases. CG 2010
 * Jr-Hung Guo, Kuo-Lan Su, Sheng-Ven Shiau (2011). Path Searching Algorithms of Multiple Robot System Applying in Chinese Chess Game. Recent Advances in Mobile Robotics, Dr. Andon Topalov (Ed.), ISBN: 978-953-307-909-7, pdf » Robots
 * Wen-Jie Tseng, Jr-Chang Chen, I-Chen Wu, Ching-Hua Kuo, Bo-Han Lin (2013). A Supervised Learning Method for Chinese Chess Programs. JSAI2013, pdf
 * Jr-Chang Chen, Shi-Jim Yen, Tsan-Cheng Su (2013). SHIGA Wins Chinese Chess Tournament. ICGA Journal, Vol. 36, No. 3 » 17th Computer Olympiad
 * Bo-Nian Chen, Hung-Jui Chang, Shun-Chin Hsu, Jr-Chang Chen, Tsan-sheng Hsu (2013). Multilevel Inference in Chinese Chess Endgame Knowledge Bases. ICGA Journal, Vol. 36, No. 4 » Endgame Tablebases
 * Bo-Nian Chen, Hung-Jui Chang, Shun-Chin Hsu, Jr-Chang Chen, Tsan-sheng Hsu (2014). Advanced Meta-knowledge for Chinese Chess Endgame Knowledge Bases. ICGA Journal, Vol 37, No. 1

2015 ...

 * Qiang Gao, Xinhe Xu (2015). Research on the Computational Complexity of n x n Chinese Chess. ICGA Journal, Vol. 38, No. 1
 * Pascal Tang (2015). SHIGA wins Chinese Chess Tournament. ICGA Journal, Vol. 38, No. 4 » 18th Computer Olympiad
 * Nguyen Hong Pham (2018). A completed implementation for Xiangqi rules. ICGA Journal, Vol. 40, No. 3
 * Ting-Yu Lin, Jr-Chang Chen, Tsan-sheng Hsu (2018). The number of effective moves for Chinese chess. CG 2018, ICGA Journal, Vol. 40, No. 4
 * Wen-Jie Tseng, Jr-Chang Chen, I-Chen Wu, Tinghan Wei (2018). Comparison Training for Computer Chinese Chess. arXiv:1801.07411

=Forum Posts=

1994

 * rec.games.chinese-chess FAQ by Stephen Leary, rec.games.chinese-chess, January 04, 1994, also from chessvariants
 * Xiang Qi Is Not The Elephant Game by Stephen Leary, rec.games.chinese-chess, November 18, 1994
 * Machine vs. IGM in Chinese Chess by Ren Wu, CCC, July 13, 1999

2000 ...

 * Tony Marsland and Chinese Chess in Maastricht (slightly O.T.) by Omid David, CCC, July 30, 2002 » 7th Computer Olympiad, Maastricht 2002
 * Re: Tony Marsland and Chinese Chess in Maastricht (slightly O.T.) by Pham Hong Nguyen, CCC, July 30, 2002


 * Bitboard techniques in Xiangqi by Harm Geert Muller, CCC, February 12, 2009 » Bitboards
 * Computer Olympiad (XQ) by Harm Geert Muller, CCC, May 14, 2009 » 14th Computer Olympiad, Pamplona 2009
 * Kindergarten bitboards and Xiangqi move genaration? by Han Chengye, CCC, December 30, 2009 » Kindergarten Bitboards

2010 ...

 * Xiangqi evaluation function by Gregory Strong, CCC, July 09, 2010 » Evaluation
 * Xiangqi chase algorithm by Evert Glebbeek, CCC, November 16, 2011 » Sjaak
 * Interesting (Chinese) Chess variant by Harm Geert Muller, CCC, January 23, 2014
 * UCCI2WB by Harm Geert Muller, CCC, October 27, 2014 » Protocols
 * UCI protocol for chess variants by Evert Glebbeek, CCC, October 28, 2014 » UCI
 * Xiangqi chase - again by Evert Glebbeek, CCC, November 06, 2014 » Sjaak

2015 ...

 * Evaluation in Xiangqi by Harm Geert Muller, CCC, July 06, 2015
 * 11-men tablebases (XQ) by Harm Geert Muller, CCC, May 23, 2016 » Endgame Tablebases
 * Xiangqi piece value model by Evert Glebbeek, CCC, May 29, 2016 » Point Value
 * Perft for Xiangqi & Shogi by Patrice Duhamel, CCC, June 12, 2016 » Shogi, Perft
 * Cumulative building of a shared search tree by Bojun Guo, CCC, December 28, 2016 » Opening Book, Persistent Hash Table
 * Probe EGT in quiescence? by Nguyen Pham, CCC, May 20, 2017 » Endgame Tablebases, Quiescence Search
 * A new design for Xianqgi (Chinese chess) Endgame Tablebase by Nguyen Pham, CCC, January 16, 2018 » Endgame Tablebases
 * Chinese Chess by Harm Geert Muller, CCC, May 22, 2018
 * Xiangqi evaluation by Harm Geert Muller, CCC, July 01, 2018
 * A proposal for Jeiqi notation by Nguyen Pham, CCC, December 26, 2018

2020 ...

 * Xiangqi chess engine in javascript - YouTube tutorial series by Maksim Korzh, CCC, January 24, 2021
 * Did anyone write a xiangqi chess engine? by Maksim Korzh, CCC, January 27, 2021
 * Chinese chess Xiangqi perft results by Maksim Korzh, CCC, January 27, 2021 » Chinese Chess Perft Results
 * Wukong Xiangqi - Chinese chess engine by Maksim Korzh, CCC, January 31, 2021

=External Links=

Chinese Chess

 * World Xiangqi Federation
 * Xiangqi from Wikipedia
 * Xiangqi: Chinese Chess from The Chess Variant Pages
 * How to Play Xiangqi - Chinese Chess
 * Chinese Chess or Xiangqi from Chinasage
 * How XiangQi can improve your chess by Davide Nastasio, ChessBase, December 06, 2017
 * rec.games.chinese-chess

Computer Chinese Chess

 * ICGA: Chinese Chess
 * Chinese Chess at the Computer Olympiad
 * Computer Chinese Chess by Tsan-sheng Hsu
 * XiangQi (Chinese Chess) by Harm Geert Muller
 * WinBoard and XiangQi by Harm Geert Muller


 * Chinese Chess Endgame Databases Query System by Jih Tung Pai
 * 中国象棋电脑应用规范(五)：中国象棋通用引擎协议 Universal Chinese Chess Protocol (UCCI)
 * 电脑象棋联赛 - 象棋百科全书 - Computer Chess League - Chess Encyclopedia
 * Discovering Chinese chess Xiangqi to create game engine for it by Maksim Korzh, January 22, 2021, YouTube Videos

Xiangqi Cloud Database

 * Xiangqi Cloud Database Query Interface by noobpwnftw

=References= Up one Level