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.
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.
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.
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.
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 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.
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.
A game ends in one of three ways:
| Result | When |
|---|---|
| Checkmate | The general is in check and nothing can capture, block or step away |
| No legal move | The side to move has no legal move at all, in check or not, and loses |
| Draw | 40 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.
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.
| Xiangqi | Jieqi | Banqi | |
|---|---|---|---|
| Board | 9×10 points, river and palaces | Same as xiangqi | 4×8 squares, half a board |
| Start | Every piece face up, fixed places | Generals face up, 30 pieces face down on their own side's starting points | All 32 face down in random places, colours mixed |
| Revealing | None | Only by moving the piece | Flip any piece in place as your turn |
| Advisors and elephants | Tied to the palace and own half | Free once face up | Move one square like everything else |
| How you win | Checkmate or no legal move | Checkmate or no legal move | Capture 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.
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.
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.
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.
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.
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.
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.