Abstract
Game playing has long served as a fundamental benchmark for evaluating Artificial General Intelligence. While Large Language Models (LLMs) have demonstrated impressive capabilities in general reasoning, their effectiveness in spatial strategic reasoning, which is critical for complex and fully observable board games, remains insufficiently explored. In this work, we adopt Chinese Chess (Xiangqi) as a challenging and rich testbed due to its intricate rules and spatial complexity. To advance LLMs' strategic competence in such environments, we propose a training framework tailored to Xiangqi, built upon a large-scale dataset of five million board-move pairs enhanced with expert annotations and engine evaluations. Building on this foundation, we introduce Xiangqi-R1, a 7B-parameter model trained in a multi-stage manner. Our experimental results indicate that, despite their size and power, general-purpose LLMs struggle to achieve satisfactory performance in these tasks. Compared to general-purpose LLMs, Xiangqi-R1 greatly advances with an 18% rise in move legality and a 22% boost in analysis accuracy. Our results point to a promising path for creating general strategic intelligence in complex areas.
Introduction
While Large Language Models (LLMs) have shown flashes of brilliance in general reasoning, they often stumble when faced with Spatial Strategic Reasoning. This involves understanding a 2D board state, adhering to strict movement rules, and planning several steps ahead based solely on text-based board representations, such as Forsyth-Edwards Notation (FEN) strings.
Standard Chess is increasingly viewed as "too easy" for modern LLMs due to its regular geometry and the abundance of training data. In contrast, Xiangqi (Chinese Chess) offers a superior testbed because of its larger 9x10 board, unique spatial constraints (the "River" and the "Palace"), and asymmetric piece rules. General-purpose models, even those with hundreds of billions of parameters, frequently suggest illegal moves or fail to understand when a side has a material advantage in Xiangqi.
Methodology
To address these challenges, we developed a three-stage training framework designed to move the model from basic rule-following to advanced strategic thinking.
Training Stages
- Stage 1: SFT on Board-Move Pairs: The model is fine-tuned on 5.1 million pairs derived from professional game records to learn basic move legality and the "language" of the board.
- Stage 2: SFT with Analytical Data: The model is trained on approximately 53,000 high-quality samples containing expert commentary and evaluations from Pikafish (a top-tier Xiangqi engine with an Elo of 3954). This teaches the model to explain the rationale behind its moves.
- Stage 3: GRPO-based Reinforcement Learning: Using Group Relative Policy Optimization (GRPO), the model is refined using a multi-dimensional reward system. This includes a Move Reward for legal and optimal moves, an Analysis Reward for correct situational assessment, and a Format Reward for adhering to the
<Think>and<Answer>reasoning structure.
Key Insights and Results
Xiangqi-R1 sets a new state-of-the-art for LLMs in this domain, achieving a 95.2% legal@1 rate—an 18% improvement over the strongest general-purpose reasoning models. Despite having only 7B parameters, it outperformed models 10-100x its size in both move suggestion and board evaluation.
The "Defensive Piece" Hurdle
One of the most significant findings involves the disparity in reasoning accuracy across different piece types. LLMs find offensive pieces (Rooks, Pawns) easier to handle because their movement rules are relatively straightforward. In contrast, defensive pieces like the King and Elephant—which have restricted movement zones (the Palace) or cannot cross the River—showed the lowest success rates. This highlights that spatial constraints are the most difficult aspect for LLMs to "visualize" through text.
RL as a Generalizer
While Supervised Fine-Tuning (SFT) often leads to memorization of specific board states, Reinforcement Learning (Stage 3) proved crucial for generalization. RL helped the model develop robust reasoning paths that apply to novel board states not present in the initial training data.
Conclusion and Future Work
Xiangqi-R1 demonstrates that specialized training and reinforcement learning can significantly enhance spatial reasoning in relatively small models. However, limitations remain. The model relies entirely on text (FEN strings); integrating visual board inputs via Multimodal LLMs could potentially enhance spatial intuition. Furthermore, while excellent at "next-move" suggestions, maintaining the consistency required for full-game stability and high-precision endgame reasoning remains a focus for future research.
Summary updated