Banqi vs Computer

Dark Chess (暗棋) against the computer — three levels, earn ranking points.

How to play Banqi (Dark Chess / 暗棋)

Banqi — Dark Chess, Half Chess or 暗棋 — is one of the most beloved quick board games of the Chinese-speaking world, played in night markets, school yards and family living rooms across Taiwan, Hong Kong and Southeast Asia. It borrows the 32 pieces of Chinese Chess (xiangqi) but hides every one of them face-down on a half-size 4×8 board, so each game starts as a mystery: you do not even know which colour you will command until the first piece is flipped. Under the simple flip-or-move rhythm lies a sharp game of memory, probability and tactics. This version follows the most common Taiwanese half-board rules. Play a friend on the same screen, or challenge the computer at three difficulty levels and earn ranking points for every win.

The goal

Win by wiping out your opponent: you are victorious the moment every one of their sixteen pieces has been captured, or when it is their turn and they have nothing legal to do — no face-down piece left to flip and none of their revealed pieces able to move or capture. There is no check or checkmate as in regular chess; the General is just the strongest piece, and losing it early does not end the game.

The board and setup

The game is played on half a xiangqi board: 4 rows by 8 columns, 32 squares in total. All 32 xiangqi pieces — for each colour one General, two Advisors, two Elephants, two Chariots, two Horses, two Cannons and five Soldiers — are shuffled and placed face-down, one on every square. Nobody knows where anything is, and at the start neither player owns a colour. Red and Black are perfectly symmetrical; only the characters on the discs differ (帥/將, 仕/士, 相/象, 俥/車, 傌/馬, 炮/砲, 兵/卒).

Taking a turn — flip or move

On your turn you do exactly one of two things: flip any face-down piece to reveal it, or move (or capture with) one face-up piece of your own colour. The very first flip of the game is special: whatever colour Player 1 reveals with that flip becomes Player 1’s colour for the whole game, and the opponent automatically takes the other colour. Flipping a piece ends your turn — even if the piece you revealed belongs to the opponent and lands right next to your strongest piece, you must wait for your next turn to act.

Movement and capturing

  • Every piece — from the General down to the Soldier, and the Cannon too when it is not capturing — moves exactly one square up, down, left or right onto an empty square. There are no diagonal moves and no long slides.
  • A piece captures by stepping onto an orthogonally adjacent, face-up enemy piece of equal or lower rank. Equal ranks may take each other: a Soldier can capture a Soldier, a General can capture the enemy General.
  • The rank order from strongest to weakest is: General (將/帥) > Advisor (士/仕) > Elephant (象/相) > Chariot (車/俥) > Horse (馬/傌) > Soldier (卒/兵).
  • Two famous exceptions bend the ladder into a circle: the lowly Soldier CAN capture the General, while the General can NEVER capture a Soldier. Five little soldiers are the only real threat to the strongest piece in the game.
  • Face-down pieces can never be captured and never move — they must be flipped first. A face-down piece is a wall for everyone (and a perfect cannon screen).

The capture table explained

Read the ladder like this: the General captures Advisors, Elephants, Chariots, Horses, Cannons and the enemy General — everything except Soldiers. The Advisor captures everything from Advisor down, the Elephant from Elephant down, the Chariot from Chariot down, and the Horse captures Horses, Cannons and Soldiers. The Soldier captures only enemy Soldiers — plus the General, its special prey.

The Cannon is the odd one out. For BEING captured it sits between the Horse and the Soldier: the General, Advisor, Elephant, Chariot and Horse can all take it with a normal one-step capture, an enemy Cannon can take it with a jump, but a Soldier can never touch it. For its OWN captures the Cannon ignores rank completely — see below.

The Cannon — the screen jump

The Cannon (炮/砲) never captures by stepping, not even a piece standing right beside it. Instead it captures exactly like in xiangqi: it fires along its row or column, jumping over exactly one intervening piece (the “screen”) and landing on the first piece beyond it. The screen may be anything — face-up or face-down, friend or enemy — and the distances on either side of the screen do not matter. The target must be a face-up enemy piece, and here is the Cannon’s power: it may capture ANY rank, including the General and Advisors. With zero screens or two screens in the way there is no shot. When it is not capturing, the Cannon simply slides one square onto an empty space like everyone else.

