Chess has a basic endgame table that every player learns. King and rook wins. King and two knights doesn’t force it. King and bishop is dead. Xiangqi has the same table, and if you read Chinese you learn it the same way, out of endgame manuals that all carry the same verdicts. In English you get fragments.

The best fragment is the Endgame section of the English Wikipedia article on xiangqi. Three dozen verdicts, stated in prose, with no citations attached to any of them. The Chinese-language equivalent is an article called Winning and Drawing Formations (象棋勝和定式). It covers the same ground with a diagram per verdict, and it cites two books: Jin Qichang and Yang Dian’s Winning and Drawing Formations in Xiangqi Endgames (Beijing Sport University Press, 2008), and Xue Rongxian’s A Beginner’s Practical Guide to Xiangqi (2009). I haven’t read either book. When I say “the manuals” below, I mean those two Wikipedia articles: one is a compressed report of the manual tradition, the other shows you the position.

Thirty-two of those verdicts are below, each one built into a position and checked twice, and each one a board you can play out against the engine that checked it. The study is on Mistboard, a chapter per verdict.

The basics: what beats the full defence

The chariot is the strongest piece in xiangqi, the rook by another name. The standard full defence keeps all four defensive pieces (士象全): general at home, both advisors, both elephants, arranged so the two guards sit directly in front of the general where a cannon can’t use them as a screen.

A bare chariot against that defence is a draw, and now a proven one: the database says draw, and Pikafish scores it at exactly 0.

Three soldiers beat it. Forced mate in 15.

Two horses beat it too, in 25.

Draw

Mate in 15

Same defence, same side to move. Both verdicts come out of the database rather than a search. Take Black in either and try to hold it.

A chariot is worth more than three soldiers by any piece table you’ll find, and more than two horses. In this endgame it’s worth less than either. Soldiers can’t retreat, which sounds like a weakness and turns into the reason they win: three of them advancing on a nine-point palace can’t be driven back, and the defence has no way to trade them off.

The same logic runs the other way. Five soldiers, all sitting on the last rank, against a bare general is a draw. Five pieces against zero. They can’t move backward and they’re already at the wall, so they can’t force mate or even stalemate.

Draw

Five pieces against one, and no mate exists in the position. Take Red and try to win it.

What decides these endgames is placement, and the English section has one pair of diagrams that shows it outright.

A bare chariot against a horse and two elephants. With the defence in its fortress (horse on e8, elephants on i8 and g6) it holds, and the database confirms the hold. Move that g6 elephant to g10 and Red wins, starting with 1.Rb7.

Draw

Red wins

The whole difference is the elephant on the right side of the board, four points further up. Hold the first, break the second.

Same material on both sides, same attacker, same side to move, and the result flips. That pair survives translation because somebody drew it. The three rows below are the ones where nobody did.

What it takes

Three of the thirty-two verdicts turn on an instruction the English does not carry. In each one a placement decides the result, and the sentence naming it is the one that got dropped.

A chariot against a horse and cannon, where the draw is one square

The English section says: “Chariot vs two minor pieces with no defensive pieces: A draw, but requires good defensive positions.”

I built eight of them. Pikafish found forced mate in all eight, in 15 moves from the most resistant one I could construct. Eight for eight is not a search artifact, so I wrote the row up as a dispute and moved on, which was the wrong call.

The Chinese article diagrams the position, and adds one sentence of instruction the English doesn’t carry: the cannon goes directly behind its own general, and the horse stays as far from the general as it can get.

Draw

Mate in 12

One point of difference. On the left the cannon sits directly behind its own general and the position is drawn; on the right it has moved one square and Red mates in 12. Take Black in either.

That position is a database draw with either side to move, and Pikafish reads it at +0.10 to depth 40. The cannon behind the general covers the back rank and can’t be skewered against it, which is the entire fortress. Slide it one point sideways and the same position is mate in 12, and every other square I tried loses too, from one point away to the far corner.

