Chinese Xiangqi rules and piece moves
The board
Xiangqi is played on the intersections of nine vertical and ten horizontal lines, rather than inside squares. The river across the middle separates the red and black sides. Each player begins with sixteen pieces in a mirrored formation. At both ends, diagonal lines mark a three-by-three palace, the home territory of the general and advisors.
How the pieces move
General / Marshal (1)
Moves one intersection orthogonally within its own palace. The two generals may never face one another on an open file; a piece must stand between them.
Advisor (2)
Moves one point diagonally inside the palace — the close guard around the general.
Elephant (2)
Moves exactly two points diagonally, making a two-by-two “field.” It cannot cross the river, and a piece on the midpoint blocks the move — this is called blocking the elephant’s eye.
Horse (2)
Moves one point orthogonally and then one point diagonally outward, making an L-shape. If the first orthogonal point is occupied, the horse is blocked; this is known as a hobbled horse.
Chariot (2)
Moves any number of intersections along an open rank or file, forward or backward. Its long range and mobility make it an important attacking piece; early chariot development is a common plan.
Cannon (2)
Moves like a chariot along open lines. To capture, however, it must jump over exactly one intervening piece, called the screen or cannon mount. That rule makes the cannon’s role change sharply between middlegames and endgames.
Soldier (5)
Moves one point forward before crossing the river. After crossing, it may move one point forward or sideways, but never backward. A single soldier is modest; connected advanced soldiers can decide a game.
Wins, losses, and draws
- Checkmate: the general is attacked and cannot escape, block, or capture the attacker.
- Stalemate: a side to move has no legal move, even if its general is not currently in check; that side loses.
- Resignation: a player may resign and lose at once.
- Repeated checking: the board detects continuous checking in a repeated position. A continuous-checking side loses rather than forcing a draw.
This board applies the following automatic end conditions for games played on this page. They do not replace the complete adjudication rules used by a tournament:
- Threefold repetition: a position must recur three or more times with every piece in the same place and the same side to move. It is a draw unless one side has given continuous checks; that side loses. The board does not separately judge repeated chasing.
- Sixty-move draw: 60 full moves — 120 half-moves — without any capture end the game as a draw, preventing an unwinnable ending from continuing indefinitely.
Common openings
- Central Cannon (当头炮 / 中炮): Red opens with 炮二平五 or 炮八平五, aiming at Black’s central soldier and central file. It creates direct pressure in the center and is usually followed by horse development and chariot activity.
- Elephant Opening (飞相局): Red develops the central elephant with 相三进五 or 相七进五, first strengthening the home side. It is quieter than the Central Cannon, with a generous margin for error and a solid defensive base.
- Immortal’s Guide (仙人指路 / 进兵局): Red advances a side soldier with 兵三进一 or 兵七进一 to test Black’s reply before choosing a plan. Its flexible branches make it a useful all-purpose opening.
How to play against the computer
Step 1: Choose a level and a color
The board is ready when the page opens. Use the side panel to set two things:
- Search level: Beginner uses the shallowest search; Regular is the balanced default; Veteran, Expert, and Master search progressively deeper and longer.
- Your side: Red moves first. Choose Black to let the computer open. Beginners often find Red easier because it keeps the first move.
Step 2: Start moving
Click New game, select one of your pieces, then choose a highlighted legal destination. Select a different piece or an empty intersection to cancel. On a phone, use the same tap-and-tap action.
Step 3: Use the helpers
- Hint: on your turn, the computer highlights a suggested move at the selected level. It is one calculated option, and another move may lead to a better result.
- Undo: rolls back your last move and the computer reply together; use it repeatedly to return to an earlier position.
- Flip board: rotates the board so your camp can remain at the near edge when you play Black.
- Move record, copy, and replay: every move is recorded in Chinese Xiangqi notation. After the game, replay it one position at a time or automatically, and copy the record when the control is available.
On a phone
The board remains playable on smaller screens. On phones, the move record and clocks are hidden by default to give the board room, while the settings and controls remain available in a scrollable row.
Saved progress, installation, and practical limits
- Local save: the current game and replay data stay in this browser. Clearing site data, using a private window, or changing devices can remove the saved position.
- Install and offline use: supported browsers can add the board to your desktop or home screen. After a successful first load, it may open without a connection; clearing site data means you will need to load it online again.
- No online opponent: this page plays against a local computer engine. It does not provide matchmaking, accounts, rankings, cloud sync, or cross-device game history.
- Hint limits: a suggested move reflects the selected level and available thinking time. Use it as a practice aid rather than a definitive answer.
Opening, middlegame, and endgame examples
Example 1: Central cannon vs screen horses
Central Cannon against Screen Horses is a well-known Xiangqi opening family. Red attacks the middle, while Black uses both horses to support the central soldier. The game quickly becomes a contest for central lines and development.
- 炮二平五 — Red plays the Central Cannon, targeting Black’s central soldier.
- 马8进7 — Black develops a horse to protect that soldier and begin the Screen Horse defense.
- 马二进三 — Red develops the right horse and brings another piece into the fight.
- 车9平8 — Black develops a chariot and takes an open line.
Those four moves show the basic opening order: contest or secure the center, develop the major pieces — chariots, horses, and cannons — then choose concrete tactics from the opponent’s reply.
Example 2: Midgame — chariot, horse, and cannon together
In the middlegame, one major piece rarely breaks a defended palace alone. A cannon can pin advisors or elephants, a chariot can control a key rank or file, and a horse can enter from the side. The attack works when those jobs support one another.
- Crouching Horse (卧槽马): a horse reaches the second rank beside the opposing general’s line, where it can directly threaten the palace and support an attack on nearby escape squares.
- Iron Gate Bolt (铁门栓): a chariot or cannon seals a palace exit while other pieces attack, leaving the general with no useful flight squares.
- Alternating Double Chariots (双车错): two chariots alternate checks on a rank or file, using the facing-generals rule to force the general aside and win a key piece.
Example 3: Endgame — using an active chariot
Chariot endgames reward active checking lines and support from your own general. Use the chariot to restrict palace squares, keep it protected, and bring your general toward the center when the position allows. The exact result still depends on every remaining defender and the side to move.
A practical way to use this board
Begin on Beginner to compare a few openings, then move to Regular once the basic patterns are familiar. Before starting the next game, read the Chinese-notation move record or replay the finished game and identify the turn where the position changed. Finding the move that lost the game teaches more than simply collecting a win.
About this browser-based Xiangqi board
Available whenever you want a game
It is not always easy to find another Xiangqi player at the right time. This page provides a five-level computer opponent that works in your browser. Open the page, choose a level, and play without installing anything or creating an account.
What the five levels change
Each level changes how far ahead the computer looks and how long it spends choosing a move. Beginner looks at fewer replies, Regular is the balanced default, and the higher levels examine more possibilities. The names describe these settings, not official ratings or playing personalities.
What is included on this board
- Computer opponent: moves are calculated in your browser rather than coming from an online match lobby.
- Play without signup: open the board and begin a game.
- Learning tools: legal-move highlights, hints, undo, detailed rules, a Chinese-notation move record, and replay sit beside the board.
- Installable board: supported browsers can add the site to a desktop or home screen, and a successful first load may make the board available offline later.