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:

  1. Stack overflow (search depth too large)
  2. Memory access out of bounds (transposition table operation error)
  3. Integer overflow (evaluation value calculation)
  4. Deadlock (multi-thread synchronization issues)

Solutions:

  1. Increase stack size or limit search depth
  2. Add array boundary checks and memory allocation checks
  3. Use safe integer types
  4. Use synchronization primitives correctly

Problem 2: Strength Decreases Instead of Increases

Phenomenon: After code modification, the engine’s strength decreases.

Possible causes:

  1. Pruning logic error (pruning branches that should not be pruned)
  2. Evaluation function error (feature weight adjustment that violates chess principles)
  3. Move ordering error (best move not searched first)
  4. Transposition table error (wrong replacement strategy or hash collision handling)

Solutions:

  1. Use Fishtest for SPRT testing
  2. Use regression test sets to check strength changes
  3. 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:

  1. Missing or malformed “ucciok” response
  2. FEN string parsing error in the “position” command
  3. Incorrect handling of time control parameters in the “go” command
  4. Delayed response to the “stop” command

Solutions:

  1. Use a UCCI debugger to test UCCI commands one by one
  2. Refer to the UCCI protocol specification on xqbase.com for implementation
  3. 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:

  1. Thread safety of the transposition table
  2. Thread safety of the evaluation function
  3. Thread safety of the move generator
  4. Thread safety of time management

Solutions:

  1. Use thread-safe data structures
  2. Reduce read-write conflicts on shared data
  3. Use atomic operations instead of locks
  4. Use Thread Local Storage

Volume XXX: International Outlook for Xiangqi Engines

International Promotion of Xiangqi Engines

Ways to promote Xiangqi engines internationally:

  1. Translate engine documentation into English and other languages
  2. Present Xiangqi engine research results at international academic conferences
  3. Participate in international computer game competitions
  4. Integrate Xiangqi engines into chess variant projects (such as Fairy-Stockfish)