# Why is ..Kh8 so much worse than ..Kg7 after Nf6?

I just "failed" this Lichess exercise. Main line is Stockfish's, secondary is mine's.

[FEN "r5k1/3N1p1p/2p1p1pb/3pP3/p2P3q/5P2/PP2QP1P/R4RK1 b - - 2 19"]

1...Bf4 2. Nf6 Kg7 {-5.4 according to Stockfish} (2...Kh8 {+1.9??} 3. Ng4 Qh3 {why not h5 already?} 4. Rf1d1 h5) 3. Ng4 h5 {Exercise completed successfully}


The basic idea was clearly to use the threat of a checkmate on h2 with the bishop and queen, and so I did.

The only option for white then was to check my king with the knight. After that, I figured it didn't really matter where my king escaped to (as long as it was safe), since white's next move would obviously be 3. Ng4 to protect h2 and prevent my mate attempt.

Some time ago I learned that "the safest spot to escape from a knight is two diagonal squares from it", since it'd take said knight at least three moves to get to a position where it can attack the same piece again.
So, to play it safe(r), I decided to go 2...Kh8 ...and that's where I failed!

But why? White's knight is going to g4 anyways and my pawn is going to h5 anyways, so what's the difference?

• It all depends on the position but in general g7 is a better square for a king than h8: more mobility, more centralized, probably a step closer to whatever square it needs to get to. "A king on the rim is dim."
– bof
Sep 30 '21 at 21:16

Excellent question because the difference between these two king moves is actually quite subtle! In general you're completely correct that moving the king two diagonal squares away from it ensures the king will be safe from the knight. However in this position, we know the knight is already headed to g4 to defend h2, so we shouldn't be afraid of the knight at all.

Instead, we should mentally prepare for what's happening after h5, winning the knight. There's two reasons that Kh8 is inferior: one positional and one tactical. After the moves h5 and hxg4 we should now see that taking on h2 with check is actually detrimental to black's king safety because the the h file is newly opened and both the queen and king are on the newly opened h file - positionally not OK. Moreover, there's an amazing tactical sequence that black has that requires the king to be on g7 instead of h8 (covering the h6 square turns out to be decisive!). Let's see how that plays out...

[FEN "r5k1/3N1p1p/2p1p1pb/3pP3/p2P3q/5P2/PP2QP1P/R4RK1 b - - 2 19"]

1... Bf4 2. Nf6+ Kg7 (2... Kh8?? 3. Ng4 h5 4. Kg2 hxg4 5. fxg4 Qxh2+ 6. Kf3 Qh3+?? (6...Bh6 {Best play - stopping our own attack just to avoid getting hurt on the newly opened h file. White is winning.}) 7. Kxf4 g5+ 8. Kxg5 Kg7 {Black needs to avoid Rh1 winning black's queen but it's already too late} 9. Rh1 Qg2 10. Rag1 Qe4 11. Qxe4 dxe4 {White is up a rook in the endgame and completely winning with their active king now no longer in danger of any mating nets.}) 3. Ng4 h5 4. Kg2 hxg4 5. fxg4 Qxh2+ 6. Kf3 Qh3+! {The tactical difference is now revealed!} 7. Kxf4 g5+ 8. Kxg5 Qh6#


As an aside this is why I don't like tactics from online trainers and much prefer them from books (although chesstempo does a good job of curating their puzzles as well). Engine-created puzzles will simply play the best lines according to the engine instead of playing the most human continuation that requires a critical understanding of the tricks lurking just beneath the surface. Seeing all 8 moves in the main line would be extremely difficult from the starting position, and certainly far above the pay-grade of whatever rating this lichess puzzle is. However, because you can easily "guess" one of the two king moves after which the puzzle immediately ends, most users are missing out on the entire point of the actual puzzle!

• A small addition: Observe that White is temporarily up a whole rook, which means "merely" winning the N in the fxg4+Kf3 line (+1 or so) is not sufficient. It is (one-sided) fun to also play out the lines where White, after hxg4, plays Rfb1 (e.g.) to avoid mate at all costs and runs for the hills. White even hangs on to the exchange, but it's about -9 or so. Sep 29 '21 at 7:36
• Super clear explanation, thanks! Sep 29 '21 at 9:21
• idk about lichess, but chess.com lets you retry indefinitely, so you can still learn from the puzzle (even on a poorly designed, 50/50-for-an-amateur puzzle) if you get an early step wrong Sep 30 '21 at 17:36
– BCLC
Sep 30 '21 at 18:04

This isn't really an answer except to say that the question might be wrong. This appears to be allowed as indicated here. But anyway just in case NoseKnowsAll from here has already given an answer and it seems to be the same as 1 of the analyses I ran just now.

My opinion: Don't overthink this. Just downvote the puzzle and move on. I have 2 reasons why

1. Even if the puzzle is correct, it's not necessarily the case that you'll immediately get a human answer when you run the analysis. Therefore, it's much to think for such little gain.

2. Unlike chesstempo, lichess doesn't really have a system for discussing puzzles and voting on different/extra moves. So you might do something like this for chesstempo but for lichess really I think ordinary thinking you might do on chesstempo might be overthinking for lichess. In fact on chesstempo, you might not have to do any thinking because the stronger players have already done it for you. You can possibly get a human answer if you ask on stackex like you did just now, but my opinion is you'll end up doing this a lot. My guess is this will be a huge wheel reinvention for puzzles that have been or will be downvoted a lot anyway. Could be wrong, but 1 way to check is if lichess will show the vote total for the puzzles similar to how chesstempo does.

• Note: I'm not saying chesstempo is superior to lichess in every way. I mean Lord knows I strongly prefer the lichess endgame puzzles over the chesstempo endgame training). It's just that lichess' discussion and vote system is non-existent. (If chesstempo had endgame puzzles and those tags like pawn endgame, queen and rook endgame, etc, then it's bye bye lichess puzzles. I'll even become a paid member of chesstempo if that's what it takes.)

Btw, if I have to give an answer anyway:

In another (but probably wrong on my part) analysis I ran it seems with Kh8 like besides putting your king on the h file to be exposed to the rook as pointed out in NoseKnowsAll's answer, you're also putting your king on the 8th rank to block your own rook from coming to the h file for some computer reason that I don't know, didn't bother to know and have no interest of knowing. Like white will still play Ng4, but h5 doesn't work anymore (h5 is also not the best move). And then in the Kg7 line you can play Rh8 where as this is no longer an option in the Kh8 line.

• Hmm... many good points that I agree with and seem useful. But as you say, not an answer except the bit on the end. I guess I won't down vote, but it's all a bit meta. Sep 29 '21 at 11:09
• @MichaelWest thanks! what is your opinion of this ?
– BCLC
Sep 29 '21 at 11:37
• I don't know chesstempo, so I won't comment about it or the differences with Lichess. But the bit on my king blocking my own rook is very useful, and something the other answer didn't mention, so thanks! Sep 29 '21 at 14:11
• oh look @MichaelWest OP says thanks!
– BCLC
Sep 29 '21 at 14:20
• @BCLC not sure what you're referring to. I don't see an answer from you on that question. If we want to discuss what constitutes a good answer that would be a good discussion for chess.meta.stackexchange.com. Sep 29 '21 at 14:21