Case Study 2 — How Far Does "Checks First" Go? A Mate Solver Against 2,000 Real Puzzles

A data case: we build the simplest possible calculator — one that only gives checks — and test it on real mate puzzles, then compare what it finds with what real players find in their games. Scripts: code/04_mate_search.py (the experiment) and code/case_study_02.py (the summary and the example).


Setup

The chapter argued that checks make the narrowest calculation trees: after a check the opponent has on average 3.4 legal replies in real middlegame positions, against about 37 after any other kind of move. If that is true, a calculator that only looks at checks should solve most short mates with very little work — and the mates it cannot solve should be the ones humans find hard.

That is a testable claim. We need three things:

  1. A test set. The Lichess puzzle database tags mates by length. We took a random slice of the file (row group 1, ordered by the random puzzle ID) and drew 1,000 mateIn2 and 1,000 mateIn3 puzzles with a fixed seed (2026). Median ratings: 1116 (mate in 2) and 1282 (mate in 3).
  2. A solver. outpost.calc.mate_search(board, n, mode) is an exact search: it proves that the side to move can force mate in at most n moves while the attacker plays only the moves mode allows — 'checks', 'checks+captures' or 'all' — and the defender may play any legal move. If it returns a line, the mate is a mathematical fact, no engine required. If it returns nothing, there is no forced mate with those moves.
  3. A cost measure. The number of positions the search visits before it succeeds or gives up — the computer's equivalent of "how much did you have to look at?".

📐 Definition — Restricted mate search. An AND–OR search over the game tree: at attacker nodes, success needs one move (from the allowed set) that leads to mate; at defender nodes, success needs mate after every legal reply. Shorter mates are tried first (iterative deepening). A node limit (150,000 positions per search here) stops runaway searches; no search in this experiment came close to it.

The data

Mate in 2 (n = 1,000 puzzles, rating median 1116):
  first solution move: check 99.3%, threat 0.6%, capture 0.1%
  solver limited to checks          : forced mate found in  99.3%   nodes median         8   mean         12   (when found: median 8)
  solver limited to checks+captures : forced mate found in  99.4%   nodes median        10   mean         15   (when found: median 10)
  solver limited to all             : forced mate found in 100.0%   nodes median        48   mean         67   (when found: median 48)

Mate in 3 (n = 1,000 puzzles, rating median 1282):
  first solution move: check 97.0%, threat 2.2%, capture 0.7%, quiet 0.1%
  solver limited to checks          : forced mate found in  96.6%   nodes median        28   mean         47   (when found: median 29)
  solver limited to checks+captures : forced mate found in  97.3%   nodes median        49   mean         83   (when found: median 49)

By puzzle rating:

Mate in 2
     band   n  checks  checks_captures  first_move_check
    <1000 394    99.7             99.7              99.7
1000-1399 376    99.7             99.7              99.7
1400-1799 179    98.3             98.9              98.3
    1800+  51    96.1             96.1              96.1
Mate in 3
     band   n  checks  checks_captures  first_move_check
    <1000 197   100.0            100.0             100.0
1000-1399 400    98.8             99.2              98.8
1400-1799 256    93.8             94.9              94.5
    1800+ 147    91.2             92.5              92.5

Left: share of mate-in-2 and mate-in-3 puzzles solved by a checks-only and a checks-plus-captures search, by puzzle rating. Right: positions searched for a mate in 2 by each mode, log scale

📊 Figure (described): Left: the share of puzzles in which the restricted search proved the mate, by puzzle rating band (the axis starts at 80%). A checks-only search solves almost every mate in 2 and 91–100% of mates in 3, with the success rate falling as the puzzle rating rises. Right: for mates in 2, the number of positions searched — median 8 with checks only, 10 with checks and captures, 48 when every move is allowed.

How the solver mirrors a human calculation

