Chinese Chess
Play Xiangqi (Chinese Chess) against a rule-based AI. Classic strategy game with unique pieces and movement rules. Choose from three CPU strategies.
How to Play Chinese Chess
- Red moves first. Select a side to play as (Red, Black, PvP, or CPU). In CPU mode the AI controls both sides.
- Choose a CPU strategy for each AI side: Smart plays principled Xiangqi with variety, Best always picks the strongest move, Random picks any legal move.
- Click a piece to select it; legal destinations highlight on the board. Click a highlighted point to move.
- The General must stay within the palace and may never face the opposing General with no pieces between them. Checkmate or stalemate the opponent's General to win.
Frequently Asked Questions
- What CPU strategies are available?
- Smart follows the rule-based AI priority order and picks randomly among moves with similar positional scores — strong but varied. Best always picks the single highest-scored move — the strongest and most consistent play. Random picks any legal move with no rules or scoring — completely unpredictable.
- How is Chinese Chess different from Western Chess?
- Pieces sit on intersections rather than squares; the board is divided by a river that restricts some pieces; and the General and Advisors cannot leave the palace.
- What does the Cannon do?
- The Cannon moves any number of points orthogonally like a Chariot, but can only capture by jumping over exactly one piece (the "screen") and landing on an enemy behind it.
- What is the flying General rule?
- The two Generals may never face each other along an open file with no pieces between them. A move that creates this situation is illegal.
- How does the rule-based AI choose a move?
- It works down a priority list: checkmate, capture the General, give check, then captures ordered by piece value — Chariot, Cannon, Horse, then anything else. Below that it prefers crossing the river, advancing a Pawn, and pushing a Chariot, Cannon or Horse forward. It skips captures that would lose more than they win, moves that leave a piece where it can be taken for free, and moves that let the opponent checkmate in reply. The position score picks the strongest move within whichever rule fires.
- Do CPU-vs-CPU games end in a draw?
- About one in five does, usually by repetition. The AI looks one move ahead and checks whether its move lets the opponent checkmate, but it cannot plan the multi-move mating nets that decide most real Xiangqi games. The rest end in checkmate, mostly after one side has won material.