How to Beat the Computer at Chinese Chess (Xiangqi)
September 28, 2026
Xiangqi against a computer can feel hopeless at first: it never gets tired, never misses a capture it can see, and never forgets a cannon on the far side of the board. But the opponent in our Chinese Chess vs Computer is a small engine running inside your browser, and it has very definite limits. Learn what it can and cannot see and you can beat each level on purpose — and every win is worth 10, 30 or 100 ranking points, depending on the level you picked.
What the computer is actually doing
On its turn the engine lists every legal move, plays each one out a fixed number of moves ahead and keeps the line that leaves it best off. “Best off” means material and nothing else: a chariot counts 600, a cannon 285, a horse 270, an advisor or elephant 120 and a soldier 30. There is no opening book, no sense of piece activity or general safety, and a soldier that has crossed the river is worth exactly the same to it as one still at home. Because it all runs on your device, the game also works offline.
What changes between the three levels
- Easy looks one move ahead. It judges only the position straight after its own move, so it never sees your reply and will happily grab a defended piece. About half of its moves are deliberately picked from the weaker options, and even its “good” moves are chosen loosely.
- Normal looks two moves ahead. It sees your best answer to each move, so plain gifts dry up. Roughly one move in ten is still a deliberate slip, and otherwise it picks at random among the moves it rates within about a soldier and a half of its best.
- Expert looks three moves ahead. Its move, your reply, its reply — with no deliberate mistakes at all. It will not fall for a one-move trap, and it sees any mate in one, for either side.
Rules that catch people out
- The horse’s leg. A horse moves one point straight, then one diagonally, and it is blocked if the point next to it in that straight direction is occupied. Before you panic about an enemy horse, check its legs; before you rely on yours, check them too.
- The elephant’s eye and the river. Elephants move exactly two points diagonally, cannot jump an occupied middle point and never cross the river. Together with the advisors, which never leave the palace, they are pure defenders.
- The cannon’s screen. A cannon moves like a chariot but captures only by jumping exactly one piece of either colour. Moving a single piece can therefore switch a cannon on or off — the most common source of surprise captures.
- The flying general. The two generals may never face each other on an open file. That makes your general an attacker: standing on a file, it takes that whole file away from the enemy general.
- No legal move means defeat. In xiangqi a stalemated side loses, and the game scores it that way: leaving the computer with no legal move is a win for you, not a draw.
- No draw by repetition, and no undo. A game ends only when one side has no legal move; New game is the only way out of a dead position. A loss costs you nothing on the leaderboard.
Easy (+10): collect what it hands you
Play sound, natural moves — cannon to the centre file, horses out, chariots onto open files — and keep every piece protected. Easy cannot see your reply, so it regularly takes a defended soldier with a chariot or walks a horse onto a point you control. Before each move ask one question: is anything of mine undefended? If not, it can only lose material to you, and once you are a chariot ahead, trade pieces off and go hunting for its general.
Normal (+30): think two moves deep
Normal sees your immediate reply but not what you do after that, so the winning ideas are all two-move plans: a quiet horse move that next turn attacks a chariot and a cannon at once; lifting the piece that screens your cannon so the cannon suddenly bites while the piece you moved makes a second threat; a pin along a file with a chariot lined up behind a cannon. It sees your mate in one but not a mate in two, so a net slowly tightening round its general often goes unnoticed until it is too late. Its occasional slip is a gift — take it, then simplify.
Expert (+100): play beyond its horizon
- Threats two moves deep. Expert sees your reply and its own answer, but not your second move. A forced mate in two — a check it must answer, then mate — is invisible to it, so it happily lets you set one up. Build the net with quiet moves and finish with checks.
- It ignores position. It will grab a soldier with a chariot even when that leaves the chariot stranded or its general exposed. Develop both chariots early, open files towards its palace and let it chase small material.
- Soldiers are cheap to it. A crossed soldier is worth the same 30 as one at home, so it rarely bothers to stop yours. Two soldiers side by side in front of its palace are an attacking force it badly underestimates.
- Cannon over horse, always. It rates a cannon slightly above a horse in every position. As pieces come off, cannons lose their screens while horses grow stronger, so giving your cannon for its horse in a thinning position is usually a good trade for you.
Endgame basics
- Use your general. Standing on a file, your general keeps the enemy general off it. In almost every mating net your general takes away one file while your other pieces cover the rest.
- A chariot beats a bare general. Confine the general along a rank with the chariot, use your own general to take away files, and it soon runs out of room.
- Cannons need a screen. A cannon can only give check by firing over another piece, so in the endgame keep one — even one of your own advisors — where the cannon can use it.
- Don’t rush soldiers to the last rank. A soldier on the enemy’s back row can only move sideways; one that stops a rank or two short keeps far more power.
- Squeeze, don’t just check. Because a side with no legal move loses, taking the last free points away from its general wins even without a check.
Put it together: read the cannon screens and horse legs before every move, keep your pieces defended against Easy, think in two-move plans against Normal, and against Expert build threats it only sees one move too late. Each win is recorded once, the moment the game ends — so the climb from 10 to 100 points is entirely in your hands.