Xiangqi rules
Xiangqi is played on the lines, not in the squares. The board is nine files by ten ranks, so there are ninety points to stand on. Red moves first, then the two sides alternate.
Every diagram below is drawn by the same code that referees a live game on this site, and the highlighted points are the moves it actually allows. If a diagram and the rules ever disagreed, the build would fail.
The board, the river and the palace
Two features of the board change how pieces move, so they are worth naming before the pieces are.
- The river is the gap across the middle, between the fifth and sixth ranks. The elephant may never cross it, and a soldier that crosses it gains a move.
- The palace is the three-by-three box at each end with the diagonal cross drawn in it. The general and its two advisors may never leave it — that is nine points each, for the whole game.
Nothing else on the board is a barrier. There is no castling, no en passant and no promotion of any kind.
At a glance
| Piece | Moves | Held back by |
|---|---|---|
| General 帥 將 | One point, straight | Palace only |
| Advisor 仕 士 | One point, diagonal | Palace only |
| Elephant 相 象 | Two points, diagonal | Own half; midpoint |
| Horse 傌 馬 | Straight one, then diagonal one | The straight step |
| Chariot 俥 車 | Any distance, straight | Nothing |
| Cannon 炮 砲 | Any distance; captures over a screen | Needs one screen |
| Soldier 兵 卒 | One point forward | Never backward |
The general (帥 / 將)
The general moves one point up, down or sideways, and it never leaves the palace. It has no diagonal move at all, so from the middle of the palace it has four squares, not eight.
e1 has four points. The diagonals drawn in the palace are not moves it can make.Losing the general loses the game. It is also bound by one rule that has no equivalent in chess — see the two generals below.
The advisor (仕 / 士)
The advisor is the general's opposite: it moves one point diagonally and is also locked inside the palace. Between them, the general and the two advisors can only ever reach those nine points.
Advisors are defenders. They are almost never worth moving out of position early, because a general stripped of both advisors is much easier to mate.
The elephant (相 / 象)
The elephant moves exactly two points diagonally — the shape of the character 田 — and it may never cross the river. It is a defender for its own half and nothing else.
It can also be blocked. If the point exactly halfway along the diagonal is occupied — by either colour — the elephant cannot make that move. Players call this blocking the elephant's eye (塞象眼).
The horse (傌 / 馬)
The horse moves one point straight, then one point diagonally outward — the same L as a chess knight, ending on the same squares. The difference is that a xiangqi horse does not jump.
A piece on the straight step blocks the two moves that begin with it. This is called hobbling the horse's leg (蹩馬腿), and it is the single rule beginners get wrong most often: the blocker sits orthogonally next to the horse, never on the diagonal.
The chariot (俥 / 車)
The chariot moves any distance along a rank or a file and captures the first piece it meets. It is exactly a rook, and it is the strongest piece on the board by a wide margin — worth roughly two horses.
Because the board is wider than it is crowded, chariots get open files early. Getting yours out before your opponent does is most of opening theory.
The cannon (炮 / 砲)
The cannon is the piece with no counterpart in chess. It moves like a chariot, any distance along a line, over empty points only. But it captures in a way nothing else does: it must jump exactly one piece — of either colour — and take the first piece beyond it.
e7 by jumping the soldier on e5. It cannot take the soldier itself, because there is nothing between them.The jumped piece is called the screen (砲架). One screen is required and two is too many, which makes cannons strongest on an open board and nearly harmless on a crowded one — the reverse of every other piece.
The soldier (兵 / 卒)
The soldier — many English sources call it the pawn — moves one point straight forward and captures the same way. There is no double first move, no diagonal capture and no promotion.
Crossing the river changes it. From then on it may also move one point sideways, which roughly triples what it can do. It still may never move backward, so a soldier deep in enemy territory is a committed piece.
The two generals may never face each other
If the two generals end up on the same file with nothing at all between them, the position is illegal. You may not make a move that produces it, and a move that would expose it is simply not available.
e5 is the only piece between the generals, so it has no legal move at all — the engine offers none.Players call it the flying general (白臉將). It is not a curiosity: it wins endgames, because your own general becomes an attacking piece down an open file.
Check, checkmate and having no move
Attacking the general is check, and you must answer it. Being unable to answer it is checkmate, and you lose.
Here is the rule that surprises every chess player: if you have no legal move, you lose. Not a draw. A player who is not in check but cannot move anything has lost the game (困毙). In chess that is stalemate and a half point; in xiangqi it is a full loss.
How a game ends
| Ending | Result |
|---|---|
| Checkmate | The side to move loses |
| No legal move | The side to move loses |
| Perpetual check by one side | The checking side loses |
| Repetition with neither side at fault | Draw |
| 100 half-moves with no capture | Draw |
| Resignation or time | That side loses |
Perpetual check is the second surprise. In chess, repeating a check forever is a draw and often a saving resource. In xiangqi it is a loss for the player giving the checks, if they are the only one refusing to vary.
Which rule book this follows
Judgements here follow the 2018 World Xiangqi Rules (WXF). Four details are worth stating plainly, because the book is not self-consistent and because we would rather name a gap than paper over it.
- Repetition is counted threefold. WXF contradicts itself here — article 3.2.B says four occurrences, article 19.8 says threefold. We follow the Chinese 2020 rules, article 23.1, which says three.
- Perpetual chase (長捉) is judged in its common form. In a repetition without check, the side that attacked the same unprotected piece on every move loses — a horse or cannon chasing a chariot counts even if the chariot is protected. The book's rarer cases, such as pinned or blocked pieces or two pieces taking turns, are scored as a draw.
- The check cap in WXF article 8 is not implemented. The book says that when counting toward the no-capture draw, checks count for at most ten moves. We simply count a hundred half-moves without a capture.
- Insufficient material is never declared. Whether the pieces left can still force a win is a referee's call, so we leave it alone and let the players decide.
If a judgement here disagrees with a referee, the referee is right — and we would like to hear about it. Ready to try? Open a board or work through an endgame puzzle. New to the game entirely? Start with how to play.
