Chapter 4 Instructor Notes: King Safety

Chapter text · Case study 1 · Case study 2 · Exercises · Quiz · Key takeaways

Chapter 4 develops question 3 of the framework. It is the most immediately "useful" chapter of Part I for club players — the Greek-gift checklist alone wins and saves games — and it carries the book's first 🪞 learning check-in. Its unifying lesson: king safety is concrete. Shelters, attackers and sacrifices are judged by counting, not by appearance.

Learning objectives

The hook names three lessons that "organise this chapter", and the chapter then says it will build "the tools to read such positions before you are in them". Students should be able to:

  1. Treat king safety as concrete: identify the preconditions that decide whether an attack or sacrifice works (§4.4).
  2. Treat defence as a skill with right and wrong answers — choose the king's square by counting checks (§4.7).
  3. Distinguish soundness from practical chances: the engine and the result can disagree, especially with a clock running.
  4. Decide when and on which side to castle, and what not castling costs (§4.2).
  5. Measure a pawn shelter and count the attackers and defenders aimed at the king zone (§4.3).
  6. Judge opposite-side castling races and same-side h-pawn storms (§4.5–4.6).
  7. Describe how king-safety judgement changes with level (§4.8).
  8. (Developer) Build outpost/king_safety.py.

Timing plan

75-minute session

Minutes Activity Notes
0–10 Hook: Batsiashvili–Kosteniuk after 15.Ng5+ Vote on ...Kg8 / ...Bxg5 / ...Kg6 before revealing the engine.
10–20 §4.1–4.2 the king's two lives; castling data The open-centre split (47.9% vs 36.5% OTB).
20–30 §4.3 shelter vs attackers "Walls versus armies": attack weight tracks the evaluation better.
30–50 §4.4 the Greek gift: five preconditions and 9,899 sacrifices Productive struggle on Polugaevsky–Tal first.
50–62 §4.5 opposite-side castling race Karpov–Korchnoi 1974; first stormer +3.7.
62–70 §4.7 defending; the Lena/Grace/Dev/Sam dialogue
70–75 Learning check-in as exit ticket

3-hour block

Minutes Activity Notes
0–15 Hook and vote
15–40 §4.2 castling: Carlsen–Groenn as the classic punishment, then the data
40–60 §4.3 shelter: intact shelter in danger vs broken shelter that holds
60–95 §4.4 Greek gift: checklist drill on Exercises B1, B3, B4 Board demo.
95–105 Break
105–130 §4.5 race: Karpov–Korchnoi, Esipenko–Caruana; Case Study 2 Data demo.
130–155 §4.6 h-pawn: Fischer–Sherwin, Case Study 1 (Abdusattorov–Gukesh)
155–170 §4.7–4.8 defence and levels; Exercise B7
170–180 Learning check-in

Key numbers and games

Item Value as quoted Where
Batsiashvili–Kosteniuk, Global Chess League 2025 (rapid) After 15.Ng5+ (depth 24): ...Kg8 −4.27, ...Bxg5 0.00, ...Kg6 +3.86; the sacrifice itself −4.41 vs 14.Bxe5 +0.12; White won anyway Hook
Uncastled king at ply 30 OTB 47.8% (n = 52,830, −2.2 vs expectation); Lichess 49.1% (−0.8) §4.2
Uncastled, open vs closed centre (OTB) 36.5% (n = 155) vs 47.9% (n = 2,484) §4.2
Shelter vs attack weight (Spearman with owner eval) Shelter +0.047 OTB / +0.088 Lichess; attack weight −0.144 / −0.141 §4.3
Attack weight 10–12 OTB 36.3% (n = 306) §4.3
Greek gifts found 9,899 across three databases; accepted ~3 in 4 §4.4
Preconditions 0–1 vs 4–5 0–1: 50.1% refuted (n = 816); 4–5: 61.6% winning, score 71.1% (n = 588) §4.4
Polugaevsky–Tal, USSR Ch 1969 Before 19.Bxh7+: +2.11 (d20) / +2.45 (d24); 4 of 5 preconditions §4.4
Opposite-castling race First stormer OTB 56.0%, +3.7 (n = 24,905); only one storm arrived 62.2% (+7.5) §4.5
Karpov–Korchnoi, Candidates final 1974 g2 After 17.Bh6: +0.83 (d20) / +1.20 (d24) §4.5; Exercise B6
Esipenko–Caruana, Candidates 2026 13...Rxc3!, a piece attack the storm definition cannot see §4.5
h-pawn storms (masters, O-O vs O-O) 16.0% (1970s) → 27.4% (2020s, n = 7,674) §4.6
Abdusattorov–Gukesh, Tata Steel 2026 After 36.Qf5: 36...Rf8! +0.02 vs 36...Rg5?? 37.Qxf6+ +11.08 (depth 20) §4.6; Case Study 1; Exercise B7
Levels (Lichess <1000 vs OTB 2400+) Greek gifts refuted 58.5% vs 23.4%; sacrificer 37.9% vs 48.2% expected under 1000 §4.8