The chariot’s own placement turns out not to matter at all. I checked it from a10, e5, i1 and a1, and every one is still drawn, which is what makes this a fortress rather than a lucky arrangement. The horse gets a looser rule than the manual’s “as far from the general as it can get”: it has to stay off the squares a single chariot move attacks. On b7, c7, d7, e7, d6, d4 or d2 the position holds. On d5, which sits on the chariot’s own rank, the chariot just takes it and mates in 5.

My eight positions all had the cannon somewhere else. The verdict in the English was right. “Requires good defensive positions” was carrying the whole result and telling you none of it.

A chariot and cannon against a chariot, where “the middle file” is not a square

The English section says: “A chariot plus a cannon cannot win against a bare chariot, as long as the defending chariot occupies the middle file.”

That reads like a rule you can check. My position satisfies it: black’s chariot sits on the middle file, at home, directly in front of its own general. Pikafish mates in 28.

It mates because of the piece the sentence doesn’t mention. A cannon captures by jumping exactly one piece, so it needs a screen, and it doesn’t care whose screen it is. Red’s cannon slides onto the middle file below the black chariot and gives check immediately, using that chariot as the platform and the black general behind it as the target. The defender’s own drawing piece is the gun carriage.

Walk the defending chariot down that file and the database draws a line across it:

Draw

Red wins

The defending chariot holds the middle file in both. Only the lower one draws. The mate at the end is scooping the moon off the seabed, played at the foot of the file.

With Red set up as in the figure, the defending chariot draws from the 5th rank and below, 0.00 at depth 40, and loses from the 6th and above. One rank.

Two things have to be true for Red to win, and both of them are about Red. The cannon has to be able to land on the middle file and survive there, which in the figure means landing on the 5th rank, where Red’s own chariot is defending it. Move that cannon off the chariot’s rank, to the 3rd or the 7th, and every one of those wins turns back into a draw. And Red needs the bottom of the middle file, because the mate this endgame turns on, scooping the moon off the seabed (海底捞月), is executed down there: the chariot reaches the foot of the file with its general behind it, and the defending chariot ends up stuck between the two generals, unable to leave the file without letting them face and unable to stay without being won.

A defender standing on the middle file up in its own half stops neither of those. Occupying a file is a claim about the squares a piece controls. I read it as a claim about the square it stands on, built a position that satisfied the words, and got mated in 28.

A horse and cannon against a horse, which no amount of depth settles

The English section says: “Horse + Cannon + 4 defensive pieces vs a minor piece [plus] 4 defensive pieces: A win if the minor piece is a horse … a draw if it is a cannon.”

Thirteen pieces. chessdb has built exactly one table that large and it is a different thirteen, and a live probe of this one comes back unknown. That does not leave only search. Strip to the ten-man KANCKAABBN, the reduction that keeps one advisor on the strong side, and the table exists: 24,251,768,055 positions, Red winning 85.48% of them. The ladder carries this verdict, not the depth.

Search doesn’t resolve it. Depth 26 gives +2.24. Depth 42 gives +2.47 and still no mate, and six different placements of the defending horse land between +2.32 and +3.03 without one of them turning decisive. A long technical win looks exactly like this from a fixed depth, and so does a position that’s simply better for Red and drawn.

Two pieces of evidence say the book is right anyway. The engine separates the two halves of the verdict on its own: swap the defending horse for a cannon, which is the drawn half of the same sentence, and the same depth reads +1.26. That gap is the book’s distinction, showing up in a number that was never told about it.

Then I let Pikafish play the position out against itself at depth 32. Red spent 33 moves manoeuvring with nothing captured by either side, took an advisor on move 34, took the second one four moves later, and kept converting until move 56, when the position dropped to ten pieces and came back into the database’s range. Black to move, every legal reply a loss.

That first capture is the whole question, because of a rule with no counterpart in chess: the natural limit (自然限着) draws the game after 60 moves by each side with no capture at all. A book win that needs 70 moves of technique is not a win you can play. This one broke through at 34, with 26 moves to spare.

