Answers.Body: <p>This is a classic case of king safety vs. material balance. Black's king is obviously way less safe than white's, BUT black has a lot more material. So if black manages to survive and consolidate their position, then black will win.</p>
  <p>Castling is not a very direct move in this position, and the simplest explanation why it's bad is that it's too slow, allowing black to bring their king to safety by means of playing ...d5 followed by ...Kb5 and then letting the black king slowly creep towards a safe haven surrounded by friendly pieces. This shouldn't come as a great surprise; after all, you gotta strike while the iron is still hot!</p>
  <p>The thing that genuninely surprised me about your post was your comment that Stockfish rates the position as drawn. I get different results when running SF on my machine, as it's convinced that white is just winning after trying to immediately kill the black king with Rb1 (threatening Qb5+, with mate soon to follow).</p>
  <p>The winning line goes as follows, and I don't see any flaw in it: <strong>11. Rb1!</strong> (cutting off black's king's escape route via b5) <strong>11...c5 12. Qf7+</strong> (forcing black to block its king's mobility further) <strong>12...d5 13.Qf3</strong> (threatening checkmate in 1) <strong>13...cxd4 14.Ba3!</strong> (cutting off black's king's escape route via c5) <strong>14...Nxf2 15.0-0</strong> (here castling is actually a good move, as it moves white's king out of the way of some annoying knight checks) <strong>15...Rf8</strong> (if black starts giving back material, then black might as well resign on the spot as nothing in the position speaks in black's favour then) <strong>16.Qe2+ d3 17.cxd3 Nxd3</strong> (here we see the point of castling more clearly; if white's king were still on e1, ...Nxd3 would be check, which could give black some time to consolidate) <strong>18. Rfd1!</strong> (threatening checkmate in 1) <strong>18...Bf5 19. Qc2!</strong> (threatening checkmate in 1; here black is finally forced to give up massive amounts of material just to delay the inevitable), and white is completely winning.
  Go through this line carefully (it's quite a good example of how to conduct a proper king hunt), and note how at every move white harasses the black king trying to checkmate it. This leads to black not having time to coordinate their pieces properly, and their king gets caught in an inescapable mating net at the end. This is why in this position (and many, many others as well) king safety trumps material count.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T08:20:27.913Z
Answers.Text: FYI I upped the "depth" limit, and at depth 23, it suddenly switch to +6. At depth 26 it's reached +13. And by depth 31 it had "Mate in 16". So it was just "the winning line was too hard to find, for the default chess.com analysis settings. (SF11, Depth 20)"
Answers.UserDisplayName: Brondahl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T08:34:02.880Z
Answers.Text: Thank you. That's *exactly* the sort of analysis that I was looking for. I assume that (currently?) we can't get chess engines to tell us this sort of thing? They can only do "trust me ... these are the right moves"?
Answers.UserDisplayName: Brondahl
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T08:37:52.227Z
Answers.Text: Same with LiChess: initially 0.0 but skyrocketing very fast. (Oh, and Black deserves a good spanking for Nxe4. After Re8, Black is simply a piece up and no swindle in sight. Ne4 is not the losing move but, so to say, the original chess sin: greed.) And, considering enginesplaining ;-), 0.0+material imbalance=perpetual or repetition (in 99% of all cases) is a thing well known by experienced users.
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T15:35:24.310Z
Answers.Text: @Brondahl [DecodeChess](https://decodechess.com/) is working on this, but I think it will take some time to be of high value across a robust set of positions.
Answers.UserDisplayName: SecretAgentMan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T22:48:47.247Z
Answers.Text: @D.BenKnoble The analysis is from move 10.  Rb1 instead of O-O.
Answers.UserDisplayName: Loren Pechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-01T14:45:09.360Z
Answers.Text: @D.BenKnoble You're right, I was a bit sloppy when I looked at the move numbers. Indeed, it's 11.Rb1.
Answers.UserDisplayName: Scounged
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-01T15:56:38.553Z
Answers.Text: Thanks! Sorry if I sounded grumpy; I was very confused :)
Answers.UserDisplayName: D. Ben Knoble
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-11-01T23:01:25.960Z
Answers.Text: @D.BenKnoble We are saying the same thing in different ways--I'm saying following the game through move 10, then playing Rb1 instead of O-O, you're saying playing Rb1 as move 11.
Answers.UserDisplayName: Loren Pechtel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-10-31T01:06:44.330Z
Answers.LastActivityDate: 2022-11-01T14:44:10.453Z
Answers.LastEditDate: 2022-11-01T14:44:10.453Z
Answers.UserDisplayName: Scounged
Body: <p>For the position after 10...Kc4:</p>
  <pre><code>    [Title &quot;White to move; castling is considered a blunder&quot;]
      [FEN &quot;&quot;]
      [Startply &quot;20&quot;]
  
      1. e4 e5 2. Nc3 Nf6 3. Nf3 Bb4 4. Bc4 Bxc3 5. Bxf7+ Kxf7 6. bxc3 Nxe4 7. Nxe5+ Kf6 8. Qf3+ Kxe5 9. d4+ Kd5 10. Qf5+ Kc4 11. O-O? d5 12. f3 Bxf5 13. fxe4 Bxe4
  </code></pre>
  <p>The position from a blitz game I just played; I was Black.</p>
  <p>I'm up 5 points of material, but obviously my King is horrifically exposed.</p>
  <p><a href="https://en.wikipedia.org/wiki/Stockfish_%28chess%29" rel="nofollow noreferrer">Stockfish</a> rates the position after 10...Kc4 as drawn, which seems surprising given the lack of any immediately obvious threats.</p>
  <p>But if White castles with 11.0-0, then the position immediately drops to -5.67. I can only assume that Stockfish believes it can see a series of forced attacks by White which ultimately end in a draw, but dropping tempo at any point allows Black to &quot;escape.&quot;</p>
  <p>But a) I'm not sure that I've got that right.
  And b) I can't really tell how it's supposed to work if that is right.</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-31T02:24:55.963Z