Threshold concepts and likely misconceptions

Key idea: learn the preconditions, not the move. The chapter says it in §4.4 and the data proves it: with 0–1 preconditions half of Greek gifts are refuted; with 4–5, 61.6% are winning. Students who internalise this stop asking "can I sacrifice?" and start asking "which jobs need doing, and which piece does each?" (Exercise B3: a bishop on e5 does the e5-pawn's job; B1: a rook lift supplies the queen's route.)

Misconceptions to expect:

  • "An intact shelter means a safe king." Attack weight tracks the evaluation far better than shelter points (Spearman −0.144 vs +0.047 OTB). Exercise A10 targets this.
  • "Not castling loses." On average it costs only −0.8 to −2.2 points; the cost is concentrated in open centres (36.5% OTB). The principle is right; the average hides where it matters.
  • "Active defence means walking the king forward." In the hook, ...Kg6 was +3.86 and ...Kg8 −4.27. Count the checks.
  • "It worked, so it was sound." Batsiashvili's sacrifice was −4.41 and won in a rapid game. Practical chances are real; they are not soundness.
  • "The checklist is enough." Exercise B4: three preconditions hold, but the knight that would go to g5 must recapture on e5. Count material first.
  • "The first attack wins." Case Study 2: the bulk of the effect is that the better side usually attacks first; from level positions the edge is about +1.7 OTB.

How the four tracks use this chapter

  • ♟️ Improver: §4.1–4.4 closely; do every position in your head first. The Greek-gift checklist is the deliverable. The §4.8 table tells them what goes wrong at their level (under 1000, the king dies in the centre).
  • 📊 Analyst: Data in §4.2 (castling by band), §4.3 (shelter vs attackers), §4.4 (9,899 Greek gifts), §4.5 (the race), §4.6 (h-pawn by era); Case Study 2 tests "the first attack wins" with controls. Each section states population, filter and sample size — have students restate them.
  • 🏆 Competitor: §4.5–4.6 on choosing a castling side and timing a storm; §4.7 on defending. Case Study 1 (Abdusattorov–Gukesh) shows an elite h-pawn attack built without committing. Exercise D4 asks how the opposite-castling draw rate (29.6% vs 41.8% at FIDE 2400+) should affect repertoire choices.
  • 💻 Developer: outpost/king_safety.py: king_zone, shelter_score, zone_pressure (attack weight N/B 2, R 3, Q 5), king_safety_report with a solid/watch/danger verdict, greek_gift_check, castling_timeline. The checkpoint's extension is x-ray attackers.

Running the code

Script What it shows Data needed
01_castling_timing.py Castling rates and timing by band game_features
02_greek_gift.py Finds 9,899 Greek gifts; outcomes by preconditions; writes greek_gift_events.csv master, broadcast and Lichess move text; engine cache
03_opposite_castling_race.py Storm arrival and first-stormer scores broadcast games, a 40,000-game Lichess sample; race_replay_cache.csv
04_shelter_and_eval.py Shelter, attack weight and king centralisation vs evaluation positions_sample
05_rook_pawn_storms.py h-pawn storms by decade and band master, broadcast and Lichess move text
06_annotated_games.py All annotated games and board diagrams (including Case Study 1) master and broadcast games, engine
case_study_02.py, project_checkpoint.py The race with controls; king_safety.py demo as above

Approximate runtimes with the caches present: 01 and case_study_02 about 10 seconds, 04 about 20 seconds, 05 about a minute, 03 and 06 one to two minutes, 02 about two minutes. Warning: 02_greek_gift.py with a cold engine cache runs Stockfish at depth 18 on 576 master positions twice and took about 45 minutes on a loaded machine — don't start it in class. Every script's output is saved as code/out_*.txt. Remind students who read game_features directly with pandas to fill missing text values before comparing titles (otherwise bot filters silently drop rows), or to use the toolkit's loader.

