Amortized Planning with Large-Scale Transformers: A Case Study on Chess
Authors: Anian Ruoss
Gregoire Deletang
Sourabh Medapati
Jordi Grau-Moya
Li Kevin Wenliang
Elliot Catt
John Reid
Cannada A. Lewis
Joel Veness
Tim Genewein
Venue: NeurIPS 2024 poster (2024)
Keywords: chess
supervised learning
transformer
scaling
benchmark
Primary area: other

Abstract: This paper uses chess, a landmark planning problem in AI, to assess transformers’ performance on a planning task where memorization is futile — even at a large scale. To this end, we release ChessBench, a large-scale benchmark dataset of 10 million chess games with legal move and value annotations (15 billion data points)  provided by Stockfish 16, the state-of-the-art chess engine. We train transformers with up to 270 million parameters on ChessBench via supervised learning and perform extensive ablations to assess the impact of dataset size, model size, architecture type, and different prediction targets (state-values, action-values, and behavioral cloning). Our largest models learn to predict action-values for novel boards quite accurately, implying highly non-trivial generalization. Despite performing no explicit search, our resulting chess policy solves challenging chess puzzles and achieves a surprisingly strong Lichess blitz Elo of 2895 against humans (grandmaster level). We also compare to Leela Chess Zero and AlphaZero (trained without supervision via self-play) with and without search. We show that, although a remarkably good approximation of Stockfish’s search-based algorithm can be distilled into large-scale transformers via supervised learning, perfect distillation is still beyond reach, thus making ChessBench well-suited for future research.

Amortized Planning with Large-Scale Transformers: A Case Study on Chess
Anian Ruoss*
Grégoire Delétang"
Sourabh Medapati!
Jordi Grau-Moya'
Li Kevin Wenliang
Elliot Catt!
John Reid"
Cannada Lewis"
Joel Veness!
Tim Genewein'
Abstract
This paper uses chess, a landmark planning problem in AI, assess transformers' performance on planning task where memorization is futile even at large scale. To this end, we release ChessBench, large-scale benchmark dataset of 10 million chess games with legal move and value annotations (15 billion data points) provided by Stockfish 16, the state-of-the-an chess engine. We train transformers with up to 270 million parameters on ChessBench via supervised learning and perform extensive ablations to assess the impact of dataset size, model size, architecture type, and different prediction targets valuee, action-values, and behavioral cloning). Our largest models learn to predict action-values for novel boards quite accurately, implying highly non- non-trivial generalization. Despite performing no explicit search, our resulting chess policy solves challenging chess puzzles and achieves surprisingly strong Lichess blitz. Elo of 2895 against humans (grandmaster level). We also compare to Leela Chess Zero and AlphaZero (trained without supervision via self-play) with and without search. We show that, although a remarkably good approximation of Stockfish's ' search-based algorithm can be distilled into large-scale transformers via supervised learning, perfect distillation is still beyond reach, thus making ChessBench well-suited for future research.
Introduction
The ability to plan ahead and reason about long-term consequences of actions is a hallmark of rationality and human intelligence. Its replication artificial systems has been central goal of AI research since the field's inception. Perhaps the historically most famous planning problem in Al is chess, where naive search is computationally intractable and brute-foree memorization is futile even at scale. Conceptually, the ability plan and reason about consequences of actions is implemented via search algorithms and value computation 2 implement such algorithms at scale, feed-forward neural networks have been playing an increasingly important role. For instance, DQN (3] and AlphaGo [4] popularized the use of neural value estimators to scale RL and (Monte Carlo) tree search. Similarly, today's 's strongest chess engines also employ combination of search and amortized neural value estimation. For example, the state-of-ther -or-rr-rrttttttt Leela Chess Zero [5] 6). which builds upon AlphaZero 77) augments Monte Carlo tree search with neural value predictions. Likewise, Stockfish 16, currently the strongest chess engine, uses efficiently updatable neural network evaluation [8) highly specialized neural architecture to obtain fast evaluations. It is trained on value estimates of an earlier Stockfish version that uses human chess heuristics. All these chess engines tweak value-estimation networks towards fast evaluations that are to be combined with search
Equal contribution. Google DeepMind. Google. Correspondence {anianr, timgen) @googlc.com.
38th Conference on Neural Information Processing Systems (NcurIPS 2024).

---