Comments.Text: Usually an evaluation of 0.00 in such a position means that the engine believes that best play ends in perpetual check.  The analysis reported by **Scounged** indicates that deeper analysis would have led to the evaluation of a winning advantage for White if not a forced checkmate.
Comments.UserDisplayName: Noam D. Elkies
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-31T04:03:41.333Z
Comments.Text: For examples of how to use the chess replayer, please see the accepted answer to https://chess.meta.stackexchange.com/questions/3/can-we-implement-a-replayer-for-chess-analysis-on-the-site. I've found it's quite helpful whenever I want to post a position.
Comments.UserDisplayName: Inertial Ignorance
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-10-31T08:34:32.157Z
Comments.Text: @NoamD.Elkies Correct :). See comment on answer.
Comments.UserDisplayName: Brondahl
Tags: <analysis>
Title: Why is this position judged to be so balanced, and why is castling wrong?
ThreadText: # Why is this position judged to be so balanced, and why is castling wrong?
  
  (Asked by: username_0 on 2022-10-31)
  
  For the position after 10...Kc4:
      [Title "White to move; castling is considered a blunder"]
      [FEN ""]
      [Startply "20"]
  
      1. e4 e5 2. Nc3 Nf6 3. Nf3 Bb4 4. Bc4 Bxc3 5. Bxf7+ Kxf7 6. bxc3 Nxe4 7. Nxe5+ Kf6 8. Qf3+ Kxe5 9. d4+ Kd5 10. Qf5+ Kc4 11. O-O? d5 12. f3 Bxf5 13. fxe4 Bxe4
  
  The position from a blitz game I just played; I was Black.
  I'm up 5 points of material, but obviously my King is horrifically exposed.
  Stockfish rates the position after 10...Kc4 as drawn, which seems surprising given the lack of any immediately obvious threats.
  But if White castles with 11.0-0, then the position immediately drops to -5.67. I can only assume that Stockfish believes it can see a series of forced attacks by White which ultimately end in a draw, but dropping tempo at any point allows Black to "escape."
  But a) I'm not sure that I've got that right.
  And b) I can't really tell how it's supposed to work if that is right.
  
  **Tags:** analysis
  
  > **Comments:**
  > **username_1**: Usually an evaluation of 0.00 in such a position means that the engine believes that best play ends in perpetual check.  The analysis reported by **username_3** indicates that deeper analysis would have led to the evaluation of a winning advantage for White if not a forced checkmate.  
  > **username_2**: For examples of how to use the chess replayer, please see the accepted answer to https://chess.meta.stackexchange.com/questions/3/can-we-implement-a-replayer-for-chess-analysis-on-the-site. I've found it's quite helpful whenever I want to post a position.  
  > **username_0**: @NoamD.Elkies Correct :). See comment on answer.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2022-10-31. Score: 12 | Accepted answer
  
  This is a classic case of king safety vs. material balance. Black's king is obviously way less safe than white's, BUT black has a lot more material. So if black manages to survive and consolidate their position, then black will win.
  
  Castling is not a very direct move in this position, and the simplest explanation why it's bad is that it's too slow, allowing black to bring their king to safety by means of playing ...d5 followed by ...Kb5 and then letting the black king slowly creep towards a safe haven surrounded by friendly pieces. This shouldn't come as a great surprise; after all, you gotta strike while the iron is still hot!
  
  The thing that genuninely surprised me about your post was your comment that Stockfish rates the position as drawn. I get different results when running SF on my machine, as it's convinced that white is just winning after trying to immediately kill the black king with Rb1 (threatening Qb5+, with mate soon to follow).
  
  The winning line goes as follows, and I don't see any flaw in it: **11. Rb1!** (cutting off black's king's escape route via b5) **11...c5 12. Qf7+** (forcing black to block its king's mobility further) **12...d5 13.Qf3** (threatening checkmate in 1) **13...cxd4 14.Ba3!** (cutting off black's king's escape route via c5) **14...Nxf2 15.0-0** (here castling is actually a good move, as it moves white's king out of the way of some annoying knight checks) **15...Rf8** (if black starts giving back material, then black might as well resign on the spot as nothing in the position speaks in black's favour then) **16.Qe2+ d3 17.cxd3 Nxd3** (here we see the point of castling more clearly; if white's king were still on e1, ...Nxd3 would be check, which could give black some time to consolidate) **18. Rfd1!** (threatening checkmate in 1) **18...Bf5 19. Qc2!** (threatening checkmate in 1; here black is finally forced to give up massive amounts of material just to delay the inevitable), and white is completely winning.
  Go through this line carefully (it's quite a good example of how to conduct a proper king hunt), and note how at every move white harasses the black king trying to checkmate it. This leads to black not having time to coordinate their pieces properly, and their king gets caught in an inescapable mating net at the end. This is why in this position (and many, many others as well) king safety trumps material count.
  
  > **Comments:**
  > **username_0**: FYI I upped the "depth" limit, and at depth 23, it suddenly switch to +6. At depth 26 it's reached +13. And by depth 31 it had "Mate in 16". So it was just "the winning line was too hard to find, for the default chess.com analysis settings. (SF11, Depth 20)"  
  > **username_0**: Thank you. That's *exactly* the sort of analysis that I was looking for. I assume that (currently?) we can't get chess engines to tell us this sort of thing? They can only do "trust me ... these are the right moves"?  
  > **username_4**: Same with LiChess: initially 0.0 but skyrocketing very fast. (Oh, and Black deserves a good spanking for Nxe4. After Re8, Black is simply a piece up and no swindle in sight. Ne4 is not the losing move but, so to say, the original chess sin: greed.) And, considering enginesplaining ;-), 0.0+material imbalance=perpetual or repetition (in 99% of all cases) is a thing well known by experienced users.  
  > **username_5**: @username_0 [DecodeChess](https://decodechess.com/) is working on this, but I think it will take some time to be of high value across a robust set of positions.  
  > **username_6**: @D.BenKnoble The analysis is from move 10.  Rb1 instead of O-O.  
  > **username_3**: @D.BenKnoble You're right, I was a bit sloppy when I looked at the move numbers. Indeed, it's 11.Rb1.  
  > **username_7**: Thanks! Sorry if I sounded grumpy; I was very confused :)  
  > **username_6**: @D.BenKnoble We are saying the same thing in different ways--I'm saying following the game through move 10, then playing Rb1 instead of O-O, you're saying playing Rb1 as move 11.  
  
  ---
  
  