← HdXiangqi

Rules of xiangqi

Everything a game in HdXiangqi follows: how the pieces move, how a game is won, and the draw and repetition rules of the two rule sets you can pick.

The board and the goalHow the pieces moveHow a game endsDrawsForbidden repetitionsInternational or Chinese rulesWhat the app can and cannot judge

The board and the goal

Two players, Red and Black, each with 16 pieces on a board of 9 files and 10 ranks. Pieces stand on the intersections. The river splits the board in two halves; each side has a palace of 3 × 3 points around its general.

Red moves first. The goal is to checkmate the opponent's general: attack it so that no move can save it.

How the pieces move

  • General (帅 / 将): one point at a time along a file or a rank, never out of its palace. The two generals may never face each other on an open file ("flying general").
  • Advisor (仕 / 士): one point diagonally, inside the palace.
  • Elephant (相 / 象): exactly two points diagonally; it cannot jump over a piece in the middle ("blocked eye") and never crosses the river.
  • Horse (马): one point straight then one diagonally; it is blocked by a piece next to it in the direction it goes ("hobbled leg").
  • Chariot (车): any number of points along a file or a rank, like a rook.
  • Cannon (炮): moves like a chariot, but captures by jumping over exactly one piece (the "screen").
  • Soldier (兵 / 卒): one point forward. After crossing the river it may also move one point sideways. It never moves back.
帥
General
仕
Advisor
卒相
Elephant: blocked eye
卒傌
Horse: hobbled leg
俥
Chariot
兵馬炮
Cannon: jumps to capture
river兵
Soldier, across the river

How a game ends

  • Checkmate: the side whose general is attacked and cannot escape loses.
  • No legal move: unlike chess, a side that cannot move at all (stalemate) also loses.
  • Resignation, or a clock that reaches zero: that side loses.
  • Agreement: both players accept a draw.
  • The repetition and draw rules below.

Draws

  • The same position for the third time (same side to move), when nobody breaks a rule of the next section: draw.
  • Too long without a capture: draw after 50 moves each (100 plies) in the international rules, 60 moves each (120 plies) in the Chinese rules.
  • Only generals, advisors and elephants left: none of them can cross the river, nobody can win: draw.

Forbidden repetitions

A player may not force a draw by repeating an attack the opponent must answer. When a position comes back the third time, the app looks at the moves of each side since it was first seen:

  • Perpetual check: every move of one side gives check. That side loses, in both rule sets.
  • Perpetual chase: every move of one side newly threatens to win a piece of the opponent that is not protected. That side loses.
  • A single quiet move in the cycle ("one check, one idle", "one chase, one idle") makes the repetition allowed: it is a draw.
  • When both sides break the rules in the same way, or neither does, it is a draw.
  • Not a chase: an attack by a general or a soldier, an attack on a soldier that has not crossed the river, an attack on a protected piece, an offer to exchange the same pieces.

International or Chinese rules

Pick the rules of your games against the bot in Settings. Online rooms use the international rules unless the host picks the Chinese ones before the game.

International (World / Asian)Chinese (CXA)
Perpetual checkLosesLoses
Perpetual chase of one pieceLosesLoses
Chasing several pieces in turnAllowed (draw)Loses
Repeated threats of mateAllowed (draw)Loses
Mixed attacks ("one check, one chase")Allowed (draw)Loses
No capture for…50 moves each60 moves each

What the app can and cannot judge

Tournament rules are applied by a referee, with many special cases (pinned protectors, "false" protection, chases of a chariot by a horse or a cannon...). The app has no referee: it applies the simplified rules above, right away, on the third repetition. In a doubtful case, the players can still agree on a draw or resign.

For games against the bot. Online rooms use the international rules unless the host picks others.