Representation Matters for Mastering Chess: Improved Feature Representation in AlphaZero Outperforms Switching to Transformers

Johannes Czech, Jannis Blüml, Kristian Kersting, Hedinn Steingrimsson

In the era of "Foundation Models," the prevailing wisdom is often: more data + bigger Transformers = better results. However, a new paper from researchers at TU Darmstadt and Rice University suggests that for specialized domains like chess, we shouldn't throw away our domain knowledge just yet.

Their study, "Representation Matters for Mastering Chess," demonstrates that while hybrid Transformer-CNN architectures offer slight improvements, the real "secret sauce" for a massive performance boost lies in how we represent the game state and formulate the loss function.

TL;DR

By refining input features and loss functions (the "FX" extension), the authors achieved a staggering 180 Elo boost in AlphaZero-style chess engines. This improvement significantly outweighs the gains from switching to Transformer-based architectures, proving that smart feature engineering remains a potent tool even in the age of deep learning.

What Problem Does This Paper Address?

Since the debut of AlphaZero, the gold standard for chess AI has been a deep Convolutional Neural Network (CNN) paired with Monte-Carlo Tree Search (MCTS). While Vision Transformers (ViTs) have revolutionized computer vision, they face a major hurdle in chess: latency.

In competitive chess, an engine must evaluate thousands of positions per second. Pure Transformers are computationally expensive and slow, leading to poor performance when search time is limited. The authors set out to see if a hybrid approach—combining the efficiency of CNNs with the global attention of Transformers—could bridge this gap, and whether "feature engineering" (often considered obsolete in deep learning) still has a role to play.

Methods

The researchers introduced two major innovations:

  1. AlphaVile: A hybrid architecture that uses "Mobile Convolutional Blocks" (from MobileNet) for early-stage processing and "Next Transformer Blocks" for high-level reasoning. This design aims to capture global board relationships without the massive latency of a pure ViT.
  2. The FX (Feature eXtension) Suite:
    • Expanded Input Planes: They increased the input from 39 to 52 planes, adding "hand-crafted" features like piece masks, material differences, and checkerboard patterns.
  3. WDLP Value Head: Instead of a single number representing the win probability, they implemented a head that predicts the full Win-Draw-Loss distribution plus an auxiliary "Moves Left" (Ply) head to improve endgame precision.
Figure 1. Architectural Overview of the Predictor Network in AlphaVile. The Mobile Convolutional Block (MCB) is inspired by Sandler et al.’s work [22], while the Next Transformer Block (NTB) is integrated from Li et al.’s re- search [16]. The parameter B denotes the number of hybrid blocks within the architecture, offering scalability to the model. Our standard AlphaVile model employs ten MCBs in Stage 1 (N1 = 10) and two Stage 2 Blocks (B = 2). Each Stage 2 Block consists of seven MCBs (N2 = 7) and one NTB.

Datasets

  • KingBase Lite 2019: A collection of over 1 million high-quality human games (Elo > 2200) used for training.
  • Lichess Variant Database: To test generalizability, the models were also evaluated on Atomic and Crazyhouse chess variants.
  • Opposite-Colored Bishop Endgames: A specific benchmark of 20 challenging positions known for being difficult for engines to evaluate correctly as draws.

Key Insights and Ideas

  • Feature Engineering is "Forever Young": The most surprising finding was that providing the network with "pre-calculated" information (like material count) allowed it to spend its capacity on complex strategy rather than re-learning basic arithmetic.
  • The Latency-Accuracy Trade-off: As shown in Figure 3, pure ViTs (ViT-FX) are outliers—they have high latency and significantly lower accuracy compared to CNNs and hybrids when constrained by real-time search requirements.
  • Endgame Sensitivity: The "Moves Left" head was crucial for endgames. By predicting how close a game is to finishing, the engine became much better at identifying "fortresses" and drawn positions that usually confuse standard AlphaZero.
Figure 3. A comparison between AlphaVile and other efficient neural network architectures, with a focus on achieving an optimal balance between accuracy and la- tency. The results were obtained from three indepen- dent seed runs.

Key Results

  • Massive Elo Gains: Adding the FX features to a standard AlphaZero-style ResNet resulted in a 180 Elo improvement.
  • Hybrid Superiority: The hybrid AlphaVile-FX model outperformed the enhanced AlphaZero-FX by an additional 30 Elo, showing that Transformers do help, but only when the representation is already optimized.
  • Variant Mastery: The improvements were consistent across chess variants, with AlphaVile-FX dominating in both Crazyhouse and Atomic chess.
Figure 4. The AlphaZero-FX network showcases ex- cellent performance in chess (4a), crazyhouse (4b), and atomic chess (4c), surpassing the vanilla ver- sion using Input Representation Version 1 without the WDLP head. The performance increase in chess is noteworthy, with an increase of 180 Elo point. The performance level of the AlphaVile network is com- parable to that of the AlphaZero network, especially at longer move times.

Limitations and Future Work

While the hybrid AlphaVile model is efficient, the authors note that pure Vision Transformers are still too slow for the high-throughput requirements of MCTS on current hardware.

Furthermore, this study primarily used supervised learning from human games. A natural next step would be to integrate these FX features and hybrid architectures into a full self-play reinforcement learning pipeline (like the original AlphaZero) to see if the Elo gains scale even further when the model generates its own data.

For now, the message is clear: if you want a stronger AI, don't just change the engine—take a closer look at the fuel.

Summary updated

BibTeX
@inproceedings{czech2024representation,
  author = {Johannes Czech and Jannis Blüml and Kristian Kersting and Hedinn Steingrimsson},
  title = {{Representation Matters for Mastering Chess: Improved Feature Representation in AlphaZero Outperforms Switching to Transformers}},
  booktitle = {ECAI},
  year = {2024},
  doi = {10.3233/faia240763},
}
Figure