Xiangqi (Chinese chess)
Play xiangqi, Chinese chess, against the computer or a friend: palace, river, cannons that jump, and the flying general rule.
How to play
- Red moves first. Pieces stand on the points where lines cross. Tap a piece, then a marked point.
- General: one point along a line, inside the palace (the shaded 3 × 3 area). Advisors: one point diagonally, inside the palace. Elephants: exactly two points diagonally, never across the river, and not if the point in between is occupied.
- Horse: one point straight then one diagonally outwards, but not if a piece stands on the first point. Chariot: any distance along a line. Cannon: moves like a chariot but captures by jumping over exactly one piece.
- Soldier: one point forward; after crossing the river also one point sideways. Soldiers never move back.
- The two generals may never face each other on an open file. Checkmate wins, and in xiangqi a player with no legal move also loses. Our draw rules: the same position three times, or 120 moves without a capture.
Keyboard and touch
| Arrow keys | Move around the board |
| Enter or Space | Pick up the piece on the square, or move the picked piece there |
| Tab | Leave the board for the buttons |
| Tap | Tap a piece, then one of the marked squares |
Tips
- Get your chariots out early along open files: they are your strongest pieces.
- A cannon needs a screen: it is strongest early when the board is crowded.
- Soldiers become much stronger once they cross the river.
- Switch Pieces show to Letters if you do not read the characters: G general, A advisor, E elephant, H horse, R chariot, C cannon, S soldier. Easy looks one move ahead and sometimes picks a weaker move; medium looks 2-3 moves ahead; hard searches deeper for up to about two seconds.
About this game
Xiangqi is the chess of China. This page uses the standard rules (including the flying general) with simplified draw rules instead of the official rules on perpetual check and chasing. The move generator is checked against the published xiangqi perft counts from the starting position (44, 1,920 and 79,666 positions after 1, 2 and 3 plies, and 3,290,240 after 4). The pieces show the traditional characters or plain letters. Everything runs in your browser.