Research Report on the History of Computer Chinese Chess (Xiangqi) Game-Playing
A structured history of Chinese chess engine development from the 1980s to 2026, covering major engines, protocols, and community tooling. Comparative Analysis of Horse and Cannon Values → Basic Compilation Configuration
Comparative Analysis of Horse and Cannon Values
The comparison of Horse and Cannon values is a classic topic in Xiangqi theory:
Material balance period: Horse is approximately 4.0-4.5 pawn units, Cannon approximately 4.5-5.0 pawn units.
Endgame period: Horse value increases slightly relative to Cannon; Cannon value decreases (fewer cannon mounts).
Positions without Advisors and Elephants: Horse value increases significantly; Cannon value also increases significantly; Horse and Cannon values are roughly equal.
Horse-to-Cannon value ratio in different positions: Opening roughly equal 0.95:1.00; Middlegame roughly equal 0.90:1.00; Opponent has no Advisors/Elephants 1.20:1.00; Opponent has Advisors/Elephants 0.85:1.00.
Special Status of the Chariot (Rook) in Evaluation
The Chariot is the most powerful piece in Xiangqi. The base value of a Chariot is approximately 10 pawn units.
Chariot in the opening: Value approximately 9.5-10.5 pawn units. After entering the opponent’s territory, it can reach 11-12 pawn units.
Chariot in the middlegame: Value approximately 10-11 pawn units. Chariots with open files have higher value. The cooperative value of two Chariots is approximately 1.1 times the sum of their individual values.
Chariot in the endgame: Value approximately 8-10 pawn units. Value greatly increases when controlling the file of the opponent’s King.
Principles of Material Exchange Evaluation
In Xiangqi, the principles of material exchange evaluation:
Equivalent exchange principle: One Chariot approximately equals one Horse plus one Cannon; One Chariot approximately equals two Cannons; One Horse approximately equals one Cannon (Cannon slightly better).
Unequal exchange principle: Active exchanges can be equal or slightly disadvantageous; Passive exchanges require more compensation; Trading one Chariot for two Horses or two Cannons is slightly disadvantageous materially but may gain positional compensation.
Implementation of Piece Evaluation in NNUE
In the NNUE evaluation network, piece values are not explicitly encoded but automatically learned from training data.
Characteristics of NNUE piece evaluation: Context dependence (the same piece material has different values in different positions); Non-linear interaction (can model non-linear interactions between pieces); Data-driven (piece values are automatically learned from training data); Dynamic adaptability (evaluation precision continuously improves).
Volume XXI: Xiangqi Engine Compilation and Performance Optimization
Basic Compilation Configuration
Basic compilation configuration for a Xiangqi engine (taking Pikafish as an example):
- Compiler: g++ or clang++
- C++ standard: C++17
- Optimization level: -O3 (release version)
- Debug symbols: -g (debug version)
- Warning level: -Wall -Wextra