Xiangqi rules

The full rules of Xiangqi (Chinese Chess) in one place, for new and competitive players. The boards below are live positions checked by the same rules engine that runs our games, so every move shown is one the game accepts.

The board and the starting position

The board has 9 vertical lines, called files, and 10 horizontal lines, called ranks. Pieces stand on the points where the lines cross, not inside the squares. A horizontal river runs across the middle and splits the board into two halves, one for each side.

Each side also has a palace, the 3×3 block of points in the middle of its back rank, marked with a diagonal cross. The river and the palace both limit how some pieces move, as the sections below show.

The figures name each point by its file, a to i from left to right, and its rank, 0 to 9 counting up from Red's side. Red's general starts on e0 and Black's on e9.

Setting up

Each player starts with 16 pieces, set out the same way on both sides:

  • The back rank holds, from left to right, a chariot, horse, elephant, advisor, the general, advisor, elephant, horse and chariot.
  • The second rank is empty.
  • The third rank has a cannon on the second file and another on the eighth.
  • The fourth rank has five soldiers, on the first, third, fifth, seventh and ninth files.
The starting position. Each palace is tinted gold; the river runs between the two armies.

Red traditionally moves first, and it does in our games too.

Players take turns, and each turn is exactly one legal move. A move is legal when all of these hold:

  1. It follows the movement rule of the piece that moves.
  2. It doesn't leave your own general in check.
  3. It doesn't leave the two generals facing each other on an open file (the flying general rule below).

An illegal move doesn't count and has to be taken back. Online, the game won't let you make one.

To capture, a piece moves onto a point held by an enemy piece, and the enemy piece comes off the board. Every piece captures the same way it moves, except the cannon, which has its own capture rule.

The general and the advisors

The general moves one point at a time, up, down, left or right, never diagonally. It can't leave the palace, can't move into check, and can't stand on an open file facing the other general.

The two advisors move one point diagonally and also stay inside the palace, so each one only ever uses five points. They are purely defensive pieces whose job is to guard the general.

Horses and elephants

The horse moves one point straight, up, down, left or right, then one point diagonally outward. Unlike a chess knight it doesn't jump. If the point it would step through first is occupied, by either side's piece, that whole direction is blocked. Players call this hobbling the horse's leg, and it comes up in tactics all the time.

The soldier on e5 hobbles the horse's leg. d6 and f6 are blocked; its other six moves are open.

The elephant moves exactly two points diagonally. It can't jump either. If the point in the middle of its move, the elephant's eye, is occupied, it can't make that move. Elephants also can't cross the river, so each one is limited to seven points on its own half of the board and works as a defender.

The soldier on d3 blocks the elephant's eye, and a6 and e6 lie across the river. Only a2 is left.

Chariots and cannons

The chariot moves any number of points along a file or rank, like a rook in chess. It can't jump over pieces. Chariots are the strongest attacking pieces in the game.

The cannon moves exactly like a chariot when it isn't capturing. To capture, it must jump over exactly one piece, called the screen, and land on the enemy piece behind it. The screen can belong to either side, and any number of empty points can sit before or after it. With no screen, or with two or more pieces in the way, the cannon can't capture.

Red's cannon uses Black's cannon on h7 as its screen and takes the horse on h9.

In the same position the cannon could not take the black cannon on h7, because nothing stands between them. A cannon needs its screen.

Soldiers

A soldier moves one point forward and never backward. Once it has crossed the river it may also move one point left or right, but still never back. Soldiers don't promote. One that reaches the far rank can only shuffle sideways for the rest of the game.

Before the river, c4 can only step forward. Across it, g6 can go forward or sideways.

The flying general rule

The two generals may never face each other on the same file with nothing between them. You can't make any move that leaves them like that, whether you move your general onto the open file or move away the last piece standing between them.

Red can't step to e0. The e-file is open, so the generals would face each other. Only d1 is legal.

This makes a general an attacker along its file. In practice it controls the open file in front of it, so the enemy general can't step onto that file. Many checkmates use it.

Check, checkmate and stalemate

A general is in check when an enemy piece attacks it. The player in check must get out of it at once by moving the general, capturing the attacking piece or blocking the attack. Against a cannon there are two extra ways out. You can move its screen away, or put a second piece in the line so it has two.

The chariot checks along rank 9. Black still has d8, so this is check but not mate.

If there is no legal way out of check, the position is checkmate and that player loses. Add a second chariot covering rank 8 and the same move ends the game. Black's general can't go to d8, can't go to e9 because it would face Red's general, and can't leave the palace.

Checkmate. The chariot on h8 covers d8, and Red's general on e0 covers e9.

Stalemate is different from chess. A player who is not in check but has no legal move loses. It is never a draw.

After a7 to a8 Black is not in check but has no legal move, so Black loses.

Draws and repetition

Players may agree to a draw at any time. Tournament rules also forbid perpetual check, checking over and over to force a repetition, and perpetual chase, attacking the same piece over and over. When the same position keeps coming back because one side keeps checking or chasing, that side has to change its moves. Rule books differ on what happens if it won't. Some score the game as a draw, others count it as a loss for the side doing the checking or chasing.

Our online game enforces every movement rule on this page, check, checkmate and stalemate included, but it doesn't track repetition. If a game starts going round in circles, settle it the way you would over a real board.

Rules players often get wrong

  • The general and the advisors can never leave the palace.
  • Elephants can never cross the river.
  • Horses and elephants can be blocked. Neither one jumps.
  • A cannon needs exactly one screen to capture.
  • Stalemate loses. It is not a draw.

The rules look like a lot at first, but they hang together. Once they feel natural you can stop thinking about mechanics and start on the beginner strategy guide.

Try a quick demo game

A private solo board against the AI, right here on the page. Nothing to sign up for.

Xiangqi

Demo preview

You know the rules. Sit down at a board.

Private rooms with friends and optional video chat, or a practice game against the AI. No download, no sign-up.

Spotted a mistake or have a question? Send feedback

Play Xiangqi Free, in the browser, no sign-up Play