# A question about a puzzle

It's White to move. Why does Stockfish evaluate 13. Kh1 so much higher than 13. Rf2? They both seem like reasonable options for me, yet the former is evaluated +7.95 for white and the latter is at -0.45. For some reason after 13. Rf2, Stockfish considers castling the best option for Black but doesn't castle after 13. Kh1.

``````[FEN "r1b1k2r/pp1n1Np1/2pbp2p/3p4/3P4/P1NBq1P1/1PP3PP/R2Q1RK1 w kq - 0 1"]
``````

At first glance, before concrete calculation:

• 1 Kh1 looks reasonably safe, the king is out of harms way for good.
• 1 Rf2 self-pins the rook and disjoints White's whole army with no obvious upside. Why play it over 1 Kh1?

Looking a bit further, Black's queen is almost out of escape squares. However, the Rf1 is the only piece that can reasonably seal the trap by attacking e3 (d4 needs to be covered too, of course). Doesn't work if its pinned!

• 1 ...0-0 indeed looks like a good move after 1 Rf2: not only gets the Rh8 out of the attack of the Nf7, but in turn also attacks the Nf7 twice, while it is now completely undefended due to the pin. Worse, the Rf2 is also under pressure, White can't just retreat his knight and open the f-file, or ...Qxf2+.
• 1 ...0-0 doesn't quite work after 1 Kh1 on the other hand because now the rook is not pinned and White can simply play 2 Rf3. After 2 Qxd4, castling enabled the discovered attack 3 Bh7+!, which wins the queen for a bishop.
• The same tactic would in theory work after 1 Rf2 0-0, too, except that in that case, White could not force Black to take on d4. A weakness is only a weakness if it can be exploited.
• If Black does not answer 1 Kh1 by castling, they will soon lose material either way (queen is trapped, rook hanging, etc.).

Self-pinning your own pieces is never advisable. You want to retain the rook's ability to move, which it can do after Kh1. Also there's the potential for a double attack against the pinned rook in the Rf2 line after Black castles, even taking into consideration that White is threatening the d6 bishop with the knight. That would still be a loss of the Exchange if the rook were to fall. Black doesn't castle after Kh1 since he has Nxd6. And White has the potential for a strong attack against the Black king, say after Qh5, so having to defend his pinned rook could also hinder that action. Self-pinning your own pieces is never a good idea under any circumtances, since then they become more vulnerable to double attack and possible loss.

After 13.Rf2?? 0-0! 14.Nxd6 (what else?) Qxf2+ white simply looses material. 13.Kh1 avoids that problem and wins. In the midst of a skirmish it is pointless to ponder over principles. You have to calculate the line to the end and then evaluate the position. The principles other have laid down for you are helpful to come to the right idea quickly, but not for more.

Conventional chess programs (pre AlphaZero aera) always do it exactly like that. At the end of the regular search, there is always a so called quiesecence search, whose sole purpose is to make sure, that a search does not suddenly stops in the midst of a tactic. Of course, a human thinks not like a conventional chess program, but faces similar problems.