# Correctness of the lichess training solution (Puzzle:63063)

I'm a beginner and right now rated 1850 in on lichess training; so I'm a very novice player. I try to solve some training examples, and though sometimes I do not feel convinced by the solution given by the computer, I continue. Here is an example where I felt the solution was absolutely wrong. Below are the pictures

Why did the computer save the queen rather than killing the knight on g3 with the pawn on h2?

I thought of this step when solving it but thought it was of no use. But the solution given left me wondering.

• You forgot the rook lift ...Rf6, winning in all lines. The puzzle is correct. – SmallChess Nov 9 '17 at 6:06
• Hey here are my steps i would do if white. Nxh2 black goes Qxg3 check white Qg2. This would be a safe move isnt it correct? – jack wilson Nov 9 '17 at 6:27
• And after white Qg2 what if black goes Qxe3 check? Followed by Qxd3 or Rf6? – bof Nov 9 '17 at 10:42

In case of 16.hxg3, Black plays 16...Qxg3+ when White has only two legal moves:

• 17.Kh1 Rf6 followed by 18...Rh6 is a quick checkmate.

• 17.Qg2 Qxe3+ and after the check is parried Black can already take back his piece with 18...Qxd3 (with already three extra pawns as a reward), or continue the attack with 18...Rf6. He's completely winning in both cases.

This exercise is a typical case of a demolition sacrifice: you give your knight on g3 to rip the opponent king of its protective pawns and mount a decisive attack.

lichess's puzzles are computer-generated, in the sense that they are selected by an algorithm from positions arising in games between humans. The solution expected is the engine's top choice. In particular, when the engine defends, it picks the best move according to the engine's evaluation.

Thus, in this case, while the most testing move is 16.hxg3, it leads to a worse position (according to the engine's assessment) than 16.Qg2 (assuming best play by both sides), so the engine defends with the latter move instead.

Of course, if this puzzle was given to you by a human, the move given for white would be 16.hxg3, and you would need to show that you found 16...Rf6. But it's not, and the algorithm that generates these puzzles isn't smart enough to differentiate between the best defense, and the most testing response.