Play Jieqi Online: Chinese Dark Xiangqi vs Computer

Jieqi, also called Chinese Dark Xiangqi, is a Chinese chess variant: xiangqi with every piece except the two generals shuffled face down. You still play on the full 9×10 board and still win by checkmate, but you do not know what most of your own army is until you move it. A hidden piece moves the first time like whatever normally stands on its point, and shows its real identity when it lands.

How to play Jieqi

Each turn you move one piece, face up or face down, and the first side to checkmate the enemy general, or leave the opponent without a legal move, wins.

  1. The setup. The Red general stands on e0 and the Black general on e9, face up. The rest of each army, two each of chariots, horses, cannons, advisors and elephants plus five soldiers, is shuffled separately and laid face down on that side's 15 usual starting points. Red moves first.
  2. Moving a face-down piece. It cannot turn over where it stands; it has to move. That move, capture or not, follows the point it starts on: from a chariot point it slides like a chariot, from a cannon point it moves like a cannon and captures over one screen, from a soldier point it steps forward. Face-down advisors stay inside the palace and face-down elephants stay on their own side of the river.
  3. Turning over. The piece flips as it lands and from then on moves as itself. Chariots, horses and cannons move exactly as in xiangqi.

Face-down pieces are real obstacles. One can hobble a horse, fill an elephant's eye, halt a chariot, serve as a cannon's screen, or stand between the generals so they do not face each other.

Can a face-down piece turn over without moving?

No. There is no flipping in place in Jieqi; a piece turns over only at the end of a move. That is the biggest difference from Banqi, where every turn can be spent turning a piece over where it lies.

Can advisors and elephants cross the river in Jieqi?

Yes, once they are face up. A turned-over advisor moves one step diagonally anywhere on the board, so it can walk out of the palace and across the river. A turned-over elephant makes its two-point diagonal jump anywhere, and its eye can still be blocked. The generals are the only pieces that never leave the palace.

Where does a revealed soldier move?

Where it stands decides it. A soldier that turns up on your side of the river can only step forward; one that turns up across the river can already step sideways on its next move. A soldier that turns up on the enemy back rank can only move sideways, and one that turns up on your own back rank has to walk forward one point at a time.

Captured face-down pieces: who gets to see them

When you capture a face-down piece, you see what it was and your opponent does not. They only know they have lost one face-down piece. Face-up captures are visible to both sides as usual. When two people share one device, neither of them is shown a hidden piece that gets taken, and everything comes to light when the game ends.

That gap is why the piece tracker sits beside the board. For each side it gives every kind of piece a row with one box per piece, filled in as face up, unseen or captured. Under your own table, Taken unseen counts pieces the opponent took from you that you cannot identify yet. They stay among your unseen boxes until a process of elimination pins them down, for example once every piece you still have on the board has turned over, and then they are marked captured.

How a Jieqi game ends

A game ends in one of three ways:

ResultWhen
CheckmateThe general is in check and nothing can capture, block or step away
No legal moveThe side to move has no legal move at all, in check or not, and loses
Draw40 moves by each side (80 in all) pass without a capture

The no-legal-move loss comes up often in Jieqi. Pieces that are still face down are short of moves, so a general whose own pieces are boxed in can run out of moves without being in check. Against a bare general, a single chariot can take away its last moves.

Only captures reset the 40-move count; turning a piece over does not. During the last five moves each, the status line counts down to the draw. There is no draw by repetition here.

What is the perpetual check rule in Jieqi?

One piece may give check six turns in a row; after that, any move that would make that same piece give check again is not allowed. It is a forbidden move, not a loss, and the piece can still make its other moves. Two or more pieces that take turns giving check are not limited. If the rule leaves a player with no legal move, that player loses as usual. Select a piece that has hit the limit and the status line says so. Perpetual chasing is not penalized; a chase that goes on long enough simply runs into the 40-move draw.

Jieqi vs Xiangqi and Banqi

XiangqiJieqiBanqi
Board9×10 points, river and palacesSame as xiangqi4×8 squares, half a board
StartEvery piece face up, fixed placesGenerals face up, 30 pieces face down on their own side's starting pointsAll 32 face down in random places, colours mixed
RevealingNoneOnly by moving the pieceFlip any piece in place as your turn
Advisors and elephantsTied to the palace and own halfFree once face upMove one square like everything else
How you winCheckmate or no legal moveCheckmate or no legal moveCapture every enemy piece

In short, Jieqi keeps xiangqi's moves and its checkmate, and adds hidden identities. Banqi keeps only the pieces and plays a ranking game on a small board.

Jieqi strategy: opening captures, counting and checks

Watch the cannon points

The cannon points are the sharpest place to start. A face-down piece on your b2 moves as a cannon, and with the enemy's face-down piece on b7 as the screen it can capture on b9, the enemy horse point. You learn what you took, but your piece turns over on the enemy back rank next to the chariot point at a9, which can take it straight back. The same shot is there on the h-file, and your opponent has both against your back rank, so look at them before your first move.

Count the hidden pieces

A third of each side's face-down pieces are soldiers, so a face-down piece sent deep into enemy lines turns up a soldier more often than anything else, and a soldier that turns up on their back rank is stuck going sideways. Use the tracker to see which kinds your opponent is still hiding. When their two chariots have both been revealed or taken, the hidden pieces left cannot include a chariot, yet anything still sitting on a chariot point will make its opening move as one.

Your palace is only as safe as what is in it

Advisor and elephant points can turn up a chariot that leaves home, and a real advisor that turns up can wander off across the river. Defend with the pieces actually standing round your general, and treat your opponent's turned-over advisors and elephants as attackers that can reach your palace.

Plan checks with two pieces

Since a single piece is limited to six checks in a row, a long attack needs a second checking piece to take over. In a won ending, squeezing the enemy general until it has no legal move wins as surely as mate.

Can the computer see face-down pieces?

No. The computer is given what you would know in its seat: the face-up pieces, the face-down pieces it has captured, and a count of the hidden pieces by kind for both sides. It never sees what a face-down piece is, on the board or among the ones you took from it. The shuffle comes from a new random seed each game and never changes during it, which is why a face-down piece you take back with Undo and move again shows the same identity.

Its moves come from PikaJieQi, built from Pikafish's open-source Jieqi code and running inside your browser, with a backup search taking over if it cannot start. Hint asks the same engine at full strength for one move, from what you can see. When the game is over every hidden piece is turned up, and pieces that never moved are drawn with a dashed outline, so you can check what each side was holding.

AI credits

The computer opponent is the open-source engine PikaJieQi, running in your browser.

Used under GPL-3.0, compiled to WebAssembly with one browser entry-point patch; the source commit, the patch and the compiler are listed in the NOTICE.