Xiangqi closes the other door too, and that one bites harder for a chess player. Perpetual check is a loss here: the side giving check must vary or forfeit. In chess it’s the standard way a lost position is saved, so the instinct doesn’t merely fail to help, it hands over the point. Between them the two rules bracket every endgame in this post. The defender can’t check its way out, and the attacker can’t grind forever. Neither has anything in chess to translate into, which is exactly why an English summary drops them.

That still isn’t a proof of the row. Black was Pikafish too, and a better defence earlier might hold; nothing here rules that out. What it settles is the part that used to rest on my trust. The win at the end is not a mate the engine announced at depth 32 and I believed, it is a position that is provably lost, so the engine’s line converts into something exact rather than into its own opinion. The engine still declines to confirm the book verdict from the root. It now plays into one that is certain. This is the row to take the defence in if you want to feel how thin a 34-move squeeze is, and the drawn half is one piece away.

Unsolved

Thirteen pieces, the row no tablebase covers. Black has 60 moves to survive without losing a piece.

Strip the material down and it stops being a search problem. chessdb.cn publishes exact tables for the reductions of this ending, and they change what the book sentence means. Take Red’s own advisors and elephants away, leaving king, cannon and horse against the full defence: 5,492,247,706 positions, Red wins 22.31% of them. Give Red back one advisor and it goes to 85.48%, over 24,251,768,055 positions. A second advisor adds a point. An elephant in place of the advisor adds seven.

So the “4 defensive pieces” on the attacking side of that sentence is doing real work, and the number that matters is one. One advisor carries the win and the elephants are nearly free. I got there with Pikafish first, running the same ladder at depth 30 before I knew the tables existed, and the ordering came out the same.

Cut the same position the other way and the answer flips. Leave both sides their full defence and take the defending horse off instead: twelve pieces, 10,453,951,719 of them, and chessdb has that one built. Red wins 92.71%, the longest mate is 69 plies, and the table records no losses at all. One reduction says the win rests on Red’s own advisors. The other says it is close to total the moment Black has nothing left to counter with. The material the book is actually talking about sits between them, in none of the 8,705 tables, and a live probe on it returns unknown.

Six words, two buckets

Two of the three rows above have one thing in common, and it’s the vocabulary. Chinese endgame manuals don’t grade a result as won or drawn. They grade it on a scale with six rungs:

Verdict What it claims English
必胜 bì shèng wins from any position of this material win
例胜 lì shèng wins by standard technique win
巧胜 qiǎo shèng wins only from particular positions win
难胜 nán shèng difficult to win, which is not the same as drawn win or draw
例和 lì hé draws by standard technique draw
必和 bì hé draws from any position draw

Five of the six survive translation. The sixth has to pick a side, and two of the three rows above sit on it.

The Chinese article files chariot against horse and cannon on the fourth rung, hard to win. The English section files it as “a draw”. The tablebase sides with the Chinese: the chariot wins from nearly everywhere on the board and is held by a single defensive formation. A player who reads “draw” defends casually and loses in 15. A player who reads “hard to win” knows there is exactly one thing to find.

The second row lands on the same rung from the other direction. The Chinese table lists chariot-and-cannon against a lone chariot as win or draw (胜/和), then spends a paragraph on which is which. The English keeps the crisp half of that and drops the paragraph, and the paragraph was the part that mattered.

The position is the fact. The verdict is a label somebody stuck on a shelf full of them, and translating the label without the shelf loses most of what it meant.

How well any of it is known

A verdict in this table sits in one of three grades, and they are not close to equivalent. Some are proven: a database has computed the whole ending, and the answer is a lookup. Some are searched: an engine agrees at the depth I ran it. That is evidence, not proof. The rest are asserted, by a manual with no citation attached.

Sorting them took two passes.

I took the 32 verdicts out of the English section, built a representative position for each, and asked Pikafish at depth 26.

Depth 26, 32 verdicts  
engine agrees 29
book says draw, engine finds a forced win 2
book says win, engine can’t finish it 1

