Case Study 2 — Do the Textbook Rules Predict Bishop-vs-Knight Results?
Setup
Endgame books give us a list of conditions under which a bishop is better than a knight: pawns on both wings, an open board with few pawns, passed pawns (especially distant ones), and — above all — a "good" bishop whose own pawns stand on the other colour. Chapter 17 tested these one at a time and found a mixed picture: the bishop's quality mattered a lot (good bishop 51.9%, bad bishop 36.4% OTB), the number of pawns a little, and the pawn spread apparently not at all. Testing one condition at a time has a known weakness, though: the conditions are correlated. Wide pawn fronts come with more pawns; more pawns come with blocked boards; blocked boards come with bad bishops. A factor that looks useless on its own can matter once the others are held fixed, and vice versa.
So we fit one model with all of them at once. The question: how much of the result of a bishop-vs-knight ending can the textbook features explain, and which of them still matter when the others are accounted for?
The data
The script is code/case_study_02.py. It uses the first stable bishop-vs-knight position (one minor each,
nothing but pawns otherwise) from every OTB broadcast game in which both players have a FIDE rating, keeping
positions where the bishop side's pawn balance is −1, 0 or +1:
OTB bishop-vs-knight endings, bishop side pawn balance -1..+1, both FIDE ratings: n = 9,730
bishop side's mean score 47.8%; by pawn balance: {-1: {'size': 2219, 'mean': 19.3}, 0: {'size': 5180, 'mean': 46.8},
1: {'size': 2331, 'mean': 77.3}}
The features, all measured from the bishop side's point of view at that position:
| Feature | Meaning | Mean (SD) |
|---|---|---|
pawn_balance |
bishop side's pawns minus knight side's (−1, 0, +1) | 0.01 (0.68) |
pawns_on_board |
all pawns, both colours | 9.18 (2.89) |
spread |
files between the outermost pawns (0–7) | 6.17 (1.49) |
own_on_colour_share |
share of the bishop side's pawns on the bishop's colour | 0.51 (0.28) |
fixed_on_colour |
of those, how many are blocked head-on by an enemy pawn | 0.53 (0.81) |
passed_diff |
bishop side's passed pawns minus knight side's | 0.03 (0.68) |
rating_diff_100 |
bishop side's FIDE rating minus opponent's, in hundreds | −0.07 (2.16) |
📐 Definition: The model is ordinary least squares on the bishop side's score (1, ½ or 0). A linear model on a three-valued outcome is crude — a logistic or ordinal model is more principled — but its coefficients read directly as "percentage points of score per unit of the feature", which is what a player wants to know. The 95% intervals come from 400 bootstrap resamples (resample the games with replacement, refit, take the 2.5th and 97.5th percentiles of each coefficient; seed 17). See Appendix E for both ideas.
Analysis
OLS of the bishop side's score (points per unit of each feature), R^2 = 0.375, intercept 51.8
coef (score pts) lo hi
pawn_balance 21.69 20.62 22.76
pawns_on_board -0.92 -1.21 -0.64
spread 1.41 0.92 1.87
own_on_colour_share -5.42 -7.74 -2.84
fixed_on_colour -2.64 -3.53 -1.74
passed_diff 3.61 2.57 4.73
rating_diff_100 6.10 5.78 6.38
R^2 without the bishop's colour-complex features: 0.369 (with them: 0.375)
R^2 with only pawn balance + rating difference: 0.362

