Xiangqi Rules - How to Play Chinese Chess

Learn the movement rules, the river and palace boundaries, and the checks that make a Xiangqi move legal.

Board, armies, and the aim

Xiangqi is played on nine files and ten ranks. The central river separates the two armies, while each general begins inside a three-by-three palace. Red moves first in this version. Each side has a general, two advisors, two elephants, two horses, two chariots, two cannons, and five soldiers. You do not capture a general in ordinary play: the goal is to give check so that the opponent has no legal reply. A player who has no legal move also loses, so a blocked position can end a game even when the general is not currently attacked.

The palace pieces and flying generals

The general moves one point orthogonally and must stay inside its own palace. Advisors move one point diagonally and also never leave that palace. The two generals may not face each other on an open file; any intervening piece is needed to block that line. This flying-general rule is checked after every move, so a move that exposes your own general to the enemy general is illegal. The engine also rejects any move that leaves your general under attack from an enemy piece. Treat the palace as a small defensive room, not as a place where the general can wander across the board.

Elephants and horses

An elephant moves exactly two points diagonally, like the corners of a two-by-two square. Its midpoint must be empty, a restriction commonly called the elephant eye, and it cannot cross the river. A horse makes an L-shaped move: two points in one direction and one at a right angle. Its first orthogonal step must be clear. If a piece occupies that horse leg, the whole move is unavailable. Unlike a western chess knight, the horse can therefore be blocked. Before using a horse to attack, inspect the adjacent leg square as well as the intended landing square.

Chariots, cannons, and soldiers

The chariot moves any number of empty points orthogonally and captures the first enemy piece in a direction. The cannon moves in the same way when it is not capturing. To capture, it needs exactly one occupied screen between itself and its target; the screen may belong to either side. A second screen makes that capture illegal. Soldiers move forward one point. After crossing the river, they may additionally move one point sideways, but they never move backward. Red advances toward the top of this board and Black toward the bottom, so the two armies use opposite forward directions.

Check, legal replies, and the result

A move is legal only if it does not leave your own general in check or create an open line between the two generals. When checked, you may move the general, capture the attacking piece, or block the attack if the line and piece allow it. The engine generates candidate moves and filters out those that fail this test. If the side to move has no legal move, the other side wins; this covers both checkmate and stalemate. For a practical drawn-game safeguard, the current implementation also declares a draw after 120 half-moves without a capture. It does not implement repetition claims or every tournament adjudication convention.

Xiangqi rules FAQ

Can the generals face one another?
No. A file between the generals must contain at least one piece. Opening that file, even accidentally, is illegal.
Does a cannon always need a screen?
Only to capture. A cannon moves along an unobstructed rank or file without a screen, but needs exactly one occupied intervening point to take.
Can an elephant cross the river?
No. It stays on its own half of the board, and its diagonal midpoint must also be empty.
Why is my horse move unavailable?
A piece is occupying the horse leg: the adjacent orthogonal point in the direction of the horse's two-point part.
Is stalemate a draw here?
No. If the player to move has no legal moves, the opponent wins, whether the general is checked or simply trapped.

Practice Xiangqi

Open a board and test one rule at a time: first block a horse leg, then make a cannon capture over one screen, and finally check whether moving a blocker would expose the generals.

Read Xiangqi strategy →