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. Chapter 2: Integration of Chinese Chess Engines and Software Ecosystems → Chapter 7: Maintenance an…

☰ Contents

Chapter 2: Integration of Chinese Chess Engines and Software Ecosystems

2.1 Design and Application of Engine APIs

The API design of Chinese Chess engines typically uses the UCCI protocol serialized communication format. Typical API designs include:

Synchronous call: GUI sends command -> wait for engine response -> receive result. This method is simple and direct, suitable for most analysis scenarios.

Asynchronous call: GUI sends command and returns immediately; the engine notifies the GUI via callback after completing background computation. This method is suitable for scenarios requiring long-term analysis (such as deep analysis, position exploration).

2.2 Integration of Game Record Editors and Engines

Modern game record editors deeply integrate engine analysis functionality. The typical workflow:

  1. User opens a game record or customizes a position
  2. User requests engine analysis of the current position
  3. Engine searches in the background, returns the best move and evaluation value
  4. Game record editor displays the engine’s analysis results (best move, variations, evaluation trend, etc.)
  5. User can explore the variation branches suggested by the engine

2.3 Overview of Online Analysis Platforms

Online analysis platforms based on Chinese Chess engines include:

Web analysis engines: Running Pikafish directly in the browser via WebAssembly (WASM) technology. Users can use top-tier engines for analysis in the browser without downloading or installing any software.

Cloud analysis platforms: Deploying engines such as Pikafish on cloud servers, providing services through Web APIs. Users connect to cloud servers via browser or app for engine analysis. The advantage of this model is that users can access more powerful computing resources.

Mobile analysis apps: Chess analysis applications running on iOS and Android devices. Mobile apps typically use the ARM-compiled version of the engine, achieving efficient NNUE inference through the NEON instruction set.

Chapter 3: The Influence of Chinese Chess Engines in Academia

3.1 Practice of Engine Development Projects in University Courses

Several Chinese universities have introduced Chinese Chess engine development projects in their computer science courses:

Tsinghua University AI course: Includes Chinese Chess engine as a course design option. Student teams complete a basic Chinese Chess engine over the semester, from position representation to search algorithms to evaluation functions.

Peking University computer game-playing course: Focuses on the theory and practice of computer game-playing, with the Chinese Chess engine being one of the core projects of the course. Students need to implement Alpha-Beta search, evaluation functions, and the UCCI protocol.

Zhejiang University software engineering course: Student teams develop UCCI protocol-based engines and compete at the end of the semester. The course emphasizes software engineering practices (version control, code review, testing, etc.).

3.2 Academic Citations of Engine Open-Source Projects

The citation status of the Pikafish project in academia:

Computer science education field: Pikafish is used as a teaching case, demonstrating the application of modern software engineering practices in AI projects.

AI research field: Pikafish is cited in academic papers as an application case of NNUE in the Chinese Chess domain.

Game research field: Comparative data between Pikafish and traditional Chinese Chess commercial engines is used in academic papers studying the evolution of computer playing strength.

3.3 Academic Value of Computer Game-Playing Competitions

The contributions of computer game-playing competitions to Chinese Chess engine academic research:

ICGA International Computer Games Championship: Provides a standardized competition environment, offering comparable experimental data for academic research.

CCMC (Chinese Computer Game Championship): Records the trajectory of Chinese Chess engine strength evolution over the years.

University Student Computer Game Competition: A competition sponsored by the Ministry of Education, attracting a large number of university students to participate in Chinese Chess engine development.

Chapter 4: Code Archaeology of Chinese Chess Engines

4.1 ElephantEye Code Structure Analysis

As one of the earliest open-source Chinese Chess engines, ElephantEye’s code structure has significant learning and research value.

Core modules:

  1. Position representation module (position.h/position.cpp): management and updating of board state
  2. Move generation module (movegen.h/movegen.cpp): move generation logic for all pieces
  3. Search module (search.h/search.cpp): implementation of Alpha-Beta search
  4. Evaluation module (evaluate.h/evaluate.cpp): implementation of the evaluation function
  5. Transposition table module (hash.h/hash.cpp): implementation of Zobrist hashing and transposition table
  6. UCCI protocol module (ucci.h/ucci.cpp): implementation of the UCCI protocol

Code style: Huang Chen’s code style is clear and concise, using meaningful variable and function names. Extensive comments make it suitable for beginner readers.

Degree of modularization: ElephantEye has a relatively high degree of modularization, with core modules communicating through well-defined interfaces. This design makes the code easy to understand and modify.

4.2 Pikafish Code Structure Analysis

As an engine adapted from Stockfish, Pikafish’s code structure inherits Stockfish’s high quality and professional design.

Characteristics of core modules:

  1. Bitboard operations: extensive use of precomputation and bitwise operations for extremely high performance
  2. Template metaprogramming: using C++ template techniques for compile-time type inference and optimization
  3. Multi-threading support: using C++ standard library threads and synchronization primitives
  4. NNUE inference: highly optimized matrix operations and SIMD instructions