Winning, losing and the draw rule

You lose in exactly two ways: all sixteen of your pieces have been captured, or it is your turn and you have no legal move at all (nothing left to flip, and every revealed piece of yours is blocked with nothing it may capture). Because flipping is always legal while any face-down piece remains, stalemates only happen late in the game.

To stop endless shuffling, this version uses a 20-move draw rule: if twenty consecutive turns (counting both players) pass without a single flip or capture, the game immediately ends in a draw. Any flip or capture resets the counter to zero. If neither side can make progress — say a lone Soldier fleeing a General forever — the game ends fairly instead of dragging on.

Playing the computer (ranked)

In “Banqi vs Computer” you flip first, and just like in the real game the first colour you reveal becomes yours — there is no side picker. Easy plays loosely and mostly at random, so beginners can win. Normal weighs material and avoids obvious blunders. Expert calculates captures two moves deep, judges every flip by its expected value over the pieces still hidden, and punishes careless reveals. The computer thinks entirely on your device, so it works offline. Beat it to earn ranking points — Easy +10, Normal +30, Expert +100 — and sign in to put your best result on the leaderboard.

Strategy tips

  • Flip with a plan. Early flips are cheap information, but never flip right next to a strong revealed enemy piece — you may hand it a free meal. Flipping beside your own strong pieces is safer: if the new piece is an enemy, you can often capture it at once.
  • Count the bag. All the maths of Banqi is public: 1 General, 2 Advisors, 2 Elephants, 2 Chariots, 2 Horses, 2 Cannons and 5 Soldiers per colour. Track what has been revealed and captured and you always know exactly what can still come out of a flip — and how risky it is.
  • Respect the Soldiers. Your General is the strongest piece but it dies to any of five enemy Soldiers. Keep it away from soldier swarms, and keep one or two of your own Soldiers alive late in the game to hunt the enemy General.
  • Cannons love a crowded board. Early on, screens are everywhere and a Cannon can snipe Generals and Advisors from across the board. Fire early — but remember every piece except the Soldier can capture your Cannon back, so check what defends the target.
  • Trade when ahead, hide when behind. If you have won the material battle, exchange equal pieces to simplify toward a won ending. If you are behind, keep pieces face-down (an unflipped piece cannot be captured) and remember the 20-move rule can save a hopeless position with a draw.

Frequently asked questions

Why is there no Undo button?

Because of hidden information. Flipping a piece reveals a secret; if you could undo a flip, you could peek at a disc and then take the move back, and in the two-player game an undo would also expose what the opponent just learned. To keep the game fair, every turn in Banqi is final — think before you flip.

Can the Cannon capture a piece standing right next to it?

No. The Cannon captures only with the screen jump: along its row or column, over exactly one piece, onto a face-up enemy any distance beyond. An adjacent enemy has no screen between it and the Cannon, so it is safe. The Cannon may still MOVE one square to an adjacent empty space like every other piece.

Can I capture a face-down piece?

No, never — face-down pieces must be flipped before they can be captured or moved. Some casual house variants let the Cannon “bomb” face-down discs blindly (risking a hit on your own piece); this version follows the standard Taiwanese rule and does not allow it.

Which Banqi variant is this exactly?

The Taiwanese half-board rules, the most widely played version: one-step movement for every piece, capture by equal-or-lower rank, Soldiers beat the General but not vice versa, and Cannons that capture any rank only by jumping one screen, while themselves being takeable by everything except Soldiers. Other regional variants exist (different cannon or elephant powers, different draw counts) but are not used here.

How do I earn ranking points, and does the game work offline?

Win a game of “Banqi vs Computer” at any level: Easy is worth 10 ranking points, Normal 30 and Expert 100. Draws and losses score nothing. Sign in and your best score per difficulty appears on the leaderboard. Once the page has loaded, both the two-player game and the computer opponent run entirely in your browser — wins earned offline are stored on your device and upload automatically the next time you are online and signed in.