Case Study 2 — Engines Playing Engines: Opening Pairs and the Stockfish–Leela Rivalry
Setup
When the best players in the world are programs, what does a game between them look like — and what can it teach a human? The book's broadcast data answers part of that question by accident. Among the 373,918 games relayed on Lichess between November 2025 and October 2026 are 3,880 games from the Top Chess Engine Championship (TCEC), flagged as engine games and excluded from every human statistic in the book. Here we put them at the centre.
The question for this case study: who decides the result of a top engine game — the engines, or the opening they were given? TCEC assigns opening positions and has each engine play both colours. If the engines were perfect and the openings balanced, every pair would be drawn. If the openings were unbalanced and the engines equal, every pair would be split 1–1 by White winning both games. Where does real engine chess sit?
Data and code: code/07_tcec.py and code/case_study_02.py. A pair is two consecutive games (by game
id) in the same event with the same PGN opening name and the engines' colours reversed. Event groups: "top"
= Superfinal, Division P, Cup 16 quarterfinal onwards and Category 1 playoff; "4K" = engines whose program
must fit in 4 kilobytes; "other" = everything else (leagues, Swiss events, lower categories). The
hand-crafted-evaluation event is a round robin and contains no consecutive reversed pairs, so it appears
only in the overall results.
The data
pairs: 784 (1568 of 3880 games)
=== Pair outcomes by event group (decided = one engine scored more than 1 of 2) ===
pairs decided_pct white_points_per_pair
grp
4K 74 64.86 1.25
other 656 66.31 1.42
top 54 53.70 1.45
all pairs: White scores 1.41 of 2 points per pair (70.4%)
level pairs (1-1): 272; both drawn 161, both won by White 107, both won by Black 4

📊 Figure (described): For each event group, the share of opening pairs in which one engine outscored the other, both games were drawn, both were won by White, or both by Black. In the top events only 53.7% of pairs were decided by the engines; in 22% (12 of 54) White won both games, so the assigned opening, not the engines, decided the score.
Of the 784 pairs, 512 (65%) were decided — one engine outscored the other — and 272 were level. Of the level pairs, 161 were two draws and 107 were two White wins: in those, the opening was strong enough that both engines won with it. Across all pairs White collected 1.41 points out of 2 (70.4%). In the top events the decided share falls to 53.7%: the closer the engines are in strength, the more the opening matters.
The context: engines versus the best humans
Put the pairs next to the plain results (from 07_tcec.py):
group games white_score draw_rate white_wins black_wins median_plies
TCEC: all games 3880 70.0 50.0 45.0 5.0 155.0
TCEC: top events 647 72.6 47.6 48.8 3.6 155.0
TCEC: hand-crafted eval 300 69.7 43.3 48.0 8.7 147.0
TCEC: 4K engines 318 57.7 38.1 38.7 23.3 126.0
Humans OTB classical, both 2700+ 374 57.2 66.8 23.8 9.4 90.0
Humans OTB classical, avg 2400+ 23354 55.0 48.3 30.8 20.9 82.0
Two differences jump out. First, the engines' games are long — a median of 155 plies in the top events against 90 for 2700-rated humans — because engines do not agree short draws and play long technical positions out instead of offering or accepting a draw. Second, Black almost never wins a top engine game (3.6%), while 2700+ humans with Black win 9.4% of theirs. Humans choose balanced openings and make errors that cancel White's edge; top engines, given an unbalanced start, rarely make the error that would let Black turn it round. The 4K engines — tiny programs — are the exception that proves the rule: they make more errors, and Black wins 23.3% of their games.
For a human player the comparison carries a practical lesson. White's edge at the top of human chess is modest because both sides choose positions they understand. When you play an opening you understand badly, you have voluntarily taken on the role of the TCEC engine given a bad assigned position — and against an opponent who knows it well, the opening will decide your game too.
Analysis
Stockfish vs LCZero, pair by pair
The two great engine families — Stockfish (alpha-beta with NNUE) and LCZero (AlphaZero-style network with tree search) — met 34 times in our data, mostly in the TCEC Cup 16 final:
=== Stockfish-LCZero opening pairs: 13 ===
event opening r1 r2 sf_pair_score
TCEC Cup 16 Final Scotch Game 1/2-1/2 1/2-1/2 1.0
TCEC Cup 16 Final English Defense 1/2-1/2 1/2-1/2 1.0
TCEC Cup 16 Final Indian Defense: Normal Variation 1/2-1/2 1-0 1.5
TCEC Cup 16 Final French Defense: Winawer Variation, Advance Variation 1/2-1/2 1/2-1/2 1.0
TCEC Cup 16 Final Dutch Defense 1/2-1/2 1/2-1/2 1.0
TCEC Cup 16 Final Petrov's Defense: Three Knights Game 1/2-1/2 1-0 1.5
TCEC Cup 16 Final King's Gambit Declined: Falkbeer Countergambit, Hinrichsen Gambit 0-1 0-1 1.0
TCEC Cup 16 Final Nimzowitsch Defense: Franco-Nimzowitsch Variation 1-0 1-0 1.0
TCEC Cup 16 Final Semi-Slav Defense: Anti-Noteboom, Stonewall Variation, Portisch Gambit 1/2-1/2 1-0 1.5
TCEC Cup 16 Final Modern Defense: Standard Defense 1-0 1-0 1.0
TCEC Cup 16 Final Owen Defense 1/2-1/2 1-0 1.5
TCEC Season 29 - Swiss 9 English Opening: Neo-Catalan 0-1 1/2-1/2 1.5
TCEC Season 30 - Swiss 10 Czech Defense 1-0 1-0 1.0
Stockfish pair results: {1.0: 8, 1.5: 5}
Thirteen pairs: Stockfish won five 1½–½ and never lost a pair; eight were level. Of the level pairs, three were "both won by White" (Franco-Nimzowitsch, Modern, Czech) and one — a King's Gambit with the Hinrichsen line — was "both won by Black": the assigned opening was bad for White, and both engines punished it. Over all 34 games Stockfish scored 57.4% (+9 =21 −4); all four of its losses came inside level pairs, where LCZero won with the same colour and opening that Stockfish had won with. Read that way, Stockfish's edge is small and comes entirely from converting a few more of the balanced openings.
Inside one game: Leela's exchange sacrifice
The pair from TCEC Season 29's Swiss event in December 2025 shows the two styles meeting. LCZero, with White in a Neo-Catalan, reached the diagram position and gave up a rook for a knight:

♟️ Position: White Kg1, Qc2, Rc1, Re1, Bd2, Bg2, Nc4, Nh4, a3, b2, c5, d3, f2, g3, h2; Black Kg8, Qd7, Rb8, Re7, Bc7, Bh3, Nc6, Nf6, a5, b7, d4, e4, f7, g7, h6 — White to move. FEN:
1r4k1/1pbqrpp1/2n2n1p/p1P5/2Npp2N/P2P2Pb/1PQB1PBP/2R1R1K1 w - - 2 21
loser's first material sacrifice: move 21.Rxe4 (ply 41); SF19 d14 -1.21 -> -1.32
multipv 3 depth 20 before it: Bxh3 -1.08; Rxe4 -1.41; Bxe4 -1.60
after Rxe4 depth 20: -1.04; PV Nxe4 Bxh3 Qxh3 dxe4 Rd7 Qd3 b5 cxb6
🤖 Engine check: Stockfish 19 had White already worse here (about −1.1 at depth 20). In a multi-PV 3 search it ranks 21.Bxh3 first (−1.08) and the game's 21.Rxe4 second (−1.41); a single-line depth-20 search of the position after 21.Rxe4 gives −1.04. Remember Chapter 23's rule: single-PV and multi-PV numbers are not interchangeable, and a 0.3-pawn gap between them is within their disagreement. The fair reading is that the exchange sacrifice was one of White's best practical choices in a worse position — the kind of long-term, positional material investment Game Changer associates with neural-network engines: White gets a pawn and the light squares around Black's king for the exchange, and the bishop on h3 disappears.

📊 Figure (described): White's win probability after each ply, Stockfish 19 at depth 14. White is already below 50% at ply 10 (after 5...d4, −0.48) and around −1.0 to −1.4 for most of the game; the sacrifice at ply 41 changes little. The evaluation stays in that band for about 80 plies before sliding after ply 120 (−1.66) to −3.21 by ply 140 and a lost ending.
=== LCZero-Stockfish, TCEC S29 Swiss 9 (39277): Stockfish 19 depth 14 ===
moves acpl accuracy inaccuracies mistakes blunders
side
black 81 7.7 97.4 1 1 0
white 81 16.7 95.9 2 2 0
after ply 10 (5...d4): -0.48
after ply 40 (20...Bh3): -1.21
after ply 41 (21.Rxe4): -1.32
after ply 80 (40...Rb5): -1.37
after ply 120 (60...gxh5): -1.66
after ply 140 (70...Kf7): -3.21
after ply 160 (80...Kxd6): -10.00
The game lasted 162 plies and ended in mate. LCZero's sacrifice held the position for roughly a hundred plies; the loss came in a long ending, where Stockfish's deep search converted a small edge — the same pattern as the pair table, in miniature.
What it means (and doesn't)
It means that at the top of engine chess the opening is a decisive variable: in nearly a quarter of top pairs the assigned position decided the score for both engines. It also means the two engine designs are close — Stockfish's 57.4% over 34 games is a small edge measured with a wide interval, earned mainly in balanced openings and long endings.
It does not mean that chess is "solved" or that the openings TCEC assigns are representative of human openings — they are chosen to produce decisive games, and a 1.e4 e5 position assigned to two engines says little about your Italian. Nor does one game show that LCZero "plays like AlphaZero" in general: its exchange sacrifice is one example, not a measured style. And because our relays are a partial set of TCEC's events (only 22 games of the Season 29 Superfinal are in our data, for example), no TCEC title or match result should be read off these tables.
Discussion questions
- Why does the share of decided pairs fall as the engines get stronger (66% in other events, 54% in the top events)? What would you predict for a match between two copies of the same engine?
- 107 pairs were "both won by White" but only 4 "both won by Black". What does that tell you about how TCEC chooses openings?
- LCZero's 21.Rxe4 ranked second in a multi-PV search and was rated within 0.3 pawns of the best move. Is that a "mistake"? How would the book's win-% based classification (Chapter 32) label it?
- How could a human tournament use the opening-pair idea to reduce the advantage of the white pieces?
Your turn
Using code/case_study_02.py as a template, compute for every engine with at least 40 games in the TCEC data
its score in level pairs only versus decided pairs only, and its score with White versus Black. Rank
the engines by how much of their result comes from converting balanced openings (decided pairs) rather
than from being given good ones. Report sample sizes and Wilson intervals, and add one board from a decided
pair of the top-ranked engine with a depth-stated Stockfish 19 evaluation.