Differences from Stockfish: Pikafish’s code modifications for Chinese Chess adaptation include:

  1. Board dimensions changed to 10 rows by 9 columns
  2. Piece types changed to 7 per side
  3. Movement rule adaptation (Cannon’s jumping capture, King face-to-face, Bishop’s eye-blocking, Knight’s leg-hobbling, etc.)
  4. NNUE input feature adaptation (adjustment of the HalfKP feature set)

Chapter 5: Supplementary Historical Notes on Chinese Chess Engines

5.1 Supplementary Materials on Early Engines

The following are supplementary materials on early engines:

Yu Xishun (虞希舜), developer of Zun Zu: According to limited public information, Yu Xishun moved on to other fields after developing Zun Zu. Some sources indicate he worked at Microsoft, but detailed information has not been obtained. The source code of Zun Zu / Xiangqi Master 3 has never been made public.

Zhao Mingyang (赵明阳), author of Xiangqi Qibing: Zhao Mingyang’s Xiangqi Qibing won the championship at the 10th ICGA in 2005. Xiangqi Qibing’s traditional evaluation function held a certain leading position among engines of its era.

5.2 Forgotten Engines

In the long history of Chinese Chess engines, some engines, although they did not achieve top competition results, still made contributions to the community:

Chu Han Qi Yuan (楚汉棋缘): A popular early Chinese Chess software on the Windows platform, with a good user interface and basic engine functionality.

Xiangqi Wizard / ElephantBoard: A GUI developed by Huang Chen, featuring the built-in ElephantEye engine. Xiangqi Wizard is suitable for teaching and casual entertainment, and was one of the most user-friendly Chinese Chess software on the Windows platform.

Xiangqi Wizard Interface Screenshot
Xiangqi Wizard (ElephantBoard) — A UCCI graphical interface developed by Huang Chen, supporting multiple engine integrations

5.3 Chronological Corrections of Engine Events

During the compilation of this report, some event timelines were noted as potentially uncertain, and are marked as follows:

Version timeline of Zun Zu: Some sources indicate that Zun Zu won the ICGA championship in 1989, but other sources mention an earlier version. A possible reason is that the earliest unofficial version of Zun Zu may have existed as early as 1987-1988.

Release date of Chess1 / Qi Yin: Different sources show the release date of Qi Yin (Chess1) ranging from 1997 to 1999. Considering that its Windows version requires Windows 95 support, the most likely release date is 1997-1998.

Relationship between Xiangqi Qibing and Xiangqi Cyclone: Some community materials mention that there was technical exchange between Zhao Mingyang (author of Xiangqi Qibing) and Chen Chaoying (author of Xiangqi Cyclone), but this claim has not been confirmed by either party.

Chapter 6: The Cultural Influence of Chinese Chess Engines

6.1 Engines and the Publication of Chess Literature

Chinese Chess engines have had a significant impact on Chinese Chess book publishing:

Traditional chess literature (pre-2005): Primarily relied on authors’ manual analysis and experience-based judgment. Chess analysis had a strong personal flavor.

Modern chess literature (post-2005): Engine analysis has become a standard feature of chess books. Authors use engines to verify their analyses and provide more precise variation displays.

Online game record databases: Engine analysis-based online game record databases (such as Xiangqi Cloud Book / 象棋云库) make game record research more convenient and efficient.

6.2 The Role of Engines on Online Platforms

The role of Chinese Chess engines on online playing platforms:

Anti-cheating systems on playing platforms: Online platforms use engine analysis to detect the similarity between players’ moves and engine suggestions, assessing the likelihood of cheating.

AI practice robots: Online platforms use engines as practice robots, providing playing practice for users at different difficulty levels.

Engine analysis in live streams: In chess live streams, streamers use engines to analyze tournament games, providing best move suggestions and variation displays.

Chapter 7: Maintenance and Updates of Chinese Chess Engines

7.1 Engineering Practices for Version Releases

The version releases of Chinese Chess engines follow certain engineering practices:

Development version: Continuously integrate new features on the development branch with frequent commits.

Testing version: After basic testing, release to community testers for large-scale testing.

Stable version: After statistical validation on platforms such as Fishtest, release as a stable version.

Long-term support version: For important stable versions, provide long-term updates and maintenance.

7.2 Issue Tracking and Community Feedback

Open-source projects like Pikafish use GitHub Issues for issue tracking:

Bug reports: Users submit bug reports; developers locate and fix issues.

Feature requests: Users submit feature requests; the community discusses their feasibility and priority.

Q&A: Community members answer other users’ questions in Issues.

7.3 Continuous Integration and Automated Testing

Modern Chinese Chess engine projects use Continuous Integration (CI) for quality assurance:

Compilation testing: Each commit is automatically verified for successful compilation on multiple platforms and compilers.

Regression testing: Run standard test game records to ensure code changes have not introduced playing strength regressions.

Performance testing: Compare the search performance (NPS and other metrics) of the current version with the previous version.