Answers.Body: <p>New answer based on the updated question.</p>
  
  <p>As it turns out, Stockfish finds all of these moves, Nxe5, gxf4, and Rd2 all almost dead equal. Let's look at why.</p>
  
  <p>It still finds gxf4 a hair better than the others, and I would normally prefer the piece myself in most cases, but not here. I like Rd2. I have included notes in the following game, so read them as you click on the moves.</p>
  
  <pre><code> [FEN "3r4/p1p1kp2/1pn1b2p/4P1p1/P3pN2/2P1P1B1/2P2PPP/R5K1 b - - 0 1"]
  
   1... gxf4 {Is not so simple since you are not just winning a piece.} (1... Nxe5 2. Ne2 Kf6 3. Nd4 Rd5 4. Nb3 Rd7 {And black is dominating the position.} 5. a5 Bxb3 6. cxb3 b5 7. Bxe5+ Kxe5 {Trying to head to a rook ending, which can be notoriously drawish, but white is so passive, black should win.}) (1... Rd2! {This would be my preference. It is strong, and wins a pawn. The Bg3 remains passive, and the N has to go to h5, and be out of play too.}) 2. Bh4+ Kf8 3. Bxd8 Nxd8 4. exf4 {Winning two pieces for the rook.}
  </code></pre>
  
  <p>This was my original answer based on the original position given after Nxe5, but seemingly given as black to move.</p>
  
  <p>There is no reason chess-wise. gxf4 is, indeed, the best move.</p>
  
  <p>The answer is that you have it on Level 5, and I assume there are higher levels. The computer on level 5 is handicapped, and thus, it intentionally throws in less good moves as part of its programming to give the player a chance. For example, that may mean that it selects the second-best, or worse, move based on certain circumstances that are met based on the programming.</p>
  
  <p>Stockfish, the strongest program that is widely available, says that gxf4 is -4.76, compared to -2.02 for Rd2.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-22T14:54:57.620Z
Answers.Text: Thanks. As noted I tried it on level 20 (the maximum) too, level 5 is normally more than sufficient to kick my backside. I'll check out stockfish, thanks for the tip.
Answers.UserDisplayName: cobberboy
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-22T14:49:47.310Z
Answers.LastActivityDate: 2020-01-22T15:08:57.330Z
Answers.LastEditDate: 2020-01-22T15:08:57.330Z
Answers.UserDisplayName: PhishMaster
Answers.Body: <p>If I understood correctly, the knight was on <code>c6</code> and you play <code>Nf4</code> whilst having a pawn on <code>e5</code> still (which is important as it prevents <code>f6</code> by black after <code>gxf4 Bh4+</code>). In this case, <code>gxf4</code> is not necessarily the best as it leads to the exchange of B+N for a rook an a pawn (see below), which gives white some chances, despite it still being better for black.</p>
  
  <pre><code> [title "Game position before Nf4, white to move"]
   [fen "3r4/p1p1kp2/1pn1b2p/4P1p1/P3p3/2P1P1BN/2P2PPP/R5K1 w - - 0 1"]
  
   1. Nf4 gxf4 2. Bh4+ Ke8 3. Bxd8 Kxd8 4. exf4
  </code></pre>
  
  <p>Instead, considering that white's lacking both coordination and activity, and the fact that black has all pieces centrally established and controls the only open file, it might be simpler (and even best) to not create an imbalance (like the line we saw above) and aim to maintain the assured edge by avoiding an over simplification that might be hard to judge and playing against white's shattered queenside pawn structure. Here's one possible continuation to exemplify:</p>
  
  <pre><code> [title "Game position before Nf4, white to move"]
   [fen "3r4/p1p1kp2/1pn1b2p/4P1p1/P3p3/2P1P1BN/2P2PPP/R5K1 w - - 0 1"]
  
   1.Nf4 Nxe5 2.Ne2 Kf6 3.Nd4 Rd5 4.Kf1 Rc5 5. Ra3 Bd7
  </code></pre>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-22T15:05:03.010Z
Answers.LastActivityDate: 2020-01-22T15:05:03.010Z
Answers.UserDisplayName: Ellie
Body: <pre><code> [FEN "3r4/p1p1kp2/1pn1b2p/4P1p1/P3pN2/2P1P1B1/2P2PPP/R5K1 b - - 0 1"]
  
   1...Nxe5 {This was the original question with black to move.} (1...gxf4) (1...Rd2)
  </code></pre>
  
  <p>NB: Black's knight was on C6 and has just moved to e5 and captured a pawn.</p>
  
  <p>So I'm a beginner, playing the chess.com app on level 5 and periodically turning 'show best moves' on and off. I'm playing white; I got my white knight cornered on h3 so at the computer's suggestion moved it to f4, fully expecting black's pawn on g5 to capture it. It's what I would do. But instead black moves Rd2. Surprised, I try again on level 20; this time black moves Nxe5. </p>
  
  <p>Why are Rd2 and Nxe5 better than gxf4?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-22T14:58:06.207Z
Comments.Text: You just added "NB: Black's knight was on C6 and has just moved to e5 and captured a pawn."
  
  My answer was based on the position above, with black to move. The answer is different now. I will edit your question to reflect you update, and reanswer.
