Answers.Body: <p>After 2.f4:</p>
  <p>2...Qf6 3.fxe5 Qxe5 4.Nf5 Rc7 5.Rf3 h6 6.Nd6 leaves White 2 points up with a killer knight on d6, and Black basically has no chances.</p>
  <p>2...Qxg3 3.hxg3 Ng4 prepares to follow up with ...Re4, when Black is down a queen for a knight, but at least his pieces are active and the position is a bit blocked (for now).</p>
  <p>It's still pretty surprising that Stockfish slightly prefer 2...Qxg3 over 2...Qf6 though. The neural net it uses for evaluation has a reputation of being more &quot;intuitive&quot; (compared to the hand-crafted evaluation from 2020 and earlier), and in a human game one could argue 2...Qxg3 may give slightly better practical chances. But still, 2...Qxg3 leaves Black down 6 points, compared to 2...Qf6 (where it's 2 points). It's curious that Stockfish does not prefer the materialistic route here, considering the material is so much more.</p>
  <p>Perhaps when training the neural net, this style of evaluating gives elo gains, when applied to more balanced positions. E.g., maybe being a bit less materialistic gives elo gains to Stockfish, when in positions under 1.00. Then, this behavior of the neural net might still be used for positions where one side is completely winning (in your example, over +6), and whether this style of the neural net is completely optimal for these types of positions becomes irrelevant.</p>
  <p>Stockfish will win any position over +6, and will lose any position under -6 (against a remotely comparable engine). So, it playing the strongest moves in such extreme positions doesn't affect how much elo Stockfish gains/loses, and thus wouldn't be a factor in what neural net is trained and eventually used. It should be noted that I'm just going on a tangent of assumptions here, but my main point is that if a neural net makes Stockfish behave slightly worse in totally won/lost positions, it likely won't affect the training of this neural net, and whether or not it's ultimately chosen to be used for Stockfish.</p>
  <p>That being said, maybe 2...Qxg3 is indeed the better move from an objective standpoint. Not really any way to tell definitively.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-05T05:33:42.740Z
Answers.Text: How is the knight killer? After a rook trade it doesn't threaten anything directly.
Answers.UserDisplayName: qwr
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-05T07:43:48.157Z
Answers.Text: Maybe Stockfish is getting human? :-) If immediately resigning is no option: Qxg3; Ng4, double rooks on h file and mate. Maybe the opponent is a patzer...In contrast, after Qf6 fxe5 I'd might win that endgame blindfold for White.
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-06T08:18:52.563Z
Answers.Text: @qwr yes but it's a whole piece, which is protected on the 6th rank. Targets the pawns on f7 and b7, controls the c8 and e8 squares. Only way for Black to get rid of it is pretty much by giving up a rook.
Answers.UserDisplayName: Inertial Ignorance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T03:34:27.933Z
Answers.LastActivityDate: 2022-08-04T17:41:15.473Z
Answers.LastEditDate: 2022-08-04T17:41:15.473Z
Answers.UserDisplayName: Inertial Ignorance
Answers.Body: <p>When I put this to Stockfish, it recommended Qf6 with a score of +4.66, which looks more reasonable. But your link is a puzzle site, with Stockfish running in your local browser; the key moves of the puzzle were over by then, so I don't think a lot of effort was put into choosing between all the losing moves. A losing position is a losing position.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T00:08:08.397Z
Answers.Text: That doesn't explain why sacrificing the queen is still considered the best move
Answers.UserDisplayName: qwr
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T01:40:06.063Z
Answers.Text: @qwr: There is really no "best move", because all moves lead to certain loss. Perhaps Qxg3 was chosen because it loses in 27 moves instead of 26.
Answers.UserDisplayName: TonyK
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-04T03:03:37.823Z
Answers.Text: The engine always has a best move (including ones equally as bad). And the engine can tell the difference between +6 and say +10 advantage. The question is why doesn't it say that here.
Answers.UserDisplayName: qwr
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-08-03T23:53:04.893Z
Answers.LastActivityDate: 2022-08-03T23:53:04.893Z
Answers.UserDisplayName: TonyK
Body: <pre><code>[Variant &quot;From Position&quot;]
  [FEN &quot;r1b1r1k1/pp3ppp/2p5/2Ppn1q1/1P1Q2B1/4P1N1/P4PPP/R4RK1 w - - 9 18&quot;]
  [Title &quot;&quot;]
  
  1. Bxc8 Raxc8 2. f4
  </code></pre>
  <p><a href="https://lichess.org/training/fRzq3" rel="noreferrer">https://lichess.org/training/fRzq3</a></p>
  <p>The idea of the puzzle seems to be first (intermezzo?) a bishop trade, then unleashing the main idea which is a pawn forking the black queen and knight.</p>
  <p>But why does Stockfish recommend black trade queen for knight? Isn't the queen a very valuable defender in this situation? Is the white knight really that threatening, maybe because it is supported by the rook on f5? The top moves are</p>
  <ol>
  <li>+6.3 19...Qxg3</li>
  <li>+7.1 19...Qf6</li>
  <li>+7.6 19...Qe7</li>
  </ol>
  
