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. Architecture-Specific Optimizations → Conversion Between Chinese and International Move Notation
Architecture-Specific Optimizations
Compilation optimizations for different CPU architectures:
x86-64 general: ARCH=x86-64 x86-64 modern (supports SSE4.2 and POPCNT): ARCH=x86-64-modern x86-64 AVX2 (post-2013 Intel Haswell/AMD Ryzen): ARCH=x86-64-avx2 x86-64 BMI2 (bit manipulation instruction set): ARCH=x86-64-bmi2 x86-64 AVX512 (high-end CPUs): ARCH=x86-64-avx512 ARMv8 general: ARCH=armv8 ARMv8 NEON (Apple Silicon, etc.): ARCH=armv8-neon
Link-Time Optimization (LTO)
Link-time optimization can significantly improve search engine performance:
- Enabling: -flto (GCC/Clang)
- Effect: Cross-module optimization at link stage
- Performance gain: approximately 5-15% strength improvement
- Compilation time: significantly increased
Profile Guided Optimization (PGO)
PGO uses runtime profiling data to guide compilation optimization:
Phase 1: Compile with -pg option to generate profiling data Phase 2: Run the engine on representative game analysis Phase 3: Recompile using profiling data to generate optimized binaries Performance gain: approximately 5-10% strength improvement
Memory Model Selection at Compile Time
Different memory model selections affect engine performance:
Standard memory model: std::memory_order_seq_cst (most strict, lowest performance) Relaxed memory model: std::memory_order_relaxed (most relaxed, highest performance) Selection principle: Use the most relaxed memory model while ensuring correctness
Volume XXII: Xiangqi Engine Language Adaptation
Conversion Between Chinese and International Move Notation
Xiangqi engine move output needs to support conversion between Chinese and international formats:
Chinese move format (traditional): Pao er ping wu, Ma 8 jin 7, Ju 1 ping 2, etc. International move format (coordinate format): a0a1, b0b3, etc. Algebraic move format: R1+2, N2+3, etc.