The short answer
Across 4 independent positions, castling was top of the candidates in 3 of 4 — and where it was not, it trailed by only 0.05. In other words, it was the right call in every position we looked at.
(“Top” here means top of the candidates compared, not the best move among all legal moves — see how we tested it.)
What we are testing
"Castle early" is taught as one of the three opening principles, alongside taking the centre and developing pieces. But is there measurable value in castling one move sooner? We compared castling with the other candidate moves in this Italian Game position.
Black is to move here, so the numbers are from Black’s point of view. They are all slightly negative because White, moving first, is a touch better, which is normal for an opening. What matters is the difference between the moves.
How we tested it
Testing a rule of thumb in one position cannot tell you whether you are seeing the rule or just that position. So we picked 4 positions of different character — open and closed, White to move and Black to move. In each one, every candidate is played and the resulting position is searched. All the numbers are real output, not estimates.
What is compared is a set of candidate moves relevant to the article, not every legal move: the move under test, and the moves a player would normally consider there. So the top row of a table is not "the best move in the position" but the highest-scoring move among those compared.
On top of that, each position is also searched once with no candidate list, and the move the engine itself picks is recorded (it is shown with each position below). This is there to catch a candidate list that quietly decides the answer: the generator aborts if that free choice beats the top candidate by 0.50 or more. Across the current data the largest such difference is 0.18.
Position by position
| Position | Top candidate | Move tested | Gap |
|---|---|---|---|
| In the Italian Game (Black to move) | d6 −0.23 | O-O −0.28 | 0.05 |
| In the Four Knights (Black to move) | O-O −0.27 | O-O −0.27 | same |
| In the Queen’s Gambit Declined (Black to move) | O-O −0.15 | O-O −0.15 | same |
| Castling long instead (White to move) | O-O-O +0.51 | O-O-O +0.51 | same |
Position 1|In the Italian Game (Black to move)
1.e4 e5 2.Nf3 Nc6 3.Bc4 Bc5 4.c3 Nf6 5.d3
FENr1bqk2r/pppp1ppp/2n2n2/2b1p3/2B1P3/2PP1N2/PP3PPP/RNBQK2R b KQkq - 0 5
The highest-scoring candidate was d6 (−0.23). O-O scored −0.28, a gap of 0.05.
Searched with no candidate list imposed, at the same depth, the engine also chose d6.
Tap a candidate move to change the board
| Move | Evaluation | Diff vs top candidate |
|---|---|---|
| d6 | −0.23 | baseline |
| a6 | −0.23 | 0.00 |
| O-O | −0.28 | −0.05 |
| h6 | −0.28 | −0.05 |
| Rf8 | −1.23 | −1.00 |
| Ng4 | −1.33 | −1.10 |
Position 2|In the Four Knights (Black to move)
1.e4 e5 2.Nf3 Nc6 3.Nc3 Nf6 4.Bb5 Bb4 5.O-O
FENr1bqk2r/pppp1ppp/2n2n2/1B2p3/1b2P3/2N2N2/PPPP1PPP/R1BQ1RK1 b kq - 7 5
Of the candidates compared, O-O scored highest (−0.27).
Searched with no candidate list imposed, at the same depth, the engine also chose O-O.
Tap a candidate move to change the board
| Move | Evaluation | Diff vs top candidate |
|---|---|---|
| O-O | −0.27 | baseline |
| Bxc3 | −0.61 | −0.34 |
| d6 | −1.18 | −0.91 |
| a6 | −1.32 | −1.05 |
| Nd4 | −1.40 | −1.13 |
Position 3|In the Queen’s Gambit Declined (Black to move)
1.d4 d5 2.c4 e6 3.Nc3 Nf6 4.Bg5 Be7 5.e3 h6 6.Bh4
FENrnbqk2r/ppp1bpp1/4pn1p/3p4/2PP3B/2N1P3/PP3PPP/R2QKBNR b KQkq - 1 6
Of the candidates compared, O-O scored highest (−0.15).
Searched with no candidate list imposed, at the same depth, the engine also chose O-O.
Tap a candidate move to change the board
| Move | Evaluation | Diff vs top candidate |
|---|---|---|
| O-O | −0.15 | baseline |
| Ne4 | −0.20 | −0.05 |
| Nbd7 | −0.20 | −0.05 |
| b6 | −0.22 | −0.07 |
| dxc4 | −0.35 | −0.20 |
Position 4|Castling long instead (White to move)
1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 a6 6.Be3 e5 7.Nb3 Be7 8.f3 O-O 9.Qd2 Be6
FENrn1q1rk1/1p2bppp/p2pbn2/4p3/4P3/1NN1BP2/PPPQ2PP/R3KB1R w KQ - 3 10
Of the candidates compared, O-O-O scored highest (+0.51).
Searched with no candidate list imposed, at the same depth, the engine also chose O-O-O.
Tap a candidate move to change the board
| Move | Evaluation | Diff vs top candidate |
|---|---|---|
| O-O-O | +0.51 | baseline |
| a4 | +0.26 | −0.25 |
| h4 | +0.20 | −0.31 |
| Be2 | +0.19 | −0.32 |
| Rd1 | −0.27 | −0.78 |
| g4 | −0.54 | −1.05 |
Why the numbers come out this way
Black’s pieces are already on sensible squares, and White has no quick way to attack the king. Delaying the castle by a move therefore costs nothing concrete, and castling, d6 and a6 all evaluate the same.
There were clearly bad moves, though. Ng4 moves the f6 knight a second time, when it was already well placed; the engine answers 6.d4 and takes the centre. Rf8 gives up the right to castle and buries the rook. What is genuinely expensive in the opening is not a delayed castle but re-moving a piece that was already doing its job.
Exceptions
This is not an argument against castling. In positions where White has an attack, one slow move can be fatal. What the numbers show is that the principle is not absolute, and some positions grant a few moves of slack.
Principles narrow down what to calculate. Checking what the opponent can actually do right now is how you tell the strict positions from the relaxed ones.
What this does and does not show
- It shows: what the engine returned for these 4 positions, with the chosen candidates searched to depth 20. The numbers are the raw output; none of them were adjusted afterwards.
- It does not show: anything about "all positions" — a sample of 4 is a very small slice of chess.
- The assumption: an evaluation assumes best play from both sides. Over the board, an inaccurate reply changes everything.
- Reproducing it: every number here is built from chess-analysis.json, the raw output of the run — positions, candidates, scores and principal variations. Running the same engine with the settings above reproduces them exactly: the search is single-threaded, the hash is cleared before each position, and the depth is fixed. A different engine version or hash size will give different numbers.

What to remember at the board
- In this position there was no need to rush the castle
- What clearly costs you is moving the same piece twice
- Giving up the right to castle to shuffle a rook also costs
- Principles are guidance, not a race for every tempo
Try it yourself
You can try the same idea in a real game. Every move is scored by the engine, so the difference between principled and careless moves shows up immediately.