It is worth pausing on what the search actually does, because it is a precise version of the advice in the chapter. At each of its own turns it lists its candidate moves — only checks, in the strictest mode — and tries them one by one. After each candidate it looks at every defence, not the one it hopes for; if a single defence escapes, the candidate is rejected and the next one is tried. It stops a line only at checkmate (a perfectly quiet position, in the chapter's sense) or when it runs out of moves to try. And it tries short mates before long ones, which is what a human does when they first ask "is there a mate in one?" before looking further. Nothing in it is clever. Its strength is that it never skips a step.

Analysis

1. "Checks first" is almost a complete method for short mates. A solver that never plays anything but checks proved 99.3% of the mates in 2 and 96.6% of the mates in 3. Adding captures helps only a little (99.4% and 97.3%). Lichess mate puzzles come from real games, so this is not a property of composed problems: short mates in real play are overwhelmingly check-driven.

2. Checks are cheap. For a mate in 2 the checks-only search needed a median of 8 positions; the full-width search needed 48 — about 6.2 times as many (median ratio per puzzle). For a mate in 3 the checks-only search needed a median of 28. That is the scale of a human calculation: a handful of lines, each a few moves long.

3. The mates it cannot find are the hard ones. Forty-one of the 2,000 puzzles resisted the checks-only search (7 mates in 2, 34 mates in 3). Their median rating was 1671, against 1176 for the puzzles it solved — a gap of about 500 rating points. Their first moves:

Puzzles NOT solved by the checks-only search: 41; their first moves: threat 68.3%, capture 19.5%, check 9.8%, quiet 2.4%

Most of them begin with a threat — a quiet move that creates a mating threat the defender cannot meet. (The 9.8% that begin with a check fail later, when the solver needs a non-check in the middle of the line.)

The example: a quiet king move

The most-played mate in 3 that the checks-only search could not solve (puzzle J5j7I, rating 1596, played 27,322 times):

White to move: mate in 3, and the first move is not a check

♟️ Position: White Kf5, Rb6, b4; Black Kh8, Rb3, a6, g3, g7 — White to move. FEN: 7k/6p1/pR6/5K2/1P6/1r4p1/8/8 w - - 0 46

Solution (database): Kg6 Rc3 Rb8+ Rc8 Rxc8#
White to move: 18 legal moves, of which 2 checks, 1 captures/promotions, 1 threats (4 forcing, 14 quiet).
Forcing scan (in order): Rb8+ (check), Rh6+ (check), Rxa6 (capture), Kg6 (threat)
  mate_search(3, checks         ): not found                                            16 positions, 0.0 s
  mate_search(3, checks+captures): not found                                            30 positions, 0.0 s
  mate_search(3, forcing        ): Kg6 Rxb4 Rxb4 Kg8 Rb8#                              106 positions, 0.1 s
  mate_search(3, all            ): Kg6 Rxb4 Rxb4 Kg8 Rb8#                            4,437 positions, 0.2 s
  Stockfish 19 d18: Kg6 #3 (Kg6 Rf3 Rb8+ Rf8 Rxf8#); second Rxa6 -0.05

46.Kg6! — the king walks up to g6 and takes h7 away from Black's king, so that 47.Rb8 would be mate on the back rank (g8 is on the rook's rank). The two checks fail on their own (46.Rb8+ Kh7 and the king escapes; 46.Rh6+? gxh6), and the capture 46.Rxa6 is only −0.05 by Stockfish. The search that allows threats finds the mate after 106 positions; the full-width search needs 4,437. Our book's threat rule lists Kg6 because, after it, White would have a mate in one if Black passed — exactly the definition.

This is the general shape of hard calculation problems: the first move is quiet, it creates a threat instead of executing one, and after it the defender has many replies — here, every rook move and every pawn move — which must all be shown to fail. The checks-first scan does not find such moves. A threat scan does, at the cost of a wider tree.

Puzzles versus games

In the chapter (Section 10.8) we measured how often real players keep a forced mate in their games. Put the two results side by side:

Mate distance Checks-only search, puzzles Lichess players, own games (first opportunity) OTB classical players
Mate in 2 99.3% (n = 1,000) 73.9% (n = 5,400) 91.0% (n = 791)
Mate in 3 96.6% (n = 1,000) 70.7% (n = 3,537) 86.8% (n = 851)

A twenty-line program that does nothing but try checks would have found more of the short mates than the players who had them on the board. Of the moves with which Lichess players kept a mate, 68.2% were checks; of the moves with which they missed it, only 25.8% were.

What it means (and doesn't)

  • It means: for short mates, the method is not the problem — the habit is. The checks-only search is exactly the procedure the chapter recommends: list the checks, follow each one, consider every reply. It finds nearly all mates in 2 and 3 with a few dozen positions of work. Players who miss them are, most of the time, not running the scan at all.
  • It means: the residue — the mates that need a quiet first move — is where calculation becomes hard, and where puzzle ratings jump by about 500 points. Train those deliberately (Lichess's quietMove and threat-first puzzles).
  • It does not mean that a checks-only player calculates as well as a strong player. Mates are a special, check-heavy corner of chess; the chapter showed that Stockfish's best move is quiet in about two-thirds of ordinary middlegame positions, where this search has nothing to offer.
  • It does not mean the puzzle and game percentages are directly comparable. Puzzles tell you a mate exists; games don't. Puzzles have no clock; Lichess games mostly have a fast one. The puzzle sample is drawn from puzzles generated by Lichess's own selection process, and the game sample from analysed (self-selected) games. The comparison shows the size of the gap, not its exact cause.

Discussion questions

  1. Why does adding captures to the checks-only search help so little for mate puzzles, when captures are twice as common as checks in middlegame positions?
  2. The threat-allowed search solved puzzle J5j7I in 106 positions; a human solver needs the idea of 46.Kg6 first. What visual clue in the position points to a king move?
  3. Players kept a mate in 2 in 73.9% of Lichess cases. Name two reasons other than "not scanning checks" that could explain misses, and how you could test each with the data.
  4. If you were designing a puzzle-training plan from these results, what share of your puzzles would you choose with a quiet first move, and why?

Your turn

Run code/04_mate_search.py with mateIn4 instead of mateIn3 (300 puzzles, node limit 300,000). Report the solved share for checks and checks+captures, the median positions searched, and the first-move kinds of the unsolved puzzles. Then pick the most-played unsolved one, diagram it, and write three sentences on what kind of idea its first move expresses.