Predicting Chess Puzzle Difficulty with Transformers
Szymon Miłosz, Paweł Kapusta
TL;DR
This work tackles the problem of predicting chess puzzle difficulty by modeling human cognitive processing rather than purely optimizing for gameplay outcome. It introduces GlickFormer, a transformer-based architecture that combines a ChessFormer spatial backbone with two temporal modeling variants to approximate Glicko-2 puzzle ratings. On a large Lichess puzzle corpus, GlickFormer outperforms the ChessFormer baseline across MAE, MAZ, and accuracy within rating deviations, with the Factorized Encoder variant achieving the best MAE of 217.71 and 67.66% accuracy within 3RD. The results demonstrate the value of explicit temporal modeling in cognitive tasks and indicate potential for personalized training and broader educational AI applications.
Abstract
This study addresses the challenge of quantifying chess puzzle difficulty - a complex task that combines elements of game theory and human cognition and underscores its critical role in effective chess training. We present GlickFormer, a novel transformer-based architecture that predicts chess puzzle difficulty by approximating the Glicko-2 rating system. Unlike conventional chess engines that optimize for game outcomes, GlickFormer models human perception of tactical patterns and problem-solving complexity. The proposed model utilizes a modified ChessFormer backbone for spatial feature extraction and incorporates temporal information via factorized transformer techniques. This approach enables the capture of both spatial chess piece arrangements and move sequences, effectively modeling spatio-temporal relationships relevant to difficulty assessment. Experimental evaluation was conducted on a dataset of over 4 million chess puzzles. Results demonstrate GlickFormer's superior performance compared to the state-of-the-art ChessFormer baseline across multiple metrics. The algorithm's performance has also been recognized through its competitive results in the IEEE BigData 2024 Cup: Predicting Chess Puzzle Difficulty competition, where it placed 11th. The insights gained from this study have implications for personalized chess training and broader applications in educational technology and cognitive modeling.