Comments.UserDisplayName: PhishMaster
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-22T15:09:35.853Z
Comments.Text: Yeah sorry, I re-read and edited it for clarity, not expecting anyone to have started a response already! Thanks for taking the time to explain. That makes more sense now.
Comments.UserDisplayName: cobberboy
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-22T15:10:25.740Z
Comments.Text: I have updated my answer. It makes more sense now for your intended question.
Comments.UserDisplayName: PhishMaster
Tags: <pawn-structure><pieces>
Title: Why doesn't the computer take my knight?
ThreadText: # Why doesn't the computer take my knight?
  
  (Asked by: username_0 on 2020-01-22)
  
  ```
   [FEN "3r4/p1p1kp2/1pn1b2p/4P1p1/P3pN2/2P1P1B1/2P2PPP/R5K1 b - - 0 1"]
  
   1...Nxe5 {This was the original question with black to move.} (1...gxf4) (1...Rd2)
  
  ```
  
  NB: Black's knight was on C6 and has just moved to e5 and captured a pawn.
  
  So I'm a beginner, playing the chess.com app on level 5 and periodically turning 'show best moves' on and off. I'm playing white; I got my white knight cornered on h3 so at the computer's suggestion moved it to f4, fully expecting black's pawn on g5 to capture it. It's what I would do. But instead black moves Rd2. Surprised, I try again on level 20; this time black moves Nxe5.
  
  Why are Rd2 and Nxe5 better than gxf4?
  
  **Tags:** pawn-structure, pieces
  
  > **Comments:**
  > **username_1**: You just added "NB: Black's knight was on C6 and has just moved to e5 and captured a pawn."  My answer was based on the position above, with black to move. The answer is different now. I will edit your question to reflect you update, and reanswer.  
  > **username_0**: Yeah sorry, I re-read and edited it for clarity, not expecting anyone to have started a response already! Thanks for taking the time to explain. That makes more sense now.  
  > **username_1**: I have updated my answer. It makes more sense now for your intended question.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_1 on 2020-01-22. Score: 1 | Accepted answer
  
  New answer based on the updated question.
  
  As it turns out, Stockfish finds all of these moves, Nxe5, gxf4, and Rd2 all almost dead equal. Let's look at why.
  
  It still finds gxf4 a hair better than the others, and I would normally prefer the piece myself in most cases, but not here. I like Rd2. I have included notes in the following game, so read them as you click on the moves.
  
  ```
   [FEN "3r4/p1p1kp2/1pn1b2p/4P1p1/P3pN2/2P1P1B1/2P2PPP/R5K1 b - - 0 1"]
  
   1... gxf4 {Is not so simple since you are not just winning a piece.} (1... Nxe5 2. Ne2 Kf6 3. Nd4 Rd5 4. Nb3 Rd7 {And black is dominating the position.} 5. a5 Bxb3 6. cxb3 b5 7. Bxe5+ Kxe5 {Trying to head to a rook ending, which can be notoriously drawish, but white is so passive, black should win.}) (1... Rd2! {This would be my preference. It is strong, and wins a pawn. The Bg3 remains passive, and the N has to go to h5, and be out of play too.}) 2. Bh4+ Kf8 3. Bxd8 Nxd8 4. exf4 {Winning two pieces for the rook.}
  
  ```
  
  This was my original answer based on the original position given after Nxe5, but seemingly given as black to move.
  
  There is no reason chess-wise. gxf4 is, indeed, the best move.
  
  The answer is that you have it on Level 5, and I assume there are higher levels. The computer on level 5 is handicapped, and thus, it intentionally throws in less good moves as part of its programming to give the player a chance. For example, that may mean that it selects the second-best, or worse, move based on certain circumstances that are met based on the programming.
  
  Stockfish, the strongest program that is widely available, says that gxf4 is -4.76, compared to -2.02 for Rd2.
  
  > **Comments:**
  > **username_0**: Thanks. As noted I tried it on level 20 (the maximum) too, level 5 is normally more than sufficient to kick my backside. I'll check out stockfish, thanks for the tip.  
  
  ---
  
  ### Answer by username_2 on 2020-01-22. Score: 2
  
  If I understood correctly, the knight was on `c6` and you play `Nf4` whilst having a pawn on `e5` still (which is important as it prevents `f6` by black after `gxf4 Bh4+`). In this case, `gxf4` is not necessarily the best as it leads to the exchange of B+N for a rook an a pawn (see below), which gives white some chances, despite it still being better for black.
  
  ```
   [title "Game position before Nf4, white to move"]
   [fen "3r4/p1p1kp2/1pn1b2p/4P1p1/P3p3/2P1P1BN/2P2PPP/R5K1 w - - 0 1"]
  
   1. Nf4 gxf4 2. Bh4+ Ke8 3. Bxd8 Kxd8 4. exf4
  
  ```
  
  Instead, considering that white's lacking both coordination and activity, and the fact that black has all pieces centrally established and controls the only open file, it might be simpler (and even best) to not create an imbalance (like the line we saw above) and aim to maintain the assured edge by avoiding an over simplification that might be hard to judge and playing against white's shattered queenside pawn structure. Here's one possible continuation to exemplify:
  
  ```
   [title "Game position before Nf4, white to move"]
   [fen "3r4/p1p1kp2/1pn1b2p/4P1p1/P3p3/2P1P1BN/2P2PPP/R5K1 w - - 0 1"]
  
   1.Nf4 Nxe5 2.Ne2 Kf6 3.Nd4 Rd5 4.Kf1 Rc5 5. Ra3 Bd7
  
  ```
  
  
  ---
  
  