Board annotation via strong oracle (Stockfish 16)
Drawy Xf games oxtract all unioue boards
Compute
State-value [Wink] (*)
Action [UC]
Action-value
Action
[FEN)
Collection of gemes noltton)
q" (s. o]
8 (6)
NV poree
FFEN 12>
51
<FEN
64
for
(M I dUM)
< M>>
31
Datasets
Training sets
Predictors
Action-value
Behavioral cloning
Love
ki P (1]o)
Loses
lig 12 Ln x)
Loes: kog ip"in"" (x())) Follay:
Sourca: games from Lichesa (range of Blo)
Test set tnealy caly gana bourds)
6(x)
VelT"
Qpin.n)
wi ue.ugal
R(A) P3
Vold') -m (od
dyyi a] cm Hegtoaall
Avallo
Source: curated chees, puzzies from lichess
10L
Puzzle Test set
122% cwerap mainng
Legai action leading to next stste with minimal predicted expected
Legal action with macinol predicted expectedd actin-value.
Legal action with highest prealcted probabiity.
viate-volue for opponent player.
Figure I: Top (Data annotation): We extract all boards from N randomly drawn games from Lichess, discard duplicate board states, and compute the state-value for each board as the win-probability via Stockfish. We compute action-values and the best action for all legal moves same way. Bottom left (Dataset creation): We construct training and test sets of various sizes (see Table[A]] Our largest training set has 15.3B action-values. Drawing games i.i.d. from the game database for test set leads to 14.7% of test boards appearing in the largest training set (mostly very early game states). We also use test set of 10K chess puzzles that come with a correct sequence of moves. Bottom right (Policies): We train predictors on three targets (state- or action-value values, or oracle actions), each of which can be used for a chess policy. Our value predictors are discrete discriminators (classifiers) that predict into which bin z; E { =K the oracle value falls.
board state in the
over many possible future move sequences. As a result, the value estimates themselves may not necessarily be optimal, which leaves open the question how far amortized planning with modern neural networks can be pushed with scale and whether the resulting "searchless" engines can match engines that use search at test time, at least in principle (putting aside computational efficiency).
To scientifically address this question, we create ChessBench (https: //g.tbbb thub. com/ htt.a//eeeeaaaeeasshhecoee
a large-scale chess dataset created from 10 million hu- man games that we annotate with Stockfish 16. We use ChessBench to train transformers of up to 270 million parameters via supervised learning to predict action- vaauuss given a board-state. We also construct searchless chess policies from these predictors, where the playing strength depends entirely on the quality of the value predictions. We find that predictions by our largest trained models generalize well and non-trivially to novel board states. The resulting policies are capable of solving challenging chess puzzles and playing chess at high level (grandmaster) against humans. Due to the combinatorial explosion of chess board states, virtually every new game involves many board states that were never seen during training (see Figure DT. This rules out memorization as a possible explanation and suggests that approximate version of Stockfish's 's seeachhbbseed value estimation algorithm can indeed be distilled into large transformers. Nonetheless, we also find that the performance gap cannot be fully closed, which may indicate that architectural innovations (or better optimization, data augmentation, etc.) might be needed instead of even larger seale.
Our main contributions are:
We introduce ChessBench, large-scale benchmark dataset for chess, consisting of 530M board states (from 10M games on lichess.org) annotated via Stockfish 16 with state-values and best-action, as well as 15B action-values for all legal actions in each board state (corresponding to roughly 8864 days of unparallelized Stockfish evaluation time).
We train transformers of up to 270M parameters to predict action-values via supervised learning. The largest models generalize well to novel boards, enable play at grandmaster level (Lichess blitz Elo of 2895) against humans, and solve chess puzzles with dificulty ratings up to Lichess Puzzle Elo of 2867 without using explicit search at test time.

---

We perform extensive ablations, including model- and dataset size, network architecture, action-valie value vs. state-value vs, behavioral cloning, and various hyper-parameters.
We open source our ChessBench dataset, our model weights, and all training and evaluation code at hhttps://githhie series of benchmark results through our models, ablations, and comparisons with Stock- fish 16, Leela Chess Zero, and AlphaZero, and their searchless policy/value networks.
com/ gowggeedeeemiidd/aeeeeoo set.cceaaccssssseeeeeeeseseee _csa_s and provide a
2
Methodology
We now describe the dataset creation, the neural predictors and how to construct policies from them, and our evaluation methodology (see Figure ! for an overview; full details in Appendix A
2.1 ChessBench Dataset
To construct training dataset for supervised learning downloaded 10 million games from Lichess (lichess.org) org) from February 20237] We extract all board states 8 from these games and estimate the state-value (>F(ss for each state with Stockfish 16 (our "value oracle") using time limit of 50ms per board (unbounded depth and maximum skill level). The value of a state is the win percentage estimated by Stockfish, lying between 0% and 100% Note that Stockfish does not provide centipawn score when it detects a mate-in-k; so we map all of these cases to a win percentage of 100%. We also use Stockfish to estimate action-values Q** (s, a) for all legal actions a E Alegal (s) in each state. Here we use a time limit of 50ms per state-action pair (unbounded depth and max skill level), which corresponds to a Lichess blitz Elo of 2713 for our action-valle oracle (see Section 3.1 The action-valls values (win percentages) also determine the oracle best action a.FF:
a SF (s) = arg max ( (s, a). eEAnnpis)
In the case where multiple moves tied in value, we pick maximizing action arbitrarily. Since train on individual boards and not whole games we shuffle the dataset after annotation. For our largest training dataset, based on 10M games, we thus obtain 15.3B action-value estimates (or ss 530M state-value estimates and oracle best-actions; cf. Table A to train on (corresponding to roughly 8864 days of unparallelized Stockfish 16 evaluation time given the limit of 50ms per move).
To create our test dataset we follow the same annotation procedure, but on 1K games downloaded from different month (March 2023), resulting in 1.8M action-value estimates (or 62K state- value estimates and oracle best actions). Since there is only a small number of early-game board states and players often play popular openings, 14.7% of boards in this i.i.d. test are also in the training set. We deliberately chose not remove them, to not introduce a distributional shift and skew test set metrics. We also create a puzzle test set, following Carlini (9, consisting of 10K challenging board states that have an Elo rating and a sequence of moves to solve the puzzle. Only 1.33% of the puzzle boards appear in the training set (i.e., the initial board states, not the complete solution sequences).
2.2 Data Preprocessing and Training
Value binning The predictors we train are discrete discriminators (i.c., classifiers). Therefore we convert the win percentages (i.e., the ground truth state- action-values) into discrete "classes" via binning, akin to distributional RL. [10]. We divide the interval from 0% to 100% uniformly into K bins (non-overlapping sub-intervals) and assign one-hot code to each bin 2, {..,..., zx }. If not mentioned otherwise, K = 128. For our behavioral cloning experiments we train to directly predict the oracle actions, which are already discrete. We ablate the number of bins K in Appendix [.. and we investigate losses that do (i.e., the log loss) and do not (i.e., the HL-Gauss and L.2 loss) maintain semantic interconnectedness of the labels (i.e., the dependence between the classes) in Table 2
Tokenization A FEN I1 string is a standard string-based description of a chess position. consists of board state, the current side move, the castling availability for both players, a potential
Liichess games and puzzles are released under the Creative Commons CCO license.
SStockfish returns a score in centipawns that we convert to the win percentage with the standard formula win% = 100/(1 exp(-000006600 0.00368208 centipawns)) from https: pestts://licee :/lichess.. hhtp:/aaaaaaarreeee
3

---

en passanr target, a half-move clock and a full-move counter, all represented in a single ASCII string Our tokenization uses this representation, except that we flatten any uses of run-length encoding to obtain fixed length (77) tokenized representation. Actions are stored in UCI notation [12], for example 'e2e4" for the popular opening move for white. To tokenize we use the index of move into lexiographically sorted array of the 1968 possible UCI encoded actions (see Appendix A.] for more details). Note that this representation technically makes the game non-Markovian, because FENs do not contain the move history and therefore, cannot capture all information for rules such as drawing by threefold repetition (drawing because the same board occurs three times).
Network inputs and outputs For all our predictors we use a modern decoder-only transformer backhone [5 parameterize categorical distribution by normalizing the transformer's outputs with log softmax layer. The models thus output log probabilities. The context size is 79 for action- value prediction and 78 for state-value prediction and behavioral cloning (see 'Tokenization' above). The output size is K (i.c., the number of bins) for action- and state-value prediction and 1968 (the number of all possible legal actions) for behavioral cloning. We use learned positional encodings [16] as the length of the input sequences is constant. Our largest model has = 270 million parameters, i.e., 16 layers, heads, and an embedding dimension of 1024 (full details in Appendix A.2).
Training protocol We train our predictors by minimizing the cross-entropy loss via mini-bated stochastic gradient descent using Adam [17]. The target labels are either bin-indices for state- or action-valus prediction or action indices for behavioral cloning. For state- and action-value prediction, additionally apply label smoothing via the HL-Gauss loss [18] using Gaussian smoothing distribution with the mean given by the label and a standard deviation of a = 0.75/ K x 0.05 as recommended by Farebrother al. (19. Thus, the labels are longer one-hot but multi-hot encoded (see Figure 3 in [19] for an overview). We ablate the loss function, i.e., HL-Gauss vs. cross-entropy vs. MSE, in Section 3.4 We train for 10 million steps, which corresponds 2.67 epochs for a batch
size of 4096 with 15.3B data points (cf. Table AT details in Appendices A.2 and A.3
2.3 Predictors and Policies
Our predictors are categorical distributions parameterized by neural networks Po(2(z) that take a tokenized input æ and output a predictive distribution over discrete labels (21, 2x Depending on the prediction target we distinguish between three tasks (see Figure for an overview).
(AV) Action-value prediction The target label is the bin 2; into which the ground-truth action-valee estimate Q (s, a) falls. The input to the predictor is the concatenation of tokenized state and action. The loss for single input data point (s;, a.) is:
Σ xE($
q((2) log Po (2|s), az) with qi == HL--Gausss ( a)),
(1)
where K is the number of bins and HL-Gauss (z) is the function that computes q; (the smoothed version of label 2;), i.e., a smooth categorical distribution using HI-Gaass [18] rather than the standard one-hot procedure. To use the predictor in a policy, we evaluate the predictor for all legal actions in the current state and pick the action with maximal expected action-value:
à AV (s)
= arg max Ez- (+).a))
a aE
(0(3,a)
(SV) State-value prediction The target label is the bin 2, that the ground -ruth state value (-F((s) falls into. The input to the predictor is the tokenized state. The loss for a single data point is:
Σ
(=(2) log PSY (=|ss) with y; = HL-Gauss (V (B:)).
=E(xI...kk
To use the state- value predictor as a policy, we evaluate the predictor for all states s' T(s, a) that are reachable via legal actions from the current state (where T(s, a) is the deterministic transition of taking action a in state s). Since s' implies that is now the opponent's 's turn, the policy picks the action that leads to the state with the worst expected value for the opponent:
arg min E (g-
Akgal
Vola')

---

(BC) Behavioral cloning The target label is the (one-hot) action-index of the ground-trute truth ac- tion (s) within the set of all possible actions (see 'Tokenization' in Section (.2). The input the predictor is the tokenized state, which leads to the loss for single data point:
- log P/ (s)]s).
(3)
This gives a policy that picks the highest-probabilie action:
à nCC (s) arg max PBC (als). aEAun
2.4 Evaluation
We use the following metries to evaluate our models and/or measure training progress.
Action accuracy The test set percentage where the policy picks the best action: a(s) (s).
Action ranking (Kendall's 7) The average test set rank correlation 20 of the predicted action distribution with the ground truth given by Stockfish. Kendall's r ranges from -1 (exact inverse order) to (exact same order), with 0 indicating rank correlation. The ranking is obtained by evaluating for all legal actions Qo a), (TT(( a)), or (a]s), in the case of AV, SV, or BC prediction, respectively. The ground-truth ranking is given by evaluating Q$F(s, a) for all legal actions.
Puzzle accuracy We evaluate our policies on their capability of solving puzzles from a collection of Lichess puzzles that rated by Elo difficulty from 399 to 2867 based how often each puzzle has been solved correctly. We use puzzle accuracy as the percentage of puzzles where the policy 's action sequence exactly matches the entire solution action sequence. For our main results in Sections 3.] and 3.2
we use 10K puzzles; otherwise, we use the first 1K puzzles to speed up evaluation.
Game playing strength (Elo) We evaluate the playing strength (measured an Elo rating) of the policies in two ways: (i) we run an internal tournament between all the agents from Table | except for GPT-3355ttubo-instruue and (ii) we play Blitz games Lichess against either only humans only bots. For the tournament we play 400 games per agent pair, yielding 22K games in total, and compute
the Elo with BayesElo [2]] using the default confidence parameter of 0.5. To ensure variability in the games, we use the openings from the Encyclopaedia of Chess Openings (ECO) (22). When playing on Lichess,
use a softmax policy with low temperature of 0.005 for the first five full-moves
instead of the arg max policy to create variety in games and prevent simple exploits via repeated play. We anchor the relative BayesElo values to the Lichess Elo vs. bots of our largest (270M) model.
2.5 Engine Comparisons
We compare the performance of our models against the following engines:
Stockfish 16 We consider two variants: (i) 50ms time limit per legal move (i.e., the dataset oracle), and (ii) a 1.5s limit per board, which roughly the amount of time the first variant (i) takes on average per board (i.c., there are roughly 30 legal moves per board average).
AlphaZero We consider three variants of AlphaZero 7 (i) with 400 MCTS simulations, (ii) only the policy network, and (iii) only the value network (where (ii) and (iii) perform no additional search). AlphaZero's networks have 27.6M parameters and are trained on 44M games (full details (3]).
Leela Chess Zero We consider three variants: (i) with 400 MCTS simulations, (ii) only the policy network, and (iii) only the value network (where (ii) and (iii) perform no additional search). We use the T82 network, which is convolutional network with 768 filters, 15 blocks, and mish activations (24] the largest network available on the official Leela Chess Zero website. At the time of writing, the precise network architecture, training data, and training protocol for the T82 network were not reported on the Leela Chess Zero website or other source. Concurrently to our paper, Monroe and Leela Chess Zero Team [6] published a rigorous tech report which now provides many of these details about for slightly different state-of-the-ant Leela Zero architecture called ChessFormer, and includes comparison against our vanilla networks.
5

---

Table 1: Comparison of our vatiu models against Stockfish 16, variants of Leela Chess Zero and AlphaZero (with and without Monte Carlo tree search), and h-Pr-3.-turbboinstie Elo ratings obtained by making the agents play against each other and cannot be directly compared to the Lichess Elo. Lichess (blitz) Elo ratings result from playing against either human opponents or bots on Lichess. Stockfish 16 with a time limit of 50ms per move is our data-generating oracle. Models operating on the PGN observe the full move history, whereas FENs only contain very limited historical information (sufficient for the fifty-move rule). Unlike all other engines, our policies were trained with supervised learning and use no explicit search at test time (except for which was trained via self-super learning and then instruction tuned).
Tournament
Lichess Elo
Agent
Train
Search
Input
Tournament
vs. Bots
vs. Humans
Puzzle Ace. (%)
9M Transformer (ours)
SL
FEN
2025 (::18)
2054
88.9
136M Transforner (ours)
FEN
2259 (::16)
2156
94.5
270M Transformer (ours)
SL
FEN
2299 (2:15)
2299
2895
95.4
GPT-3.5-turbo t-turo--nnstuutt
PGN
1755
66.5
AlphaZero (policy net only)
RT.
PGN
1777 (+22)
56. 1
AlphaZero (value net only)
PGN
1992 (1119)
82.0
AlphaZero (400 MCTS sim.)
RL
PGN
2470 (++10)
95.6
Loela Zero (policy only)
PGN
2292
2224
88.6
Leela Chess Zero (value net only)
RI.
PGN
2418 (.116)
2318
95.9
Leela Chess Zero (100 MCTS sim.)
RL
PGN
2858 (4:20)
2620
98.6
Stockfish 16 (50ms per move) [ornele]
SI.
/
FEN + Moves
2711 (+118)
2713
99.8
Stockfish 16 (1.58 per board)
SL
FEN Moves
2935 (4:23)
2940
100.0
We follow Carlini 9 and encode the entire game with the Portable Game Notation (PGN) [ to reduce hallucinations. Since Carlini [9] found that (at that time) GPT-4 struggled to play full games without making illegal moves, we do not consider GPT-4.
GPT-3.5-turbo-instrud
In contrast to our models, all of the above engines rely on the entire game's 's history (via the PGN; we use the FEN, which only contains the game's current state and very limited historical information). Observing the full game's 's history helps, for instance, detecting and preventing draws from threefold repetition (games are drawn if the same board state appears three times throughout the game). Our engines require a workaround to deal with this problem (described in Section 4
A direct comparison between all engines comes with lot of caveats since some engines use the game history, some have very different training protocols (i.e., RL via self-play instead of supervised learning). and some use search test time. We show these comparisons to situate the performance of our models within the wider landscape, but emphasize that some conclusions can only be drawn within our family of models and the corresponding ablations that keep all other factors fixed.
3 Case-Study Results
We use two settings for our experiments: (i) large-scale setting for our main results (Sections 3.] and 3.2,, details in Appendix A and (ii) a setting geared towards getting representative results with better computational efficiency for our ablations (Sections 3.3 and 3.4 details in Appendix A.3)
3.1 Main Result
Table shows the playing strength (internal tournament Elo, external Lichess Elo, and puzzle accuracy) of our large-scale transformers trained on the full (10M games) training set. We compare models with 9M, 136M and 270M parameters (none of them overfit the training set as shown in Appendix B.4). The results show that all three models exhibit non- oriviaivial generalization to novel boards and can successfully solve a large fraction of puzzles. Across all metrics, increasing model size consistently improves the scores, confirming that model scale matters for strong chess performance. Our largest model achieves a blitz Elo of 2895 against human players, which places into grandmaster territory. However, the Elo drops when playing against bots on Lichess, which may be a result of having significantly different player pool 255. minor technical issues, or qualitative difference in how bots exploit weaknesses compared to humans (see Section 4 for detailed discussion).

---

per
RCC///Y thi
20
400-500
900
1000 1200
1200-3430
3400-1635
1620-100 1002
1000 2000
2000
2230
2230-2000
2002
2600 2300
2800-3012
Figure 2: Puzzle solving comparison for our 270M transformer, Stockfish 16 (50ms per move), Leela Chess Zero, AlphaZero, and
instruct 10K Lichess puzzles (curated following
10 100 Games
100 000 Games
1'000'000 Games
4.0K
1M
N:228 Accuracy 150
60
20
Step
Step
Step
1e6
Figure 3: Puzzle accuracy for different training set sizes (stated above panels) and model sizes (color-coded), evaluated our small set of 1K puzzles. Generally, larger models trained larger datasets lead to higher accuracy (which strongly correlates with test set performance and general chess playing strength), highlighting the importance of scale for strong chess play. This effect cannot be explained by memorization since < 1.41% of the initial puzzle board states appear in our training set. If the model is too large in relation the training it overfits (left panel; loss curves Figure A3
3.2 Puzzles
In Figure 2 we compare the puzzle performance of our 270M parameter model against Stockfish 16 (50ms Timit per move), large puzzle set of 10K puzzles, grouped by their assigned Elo difficulty from Lichess. Stockfish 16 performs the best across all difficulty categories, followed by Leela Chess Zero, AlphaZero, and our model. Impressively, our model, which does the performance of AlphaZero with (Monte Carlo) tree search. GPT-3.5-turbo-instt non-trivial puzzle performance but significantly lags behind our model. We emphasize that solving the puzzles requires correct move sequence, and since our policy cannot explicitly plan ahead, solving the puzzle sequences relies entirely on having good value estimates that can be used greedily.
AlphaZero, and Leela Chess Zero. We use our
any explicit search test time, nearly matches achieves
3.3 Scaling Analysis
Figure shows scaling analysis over the dataset and model size. We visualize the puzzle accuracy (train and test losses in Figure A3)) which correlates well with the other metrics and the overall playing strength. For small training set size (10K games, left panel) larger architectures (> 7M) start to overfit. This effect disappears as the dataset size is increased to 100K (middle panel) and 1M games (right panel). The results also show that the final accuracy of model increases the dataset size increased (consistently across model sizes). Similarly, we observe the general trend of increased architecture size leading to increased overall performance (as our main result in Section 3.1
3.4 Variants and Ablations
We perform extensive ablations using the 9Mparameter model and show the results in Tables
and A2 We use the results and conclusions drawn to inform and justify our design choices and determine the default model-, data-, and training configurations.
7

---

Predictor targets By default we learn predict action-values given board state. Here we compare against using state-values or oracle actions (behavioral cloning) as the prediction targets (Section 2.3 Figure | describe how to construct policies from the predictors). Table 2 and Figure A4 show that the action-value predictor is superior in terms of action-ranking (Kendall's T), action accuracy, and puzzle accuracy. This superior performance might stem primar- ily from the significantly larger action- value dataset (15.3B state-action pairs a 530M states for our largest training set). We thus all three predictors on the same amount of
Table 2: Ablating the predictor target, loss function. net- work depth, and number of value bins (see Section 3.4) The best configurations are: action-value prediction (see Appendix [8.5 for detailed discussion), HL-Gauss loss, depth 16, and 128 bins. We conduct further ablations (over the data sampler, the Stockfish time limit, and the model architecture) in Appendix B. and Table
Accuracy (%)
Ablation
Parameter
Puzdes
Actions
Kendall's
Action- Value State-Valuc Behavioral Cloning
83,3
63.0
0.259
Predictor target
77.5
58.5
0.215
65.7
56.7
0.116
HI.-Gauss (class.)
82.0
61.8
0.257
ablation where train
Loss function
log (class.)
80.6
61.9
0.257
(regr.)
80.8
58.9
0.240
2
54.7
51,5
0,209
data (results in Table A4 and Figure A5 which largely confirm this hypothesis). Ap- pendix B.S contains detailed discussion, cluding why the performance discrepancy between behavioral cloning and the state- value prediction policy may be largely due to training only on expert actions rather than the full action distribution.
4
40.5
44.3
0.179
Network depth
8
79.5
60.7
0.252
81.3
61.6
0,256
79.5
61.2
0.254
16
83.0
61.4
0.248
83.0
63.2
0.261
No. of valuee hins
84.4
63.1
0,259
128
83.8
63.4
0.262
256
83.7
63.0
0,260
Loss function We treat learning Stockfish action-values classification problem and train by minimizing the HL-Gaass loss [18]. Here we compare this to the cross-entropy loss (log-loss), which as close as possible to the (tried and tested) standard LLM setup. Another alternative is treat the problem as a scalar regression problem by parameterizing a fixed-variance Gaussian likelihood model with transformer and performing maximum (log) likelihood estimation, i.e., minimizing the mean- -quares error (L2 loss). To that end, we modify the architecture to output a scalar (without final log- layer or similar). Table shows that the HL-Gauss loss outperforms the other two losses.
Network depth Table shows the influence of increasing the transformer's 's depth (i.e.. the number of layers) for fixed number of parameters (we vary the embedding dimension and the widening factor such that all models have the same number of parameters). Since transformers may learn to roll out iterative computation (which arises in search) across layers, deeper networks may hold the potential for deeper unrolls. The performance of our models increases with their depth but saturates at around 16 layers, indicating that depth is important, but not beyond certain point.
Value binning Table 2 shows the impact of varying the number of bins used for state- and action- value discretization (from 16 to 256), demonstrating that more bins generally lead to improved performance (up to a certain point). We therefore use K = 128 bins for our experiments.
4
Discussion
When using our state- based policies to play against humans and bots, two minor technical issues appear that can only be solved by having (some) access to the game's 's history. In this section, we discuss both issues and present our corresponding workarounds.
Blindness to threefold repetition By construction, our state-based predictor cannot detect the risk of threefold repetition (drawing because the same board occurs three times), since it has no access to the game's 's history (FENs contain minimal historical info, sufficient for the fifty-move rule). To reduce draws from threefold repetitions, we check if the agent's next move would trigger the rule and set the corresponding action's 's win percentage to 50% before computing the softmax. However, our agents still cannot plan ahead mimize the risk of being forced into threefold repetition.
8

---

Indecisiveness in the face of overwhelm- ing victory If Stockfish detects a mate- in-k it outputs k and not centipawn score. When annotating our dataset, we map all such outputs to win percentage of 100%. Similarly, in a very strong position, sev- eral actions may end up in the maximum value bin. Thus our agent sometimes plays somewhat randomly rather than commit- ting to a plan that finishes the game (the agent has no knowledge of its past moves). Paradoxically, this means that our agent, de- spite being in position of overwhelming win percentage, sometimes fails to take the (virtually) guaranteed win (see Figure 4 and might draw or even end up losing since small chances of mistake accumulate with longer games. To alleviate this, we check whether the predicted scores for all top five moves lie above win percentage of 99% and double-check this condition with Stockfish, and if so, use Stockfish's top move (out of these) have consistency strategy across time-steps.
(a) Possible Move (Mate-in-3) (b) Actual Move (Mate-in-5)
Figure 4: Two options to win the game in 3 or 5 moves, respectively (more options exist). Since they both map into the highest-value bin fastest way to win (in 3), and instead plays Nd6+ (mate- in-5). Unfortunatcly, a state-based predictor without explicit search cannot guarantee that it will continue playing the Nd6+ strategy and thus might randomly alternate between different strategies. Overall this in- creases the risk of drawing the game or losing due to a subsequent (low-probability) mistake, such as a bad soflmax sample. Board from game between our 9M Transformer (white) and a human (blitz. Elo of 2145).
bot ignores Nh6+, the
Elo: Humans vs. bots We have three plausible hypotheses for why the Lichess Elo in diifers when playing against humans vs. bots: (i) humans tend to resign when our bot is in an overwhelmingly winming position but bots do not (i.e., the previously described problem gets amplified against bots); (ii) most humans on Lichess rarely play against bots, i.e., the two player pools (humans and bots) are hard to compare and their Elo ratings may be miscalibrated [25]; and (iii) based on anecdotal analysis by a chess National Master, our models make the occasional tactical mistake which may be penalized more severely by bots than humans (analysis in Appendices B.7 and [.8). While investigating this Elo discrepancy is interesting, it not central to our paper and does not impact our main claims.
4.1 Limitations
Our primary goal was to investigate whether complex search algorithm such as Stockfish 16 can be approximated with feedforward neural network our dataset via supervised learning. While our largest model achieves good performance, it does not fully close the gap to Stockfish 16, and is unclear whether further scaling would close this gap or whether other innovations needed.
While we produced a strong chess policy, our goal was not to build a state-of ofate--f-thh-arr chess engine. Our models are impractical in terms of speed and would perform poorly in computer chess tournaments with compute limitations. Therefore, we calibrated our policy's 's playing strength via Lichess, where the claim of "grandmaster-level" play currently holds only against human opponents. In addition, we only evaluated our biggest model against humans on Lichess due to the extensive amount of time required. We also cannot rule out that opponents, through extensive repeated play, may find weaknesses due to the deterministic nature of our policy. Finally, we reiterate that we compare to other engines situate our models within the wider landscape, but that direct comparison between all the engines comes with a lot of caveats due to differences in their inputs (FENs vs. PGNs), training protocols (RL vs. supervised learning), and the use of search at test time.
Leela Chess Zero's 's networks, which are trained with self-play and RL, achieve higher Elo ratings without using explicit search at test time than our transformers, which we trained via supervised learning. However, contrast to our work, very strong chess performance (at low computational cost) is the explicit goal of this open source project (which they have clearly achieved via domain-specific adaptations). We refer interested readers to 6 (which was published concurrently to our work) for details on the current of-te-of-hheanne and comparison against our networks.

---

5 Related Work
Unsurprisingly given its long history in AI, there is vast literature applying algorithmic techniques to chess. Earlier works predominantly focused on methods which would increase the strength of chess playing entities, but time has progressed, the role of chess problem domain has changed more from a challenge area to that of an illuminating benchmark, and our work continues this tradition.
Early computer chess research focused on designing explicit search strategies coupled with heuristics, as evidenced by Turing's s initial explorations [26] and implementations like NeuroChess [27]. This culminated in systems like Deep Blue (28] and early versions of Stockfish [29].
AlphaZero and Leela Chess Zero S marked a paradigm shift: They employed deep RL with
Monte Carlo tree search to learn heuristics (policy and value networks) instead of manually designing them [30 31) Several works built upon this framework (32), including enhancements AlphaZero's s
self-play mechanisms [33] and the use of model-free RL [23] At the time of writing, Leela Zero's 's T82 networks were state-of-the art, but their training protocol, training data, and some architectural details were not fully reported. In the meantime, Monroe and Leela Chess Zero Team [6] have published a detailed tech report on another transformer- based Leela Zero architecture called the ChessFormer. Their comparison shows that ChessFormers comparable in size to our models outperform our vanilla transformers while requiring fewer FLOPS thanks to clever domain-specinf adaptations.
Another line of work moved away from explicit search methods by leveraging large-scale game datasets for (un)supervised learning, both for chess [34 and Go (38 MMst closely related to our work. project Maia (35] used behavioral cloning on 12M human games but, rather than maximizing performance (i.e., distilling Stockfish), focused on predicting human moves at different levels of play,
The rise of large (pretrained) foundation models also led to innovations in various areas of computer chess research: learning the rules of chess [39 40), evaluating move quality [41), evaluating playing strength [ 42), state tracking 43 44, and playing chess from visual inputs [45). Fine-tuning on
chess-specific data sources (e.g., chess textbooks) has further improved performance [46.488.
6 Conclusion
Our paper introduces ChessBench, large-scale, open source benchmark dataset for chess, and shows the feasibility of distilling an approximation of Stockfish 16, a complex planning algorithm, into a feed-forward transformer via standard supervised training. The resulting predictor generalizes well to unseen board states, and, when used in a policy, leads to strong chess play. We show that strong chess capabilities from supervised learning only emerge at sufficient dataset and model scale. Our work thus adds to a rapidly growing body of literature showing that sophisticated algorithms can be distilled into feed-forward transformers, implying a paradigm shift to viewing large transformers as powerful technique for general algorithm approximation rather than "mere" statistical pattern recognizers. Nevertheless, perfect distillation of Stockfish 16 still beyond reach and closing the performance gap might need other (e.g., architectural) innovations. Our open source benchmark dataset, ChessBench, thus provides a solid basis for scientific comparison of any such developments.
7 Impact Statement
While the results of training transformer-based architectures at scale in (self-)supervised way will have significant societal consequences in the near future, these concerns do not apply to closed domains, such as chess, that have limited real-world impact. Moreover, chess has been a domain of machine superiority for decades. Another advantage of supervised training single task over other forms of training (particularly self-play or reinforcement learning and meta-learning) that the method requires strong oracle solution to begin with (for data annotation) and is unlikely to significantll outperform the oracle, which means that the potential for the method to rapidly introduce substantial unknown capabilities (with wide societal impacts) is very limited.
10

---

Acknowledgments
We thank Aurélien Pomini, Avraham Ruderman, Eric Malmi, Charlic Beattie. Chris Colen, Chris Wolff, David Budden, Dashiell Shaw, Guillaume Desjardins, Guy Leroy, Hamdanil Rasyid, Himanshu Raj. John Schultz, Julian Schrittwieser, Laurent Orseau, Lisa Schut, Mare Lanctot, Marcus Hutter, Matthew Aitchison, Matthew Sadler, Nando de Freitas, Neel Nanda, Nenad Tomasev, Nicholas Carlini, Nick Birnie, Nikolas De Giorgis. Ritvars Reimanis, Satinder Baveja, Thomas Fulmer, Tor Lattimore, Vincent Tjeng, Vivek Veeriah, Zhengdong Wang, and the anonymous reviewers for insightful discussions and their helpful feedback.
References
[1] Stuart Russell and Peter Norvig. Artificial Intelligence: A Modern Approach (4th Edition). Pearson, 2020.
[2] Richard S. Sutton and Andrew G. Barto. Reinforcement learning an introduction. MIT Press, 1998.
[3] Volodymyr Mnih, Koray Kavukcuoglu, David Silver, Andrei A. Rusu, Joel Veness, Marc G. Bellemare, Alex Graves, Martin A. Riedmiller, Andreas Fidjeland, Georg Ostrovski, Stig Pe- tersen, Charles Beattie, Amir Sadik, Ioannis Antonoglou, Helen King, Dharshan Kumaran, Daan Wierstra, Shane Legg, and Demis Hassabis. Human-level control through deep reinforcement learning. Nat., 2015.
[4] David Silver, Aja Huang, Chris J. Maddison, Arthur Guez, Laurent Sifre, George van den Driess- che, Julian Schrittwieser, Ioannis Antonoglou, Vedavyas Panneershelvam, Marc Lanctot, Sander Dieleman, Dominik Grewe, John Nham, Nal Kalchbrenner, Ilya Sutskever, Timothy P. Lillicrap, Madeleine Leach, Koray Kavukcuoglu, Thore Graepel, and Demis Hassabis. Mastering the game go with deep neural networks and tree search. Nat., 2016.
[5] The LCZero Authors. LoelaChessZero, 2018. URL httph::tt/tcceeeee org
[6] Daniel Monroe and The Leela Chess Zero Team. Mastering chess with a transformer model. arXiv:2409.1223 12272, 2024.
[7] David Silver, Thomas Hubert, Julian Schrittwieser, Ioannis Antonoglou, Matthew Lai, Arthur Guez, Mare Lanctot, Laurent Sifre, Dharshan Kumaran, Thore Graepel, Timothy P. Lillicrap, Karen Simonyan, and Demis Hassabis. Mastering chess and shogi by self- ellf-pla with general reinforcement learning algorithm. 1rXiv:17/2.01815, 2017.
[8] Yu Nasu. Efficiently updatable neural-nettwrkk-basee evaluation functions for computer shogi. Ziosofi Computer Shogi Club, 2018.
[9] Nicholas Carlini. Playing chess with large language models, 2023. URL httth:://tschool.... carlini. com www./wiiittooooooooooooooooooooo http///ttiiigigii 2023/222//aa0 cceess 11m. html
[10] Mare G. Bellemare, Will Dabney, and Mark Rowland. Distributional Reinforcement Learning.
MIT Press, 2023.
[11] Steven J. Edwards. Standard: plementation guide. 1994. URL htttp::/ us archive arg/26/itens
Portable game notation specification and im-
Pgn- aon-standard--a 1994-999999 12 BttpPPPN_ssaaadddaaaaae 18--
[12] Rudolf Huber and Stefan Meyer- Universal chess interface, 2000. URL interface html
shr shrederrhess. com/ https//ewwtuueeeeiiiiiieeeeeeees
[13] Ashish Vaswani, Noam Shazeer, Niki Parmar, Jakob Uszkoreit, Llion Jones, Aidan N. Gomez, Lukasz Kaiser, and Illia Polosukhin. Attention all you need. In NIPS, 2017.
[14] Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timo- thée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurélien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. Ilama: Open and efficient foundation language models. 2rXiv:2302.1397/ 2023.

---

[15] Hugo Touvron, Louis Martin, Kevin Stone, et al. Llama 2: Open foundation and fine-tuned chat models, WrXiv:2307.09288 2023.
[16] Jonas Gehring, Michael Auli, David Grangier, Denis Yarats, and Yann N. Dauphin. Convolu- tional sequence to sequence learning. In ICML, 2017.
[17] Diederik P. Kingma and Jimmy Ba. Adam: A method for stochastic optimization. In ICLR (Poster), 2015.
[18] Ehsan Imani and Martha White. Improving regression performance with distributional losses. In ICML, 2018
[19] Jesse Farebrother, Jordi Orbay, Quan Vuong, Adrien Ali Taiga, Yevgen Chebotar, Ted Xiao, Alex Irpan, Sergey Levine, Pablo Samuel Castro, Aleksandra Faust, Aviral Kumar, and Rishabh Agarwal. Stop regressing: Training value functions via classification for scalable deep RL. arXiv:2403.03950 2024.
[20] Maurice George Kendall. A new measure of rank correlation. Biometrika, 1938.
[21] Rémi Coulom.
Whole-history rating: bayesian rating system for players of time-varying strength. In Computers and Games, 2008.
[22]
Aleksandar Matanović. Encyclopaedia of Chess Openings. Batsford Limited, 1978.
[23] Julian Schrittwieser, Ioannis Antonoglou, Thomas Hubert, Karen Simonyan, Laurent Sifre. Simon Schmitt, Arthur Guez, Edward Lockhart, Demis Hassabis, Thore Graepel, Timothy P. Lillicrap, and David Silver. Mastering atari, go, chess and shogi by planning with a learned model. Nat., 2020.
[24] Diganta Misra. Mish: self regularized non-monotonic neural activation function. arXiv:998.008811, 2019.
[25] Justas Zabulionis. Exact ratings for everyone on lichess, 2023. URL http:://///iisessss org/
@/ jjssta//blo//raatttraaaai---a--/ wew.enngg--rrr--eeeeeeeee-eeeeee on htt.rrrrroooooooooooooooaaaaaaaa
[26] Cyril Burt. Faster than thought: A symposium digital computing machines. edited by b. v. bowden. British Journal of Statistical Psychology, 1955.
[27] Sebastian Thrun. Learning to play the game of chess. In NIPS, 1994.
[28] Murray Campbell, A. Joseph Hoane Jr., and Feng-Hsiung Hsu. Deep blue. Artif. Intell., 2002.
[29] Tord Romstad, Marco Costalba, Joona Kiiski, Gary Linscott, Yu Nasu, Motohiro Isozaki, Hisayori Noda, and al. Stockfish, 2008 URL
org
[30] Joel Veness, David Silver, William T. B. Uther, and Alan Blair, Bootstrapping from game tree search. In NIPS, 2009.
[31] Matthew Lai. Giraffe: Using deep reinforcement learning to play chess, 15% 2015.
[32] Dominik Klein. Neural networks for chess. arXivv2209.01506 2022.
[33] Sai Krishna G. V., Kyle Goyette, Ahmad Chamseddine, and Breandan Considine. Deep pepper: Expert iteration based chess agent in the reinforcement learning setting. I8X6. 00683, 2018.
[34] Omid E. David, Nathan S. Netanyahu, and Lior Wolf. Deepchess: End-to-end deep neural network for automatic learning in chess. In ICANN (2), 2016.
[35] Reid Kellroo-YYoung Siddhartha Sen, Jon M. Kleinberg, and Ashton Anderson. Aligning superhuman AI with human behavior: Chess as a model system. KDD, 2020.
[36] Reid Mcllroy- Young, Russell Wang, Siddhartha Sen, Jon M. Kleinberg, and Ashton Anderson. Learning models of individual behavior in chess. In KDD, 2022.
12

---

[37] Saumik Narayanan, Kassa Korley, Chien-Ju Ho, and Siddhartha Sen. Improving the strength of human-likk models in chess, 2023.
[38] Chris J. Maddison, Aja Huang, Ilya Sutskever, and David Silver. Move evaluation in go using deep convolutional neural networks. In ICLR (Poster), 2015.
[39] Michael DeLeo and Erhan Guven. Learning chess with language models and transformers. arXiv:2209. 1902, 2022.
[40] Andreas Stöckl. Watching a language model learning chess. In RANLP, 2021.
[41] Isaac Kamlish, Isaac Bentata Chocron, and Nicholas McCarthy. Sentimate: Learning to play chess through natural language processing. orXiv:1907.08322 2019.
[42] Borja Albert Gramaje. Exploring GPT's capabilities chess-puzzles. Master's thesis, Universi- tat Politècnica de València, 2023.
[43] Shubham Toshniwal, Sam Wiseman, Karen Livescu, and Kevin Gimpel. Chess testbed for language model state tracking. In AAAI, 2022.
[44] William Merrill, Jackson Petty, and Ashish Sabharwal. The illusion of state in state-space models. 18888:2404.08819 2024.
[45] Johannes Czech, Jannis Blüml, and Kristian Kersting, Representation matters: The game of chess poses a challenge to vision transformers. arXiv:2304. 14918, 2023.
[46] David Noever, Matthew Ciolino, and Josh Kalin. The chess transformer: Mastering play using generative language models. arXiv:2008. 04057, 2020.
[47] Haifa AIrdahi and Riza Batista-Navarro. Learning to play chess from textbooks (LEAP): a corpus for evaluating chess moves based on sentiment analysis. arXhv:2310.20260 2023.
[48] Xidong Feng, Yicheng Luo, Ziyan Wang, Hongrui Tang, Mengyue Yang, Kun Shao, David Mguni, Yali Du, and Jun Wang. Chessgpt: Bridging policy learning and language modeling. D.Xiv:3306.09200 2023.
[49] Noam Shazeer. GLU variants improve transformer. arXiv:2002.055222,2000
[50]
Ioannis Pantidis. lichess-bot, 2018. URL lichess-bot
[51]
James Bradbury, Roy Frostig, Peter Hawkins, Matthew James Johnson, Chris Leary, Dougal Maclaurin, George Necula, Adam Paszke, Jake VanderPlas, Skye Wanderman- and Qiao Zhang. JAX: composable transformations of Python+NumPy programs, 2018. URL
http:///ithhn com/ cooo//oooge//axx
[52] DeepMind, Igor Babuschkin, Kate Baumli, Alison Bell, Surya Bhupatiraju, Jake Bruce, Peter Buchlovsky, David Budden, Trevor Cai, Aidan Clark, Ivo Danihelka, Antoine Dedieu, Claudio Fantacci, Jonathan Godwin, Chris Jones, Ross Hemsley, Tom Hennigan, Matteo Hessel, Shaobo Hou, Steven Kapturowski, Thomas Keck, Iurii Kemaev, Michael King, Markus Kunesch, Lena Martens, Hamza Merzic, Vladimir Mikulik. Tamara Norman, George Papamakarios, John Quan, Roman Ring, Francisco Ruiz, Alvaro Sanchez, Laurent Sartran, Rosalia Schneider, Eren Sezener, Stephen Spencer, Srivatsan Srinivasan, Miloš Stanojević, Wojeiech Stokowiec, Luyu Wang, Guangyao Zhou, and Fabio Viola. The DeepMind JAX Ecosystem, 2020. URL. http://github. com/ -
[53] Tom Hennigan, Trevor Cai, Tamara Norman, Lena Martens, and Igor Babuschkin. Haiku: Sonnet for JAX, 2020. URL httt:://gitiii
com http//eepmindd///// Am-haiku
[54] Matthew Sadler and Natasha Regan. Game Changer: AlphaZero's 's Groundbreaking Chess Strategies and the Promise of AI. New In Chess, 2019.
13

---

A Experimental Setup
A.1 Tokenization
The first part of a FEN string encodes the position of pieces rank-wise (row-wise). The only change we make is that we encode each empty square with '.' which always gives us 64 characters for board. The next character denotes the active player ('w' or 'b'). The next part of the FEN string denotes castling availability (up to four characters for King- and Queen-side for each color, or "-' for no availability) take this string and if needed pad it with " such that it always has length 4. Next are two characters for the en passant target, which can be '-' for no target; we use the two characters literally or --" for no target. Finally we have the halfmove clock (up two digits) and the fullmove number (up to three digits); we take the numbers as characters and pad them with ' to make sure they are always tokenized into two and three characters respectively.
A.2 Main Setup
We use the same basic setup for all our main experiments and only vary the model architecture.
We train for 10 million steps with a batch size of 4096, meaning that we train for 2.67 epochs on the full training dataset (10M games). We use the Adam optimizer [17] with learning rate of 1 10-4 We train on the dataset generated from 10 million games (cf. Table [ for the action-value policy with 128 return buckets and stockfish time limit of 0.05s. We use the unique sampler and evaluate on 1k games (cf. Table AT) and 10k puzzles from a different month than that used for training.
We train a vanilla decoder-only transformer without causal masking 13, with the improvements proposed in L.LaMA [44 and Ilama [13], i.e., post-normalization and SwiGI.U [49]. We use three different model configurations (with widening factor of 4): (i) 8 heads, 8 layers, and an embedding dimension of 256, (ii) 8 heads, layers, and an embedding dimension of 1024, and (iii) heads, 16 layers, and an embedding dimension of 1024.
A.3 Ablation Setup
We use the same basic setup for all our ablation experiments and only vary the ablation parameters.
We train for 5 million steps with batch size of 1024, meaning that we train for 3.19 epochs on smaller training dataset (1M games). We use the Adam optimizer [7 with a learning rate of 4 x 10-4. We train on the dataset generated from 1 million games (cf. Table for the action-value policy with 32 return buckets and stockfish time limit of 50ms. We use the unique sampler and evaluate on 1K games (cf. Table Al) and 1K puzzles (1.4% overlap with training set) from a different month than that used for training. We train vanilla decoder-only transformer [13] with post-normalivation, 8 heads, 8 layers, an embedding dimension of 256, a widening factor of 4, and no causal masking.
A.4 Dataset Statistics
We visualize some dataset statistics Figure A1 Note that, even though we should have the same amount of board-state data points for state-value prediction and behavioral cloning, we occasionally run into time-outs when annotating our dataset with Stockfish (due to our internal infrastructure setup) and therefore drop the corresponding record.
A.5
Playing-Strengte Evaluation
Lichess We evaluate and calibrate the playing strength of our models by playing against humans and bots on Lichess (using the lichess-bot project (50) as basis). Our standard evaluation allows for both playing against bots and humans (see Table but since humans tend to rarely play against bots the Elo ratings in this case are dominated by playing against other bots (see our discussion of how this essentially creates two different, somewhat miscalibrated, player pools in Section In our case the policies the column denoted with 'vs. Bots' Table I have played against some humans but the number of games against humans is < 4.5% of total games played. To get better calibration against humans we let our largest model play exclusively against humans (by not accepting games with other bots) which leads to significantly higher Elo ranking (sec Table Πp. Overall we have
14

---

Table A1: Dataset sizes. For simplicity, we typically refer the datasets by the number of games they were created from.
State-Valus
Behavioral Cloning
Action-Value
Split
Games
Records
Bytes
Records
Bytes
Records
Bytes
Train
104
591 897
43.7 MB
589 130
41.1 MB
17333 887
1.4 GB
10a
5747 753
422.0 MB
5720672
397.4 MB
167 926
13.5 GB
10
55
4.0
54 050
3.8 GB
1 372407
129.0 GB
107
530 3304334
38.6 GB
527 633 465
36.3 GB
15 15.316 914 724
1.2 TB
Test
10a
62 829
4.6 MB
62.561
4.4 MB
1 838 218
148.3 MB
100000
400000
350000
300000
Count
Count
250000
200000
40000
150000
20000
100000
50000
0.4
0.8 1.0
250
500
750
1000
1250
1500 1750
2000
Move Indix
(a) Win percentages
(b) Moves (sorted by frequency)
Figure A1: Win percentage and move distributions for our action-value dataset generated from 1000 games (cf. Table AT). We use 50 buckets to generate the histograms. The win percentage distribution skewed towards as we consider all legal moves per board and most actions are not advantageous for the player.
played the following numbers of games for the different policies shown in Table [ 553 games for 9M, 169 games for 136M, 228 games against bots and 174 games against humans for 270M, 181 games for GPP--3.--turbo-insrrncc, 37 games for Leela Chess Zero (policy net only), 46 games for Leela Chess Zero (value net only), games for Leela Chess Zero (400 MCTS sim.), 30 games for Stockfish (50ms per move) [oracle], and 42 games for Stockfish (1.5s per board).
A.6 Stockfish Setup
We use Stockfish 16 (the version from December 2023) throughout the paper. When we play, we use the oracle used for training, which is unconventional way to play with this engine: We evaluate each legal move in the position for 50ms, and return the best move based on these scores. This is not entirely equivalent moves per position, as we force Stockfish to spend 50ms on moves that could uninteresting and unexplored. We chose keep this setup to have comparison to the oracle train on. Note that, when comparing the legal moves in a given position, we do not clear Stockfish' 's cache between the moves. Therefore, due the way the cache works, this biases the accuracy of Stockfish evaluation to be weaker for the first moves considered. Finally, due to the nature of our internal hardware setup, use different kinds of chips Intel(R) Xeon(R) W-2135 CPU @ 3.70GHz, and (ii) to compute the tournament Elo, we use a single Tensor Processing Unit (V3), as for all the other agents.
standard thinking time of 50ms multiplied by the number of legal
Stockfish: (i) to compute the Lichess Elo,
6-core
A.7 AlphaZeero Setup
We use the AlphaZero version from 2020, with network trained at that time 23 We investigate three different versions: (i) policy network only, (ii) value network only and (iii) standard version with search. For (i) we do a search limited to node. For (ii) we do search limited to I node for
15

---

every legal action and then take the arg max. For (ii), we use the standard search from the paper, with 400 MCTS simulations (confirmed via personal correspondence with Schrittwieser al. [23]) and the exact same UCB scaling parameters. We also take the arg max over visit counts. Note that AlphaZeero's 's policy and value network have been trained on 44M games, whereas we trained our largest models only 10M games.
A.8 Leela Chess Zero Setup
We use the latest release version (v31.0) of Leela Chess Zero S with the largest network officially supported the time of submission (i.e., the 'Large' T82 network from https://lczero org/ play/networks/ bbsttttteeeeettteeeeeee We investigate three different versions: (i) policy network only, (ii value network only and (ii) standard version with search. For (i) we do search limited node. For (ii) we do a search limited to I node for every legal action and then take the arg max. For (ii),, we use 400 MCTS simulations. The network architecture and training protocol for T82 were not fully available; more details are now provided in Monroe and Leela Chess Zero Team [6] (written concurrently to our work) about a slightly different architecture, called the ChessFormer.
A.9 Computational Resources
Our codebase is based on JAX [51] and the DeepMind JAX Ecosystem [5 53] We used 4 Tensor Processing Units (V5) per model for the ablation experiments. We used 128 Tensor Processing Units (V5) per model to train large (9M, 136M and 270M) models. We used single Tensor Processing Unit (V3) per agent for our Elo tournament.
B Additional Results
B.1 Additional Ablations
We perform additional ablations using the 9M parameter model. As in Section 3.4 the results and conclusions drawn are used to justify our design choices and determine default configuration for model, data, and training. Table A2 shows the results.
Stockfish time limit We create training sets from 1 million games annotated by Stockfish with varying time limits to ma- nipulate the playing strength of our oracle. We report scores on the puzzle set (same for all models) and test set created using the same time limit as the training set (dif- ferent for all models). Table 2 shows that a basic time limit of 0.05 seconds gives only marginally worse puzzle performance. As a compromise between computational ef- fort and final model performance we thus
Table A2: Ablating the Stockfish time limit (used for dataset annotation), the data sampling method for train- ing, and the model architecture (see Appendix
Accuracy (%)
Ablation
Parameter
Puzzles
Actions
Kendall's 7
0.05
84.0
62.2
0.256
0.1
85.4
0.254
Stockfish limit [s]
0.2
84.3
62.6
0.259
0.5
83.3
63.0
0.259
Uniform Weighted
83.3
63.0
0.259
choose this as our default value (for our 10M games dataset we need about 15B -evion-evaluation calls with Stockfish, i.e., roughly 8680 days of unparallelized Stock- fish evaluation time).
Data sampler
49.9
48.2
0.192
Transformer ConvNet
83.3
63.0
0.259
Architecture
17.3
37.6
0.171
Data sampler We remove duplicate board states during the generation of the training and test sets. This increases data diversity but introduces distributional shift compared to the "natural" game distribution of boards where early board states and popular openings occur more frequently. To quantify the effect of this shift we use an alternative "weighted" data sampler that draws boards from our filtered training set according to the distribution that would occur if we had not removed duplicates. Results in Table A2 reveal that training on the natural distribution (via the weighted sampler) leads to significantly worse results compared sampling uniformly randomly from the filtered training set (both trained models are evaluated filtered test set with uniform sampling,
16

---

Table A3: Inference times and legal move accuracy.
(a) Inference times for the agents from Table D on 1000 random baords from the Encyclopedia of Chess Openings (ECO).
(b) I Legal move accuracy 1000 random hoards from three data sources. Measuring the legal move accuracy only really makes sense for BC, which, indeed, almost always plays a legal move. In contrast, our action- value predictor was not trained to play legal moves, since Stockfish's Q a)-vulues are undefined for illegal moves. Note that
Inferenee Time [ms]
Agent
Average
Standard Deviation
9M Transformer (ours)
14.5
34.4
136M Transformer (ours)
32.0
58.5
270M Transformer (ours)
37.1
117.2
the legal move accuracy cannot be computed for state-value prediction since it is only de-
AlphaZero (policy net only)
4.5
4.0
AlphuZero (value net only)
127.1
38.7 7
fined on boards reachable via legal moves.
AlphaZero (100 MCTS sim.)
293.1
4.4
Leela Chess Zero (policy net only)
4.3
22.5
Leela Chess (value net only)
116.8
51.4
Legal Move Accuracy (%)
Loela Chess Zero (400 MCTS sim.)
116.1
49.7
Prediction Target
ECO
Puzzles
Test
Stockfish 16 (50ms per move) [oracle]
1525.3
349.6
Action-Vales
0.0
10.5
0.5
Stockfish 16 (1.5s per board)
1501.1
0.6
Rehavioral Cloning
100.0
99.6
and the puzzle test set). We hypothesize that the increased performance due to the increased data diversity seen under uniform sampling. As we train for very few epochs, the starting position and common opening positions are only seen a handful of times during training under uniform sampling, making it unlikely that strong carly-game play of our models can be attributed to memorization.
Model architecture To investigate the performance of architectures other than transformers on our benchmark, we perform preliminary investigation with an AlphaZero-like convolutional neural network. We therefore train residual tower with 8 layers and 256 channels (no pooling, broadcasting, or bottleneck layers), followed by a linear layer and log softmax. We input the 8-by-8 board in single channel and treat the other scalars in the FEN as additional channels. Table A2 shows that this particular model- and training configuration does not lead to strong results for the convolutional architecture we consider. Note that we did not extensively tune our experiment setup and would therefore expect highly domain- domain-specific setups that more closely resemble those of AlphaZero or Leela Chess Zero to achieve much higher performance. Thus, the purpose of this experiment is to show that the vanilla transformer setup seems to achieve better performance than an "equivalently vanilla" convolutional setup.
B.2 Inference Times
Table A3a shows the inference times in milliseconds on 1000 random boards from the Encyclopedia of Chess Openings [22] using single TPU (V5). Unsurprisingly, the "searchless" agents (i.e., our models and the policy networks) are orders of magnitudes faster than the agents that rely on tree search at test time. Note that the value networks are slow evaluate since we compute every legal action individually (and sequentially) and then take the arg max over the values.
B.3 Predicting Legal Moves
natural question that arises when training models to play chess is whether they have actually learned the rules of the game. However, the problem of generating legal moves is tangential to our paper since we use a legal move generator (given by the environment) for our policies. as is standard in the chess AI literature (sec, e.g., AlphaZero, Stockfish, or Leela Chess Zero). In fact, computing the legal move accuracy does not actually make sense for action-valle value prediction since the nction-value function is only defined for legal moves. In contrast, for behavioral cloning the question of legal move accuracy is potentially more interesting (throughout this work, we normalize the predictive distribution to support only the legal moves except when evaluating the legal move accuracy) since the model is trained to output the oracle (and therefore a valid) action.
We investigate the legal move accuracy for action-value and behavioral cloning in Table A3b (the legal move accuracy is undefined for state-value prediction since we can only evaluate boards reachable via legal moves). Unsurprisingly, Table A3bl shows that the action-value predictor has very low legal
17

---

100
273M
Than Loak
6
0
1
Stapp
Step
Step
(a) Training Loss
(b) Test Loss
(c) Puzzle Accuracy
Figure A2: Train and test loss curves and puzzle accuracy over time for the models from Section 3.1 We observe overfitting, which justifies always using the fully trained model in evaluations.
100000 Games
100'000 Games
0000000 Garnes
SM
24M
5
Step
166
Step
166
Step
1e6
(a) Training Loss
400C
3M
vol. Loss (10g SCaNN
2M
106
106
1e6
(b) Test Loss
Figure A3: Loss curves when scaling model size and training set size.
move accuracy, since outputs for illegal moves are undefined (i.e., never adjusted during training). In contrast, our behavioral cloning policy has learned to almost always predict a legal move, even for highly out-of- -ifdiisttinttinn puzzle boards, showing that our networks have the capacity to learn the rules given training protocol and dataset if explicitly trained to do so (i.e., unlike action-vall prediction).
B.4 Loss Curves
we show the train and test loss curves (and the evolution of the puzzle accuracy) for the large models from Section 3.1 We observe that none of the models overfit and that larger models improve both the training and the test loss.
In Figure A2
In Figure A3 we visualize the train and test loss curves for the scaling experiment from Section 3.3 In line with the results shown in the main paper we observe that on the smallest training set, models with > 7M parameters start to overfit but not for the larger training sets. Except for the overfitting cases we observe that larger models improve both the training and test loss, regardless of training set size. and that larger training set size improves the test loss when keeping the model size constant.
18

---

80
80
Kansa
60
40
Ponte
Actian-iolus
20
Actinn-ssla
5
5
Step
Step
Step 200
(a) Kendall's
(b) Puzzles Accuracy (%)
Action Accuracy (%)
Figure A4: Comparison of the three different prediction targets (action-value, state-value and behavioral cloning) trained on the datasets generated from million games. Note that this means that the action-value network is trained on roughly 30 times more data than the other two (cf. Table (A]). Action-value learning (trained 1.6B action-values) learns slightly slower but outperforms the other two variants in the long run (which are trained on roughly 55M states best actions). Behavioral- cloning falls significantly short of state-value learning, even though both are trained on virtually the same amount of data.
Table A4: Ranking the policies that arise from our three different predictors by having them play against each other in tournament and computing relative Elo rankings (200 games per pairing; i.c. 600 games per column). When constructing the training data for all three predictors based on the same number of games (middle column), the action-value dataset is much larger than the value / behavioral cloning set, which leads to stronger policy. When correcting for this by forcing the same number of training data points for all three (right column), the difference between state- and action-value prediction disappears.
Relative Tournament Elo
Prediction Target
Same of Games in Dataset
Same # of Data Points
Action- Value State-Value
+492 (+31))
+252 (+22)
+257 (#)
+264 22)
Behavioral Cloning
(#28)
24
B.5 Predietor-Targel Comparison
In Figure A4 we compare the puzzle accuracy for the three different predictor targets (action-values, state-values, or best action) trained on million games. As discussed in the main text, for fixed number of games we have very different dataset sizes for state-value prediction (roughly 55 million states) and action-value prediction (roughly 1.6 billion states); see Table for all dataset sizes. seems plausible that learning action-values might pose slightly harder learning problem, leading to slightly slower initial learning, but eventually this is compensated for by having much more data to train on compared to state-value learning (see Figure A4 which shows this trend). Also note that since we use the same Stockfish computation time in total (due to one call per action) when compared to state-values (one call per board). To control for the effect of dataset size, we train all three predictors (9M parameter model) on fixed set of 40 million data points. Results are shown in Figure A5 As the results show, the state-value policy in this case slightly outperforms the action- value policy, except for action-ranie ranoonn (Kendall's 's r), which makes sense since the action-vall value predictor is implicitly trained to produce good action rankings. To see how this translates into playing -trenngh,, we pit all three policies (AV, SV, BC) against each other and determine their relative Elo rankings. Table A4 shows that when not controlling for the number of training data points, the action-value policy is strongest (in line with the findings in Table and Figure A4).. but when controlling for the number of training data points the action-value and state-value policy perform almost identical (in line with Figure A5)..
per Stockfish call, all action-values for one state use more
Throughout all these results we observe lower performance of the behavioral cloning policy, despite being trained on a comparable number of data points as the state-value policy. The main hypothesis for this is that the amount of information in the behavioral cloning dataset lower than the tate-valuue
19

---

20
Kensa
40
Adtin--ssla
5
5
Step
Stop
Stop
(a) Kendall's
(b) Puzzles Accuracy (%)
Action Accuracy (%)
Figure A5: Comparison of the three different prediction targets (action-value, state-value, and behavioral cloning) trained exactly the same number of data points (40M). The superiority of action-value learning over state-value learning disappears (or even reverses to some degree), except when measuring the action-ranking correlation (Kendall's which the action-value policy is indirectly trained to perform well on.
dataset, since we throw away any information in the state- or action-valuse beyond the index of the oracle action. We suspect that training on the full action distribution of the oracle (with cross-entropy loss), rather than the best action only would largely close this gap, but we consider this question beyond the scope of this paper and limit ourselves simply reporting the observed effect in our setting.
B.6 Fischer Random Chess
As a measure of out-o--distributtin generalization, we evaluate the performance of our 9M transformer on Fischer random chess (Chess960) via Lichess (using the same setup for Table 1.. Fischer is a variation of the game of chess, which employs the same board and pieces as classical chess, but the starting position of the pieces the players' home ranks randomized. following certain rules. The random setup makes gaining an advantage through the memorization of openings impracticable; players instead must rely more on their skill and creativity over the board. Thus, Fischer random chess can be viewed as measure of whether our models have learned general tactics (for the early stages of the game). While our bot attains blitz Elo of 2054 (cf. Table [ it only manages to play Fischer random chess at 1539 Elo (against bots), suggesting that the distribution shift is too high for our models to handle.
B.7 Tactics
In Figure A6 we analyze the tactics learned by our 270M transformer used against human with blitz Elo of 2145. We observe that our model has learned to sacrifice material when it is advantageous build a longer-term advantage.
B.8 Playing Style
We recruited chess players of National Master level and above analyze agent's games against bots and humans on the Lichess platform. They made the following qualitative assessments of its playing style and highlighted specific examples (see Figure A7).
The agent has an aggressive enterprising style where fiequently sacrifices material for long-tern strategic gain. The agent plays optimistically: it prefers moves that give opponents difficult decisions to make even if they are not always objectively correct. values king safety highly in that it only reluctantly exposes its own king danger but also frequently sacrifices material and time expose the opponent's king. For example 17 Bg5 in Bame|B.8.7 encouraged its opponent to weaken their king position. Its style incorporates strategic motifs employed by the most recent neural engines 7 54 For example it pushes wing pawns in the middlegame when conditions permit (see game B.8.2) b. In game B.8.3 the agent executes correct long-term exchange sacrifice. In game B.8.4 the bot uses
gameeB....enccouraage
httpe://en.wikkieddaa.co httppp/dia..oggi/////iisseee
20

---

Human (2145 Eloo
270M Transformer
Human (2145 Elo)
270M Transformer
(a) Blunder (Bd4 best)
(b)
Inacouracy
(d4
best)
(e) Checkmate now unavoidable (Bf2 best)
Figure A6: Example of the learned tactics for our 270M transformer vs. a human player with a blitz Elo of 2145 (the game progresses from left to right and top bottom). Our model decides to sacrifice two pawns since the white bishop will not be able to prevent it from promoting one the pawns. The individual subfigure captions contain the Stockfish analysis from Lichess (i.e., our model plays optimally).
21

---

A
A
A
W
(a) King weakening
(b) Wing pawn push
(c) Exchange sacrifice for long
compensation
W!
P
A
(d) Long term sacrifice
(c) Exposing the opponent's king
(f) Disagreement with Stockfish
gg) Optimistic blunder
Figure A7: Examples of our 270M transformer's playing style against online human opponents.
motif of a pin on the back rank to justify pawn sacrifice for long term pressure. Game B.8.5 features a piece sacrifice expose its opponent's king. The sacrifice is not justified according to Stockfish although the opponent does not manage tread the fine line to permanent advantage and blunders six moves later with Bg7.
The agent has distinct playing style to Stockfish: one analyzer commented "it feels more enjoyable than playing a normal engine", "as if you are not just hopelessly crushed". Indeed it does frequently agree with Stockfish's s move choices suggesting that the agent's 's action-value predictions match Stockfish's. However the disagreements can be telling: the piece sacrifice the preceding paragraph is such an example. Also, game i.8.6 (.m.eB.8.66) interesting because the agent makes moves that Stockfish Rxb4 and believes black
strongly disagrees with. particular agent strongly favours better, in contrast Stockfish believes white is better and prefers Nd4. Subsequent analysis by the masters suggests Stockfish is objectively correct in this instance. Indeed on the very next move the agent has reversed its opinion and agrees with Stockfish.
22

---

The agent's 's aggressive style is highly successful against human opponents and achieves a grandmaster- level Lichess blitz Elo of 2895. However, against other engines its estimated Elo is far lower, i.e. 2299. Its aggressive playing style does not work as well against engines that are adept at tactical calculations, particularly when there is a tactical refutation to sub-optimal move. Most losses against bots can be explained by just one tactical blunder in the game that the opponent refutes. For example Bxh3 in game B.8.7 loses a piece to g4.
Finally, the recruited chess masters commented that the agent's style makes it very useful for opening repertoire preparation. is no longer feasible to surprise human opponents with opening novelties as all the best moves have been heavily wer-analyzed. Modern opening preparation amongst professional chess players now focuses on discovering sub-optimal moves that pose difficult problems for opponents. This aligns extremely well with the agent's 's aggressive, enterprising playing style which does not always respect objective evaluations of positions.
B.8.1 King weakening game
1. e4 c5 2. NI3 Nc6 3. Bb5 g6 4. 0-0 Bg7 5. c3 N16 6. Re1 0-0 d4 d5 8. c5 Ne4 9. Bxc6 bxc6
10. Nbd2 Nxd2 11. Bxd2 Qb6 12. dxc5 Qxc5 13. h3 Qb5 14. b4 a5 15. a4 Qc4 16. Rel Bd7 17. Bg5 f6 18. Bd2 Bí5 19, exf6 exf6 20, Nd4 Bd7 21. Nb3 axb4 22. cxb4 Qh4 23. Nc5 Bf5 24. Ne6 Rfc8
25. Nxg7 Kxg7 26. Re7+ Kh8 27. a5 Re8 28. Qe2 Be4 29. Rxe8+ Rxe8 30. f3 1-0
B.8.2 Wing pawn push game
1. e4 c6 2. d4 d5 3. Nc3 dxe4 4. Nxe4 N16 5. Ng3 c5 6. Bb5+ Bd7 7. Bxd7+ Nbxd7 8. dxc5 Qa5+ 9. Qd2 Qxc5 10. N63 h5 11. O-O h4 12. Ne2 h3 13. g3 e5 14. Ne3 Qc6 15. Qe2 Bb4 16. Bd2 0-0 17.
Rael Rfe8 18. Ne4 Bxd2 19. Qxd2 Nxe4 0-1
B.8.3 Exchange sacrifice game
1. d4 d5 2. c4 e6 3. Ne3 Bb4 4. cxd5 exd5 5. Nf3 Nf6 6. Bg5 h6 7. Bh4 g5 8. Bg3 Ne4 9. Rel h5 10.
h3 Nxg3 11. fxg3 c6 12. e3 Bd6 13. Kf2 h4 14. g4 Bg3+ 15, Ke2 0-0 16. Kd2 Re8 17. Bd3 Nd7 18.
Kc2 Rxe3 19. Kb1 Qe7 20. Qe2 Nf8 21. Rhfl Ne6 22. Bh7+ Kg7 23. Bf5 Rxf3 24. gxf3 Nxd4 25.
Qd3 Nxf5 26. gxf5 Qe5 27. Kal Bxf5 28, Qe2 Re8 29. Qxe5+ Rxe5 30. Rfdl Bxh3 31. Rc2 Re3 32.
Ne2 Bf5 33. Red2 Rxf3 34. Nxg3 hxg3 0-1
B.8.4 Long term sacrifice game
1. d4 d5 2. c4 e6 3. Nf3 Nf6 4. Nc3 Bb4 5. Bg5 dxc4 6. e4 b5 7. a4 Bb7 8. axb5 Bxe4 9. Bxe4 h6
10. Bd2 Bh7 11. 0-0 0-0 12. Be3 c6 13. bxc6 nxc6 14. Qb3 Qe7 15. Ra4 a5 16. Rd1 Rfd8 17. d5
exd5 18. Nxd5 Nxd5 19. Rxd5 Rxd5 20. Bxd5 Rd8 21. Ral a4 22. Rxa4 Qd7 23. Bc4 Qd1+ 24.
Qxdi Rxd1+ 25. Bfl Ba5 26. Re4 Rbl 27. Rc2 Nb4 28. Rc5 Nc6 29. Bel Bb4 30. Rc2 g5 31. h4 g4
32. Nh2 h5 33. Bd3 Ral 34. NI1 Ne5 35. Be2 Be4 36. Rc8+ Kh7 37. Be3 Rel 38. Bb5 Bd3 39,
Bxd3+ Nxd3 40. Rd8 Nxb2 41. Rd5 Be7 42. Rd7 Bxh4 43. g3 Bf6 44. Rxf7+ Kg6 45. Rxf6+ Kxf6
46. Bd4+ Kg5 47. Bxb2 Rb1 48. Be3 Kf5 49. Kg2 Rb3 50. Ne3+ Ke4 51. Bí6 Rb5 52, Kfl Rb6 53.
Bc3 Rb3 54. Bd2 Kd3 55. Bel Rb5 56. Ng2 Ko4 57. Ke2 Rb2+ 58. Bd2 Re2 59. Ne3 Ra2 60. Nc4
Kd4 61. Nd6 Ke5 62. Ne8 Kf5 63. Kd3 Rao 64. Be3 Rc6 65. Bb4 Kg 66. Nd6 Ra6 67. Bc5 Ra5 68.
Bd4 Ra6 69. Nc4 Ra4 70. Nb6 Ra5 71. Kc4 h4 72, gxh4 Kh5 73. Bí6 Ra2 74. Ke3 Ra3+ 75, Kc2 g3
76. Nd5 Ra2+ 77. Kf3 gxf2 78. Nf4+ Kh6 79. Kg2 fl= 80. Kxfl Re2 81. Bg5+ Kh7 82. Ne2
Kg6 83. Kf2 Ra2 84. KP3 Ra4 85. Ng3 Rc4 86. Bf4 Rc3+ 87. Kg4 Re4 88. h5+ Kf6 89. Nf5 Ra4 90.
Ne3 Ra5 91. Ne4 Ra4 92. Ne5 Kg7 93. K15 Ra5 94. Kg5 Rb5 95. Kg4 Rb1 96. Kf5 Rb5 97. Ke4
Ra5 98. h6+ Kh7 99. Bd2 Ra2 100. Be3 Ra6 101. Ng4 Ra3 102. Bd2 Ra2 103. Bf4 Ra5 104, K13
Rí5 105. Ke3 Kg6 106. Ke4 Rh5 107. K13 Rh3+ 108. Kg2 Rh5 109, Kg3 Ra5 110. Be3 Ra3 111.
Kf3 Rb3 112. Ke4 Rb4+ 113, Bd4 Ra4 114. Ke5 Re4 115. Kdd Ra4 116. Ke4 Rb4 117. Kd3 Ra4
118. Kc3 Ra3+ 119. Kc4 Rg3 120 Ne3 Rh3 121. Kd5 Rxh6 122. Bb6 Rh3 123. Nc4 Rh5+ 124.
Ke6 Rg5 125. Nd2 Rg2 126. NEl Rb2 127. Bd8 Re2+ 128. Kd5 Rel 129. Ne3 Rxe3 130. Bh4 Kf5
131. Bf2 Rd3+ 132. Kc4 Ke4 133. Bc5 Rc3+ 134. Kxc3 1/2-1/2
B.8.5 Expose king game
e4 c5 2. Nf3 Ne6 3. Na3 Nf6 4. e5 Nd5 d4 cxd4 6. Nb5 a6 7. Nbxd4 g6 8. Be4 Ne7 9. Nxe6
bxc6 10. Ng5 Ne6 11. Nxf7 Kxf7 12. Bxe6+ Kxeō 13. Bd2 KI7 14. QB+ Kg8 15. e6 dxe6 16.
23

---

0-0-0 Qd5 17. Qe3 Bg7 18. Bc3 Qxa2 19. Rd8+ K17 20. Qf4+ Bf6 21, Rxh8 Qal+ 22. Kd2 Qxhl 23. Bxf6 exf6 24. Qc7+ 1-0
B.8.6 Stockfish disagreement game
1. e4 c5 2. NE3 Nc6 3. d4 cxd4 4. Nxd4 Ni6 5. Nc3 e6 6. Ndb5 d6 7. Bf4 c5 8. Bg5 a6 9. Na3 b5 10.
Nd5 Qa5+ 11. Bd2 Qd8 12. Bg5 Be7 13. Bxf6 Bxf6 14. c4 15. Ne2 Rh8 16. g3 b3 17. axb3
Rxb3 18, Nch4 Rxb4 19. Nxb4 Nxb4 20. Qa4+ Kf8 21. Qxb4 g6 22. Bg2 h5 23. h4 Kg7 24. 0-0 g
25. hxg5 Bxg5 26. f4 Be7 27. fix5 dxe5 28. Qc3 Bc5+ 29. Kh2 Qg5 30. Rí5 Bxf5 31. Qxe5+ Qf6
32. Qxf6+ Kx16 33. exf5 Kg5 34. Bd5 Rb8 35. Ra2 16 36. Be6 Kg4 37. Kg2 Rb3 38. B/7 Rxg3+ 39.
Kfl h4 40, Ra5 Bd4 41. b4 h3 42. Bd5 h2 43. Bg2 Rb3 44. Rxa6 Rbl+ 45. Ke2 Rb2+ 0-1
B.8.7 Blunder game
1. b3 e5 2. Bb2 Nc6 3. e3 d5 4. Bb5 Bd6 5. Bxc6+ bxc6 6. d3 Qg5 7. NI3 Qe7 8. c4 Nh6 9. Nbd2
O-O 10. c5 Bxc5 11. Nxe5 Bb7 12. d4 Bd6 13. O-O c5 14. Qh5 cxd4 15. exd4 Rae8 16. Rfel f6 17.
Nd3 QF7 18. Qf3 Bc8 19. h3 NE5 20. g3 Ne7 21. Bc3 Bxh3 22. g4 f5 23. Qxh3 fxg4 24. Qxg4 h5 25.
Qe6 g5 26. Qxf7+ Rxf7 27. Bb4 Ref8 28. Bxd6 cxd6 29, b4 Ní5 30. Re6 Kg7 31. Rdl Rc7 32. Nf3
g4 33. Nd2 h4 34. Nb3 Rc2 35. NE4 g3 36. Nh5+ Kh7 37. fxg3 Nxg3 38. Nxg3 Rg8 39. Rd3 Rxa2
40, Rxd6 Rb2 41. Rxd5 Rxg3+ 42. Rxg3 hxg3 43. Nc5 Kg6 44. b5 Rxb5 45. Kg2 a5 46. Kxg3 a4 47.
Rd6+ Kf5 48. Nxa4 Rb3+ 49. Kf2 Rh3 50. Ne5 Kg5 51. Re6 KfS 52. d5 Ke5 53. d6 Rh2+ 54. Kg3
Rd2 55. d7 Rxd7 56. Nxd7+ Ke4 57. Rd6 Ke3 58. Nf6 Ke2 59. Ng4 Kel 60. Kf3 Kfl 61. Rdi# 1-0
24

---

NeurIPS Paper Checklist
1. Claims
Question: Do the main claims made in the abstract and introduction accurately reflect the paper's contributions and scope?
Answer: [Yes]
Justification: The experimental results in Section and Appendix support the claims from Section 1
2. Limitations
Question: Does the paper discuss the limitations the work performed by the authors?
Answer: [Yes]
Justification: Discussed in Section 4.1
3. Theory Assumptions and Proofs
Question: For each theoretical result, does the paper provide the full set of assumptions and a complete (and correct) proof?
Answer: [NA]
Justification: No theoretical results proofs.
4. Experimental Result Reproducibility
Question: Does the paper fully disclose all the information needed to reproduce the main ex- perimental results the paper to the extent that affects the main claims and/or conclusions of the paper (regardless of whether the code and data are provided or not)?
Answer: [Yes]
Justification: We provide all experimental details in Section and Appendix A
5. Open access to data and code
Question: Does the paper provide open access the data and code, with sufficient instruc- tions to faithfully reproduce the main experimental results, as described in supplemental material?
Answer: [Yes]
Justification: We open sourced dataset, model weights, and code at htttts://gitthii
sew.cceeerccceeeeeeeeeeeeeeeeeee chess
6. Experimental Setting/Details
Question: Does the paper specify all the training and test details (e.g., data splits, hyper- parameters, how they were chosen, type of optimizer, etc.) necessary to understand the results?
Answer: [Yes]
Justification: We provide all experimental details in Section 2 and Appendix A and open sourced our our dataset, model weights, and code.
7. Experiment Statistical Significance
Question: Does the paper report error bars suitably and correctly defined or other appropriate information about the statistical significance of the experiments?
Answer: [Yes]
Justification: See Table
| for the tournament Elo.
8. Experiments Compute Resources
Question: For each experiment, does the paper provide sufficient information the puter resources (type of compute workers, memory, time of execution) needed to reproduce the experiments?
Answer: [Yes]
Justification: See Appendix A.9
25

---

9. Code Of Ethics
Does the research conducted in the paper conform, in every respect, with the NeurlPS Code of Ethics http:///wg...aac....//////////aa
Question:
Answer: [Yes]
Justification: No ethical concerns.
10. Broader Impacts
Question: Does the paper discuss both potential positive societal impacts and negative societal impacts of the work performed?
Answer: [Yes]
Justification: See Section 7
Safeguards
Question: Does the paper describe safeguards that have been put in place for responsible release of data or models that have a high risk for misuse (e.g., pretrained language models, image generators, or scraped datasets)?
Answer: [NA]
Justification: The paper poses no such risks.
12. Licenses for existing assets
Question: Are creators or original owners of assets (e.g., code, data, models), used in the paper, properly credited and are the license and terms of use explicitly mentioned and properly respected?
Answer: [Yes]
Justification: Section discusses the license for Lichess games and puzzles.
13. New Assets
Question: Are new assets introduced in the paper well documented and is the documentation provided alongside the assets?
Answer:
[Yes]
Justification: We described our benchmark dataset, which we open sourced, in Section 2
14. Crowdsourcing and Research with Human Subjects
Question: For crowdsourcing experiments and research with human subjects, does the paper include the full text of instructions given to participants and screenshots, if applicable, as well as details about compensation (if any)?
Answer: [NA]
Justification: No research with human subjects (other than competing Lichess.org).
15. Institutional Review Board (IRB) Approvals or Equivalent for Research with Human Subjects
Question: Does the paper describe potential risks incurred by study participants, whether such risks were disclosed to the subjects, and whether Institutional Review Board (IRB) approvals (or an equivalent approval/review based on the requirements of your country or institution) were obtained?
Answer: [NA]
Justification: No risks incurred by human study participants.
26


Reviews:
[{"review_id": "SV95etlX04", "reviewer": "Reviewer_wU89", "summary": "The paper is well-written and demonstrates that supervised learning with Stockfish evaluations can create a strong chess engine. The methodology is solid, and the inclusion of an LLM as a baseline is noteworthy. However, the motivation is ambiguous and the use of transformers over CNNs is questioned. Additionally, the paper lacks clarity on certain statements, and the technical contribution is limited. Ablation studies on training objectives are also recommended.", "questions": "Please refer to W2-W4.", "limitations": "Yes.", "rating": 5, "confidence": 4, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "- This paper is well-written and easy to follow\n- It is interesting to know that supervised learning with Stockfish evals can be a strong chess engine baseline\n- The methodology is solid and well-explained\n- The authors include an LLM as a baseline, it is interesting to see a proper evaluation of how well LLMs can play chess", "weaknesses": "- W1: The motivation for this work is somewhat ambiguous. On the one hand, the authors claimed that the main idea is to approximate the search engine Stockfish, by distilling its board evaluation results into NNs (in particular transformers), but the evaluation is on chess performance instead of directly comparing the predicted and ground truth centipawn advantages. Although the action prediction evaluation is kind of doing that, it is still discretized to actions before comparing the rankings, not comparing the continuous values directly. Therefore the claim to approximate stockfish is invalid. On the other hand, the proposed system did really well in chess, it seems that the authors are trying to build a strong chess engine without searching. But it is still underperforming lc0 inference without search.\n- W2: Why transformers are particularly interesting for this study? Many prior works have shown that the multi-channel encoding of chess boards combined with CNNs can perform really well, including alphazero, lc0, maia, etc. Essentially, chessboards are 2d and the used inputs are sequential. Is it possible that the tokenization of FEN and the direct inputs to transformers are limiting the performance?\n- W3: It is unclear what this statement means: “Although the source code is available, there is no (peer-reviewed) research report explaining and comparing Lc0’s methods”. Does this mean lc0 may include Stockfish eval already? Is it still fair to compare with lc0? It would be good if the authors could clarify.\n- W4: The labels of the value prediction are ranges of centipawn advantages predicted by Stockfish. Is there any design to balance the labels? And is there any mechanism to make sure the categorical labels are semantically interconnected?\n- W5: The methodological contribution of this work is limited. If I understand correctly, the method basically incorporates stockfish evals as training targets without task-oriented designs.\n- W6: Ablation studies on the training objectives should be conducted and presented.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We thank the reviewer for their constructive feedback.\n\n**The paper claims to aim at approximating Stockfish by distilling its board evaluation into a transformer but evaluates performance w.r.t. chess play rather than Stockfish’s centipawn score, which invalidates this claim. Instead, the paper appears to create a strong chess engine without using explicit search, which, however, underperforms lc0.**\n\nThank you for pointing out a potential source of confusion!\n\nWe do evaluate the learning targets (i.e., the loss over win percentage/centipawns) in Appendix B.4 (Fig. A2 and A3). These loss curves show the quantitative comparison against the discretized ground-truth centipawn score.\n\nWe respectfully disagree that our goal was not to distill Stockfish’s value estimation behavior. The objective we *directly* optimize (and report in the appendix) is our model’s prediction error w.r.t. Stockfish’s value estimates, and as a modeling assumption, we chose to phrase this as a discretized prediction problem (similar to distributional RL). This is the main idea behind general algorithm distillation (i.e., minimizing prediction error over an algorithm’s outputs).  We mainly focused on two *behavioral* metrics for comparing models since they imply good quantitative predictions and allow easy comparison across learning targets and models. One could think of these metrics as using a chess-relevant distortion function. If, instead, our goal were to build a strong chess engine, we would have used explicit search and a domain-specific transformer. The fact that lc0’s policy net performs ~160 Elo better is interesting but does not undermine the main goal of our paper (which is to carefully investigate various architectural and training factors, not to outperform).\n\n**Why are transformers interesting for this study if prior work showed that convolutional networks achieve strong performance on chess?**\n\nWe focus on investigating transformers’ amortized planning capabilities (in the context of chess). While convolutional networks have been used successfully in the past (e.g., AlphaZero, or past versions of lc0), the more recent consensus seems to be that transformer-based architectures are at least equally suitable, perhaps even stronger. For example, the strongest modern lc0 networks are transformer-based, as also pointed out by  `R-LZwX`, which is the result of many ablations by the lc0 community. While it is intuitive that 2D convolutions implement good inductive biases for the 2D chess board, it is also plausible that (self-)attention leads to good inductive biases for considering relative relations between sets of relevant pieces regardless of their precise spatial arrangement on the board. To avoid speculation, we also performed an ablation with a convolutional network in our paper (see Table A2).\n\n**What does it mean that lc0’s source code is available but that there is no (peer-reviewed) research report explaining and comparing lc0’s methods? Does this mean lc0 may include Stockfish already? Is it still fair to compare with lc0?**\n\nThe difficulty with lc0 is that it is a collection of models (originally re-implementing AlphaZero, but with significant evolution since then) that is developed by an active chess engine community, which makes heavy use of the lc0 blog and discord server to share results. This means that detailed architectural information is often only available via the source code (~90k lines of code), and, more importantly, full details about the training process and data sets are typically not part of the open-source release and are thus simply not available for many lc0 networks (though we cannot rule out that this information could be found on lc0’s discord server). For example, even `R-LZwX`, who seems very knowledgeable about lc0, is not fully aware of all the training details. While the lc0 community has made impressive contributions and progress over AlphaZero, the lack of independent reproducibility due to missing information makes the networks currently less suitable for academic research (one of the key requirements of peer-reviewed research articles is providing all information necessary for independent reproduction of results). One positive side-effect that our paper and dataset/model release hopefully have is to encourage and enable others to evaluate their methods in a way that allows for scientific reproducibility.\n\nConsequently, we do not know whether lc0 includes Stockfish evaluations. However, this does not have an impact on our work and main claims. Similarly, whether comparing to lc0 is “fair” cannot be answered without knowing the full training details of lc0, which is a caveat we clearly state in our paper (lines 190 - 192): \"We show these comparisons to situate the performance of our models within the wider landscape, but emphasize that some conclusions can only be drawn within our family of models and the corresponding ablations that keep all other factors fixed.\"\n\n**Can you conduct ablation studies on the training objectives?**\n\nYes, we have already conducted the following ablations of the training objectives:\n* *loss function* (Table 2): log-loss (classification) vs. HL-Gauss loss (classification) vs. L2 loss (regression)\n* *predictor-target* (Table 2): action-value vs. state-value vs. behavioral cloning\n* *number of value bins* (Table A2): 16 to 256 bins for the HL-Gauss loss\n\nIf the reviewer has any other ablation of the training objectives in mind, we are happy to include it in the next revision of our paper.\n\n**Did you try to balance the labels and make sure that they are semantically interconnected?**\n\nWe did not balance the labels as we did not want to perturb the natural game/value distribution. We are not quite sure what the reviewer means by “semantic interconnectedness”. Could you please clarify? Note that we did perform ablations on the number of bins we used for our discretization (see Table A2) and an ablation on a non-discretized loss (see Table 2).", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "nJpQN3aHEv", "reviewer": "Reviewer_LZwX", "summary": "The paper introduces a large dataset of chess board states along with annotations for best moves and state-(action)-values. It demonstrates that transformers trained on this dataset with supervised learning can achieve significant performance and generalization. This adds to the growing evidence showing that neural nets can implement complex behaviors (such as imitating search-based chess engines).", "questions": "(pretty minor)\n- If I understand correctly, all three types of predictors use entirely separate models. I'm wondering whether training a single model with a shared body and three small prediction heads would lead to transfer between predictors (e.g. let the BC policy profit from the larger amount of data used to train the state-action-value predictor). Is this something you considered/tried?\n- Why is the state-value predictor trained only on the smaller amount of data (compared to the state-action-value predictor)? Couldn't you use the state-action-value annotations as state-value annotations for the follow-up state, which would mean you'd already have all the training data needed to also train the state-value predictor on more data?", "limitations": "Issues are discussed well in the paper", "rating": 6, "confidence": 5, "soundness": 4, "presentation": 4, "contribution": 2, "strengths": "- There is continuing debate about the extent to which neural networks learn generalizing non-trivial algorithms, so this is a timely addition.\n- The paper has extensive experiments with a wealth of different metrics and some interesting ablations.\n- I like the discussion in section 4 and elsewhere. It's transparent about potential issues, but in my view none of these are a big issue for the overall takeaways, and it seems fine to add manual workarounds to deal with them (like the authors do).\n- The writing is very clear and covers all the details I was interested in. Overall, I really like the execution of this paper.", "weaknesses": "EDIT: see my reply (https://openreview.net/forum?id=XlpipUGygX&noteId=UsMmll2N3a) for my updated stance.\n\nThe paper does not add too much that didn't already exist outside peer-reviewed ML venues. As the authors discuss (line 312), the existing Leela Chess Zero network is stronger than the network introduced by this paper. The T82 version of Leela (which this paper compares against) is also trained using supervised learning and uses a transformer architecture similar to the one in this paper. Similarly, datasets of chess board states with engine annotations exist (e.g. at https://database.lichess.org/). I'm not aware of datasets with state-action-value annotations for all moves in a state, but it's not clear that this is even necessary to train a state-action-value predictor.\n\nIn my mind, the main contribution of this paper is thus creating a well-documented and peer-reviewed chess-playing neural network and dataset, as well as running ablations (which likely don't come as a surprise to the chess engine community, but seem interesting for the broader NeurIPS audience). This is still a nice contribution (though I wish it was made clearer from the start that this is what the paper does, e.g., in the intro/\"contributions\" paragraph. EDIT: the authors' changes do make this clear now).\n\nMinor notes:\n- Regarding why BC does worse than value predictions (appendix B.5): I don't think the richer training signal is the full explanation, since the value nets of Leela/AlphaZero also outperform their policy nets, even though those policy nets are trained to imitate a full distribution (rather than the single best move). My guess is that another reason is the weak form of \"1-ply search\" inherent in letting the network evaluate many different actions/follow-up states and taking an argmax.\n- Line 177: T82 is a transformer, not a ConvNet (see more below)\n- Nitpick for table 1 and elsewhere: Leela and AlphaZero get the past eight board states as input, rather than the full move history (though the lack of even earlier states shouldn't matter much). I think the most notable difference is in fact between GPT-3.5 vs all the other networks, since GPT-3.5 gets *only* moves and so has learn to keep track of the board state itself. So in the \"Input\" column, I might distinguish between \"PGN\" (for GPT-3.5), \"FEN\" (for the new models), and \"FEN + past states\" (for Leela and AlphaZero).\n- On the claim that the network plays at grandmaster level: this is a difficult comparison to make, since human players play better when given more time per move, whereas the neural network of course doesn't improve from time beyond what's needed for one or a fixed number of forward passes. I agree that the network seems as strong as grandmasters with Blitz time controls, but it might still be significantly weaker than grandmasters at classical time controls. I think this distinction isn't always clear (e.g. line 44).\n\nDetailed notes on Leela vs the new model in this paper: The T82 version of Leela that this paper compares against was trained using supervised learning on MCTS data, rather than trained with online RL (this isn't well-documented, but see https://lczero.org/play/networks/basics/ and note that T82 is one of the \"contrib runs\"). It is also a transformer with an input encoding not too different from the one used in this paper (one token position per square of the chess board). The main differences as far as I can tell are that Leela has some domain-specific improvements to its architecture (https://lczero.org/blog/2024/02/transformer-progress/, Smolgen is part of T82), uses fewer parameters, and was trained on different (and probably more) data.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We thank the reviewer for their careful study of our paper and, in particular, for all their clarifying remarks on lc0, which have helped us to improve the description of that baseline.\n\n\n**Lc0’s T82 network is a domain-specific transformer (rather than a ConvNet), trained using supervised learning on an unknown amount of MCTS data (rather than using online RL).**\n\nThank you for these clarifications and all the additional information on lc0! We agree with the reviewer that these details are not well-documented, which makes a scientific comparison beyond evaluating playing strength difficult (e.g., it is unclear which and how much data was used to train T82). We have updated the description of lc0 in Section 2.5 as follows:\n\n“**Leela Chess Zero** We consider three variants: (i) with 400 MCTS simulations, (ii) only the policy network, and (iii) only value network (where (ii) and (iii) perform no additional search). We use the T82 network, which is a transformer and the largest network available on the official Leela Chess Zero website [5]. T82 uses one token per square of the chess board, has fewer parameters (94M vs. up to 270M for our models), includes some domain-specific architecture changes (e.g., Smolgen [29]), and was trained using supervised learning on MCTS data.”\n\n\n**The grandmaster claim against humans may only hold with Blitz time controls (since human performance improves with more evaluation time, unlike the models trained in this paper), which isn’t always clear in the paper.**\n\nWe fully agree that our results only imply grandmaster-level performance against humans with Blitz time controls, and we will clarify this distinction throughout the paper. For example, we have changed line 44 to “... playing chess at a high level (grandmaster) against humans *with Blitz time controls*”.\n\n\n**BC does worse than value predictions because it performs a weak form of “1-ply search” rather than having a poorer training signal (lc0’s/AZ’s policy nets are also worse even though they imitate the full distribution, i.e., not just the best move).**\n\nThis is an interesting observation. Indeed, multiple factors probably contribute to BC’s relatively weak performance, and we agree that inference-time FLOPS (i.e., performing a less expansive “1-ply search” than the value-based methods) is probably also a major factor. We have expanded the discussion of these results in Appendix B5 accordingly.\n\n\n**AZ and lc0 operate on the past 8 board states rather than the full move history.**\n\nThank you for the clarification! We agree that the reviewer’s proposed distinction of “PGN” for GPT-3.5 and “FEN + past states” for AZ and lc0 is more precise and have updated Table 1 and the description in Section 3.1 accordingly. \n\n\n**Did you try training a single model with three prediction heads for the different predictor targets (AV, BC, SV) to enable transfer between them (e.g., more data for BC)?**\n\nThank you for this interesting suggestion! We have not tried training a single shared model with multiple heads. A priori, it is not clear whether this would increase overall performance, lead to catastrophic interference, or make little difference overall since all three targets are highly related. It is also unclear whether increased model capacity would be needed (or not) and how to combine all three predictions into a single policy (though there are obvious candidates). We believe that investigating these questions is out of scope for our current work, and have added them to a future work section in the discussion of our paper.\n\nNote that we did conduct an ablation where all three predictor targets were trained on the same amount of data in Table A4 to investigate whether our observed differences in performance were simply a matter of different amounts of data. \n\n\n**Why is the state-value predictor not trained on the (much larger) state-action-value dataset, using the state-action values as state-values for the next state?**\n\nIndeed, that is an astute observation, which would cut the annotation time in half when creating the state value and action value datasets (assuming that Stockfish’s evaluation is symmetric). For our paper, we only trained the action value predictor on our largest dataset of ~15 billion data points. However, we also conducted the ablation where all three predictor targets are trained on exactly the same amount of data in Table A4, showing that the state value predictor performs more or less on par (slightly better, by 12 Elo) with the action value predictor. A priori, it seems plausible that learning to predict state and action values is of roughly equal complexity (in deterministic environments), but repeating our experiment from Table A4 (i.e., using the same number of training data points for all policies) at even larger scales would be an interesting direction for future work.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "ScKs1WDfM7", "reviewer": "Reviewer_Ye4U", "summary": "This paper aims to solve the challenging problem in the chess game. The main contributions include building a large-scale dataset and training a large-scale transformer model with the collected dataset. The proposed approach has shown a significant outperformance over the baselines.", "questions": "Can the authors elaborate on whether the transformer structure is more important or the dataset is more important for performance improvement?", "limitations": "The authors have discussed the potential limitations.", "rating": 6, "confidence": 3, "soundness": 3, "presentation": 3, "contribution": 2, "strengths": "The writing is mostly clear.\n\nThe empirical performance shows a great improvement.\n\nChess is a challenging game to evaluate the level of artificial intelligence, and the collected dataset can be used for the following research works.", "weaknesses": "The technique novelty of this work is incremental, as the techniques used in the proposed approach have been previously developed. The usage of transformer in amortized planning is a contribution, but not significant enough.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We thank the reviewer for their helpful feedback.\n\n\n**Is the transformer or the dataset more important for performance improvement?**\n\nAlthough this cannot be determined with certainty given our results, we investigated this question in Table A2, where we ablated model architecture and the time limit used when annotating a move with Stockfish for the dataset creation. Table A2 shows that using a higher time limit does lead to some performance gains (e.g., 1.4% higher puzzle accuracy) but at an extremely high computational cost (i.e., doubling the total unparalleled annotation time from 8680 days to 17360 days). Therefore, we compromise between computational effort and final model performance and use 0.05s per state-action value annotation.\n\n\n**Using transformers for amortized planning is a contribution, but not significant enough.**\n\nWe respectfully disagree. Though the approach of amortizing a planning algorithm with a fixed-parametric function approximator may be evident to some researchers, it is typically not the mainstream interpretation. Large sequence models have been repeatedly dismissed as mere “statistical pattern matchers”,  “stochastic parrots”, or “curve fitters”; implying that this approach is insufficient to capture complex algorithmic behavior. While the results of large foundation models may speak for themselves w.r.t. this criticism, we believe it is important to advocate and thoroughly test the amortization viewpoint. Just to reiterate: the state space of chess is very large - even when only considering the “natural” distribution of board states from games on lichess.org, all but the most trivial games face our networks with mostly unseen board states, where accurate value estimates and/or actions require considerable generalization beyond the training data. Our results cannot be explained as memorization with a bit of interpolation or simple statistical pattern matching, and not too long ago, such results were thought to be unachievable without explicit planning. Our results also show that transformers (up to the size used in our experiments) cannot always fully match Stockfish. Together, this raises two important future questions: (i) What is missing to match Stockfish’s performance; is it just a matter of scale, or can we identify systematic shortcomings of transformers? (ii) How do transformers implement amortized planning, and how is it related to architectural parameters such as depth? While these questions are beyond the scope of our current work, we believe that our results and dataset lay excellent groundwork to investigate these questions in the future.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}, {"review_id": "oG5xT22UCy", "reviewer": "Reviewer_tXJ6", "summary": "This paper introduces an open dataset comprised of real chess positions annotated with a evaluation score, the best move to play, and a score for each legal move according to StockFish 16 using 50ms for each action. They then train large transformers over this dataset, and include in-depth analysis through making the model play on Lichess, and using ablation studies over the hyperparameters of the network.", "questions": "Section 2.2 mentions that the problem was seen as a classification problem, binning the win percentages into K uniform bins. Was augmenting the density of bins around 50% in order to improve accuracy in critical positions considered?\n\nTable A3(a) in the appendix seems to show that stockfish with 0.05s per move takes 1.5s per move on average. What does this mean? Wasn't the 50ms limit a strict limit?\n\nAppendix A9 mentions the hardware used for the experiments, but not how long it took to train each model. Would it be possible to add this information?", "limitations": "The limitations are adequately addressed.", "rating": 7, "confidence": 3, "soundness": 4, "presentation": 4, "contribution": 3, "strengths": "- The paper provides an extensive analysis of the current state and abilities of their trained Transformer on ChessBench, giving a really strong starting point for future work on the subject.\n- The promising results of using a Transformer architecture to replicate StockFish's evaluation point to the ability of large models to be able to perform well in the area of planning for complex tasks.\n- The dataset introduced by the authors is quite extensive, and could prove very useful for future research", "weaknesses": "- The dataset might be of relatively poor quality, as it uses Stockfish 16 with only 50ms for each evaluation. This could make a significant proportion of the evaluations be wrong, and potentially limit the playing strength of models trained using this data. (Table 1. show a significant (>200 elo) disparity in playing strength between 0.05s and 1.5s for stockfish)\n- The goal of the paper is not immediately obvious. A first reading of the abstract and the introduction seem to imply with the title that the paper is concerned about the general abilities of Transformers to tackle planning problems, while the contributions are more focused on providing a dataset (as well as an initial case study on it) for future research on this topic, focused on the case of chess.", "quality": null, "clarity": null, "significance": null, "originality": null, "strengths_and_weaknesses": "", "was_revised": false, "final_justification": "", "rebuttal": "We thank the reviewer for their insightful and positive feedback.\n\n\n**Is the dataset of poor quality if you use Stockfish with only 50ms evaluation time (as there is a significant Elo disparity between 0.05s and 1.5s for Stockfish)? Also, why does Stockfish with 0.05s evaluation time take 1.5s to play a move on average?**\n\nThe dataset is of high (super grandmaster) quality, as evidenced by the fact that Stockfish with 0.05s, i.e., the data-generating oracle, achieves an Elo of 2713 against other bots on Lichess. While higher time limits would lead to even stronger annotations, there is a trade-off in terms of computing time spent on collecting the dataset (currently 8680 days of unparallelized compute). Note that we did, however, create smaller-scale datasets with higher annotation time limits in Table A2, showing that none of our networks can currently fully match the performance of the data-generating oracle(s), so the current frontier seems to lie with improving models rather than the playing-strength of the data-generating oracle. \n\nTo clarify the 0.05s vs. 1.5s evaluation time, we consider two versions of Stockfish:\n* *Data-generating oracle*: For a given board, the oracle *evaluates* every legal move separately for 0.05s (i.e., if there are, e.g., 30 legal moves, Stockfish uses a total time of 1.5s to *play* a move). We primarily compare to this version since this is how we constructed the dataset.\n* *“Standard-play” Stockfish*: For completeness, we also include Stockfish as it would typically be used in standard play, i.e., its evaluation time is restricted per state but not per move, meaning that some clearly suboptimal moves can receive very little time (based on Stockfish’s pruning) and the resulting extra budget is instead spent on more promising moves. Since there are roughly 30 legal moves per board on average, we choose a time limit of 30 * 0.05s = 1.5s per board state for  “standard-play” Stockfish. This leads to an improvement in play of >200 Elo compared to the version that spends a fixed 50ms on each legal move per board state, but we only include this baseline as a “reference” (i.e., it is not reflected in the dataset).\n\nWe agree that the difference between these two versions is subtle, and we will clarify it in the next revision of our paper.\n\n\n**How long did it take to train each model?**\n\nThe 9M models trained at roughly 270 steps per second, yielding a total training time of 10M / 270 * 3600) = 10.2 hours. The 136M models trained at approximately 26 steps per second, yielding a total training time of 10M / (26 * 3600 * 24) = 4.45 days. The 270M models trained at roughly 13 steps per second, yielding a total training time of 10M / (13 * 3600 * 24) = 8.9 days. We will add these details to Appendix A.6, which describes our hardware setup.\n\n\n**Did you consider non-uniform binning to improve accuracy in critical positions?**\n\nWe initially experimented with non-uniform binning but quickly abandoned the approach due to its increased complexity (e.g., state-value expansion is non-trivial with non-uniform bins due to its minimax nature) and failure to produce large performance gains. However, we did ablate the number of bins in Table A2, showing that an increased resolution improves performance, but only up to a certain point. Based on our experience, non-uniform binning can lead to gains when the overall number of bins is very small, but these gains diminish relatively rapidly with medium to large numbers of bins.", "claims_and_evidence": "", "methods_and_evaluation_criteria": "", "theoretical_claims": "", "experimental_designs_or_analyses": "", "relation_to_broader_scientific_literature": "", "essential_references_not_discussed": "", "other_strengths_and_weaknesses": "", "other_comments_or_suggestions": "", "questions_for_authors": "", "summary_of_paper": "", "summary_of_recommendation": "", "technical_quality": "", "clarity_of_presentation": "", "potential_impact": "", "robotics_focus": "", "quality_of_limitations": "", "questions_for_rebuttal": "", "reasons_to_accept": "", "reasons_to_reject": "", "questions_to_authors": "", "extra_scores": {}}]

Author rebuttal:
We thank the reviewers for their detailed comments and positive feedback. 

We are pleased that the reviewers consider our paper well-written (`R-wU89`, `R-LZwX`, `R-Ye4U`) and a “timely addition to the literature of learning non-trivial algorithms”  (`R-LZwX`, `R-tXJ6`), our methodology solid (`R-wU89`), our experiments extensive “with a wealth of different metrics and interesting ablations” (`R-LZwX`, `R-tXJ6`), and our open-source benchmark dataset “very useful for future research” (`R-Ye4u`, `R-tXJ6`).

Here, we summarize our response to the common questions. We respond to the individual questions below every review.


`R-wU89`, `R-LZwX`, `R-tXJ6`: **What is the motivation for and main contribution of this work?**

The motivation for our work is to understand transformers’ capabilities of amortizing planning via supervised learning. We conduct a case study using chess as a testbed because it is very well studied, memorization is futile even at large scale, and strong chess engines use fairly sophisticated algorithms for which it is not trivially clear that transformers can easily learn to mimic them. As `R-LZwX` points out, the computer chess community has made similar previous and parallel investigations, but not necessarily with the same aim and scientific reproducibility in mind. Hence, we believe that a rigorously executed case study with well-documented details adds value and facilitates future research and scientific comparison of approaches. An important part of this (but not the only contribution) is crafting a benchmark dataset (and documenting exactly how the data is collected and how evaluations are performed).

We have made the following changes (in italics) to our introduction to clarify the motivation and goals of our paper:

* L38: *The goal of our paper is thus to investigate to which degree vanilla transformers can be trained to mimic Stockfish’s value estimation algorithm by minimizing prediction error (log-loss) and what quantitative impact architectural parameters and training design choices have on this capability.* To *scientifically* address this question, we created ChessBench, a large-scale chess dataset created from 10 million human games that we annotated with Stockfish 16.
* L43: The resulting policies are capable of solving challenging chess puzzles and playing chess at a high level (grandmaster) against humans *with Blitz time controls*.
* L51: *We note that building a strong chess engine is not our primary goal (we use game-playing-related metrics, i.e., playing strength and puzzle-solving accuracy, as performance measures since they are highly correlated with good value estimates and allow for easy comparison with other models). Some of our findings are qualitatively known in the chess engine community, particularly the Leela Chess Zero community, and we do compare against one of their state-of-the-art transformer-based models, which performs slightly better than our largest model. Since the training details of this network are opaque, a direct comparison must be taken with a grain of salt, and we instead perform extensive ablations on our model to ensure that all non-ablated parameters are kept fixed. To easily enable further research and improve standardization and reproducibility, we release our dataset and evaluation metrics as a benchmark, ChessBench, and provide some initial results via our models and ablations and the models we compared against.*


`R-wU89`, `R-Ye4U`: **The methodological contributions are limited because there are no domain-specific modifications.**

Indeed, we do not make domain-specific modifications to the architecture/training protocol, but that is deliberate and one of our main design principles: Our goal is to provide an evaluation of transformers in their standard, tried-and-tested setup, rather than building the best possible chess architecture (which would require domain-specific tweaks).

Meta-review: This paper produces a benchmark dataset constisting of chess positions together with Stockfish position evaluations. The main idea is to investigate the ability of transformers to learn this mapping, thus "distilling" Stockfish's search process into a single pass of a transformer. Various dimensions and ablations are investigated, with results showing that a Transformer-only model is capable of playing chess at a high level (without search), although not as well as Stockfish.

The work is solid and was complimented by the reviewers. One strange thing about this paper is that many of the results may indeed be known to the general Leela-chess community, but this would be the first paper that provides documentation and rigour surrounding the idea of using a neural network (in this case, a transformer) to evaluate positions. As such, many of the results will likely be novel to the general machine learning community. On the other hand, one could argue that the audience for this is rather niche. The idea of "distilling" an algorithm or search process into a transformer is generally useful to a wider audience, but because it is so tied to the domain of chess here (naturally, since the benchmark itself focuses on chess), it's unclear whether these results might be of interest outside the domain (and computer chess playing community).

As a minor note, the issue of indeciseveness is tackled in a rather inelegant way, and I can't help but wonder if it reveals an issue with the way the benchmark is constructed. Instead of mapping all guaranteed checkmating sequences to the same value, perhaps they can be mapped to slightly different (high) values to differentiate and encourage the transformer to follow shorter paths to victory.
Decision: Accept (poster)