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. Problem 1: Search Crashes → International Promotion of Xiangqi Engines
☰ Contents
Problem 1: Search Crashes
Phenomenon: The engine crashes or exits unexpectedly during search.
Possible causes:
- Stack overflow (search depth too large)
- Memory access out of bounds (transposition table operation error)
- Integer overflow (evaluation value calculation)
- Deadlock (multi-thread synchronization issues)
Solutions:
- Increase stack size or limit search depth
- Add array boundary checks and memory allocation checks
- Use safe integer types
- Use synchronization primitives correctly
Problem 2: Strength Decreases Instead of Increases
Phenomenon: After code modification, the engine’s strength decreases.
Possible causes:
- Pruning logic error (pruning branches that should not be pruned)
- Evaluation function error (feature weight adjustment that violates chess principles)
- Move ordering error (best move not searched first)
- Transposition table error (wrong replacement strategy or hash collision handling)
Solutions:
- Use Fishtest for SPRT testing
- Use regression test sets to check strength changes
- Use binary search to locate the specific modification that caused the strength change
Problem 3: Incomplete UCCI Protocol Implementation
Phenomenon: The engine cannot work properly in a UCCI debugger or other GUI.
Common issues:
- Missing or malformed “ucciok” response
- FEN string parsing error in the “position” command
- Incorrect handling of time control parameters in the “go” command
- Delayed response to the “stop” command
Solutions:
- Use a UCCI debugger to test UCCI commands one by one
- Refer to the UCCI protocol specification on xqbase.com for implementation
- Use existing open source UCCI implementations as reference
Problem 4: Multi-thread Safety
Phenomenon: The engine becomes unstable or decreases in strength in multi-threaded mode.
Common issues:
- Thread safety of the transposition table
- Thread safety of the evaluation function
- Thread safety of the move generator
- Thread safety of time management
Solutions:
- Use thread-safe data structures
- Reduce read-write conflicts on shared data
- Use atomic operations instead of locks
- Use Thread Local Storage
Volume XXX: International Outlook for Xiangqi Engines
International Promotion of Xiangqi Engines
Ways to promote Xiangqi engines internationally:
- Translate engine documentation into English and other languages
- Present Xiangqi engine research results at international academic conferences
- Participate in international computer game competitions
- Integrate Xiangqi engines into chess variant projects (such as Fairy-Stockfish)