Nine files, ten ranks, a river down the middle, a palace behind each back rank. Xiangqi looks like chess from across the room and plays like something else entirely once the cannon enters the picture.
How to play Xiangqi
Pieces sit on the intersections, not in the squares between them — the same convention as go, not the square-filling convention of Western chess or checkers. Checkmate the enemy general to win.
How each piece moves
- General — one step orthogonally, confined to the palace.
- Advisor — one step diagonally, confined to the palace.
- Elephant — exactly two points diagonally, never crossing the river, blocked if the midpoint is occupied by anything — friend or foe. This point has a name: the elephant's eye.
- Horse — one step orthogonally then one diagonally outward, blocked ("hobbled") if the orthogonal point in between is occupied.
- Chariot — any distance orthogonally, blocked by the first piece in its path. The strongest piece on the board.
- Cannon — moves like the chariot when not capturing. To capture, it must jump over exactly one piece and land on an enemy piece beyond it.
- Soldier — one step forward only, until it crosses the river; after that, forward or sideways, never backward.
The flying general rule
The two generals may never face each other on a completely open file. A move that would create that position is illegal — including a move by some other piece that happens to clear the file between them, not just a move by the general itself. We built this as a direct check in the engine rather than a special case: after every candidate move, if the two generals would see each other with nothing in between, that move is rejected, the same way a move leaving your own general in check is rejected.
How do you win at Xiangqi?
Checkmate the enemy general — leave them in check with no legal way out. Having no legal move at all is also a loss here, even without being in check, which is the reverse of Western chess, where that same position is a draw.
Why the cannon is the trickiest piece to learn
The cannon is really two pieces sharing one name. Moving quietly, it slides in a straight line and cannot jump anything, exactly like the chariot. Capturing, it must jump exactly one piece — its own colour or the enemy's, it makes no difference — and land on an enemy piece immediately beyond that single screen. No screen, or two, or more, and there is no capture in that direction at all.
New players consistently expect it to behave like the chariot all the time. We tested the boundary cases specifically before shipping this page: a clear path with no screen produces no captures, a path with exactly one piece in the way produces exactly the capture you'd expect, and landing on the screen itself is never legal.
What makes Xiangqi different from Western chess
The board itself is the biggest difference: pieces occupy intersections on a 9×10 grid rather than squares on an 8×8 one, and the river and palace restrict four of the seven piece types to only part of the board. There is no castling, no piece promotion, and no two-square opening move for soldiers — every piece moves the same way from the first move of the game to the last.
Is a draw possible in Xiangqi?
Rarely, and never simply by running out of moves — that is a loss here, not a draw. The one route to a genuine draw on this page is threefold repetition. Real Xiangqi tournament rules go considerably further, prohibiting perpetual checks and perpetual chases of an undefended piece in ways that plain repetition does not capture — but those rules have enough contested edge cases that even human arbiters argue about them, so this page uses the simpler repetition rule rather than risk getting a genuinely disputed case wrong.
Playing Xiangqi against the computer
How do the three computer levels differ?
In how many candidate moves get a second look at the reply and how often a merely good move gets played instead of insisting on the exact best one — the same design as the other computer opponents on this site, including Reversi and Halma. The evaluation itself uses standard approximate piece values: chariot 9, cannon 4.5, horse 4, advisor 2, elephant 2, and a soldier worth roughly double once it has crossed the river and gained the ability to move sideways as well as forward.
Where Xiangqi comes from
China, further back than any single date can honestly claim. Chess-like games appear in Chinese writing from well over a thousand years ago, but the version with a river, a palace and a cannon — recognisably today's Xiangqi — is generally placed around the Song dynasty, roughly a thousand years back, with the rules settling into close to their modern form over the centuries that followed.
The cannon's name is older than it looks: 炮/砲 originally meant a siege catapult, not a gunpowder weapon. The piece and its name likely predate the military use of actual gunpowder cannons in China by some distance — a reminder that the piece was named for what armies already had, not for what came later.



