Measure the student, not the move
An engine says a move is fine. A 1100 player will still lose. A metric for that, and the checks that caught its instruments measuring themselves.
By Nelson D’Souza · · 12 min read
- Evals
- Measurement
- Chess
In this note
- First attempt: count the escape routes
- Move 7 passed in silence
- Every legal move got a vote
- Survival: engine for truth, Maia for the student
- When the instrument measures itself
- Two resolutions in one comparison
- State the instrument carries
- Samples that can't answer the question
- Metrics that can't move, or can't fail
- Checking the rating against known answers
- What survival still can't see
An engine measures the move. A tutor has to measure the student. In my chess tutor, a survival metric pairs Stockfish, the judge of which moves hold, with Maia-2, a neural network trained on human games that predicts which move a player at a given rating will actually play. On the Fried Liver Attack, a sharp, well-known trap line, the engine calls Black’s recapture fine, and a simpler count of holding moves passes the decisive move in silence. Survival names it, and it’s the move a player at that level is most likely to make.
Most of the work went into the instruments rather than the metric. Search depth, the engine’s cache, sample size and an unpaired comparison each produced a number that described the measurement setup instead of the student. Each was caught by testing the instrument before trusting what it said.
The tutor is for developing players. It has to judge every move a student makes, and the obvious judge is a chess engine. Stockfish plays far better than any human and will tell you, for any move, how much it cost.
Here is the line. After 1.e4 e5 2.Nf3 Nc6 3.Bc4 Nf6 4.Ng5 d5 5.exd5, Black recaptures with 5...Nxd5. Stockfish says it costs 93 centipawns. Converted to win percentage, Lichess’s mapping from centipawns to a rough chance of winning, that’s about 8 points, under the 10-point bar for even an inaccuracy. And the engine is right: modern theory holds that Black survives after 6.Nxf7 Kxf7 7.Qf3+ Ke6.
But a tutor that tells a 1100-rated player “that’s fine” is a terrible coach. Holding that position takes a long sequence of accurate moves they won’t find.
First attempt: count the escape routes#
If the problem is “objectively fine but hard to hold”, measure how hard. For each student move, let the engine find the opponent’s best reply, then count how many of the student’s next moves still hold. Call that share forgiveness. A position where 24 of 30 replies hold is forgiving; one where 1 of 42 holds is not.
It passed the first validation, a handful of known positions:
- Fried Liver
Nxd5: objectively good, 1 of 42 replies hold. Verdict: risky. - The book move
Na5instead: best, 3 of 6 hold. Fine. - A quiet
Nc6: best, 24 of 30 hold. Fine. Bg4, which allows Légal’s Mate: good, 5 of 35 hold. Risky.
It flagged Bg4, a classic trap, without being told about it. That is the kind of validation that misleads: a few positions with known answers, every one of them right. It went into the decision log.
Move 7 passed in silence#
The next step was to look at a whole line instead of single positions, and to bring in Maia-2 as the model of the student. I ran the Fried Liver line after 5...Nxd5 for a student at 1100, and set the counting measure beside what Maia expected:
- Move 6: 1 of 42 replies hold. The student plays
Kxf793% of the time, and it holds. - Move 7: 2 of 7 hold. The student plays
Ke852% of the time, and it loses. - Move 8: 5 of 32 hold. The likely move,
Nb4at 41%, holds. - Move 9: 1 of 32 holds. The likely move,
c6at 68%, holds.
Counting screams at moves 6 and 9, where the lone holding move is the obvious one any student finds. And it misses move 7 entirely. Two of seven is 0.29, above the 0.2 line below which a position is flagged, so the one moment that decides the game would have passed in silence. The earlier successes had been right by accident.
Every legal move got a vote#
Counting legal replies conflates forced with difficult. A position with exactly one reasonable move scores as maximally unforgiving, when it’s often the easiest kind of position to play: there’s one move, and it’s the natural one. A position with two holding moves out of seven looks generous, but if the student’s instinct is one of the five losing moves, it’s the most dangerous position in the game.
What counting lacks is any model of who’s choosing. Every legal move gets one vote, including moves no human at that rating would consider. The engine knows which moves are good. It has no idea which ones a person will reach for.
Survival: engine for truth, Maia for the student#
The replacement splits the two jobs. Stockfish decides which moves hold. Maia decides which moves the student will actually play. At each of the student’s decisions along the critical line, add up Maia’s probability for the moves that hold. That’s the chance the student gets through this move. Multiply along the line and you get the chance they survive the sequence. The tutor’s explanations divide the work the same way. In The model never sees the board, an engine owns every fact and a model only words them.
- Student to move to Maia at the student's rating: likely moves
- Maia at the student's rating: likely moves to Stockfish scores them and the best move, in one search: “95% of the mass, at most 8”
- Stockfish scores them and the best move, in one search to Keep moves within 10 points of the best
- Keep moves within 10 points of the best to P(survive this move) = Maia's mass on those
- P(survive this move) = Maia's mass on those to Multiply along the critical line
- Multiply along the critical line to Survival, plus the likeliest losing move
The product is an estimate along one path. The walk assumes both sides then play the engine’s move, so a student who holds with a different move reaches a position the number doesn’t follow. It measures whether this student keeps up with the critical line, which is what a coach needs to know.
On the same Fried Liver line, survival is high at most moves but collapses at one, and multiplied along the line it leaves a player at this level with a small chance of getting through. After the book move 5...Na5 instead, most players survive. The trap and the control separate clearly, which the engine’s verdict alone never showed.
Survival also names the move the student is about to get wrong, Ke8 in this line. At first the coach said so before the student moved. I took that out, because a student told which move fails never plays it and never finds out why. The coached mode can give a move back, so now the mistake happens, and the prediction goes to the review.
I didn’t tune the counting measure to fix move 7. The decision log puts it plainly: a measure that is right for the wrong reason will be wrong somewhere untested, so it is replaced rather than tuned.
Maia’s limits shape how the tutor uses it. Maia-2 groups ratings into buckets of a hundred from 1100 up and puts everything below 1100 in one bucket, so its output at 600, 800 and 1000 is byte-identical and there’s no dial below 1100. It’s unreliable in the first few moves of a game (from the starting position it prefers knight moves to e4), so the tutor uses an opening book for roughly the first ten plies and doesn’t trust survival before about ply 8. Where it works, it’s convincing: at the Fried Liver decision point it predicts Nxd5 76.2% of the time at 1100, and the book move Na5 52.6% of the time at 1900.
When the instrument measures itself#
Proving the metric, and the features built on it, meant auditing the instruments as hard as the metric. Each case below is one class of failure: a number that describes the measurement setup rather than the student.
Two resolutions in one comparison#
A move holds if it scores within 10 points of the best move. The first version scored the candidates at search depth 10, but took the best move’s score from a depth-16 search. A shallow search can’t see a deep refutation, so weak moves looked survivable.
At move 7, Ke6 scores 40.0 win-percentage points and Ke8 scores 29.2 at depth 16: a gap of 10.8, past the threshold. At depth 10 the gap hasn’t opened yet, and Ke8 counts as holding. Survival for the trap line came out about as high as for the book move, and the move that decides the game vanished from the result.
It took two fixes. The bar now comes from the same search as the moves it judges, and that search runs at full depth. Scoring only the handful of moves Maia considers likely pays for the depth, because 5 moves searched deeply cost less than 42 searched shallowly. The result separated the trap from the book move as clearly as the slower version had, at 5.3 s per walk.
In a coached game the student waits for that. A walk runs before the student’s move, and the app shows a waiting state for that one call and nothing else. It runs only past the opening, at least six plies after the last interruption, and until the coach has used its six interruptions, so most moves spend nothing on it.
The same blindness came back in game review, where the obvious optimisation was to find the interesting moments with a fast, shallow sweep and judge only those deeply. Over ten games, a depth-8 sweep rated real mistakes of 14.8% and 12.5% at 0.0%, and depth 10 still missed 13.1% and 12.5%. Those are positions where a shallow search can’t see the tactic, which is exactly where a student needs the review. Review now makes one deep pass, at 178 ms a ply, about eleven seconds for an ordinary game.
State the instrument carries#
An engine keeps a transposition table: a cache of positions it has already searched. Reusing it across searches is normally free speed. For the forgiveness count it was poison. That survey scores every legal move at shallow depth, so losing moves get almost no search of their own, and their scores lean heavily on whatever is already cached.
- Forgiveness survey to Stockfish process: “fresh process”
- Stockfish process replies to Forgiveness survey: “2, 2, 2 of 42 hold”
- Forgiveness survey to Stockfish process: “same position again (warm)”
- Stockfish process replies to Forgiveness survey: “2, 1, 1, 1”
- Forgiveness survey to Stockfish process: “unrelated positions in between”
- Stockfish process replies to Forgiveness survey: “1, 1, 17: a trap reads as quiet”
- Forgiveness survey to Stockfish process: “fix: new game, ucinewgame”
- Stockfish process replies to Forgiveness survey: “1 of 42, stable”
Seventeen of 42 turns a trap into a quiet move. And interleaved positions are the real usage pattern, so in production this would have looked like a coach that intermittently missed traps. The fix passes a fresh game object with each scoring call, which makes the chess library send ucinewgame and clear the table. The call survival uses to score its candidates does the same.
Samples that can’t answer the question#
Maia has no setting below 1100, so weaker opponents are made by flattening its move distribution with a temperature: every move stays one a person might play, and the good one is chosen less often. To know what each temperature is worth, a script plays it against unaltered Maia 1100 and converts the score to a rating with the Elo formula.
The first run used 30 games a match. The table wasn’t monotonic, which at that size it had no reason to be: near an even score, one standard error over 30 games is about 64 Elo, larger than most of the differences being read. I threw it away.
At 120 games a match the ratings came out like this, with the control within noise of 1100:
| Opponent | Measured rating |
|---|---|
| Unaltered Maia 1100 (control) | 1088 |
| First flattened setting | 901 |
| Second flattened setting | 820 |
| Third flattened setting | 775 |
One standard error is now 32 to 47 Elo depending on the score, before draws shrink it. The tutor offers two brackets, at 900 and 800, and not a third. Even 901 against 820 is only about 1.4 standard errors apart (and calibrated against unaltered Maia 1100 rather than real 800-Elo human games), so those two brackets lean partly on the design: a flatter distribution should play worse. 820 against 775 is under one standard error. A third bracket there would be a distinction the measurement can’t see.
A paired design caught what an unpaired one missed. Back when the coach still spoke before predicted mistakes, only 7 of 53 interruptions were that kind. The hypothesis was that the expensive survival walks were being wasted on quiet positions, so a cheap gate (in check, a piece exposed, a capture on the last move) would spend them better. An unpaired run, with different random seeds, showed 7 becoming 11.
- Hypothesis: a cheap gate spends walks better to Unpaired run with new seeds
- Unpaired run with new seeds to 7 → 11 predicted: an effect?
- 7 → 11 predicted: an effect? to 7/53 vs 11/54: about one standard error: “check”
- Hypothesis: a cheap gate spends walks better to Paired run, same seeds
- Paired run, same seeds to Byte-identical results
- Byte-identical results to Gate fires on 305 of 305 positions: “why?”
- Gate fires on 305 of 305 positions to Revert; record the numbers in the code
- 7/53 vs 11/54: about one standard error to Revert; record the numbers in the code
Seven of 53 against 11 of 54 is about one standard error apart, which different games produce on their own. The paired re-run used the baseline’s seeds. The driver’s random number generator is independent of the coaching policy, so the games are identical between runs and any difference would be the policy’s doing. It returned byte-identical results: 53 interruptions, 7 predicted. Measuring the gate directly explained why. It returned true for 305 of 305 positions past the opening, because past the book there is nearly always a capture, a check, or a piece attacked by something cheaper.
I reverted the change and recorded the numbers in the interruption module, so nobody tries it again. The binding constraint was the cap of six interruptions a game, not the walk budget.
Metrics that can’t move, or can’t fail#
The headline progress metric read 70% loss per move. That’s implausible as an average over every move, and it was the clue. Loss was recorded only for wrong moves and left NULL for correct ones, and SQL’s AVG skips NULLs, so the number averaged over failures alone. The deeper fault was that it couldn’t fall as the student improved. They make fewer mistakes, but each remaining one is as bad, so the average sits still. Correct moves now record 0.0, which is true, because in a drill the expected move is the best move.
A second metric had the same disease. The progress screen showed how well each concept was held, using FSRS, the spaced-repetition scheduler, and its estimate of recall now. Recall right after a review is close to 100% whatever the memory’s stability, and the scheduler brings every concept back on or before its due date, so for anyone practising daily everything has just been reviewed. On one real history of 171 attempts over 15 concepts, the number spanned zero percentage points while the stability behind it spanned 141x. Asked about a day ahead instead, the scheduler lets stability show: the same history spans 69% to 99%, and the weakest concept is the one with the lapses.
The opposite failure is a metric that can’t fail. Interruptions must not line up perfectly with errors, or the student learns to listen for the coach’s voice instead of looking at the board. The policy then capped predicted mistakes at half the interruption budget, so measuring the share of interruptions that were predictions would only have read the cap back.
So the measurement asked a question that can fail. Of the interruptions that fired, how many sat immediately before a move the student got wrong anyway? Over ten games and 498 student moves it was 16 of 53, or 0.30, against a target of at most 0.5. The 95% Wilson interval reaches about 0.44, still under the target, though interruptions within one game aren’t independent, so the real interval is somewhat wider.
Checking the rating against known answers#
The student’s rating sets drill difficulty, the opponent and survival’s parameters, so the tutor estimates it from rated puzzles with Glicko-1, a rating system that tracks uncertainty alongside the rating. I checked it against simulated students of known strength. Averaged over twelve seeds, the estimate lands within 150 points of the truth at 700, 1000 and 1400. A single student whose true rating is 950 is estimated at 1028 after 20 puzzles, with a 95% range of 872 to 1184, which is honestly wide for that many puzzles. The app shows the band to the student and says the first few puzzles are how it finds out.
That check has two limits worth naming. The simulated student solves each puzzle with exactly the probability Glicko’s formula predicts, so it proves the arithmetic recovers a rating from its own model, not that real students behave that way. And one run landing inside its interval says little about the interval. Whether a 95% band contains the truth about 95% of the time is a separate measurement over many runs, and I haven’t made it.
What survival still can’t see#
Survival has edges of its own, and they’re where the next measurements have to go. It models a typical player at a rating, through Maia, not this student’s own habits. It has nothing finer than “below 1100”, which is why the weaker opponents are flattened Maia rather than a weaker model. It isn’t trusted before about ply 8, so a book covers the opening. And every number here asks whether the tutor reads a position or a game correctly. Whether a student who hears it gets better is a slower measurement than any of these, and it’ll need a paired design and a sample large enough to resolve the difference before anything is read into it.
Built in: Chess Tutor