Then I checked the same positions a second way. Xiangqi has cloud endgame databases that look the answer up instead of searching for it: chessdb.cn returns win, draw or loss plus a distance count for positions with few enough pieces. Twenty-seven of my 32 fit. That cutoff is more generous than it sounds, because a position with eight advisors and elephants on it is nearly as constrained as one with three pieces: an advisor has five legal squares, an elephant has seven, and neither can leave its own half. It really is a lookup, too. Walk its own best line move by move and the verdict never flips and the distance never rises, which no search does.

Two of the three rows above now carry a defensive setup the database confirms, and both retractions were mine rather than the manual’s. The sweep reads 31 of 32 agreeing with Pikafish and one leaning, with 27 of the 32 positions small enough for the database and all 27 exact.

What the check caught in the positions I built

The rest of what the check caught was mine. Three illegal positions, where I’d left the two generals facing each other down an open file, which parses fine and looks fine and is not legal xiangqi. Two positions I’d labelled book draws where Pikafish announced mate in 2, verdict right and my snapshot garbage. And one where the position was fine and my explanation of it was wrong.

The book says three unadvanced soldiers beat the full defence, which means soldiers on the 7th rank. Pull the same three back one rank and the win evaporates. I wrote that down as a matter of tempo, a move short of everything. It isn’t. A black elephant can only ever stand on seven points of the board, and from e8 it reaches exactly c6, g6, c10 and g10. Two of the three soldiers on the 6th rank are parked on elephant points. Black doesn’t need technique there, only a capture.

Mate in 15

Black takes one

Elephant reach is what "unadvanced" is protecting. A soldier on the 7th can never be captured by one, from any square, at any point in the game. Pull them back a rank and two are standing on squares an elephant reaches.

Six of my positions were broken and the check found all six. None of the manual’s verdicts were.

The frontier

A database settles an ending because somebody computed all of it. chessdb.cn has built 8,705 of those for xiangqi. No English page states their shape, so here it is.

Pieces Tables Positions
3 4 18,858
4 36 6.9 million
5 169 1.3 billion
6 615 188 billion
7 1,582 7.0 trillion
8 2,494 26.1 trillion
9 2,169 33.9 trillion
10 1,227 23.6 trillion
11 368 10.4 trillion
12 40 1.0 trillion
13 1 30.4 billion

102,230,279,715,348 positions. 25.56 TiB on disk, counting the distance-to-conversion and distance-to-mate tables together. The count peaks at nine pieces and falls away fast after eleven, which is what a frontier looks like from the inside. The longest forced win in the whole corpus runs 759 plies: two horses and an advisor against two elephants, a horse and a soldier.

Thirteen pieces a side, both defences intact, is past the last line of that table. That is the horse and cannon. The manual’s 例胜, its “routine win”, is a verdict on a position nobody has computed.

The one thirteen-piece table chessdb has built is a different ending, and it is the one this post opened with: three soldiers behind a full defence, against a full defence. 30,445,843,365 positions, the deepest material anyone has solved in xiangqi, and Red wins 48.00% of it. That number counts every arrangement of the pieces rather than the good ones, which is the same reason a book verdict and a win rate are not the same claim.

Both of those numbers are worth holding next to the table at the top of this page. The basic endgames are the small ones, and most of them are solved outright. The moment a verdict describes both sides at full strength, it is describing material that has never been computed by anyone, and the manual is still the only source there is.


The 32 entries, with the source and provenance on every row, are in xiangqi-endgame-corpus.ts. The checker is verify-xiangqi-endgames.ts; point it at a Pikafish binary and it prints book verdict against engine read, side by side, with the principal variation. Add --tablebase and it adds the exact answer for every position small enough to have one.

A basic endgame is a claim you can test, which is the whole reason to put these on a board instead of in a table: take the side the book says is lost, and find out how long you last. All 32 are a study on Mistboard, a chapter each, rooted at the position with the engine’s line as the mainline and the verdict written underneath. When that goes badly, Pikafish is on the bot ladder at full strength, with eight Fairy-Stockfish levels underneath it for when full strength stops being instructive.