In-class demos

Board demo

Set up the hook after 15.Ng5+ (r2q1r2/pp1bb1pk/2n5/3pp1N1/5B1P/2P5/PP3PP1/R2QK2R b KQ - 1 15). Before any engine, ask three volunteers to defend one king move each: ...Kg8, ...Bxg5, ...Kg6. For each, the class lists White's next check or threat. Then reveal: −4.27 / 0.00 / +3.86 (depth 24), an eight-pawn swing on one decision. Next, return to the position before 14.Bxh7+ (r2q1rk1/pp1bb1pp/2n5/3pp3/5B1P/2PB1N2/PP3PP1/R2QK2R w KQ - 0 14) and run the five-item checklist aloud. The chapter's count (§4.4) is two of five: knight to g5 and no f6-knight hold; g5 is guarded by the e7-bishop, the queen cannot reach the h-file at once, and the e5-pawn is Black's. The sacrifice was objectively unsound (−4.41) and still won, because 15...Kg6 looks natural and 15...Kg8 requires seeing that 16.Qxd5+ Kh8 leaves White short of attackers — the practical-chances lesson.

Data demo

Show the pooled Greek-gift table from §4.4 with only the "preconditions" column visible. Ask students to guess the refuted share for 0–1 preconditions and the winning share for 4–5. Reveal 50.1% refuted (n = 816) and 61.6% winning (n = 588). Then show the level split from §4.8: under 1000 on Lichess, sacrificers scored 37.9% against 48.2% expected, with 58.5% refuted; at OTB 2400+, 23.4% refuted. Ask: "What changes as players improve — knowledge, or judgement?" The chapter's answer: judgement.

Exercise guidance

  • Part A (all tracks): A2 (compute shelter points) is a good warm-up; A4 asks which precondition was most informative (the e5-pawn: 50.4% winning when present vs 29.8% when absent, per the chapter's data); A9 asks students to interpret the +3.7 first-stormer edge.
  • Part B: common wrong answers:
  • B1 (Kasparov–Short): students reject 20.Bxh7+ because only three preconditions hold. The rook lift (Rc3–h3) supplies the missing queen route; +7.22 at depth 20.
  • B2 (Alekhine–Tenner): students look for checks with pieces and miss 14.O-O+ (#6).
  • B3 (Polgar–Karpov): "no knight to g5, so no sacrifice" — the e5-bishop does the pawn's job; 25.Bxh7+ is +11.15.
  • B4 (Lopez Gonzalez–Macieja): students play 16.Bxh7+ because the checklist looks good. Count material: 16.Nxe5 (−1.28) is forced; the sacrifice is −5.48.
  • B5 (Fischer–Sherwin): 19.Qe2 (−2.97) instead of 19.h5! (+2.49).
  • B6: students quote one depth. The point is that +0.83 (d20) and +1.20 (d24) disagree on Black's best try.
  • B7 (Abdusattorov–Gukesh): students look for counterattack. 36...Rf8! (+0.02) defends f6 a second time.
  • Part C (Analyst, Developer): C3 (change the storm definition) and C5 (fianchetto shelter) are good exercises in how definitions drive results.
  • Part D: D2 (why coaches insist on castling when the average cost is small) and D3 (Fischer's sacrifice vs the engine's quiet 18.Qe2, +2.79) make good written reflections.
  • Part M: M1 converts the hook's three evaluations to win% with Chapter 1's formula; M4 ties the e5-pawn to Chapters 2 and 3.

Assessment ideas

  1. Checklist under time. Five positions with a bishop aimed at h7; students have 60 seconds each to tick the five preconditions and decide yes/no. Include one where a different piece does a missing job.
  2. Defender's choice. Give a position after Bxh7+ Kxh7 Ng5+ and ask for the king move with the reasoning ("count the checks").
  3. Data interpretation. "The first stormer scores 56.0%. Should you always rush your pawns?" A strong answer cites Case Study 2's control for the position at castling time (+1.7 from level positions) and the larger effect of stopping the opponent's storm.
  4. Learning check-in follow-up. Students classify their last three losses with the (a)–(d) letters from the check-in and propose one training target.
  5. Quiz. Twenty-one questions; about 20–25 minutes.
  6. Developer milestone. king_safety_report returns a verdict on the hook position and greek_gift_check reports the preconditions correctly.