Skip to content
Strategy

Xiangqi

Chinese chess: cannons, elephants and a river to cross.

The great Chinese strategy game, played by hundreds of millions of people: palaces, a river, cannons that jump and generals that cannot face each other. Dedicated alpha-beta engine.

Players
1 or 2 players
Length
20 to 45 min
  • Against the AI
  • Two players on one device
Play Xiangqi

15 days of full access, no account · No download

Xiangqi preview

How to play

Goal

Checkmate the opposing general. In xiangqi, a player who has no legal move loses the game, whether in check or not (there is no stalemate).

The board

  • Pieces are placed on the intersections of a grid of 9 lines by 10. A river separates the two sides; a 3 × 3 palace marked with an X sits in the centre of each end.
  • Red moves first.

Movement

  • General (K): one intersection in a straight line, without leaving its palace. The two generals may never face each other on a file with no piece between them.
  • Advisor (A): one intersection diagonally, within the palace.
  • Elephant (E): exactly two intersections diagonally, without crossing the river; blocked if the midpoint is occupied.
  • Horse (H): one intersection in a straight line then one diagonally; blocked if the first intersection is occupied (the horse’s “leg”).
  • Chariot (R): like a rook, in a straight line over as many intersections as you like.
  • Cannon (C): moves like the chariot, but captures only by jumping over exactly one piece (the screen), of either colour.
  • Soldier (P): one intersection forward; after crossing the river, sideways as well. Never moves backward and is never promoted.

Draws and repetitions

  • A position repeated three times is a draw, unless one side is giving perpetual check: that side is then declared the loser.
  • With no attacking piece on either side, the game is a draw.

Controls

  • Tap a piece then its destination intersection, or drag it. Legal moves are shown; captures are circled in red.
  • “Pieces” option: traditional Chinese characters or pictograms for the uninitiated (the legend is in the side panel).
  • Moves are recorded as “piece, starting file, direction, destination”: R1+2 means the chariot on file 1 advances two points.
Tip: cannons are formidable in the opening (central cannon!), while horses and chariots dominate the middlegame. Keep your advisors and elephants home to protect the general.

About the AI

Dedicated alpha-beta engine written for Ludo Genie: 11 × 12 bordered board, Zobrist keys, transposition table, principal variation search with aspiration windows, quiescence search on captures, null move, late move reductions, killer and history moves, check extensions, perpetual check detection. The evaluation relies on piece-square tables tuned for xiangqi, chariot and horse mobility, cannon alignment and palace protection. The Master level thinks for about 3 seconds per move; the lower levels reduce the depth, add noise to the evaluation and make less and less frequent inaccuracies.

AI levels

  1. BeginnerIs discovering the rules with you: quick moves and frequent mistakes.
  2. AmateurKnows the basic tactics, but lets opportunities slip by.
  3. IntermediateCalculates five moves ahead and punishes most mistakes.
  4. ExpertDeep search, rare inaccuracies.
  5. MasterThe engine at full strength: about 3 seconds per move.

More strategy games

Lire cette page en français