Tags: <stockfish><puzzles><sacrifice>
Title: Why does Stockfish recommend this queen sacrifice in this puzzle?
ThreadText: # Why does Stockfish recommend this queen sacrifice in this puzzle?
  
  (Asked by: username_0 on 2022-08-03)
  
  ```
  [Variant "From Position"]
  [FEN "r1b1r1k1/pp3ppp/2p5/2Ppn1q1/1P1Q2B1/4P1N1/P4PPP/R4RK1 w - - 9 18"]
  [Title ""]
  
  1. Bxc8 Raxc8 2. f4
  
  ```
  
  <https://lichess.org/training/fRzq3>
  
  The idea of the puzzle seems to be first (intermezzo?) a bishop trade, then unleashing the main idea which is a pawn forking the black queen and knight.
  
  But why does Stockfish recommend black trade queen for knight? Isn't the queen a very valuable defender in this situation? Is the white knight really that threatening, maybe because it is supported by the rook on f5? The top moves are
  
  1. +6.3 19...Qxg3
  2. +7.1 19...Qf6
  3. +7.6 19...Qe7
  
  **Tags:** stockfish, puzzles, sacrifice
  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2022-08-04. Score: 11
  
  After 2.f4:
  
  2...Qf6 3.fxe5 Qxe5 4.Nf5 Rc7 5.Rf3 h6 6.Nd6 leaves White 2 points up with a killer knight on d6, and Black basically has no chances.
  
  2...Qxg3 3.hxg3 Ng4 prepares to follow up with ...Re4, when Black is down a queen for a knight, but at least his pieces are active and the position is a bit blocked (for now).
  
  It's still pretty surprising that Stockfish slightly prefer 2...Qxg3 over 2...Qf6 though. The neural net it uses for evaluation has a reputation of being more "intuitive" (compared to the hand-crafted evaluation from 2020 and earlier), and in a human game one could argue 2...Qxg3 may give slightly better practical chances. But still, 2...Qxg3 leaves Black down 6 points, compared to 2...Qf6 (where it's 2 points). It's curious that Stockfish does not prefer the materialistic route here, considering the material is so much more.
  
  Perhaps when training the neural net, this style of evaluating gives elo gains, when applied to more balanced positions. E.g., maybe being a bit less materialistic gives elo gains to Stockfish, when in positions under 1.00. Then, this behavior of the neural net might still be used for positions where one side is completely winning (in your example, over +6), and whether this style of the neural net is completely optimal for these types of positions becomes irrelevant.
  
  Stockfish will win any position over +6, and will lose any position under -6 (against a remotely comparable engine). So, it playing the strongest moves in such extreme positions doesn't affect how much elo Stockfish gains/loses, and thus wouldn't be a factor in what neural net is trained and eventually used. It should be noted that I'm just going on a tangent of assumptions here, but my main point is that if a neural net makes Stockfish behave slightly worse in totally won/lost positions, it likely won't affect the training of this neural net, and whether or not it's ultimately chosen to be used for Stockfish.
  
  That being said, maybe 2...Qxg3 is indeed the better move from an objective standpoint. Not really any way to tell definitively.
  
  > **Comments:**
  > **username_0**: How is the knight killer? After a rook trade it doesn't threaten anything directly.  
  > **username_2**: Maybe Stockfish is getting human? :-) If immediately resigning is no option: Qxg3; Ng4, double rooks on h file and mate. Maybe the opponent is a patzer...In contrast, after Qf6 fxe5 I'd might win that endgame blindfold for White.  
  > **username_1**: @username_0 yes but it's a whole piece, which is protected on the 6th rank. Targets the pawns on f7 and b7, controls the c8 and e8 squares. Only way for Black to get rid of it is pretty much by giving up a rook.  
  
  ---
  
  ### Answer by username_3 on 2022-08-03. Score: 0
  
  When I put this to Stockfish, it recommended Qf6 with a score of +4.66, which looks more reasonable. But your link is a puzzle site, with Stockfish running in your local browser; the key moves of the puzzle were over by then, so I don't think a lot of effort was put into choosing between all the losing moves. A losing position is a losing position.
  
  > **Comments:**
  > **username_0**: That doesn't explain why sacrificing the queen is still considered the best move  
  > **username_3**: @username_0: There is really no "best move", because all moves lead to certain loss. Perhaps Qxg3 was chosen because it loses in 27 moves instead of 26.  
  > **username_0**: The engine always has a best move (including ones equally as bad). And the engine can tell the difference between +6 and say +10 advantage. The question is why doesn't it say that here.  
  
  ---
  
  