📊 Figure (described): Coefficients of the model with 95% bootstrap intervals, sorted. An extra pawn is worth about 22 score points and 100 rating points about 6. Among the textbook features, a passed-pawn advantage (+3.6 per pawn) and the pawn spread (+1.4 per file) help the bishop side; more pawns on the board (−0.9 each), more own pawns on the bishop's colour (−5.4 from none to all) and each fixed pawn on that colour (−2.6) hurt it. Every interval excludes zero.
Read the coefficients one at a time.
- The extra pawn dominates. +21.7 points per pawn, with an interval of 20.6–22.8. No positional feature comes close. In a minor-piece ending, material first.
- Ratings matter, of course: +6.1 points per 100 FIDE points. This is the confounder the one-at-a-time tables could only handle with the rating-adjusted score.
- Spread does help — once the pawn count is held fixed. +1.4 points per file. In Chapter 17's raw table, spread looked flat; the reason is that wide fronts tend to come with many pawns, and many pawns hurt the bishop (−0.9 per pawn). Hold the number of pawns constant and the textbook rule reappears, modestly: going from pawns on four adjacent files (spread 3) to pawns on both rook files (spread 7) is worth about 5–6 points.
- The bishop's colour complex matters twice. Having all of your pawns on the bishop's colour rather than none costs about 5.4 points, and each fixed pawn on that colour another 2.6. A bishop with four of six pawns on its colour and two fixed — Kasparov's in 1984 — therefore starts roughly 5–6 points behind a bishop like Fischer's.
- Passed pawns are worth 3.6 points each in this model, on top of the material count — a reminder that the pawn-balance feature counts pawns, not their quality.
Then read the model as a whole. R² = 0.375: the features explain about 37% of the variance in results. That sounds poor, but a single game's result has a lot of irreducible noise. The more striking number is the comparison: pawn balance plus rating difference alone already explain 0.362. All the textbook features together add 0.013. The colour-complex features add 0.006 of that.
Plugging in archetypes (level pawns, equal ratings):
Fischer-Taimanov type: 12 pawns, both wings, 1 of 6 own pawns on bishop colour, 1 fixed: 47.1%
Karpov-Kasparov type: 12 pawns, both wings, 4 of 6 own pawns on bishop colour, 2 fixed: 41.7%
Open board: 6 pawns, both wings, 1 of 3 own pawns on bishop colour, none fixed: 54.3%
The same model online. We refitted it on the Lichess blitz, rapid and classical games (weighted to the
population with sample_weight; Lichess ratings):
Same model on Lichess blitz/rapid/classical games (weighted by sample_weight; Lichess ratings): n = 6,510, R^2 = 0.093
pawn_balance 15.47
pawns_on_board -0.45
spread 1.04
own_on_colour_share -1.60
fixed_on_colour -2.76
passed_diff 3.01
rating_diff_100 4.60
Every coefficient keeps its sign, but the model explains only 9% of the variance online against 37.5% over the board, and even an extra pawn is worth only about 15 points instead of 22. That is the signature of faster games: results are noisier, the clock decides many endings, and structure has less time to tell. Interestingly, the fixed-pawn penalty is as large online (−2.8 per pawn) as over the board (−2.6), while the general "share on colour" penalty shrinks. A blocked pawn on your bishop's colour is a concrete, permanent problem — one that costs points even when nobody has time to exploit the subtler ones.
What it means (and doesn't)
It means that the textbook rules point in the right direction, every one of them, once you control for the others — including the "pawns on both wings" rule, which the raw table seemed to refute. It means the effects are real but modest compared with one pawn of material or a hundred rating points. And it means a model built on summary features is a poor predictor of an individual ending: Fischer–Taimanov's profile predicts 47.1% for the bishop side, yet Stockfish rated that position +5.99.
It doesn't mean that the features are unimportant in your games. The model averages over thousands of endings, most of which are balanced and decided by later mistakes. The features that make Fischer's position winning — which pawns are fixed on the bishop's colour, whether the knight is the only defender of one of them, whether the king can reach the other — are relations between particular pieces and squares, and no column in our table measures them. The model's low R² is a statement about the limits of the features, not about the limits of endgame understanding.
It also doesn't mean causation. Players choose whether to enter these endings. A player with a bad bishop who understands the danger avoids the ending; the ones who reach it are disproportionately those who misjudged it. The coefficients describe what happens in endings that real players chose to reach.
How a player or coach can use it. Translate the coefficients into a pre-trade checklist with rough weights. Before you exchange into bishop against knight with level pawns, add up: each own pawn fixed on your bishop's colour about −2.6 points, all your pawns on its colour about −5, each pawn on the board about −1, each file of spread about +1.4, each extra passed pawn about +3.6. If the total is clearly negative, the ending is probably worse than its reputation; if it is clearly positive, it is probably better. Then — and this is the part no model does for you — look for the relations: fixed enemy pawns on your bishop's colour, a defender with two jobs, a square for your king. A coach can use the same weights to choose training positions: the endings where the features point one way and the engine the other (like Fischer–Taimanov, predicted 47.1% but evaluated +5.99) are the most instructive, because they force the student to see what the summary cannot.
Discussion questions
- The raw table in 17.2 showed no effect of pawn spread; the model shows +1.4 points per file. Explain, in your own words, how both can be true.
- Why might the bad-bishop effect be larger in the raw tables (36.4% vs 51.9%) than in the model (about 5–8 points)? Which other features absorb part of it?
- The model's R² barely moves when you add the textbook features. Does that make the features useless for a player? For a coach writing a training plan?
- What feature would you add to capture "the knight is the only defender of a fixed pawn"? How would you compute it with python-chess?
Your turn
Extend code/case_study_02.py in two directions and report what changes:
- A logistic model. Replace the linear regression with two logistic regressions from scikit-learn — one for "bishop side wins", one for "knight side wins" — and compare the signs and relative sizes of the coefficients with the linear model. Expected shape of output: two coefficient tables with the same seven features.
- A better feature. Add
targets_on_colour: the number of the knight side's pawns standing on the bishop's colour and fixed by the bishop side's pawns (Fischer had two blocked head-on, f5 and h5, with g6 chained to them). Does it earn a coefficient larger than the bishop side's ownfixed_on_colour? Does R² improve? Write two sentences on what your result says about the "targets" half of the bishop's job.