Answers.Body: <p>Chess engines just don't work that way. They don't have a &quot;risk&quot; or a &quot;just in case&quot; module. They just try to maximize their eval function. (They value stuff like king safety, but that's something different).</p>
  <p>Typical case: on a given position white has an easy to calculate simplification that takes to a trivially winning K+P vs K endgame. Say this is a mate in 30. On the other hand, in the same position, white has a very hard to find (for humans) mate in 15. No human would risk to miscalculate the brilliant mate in 15 when you can get into a prosaic won endgame, but to the engine mate in 15 is just better than mate in 30, so there it'll go.</p>
  <p>Another reason for engines not to behave these ways; it just doesn't add Elo points to their strength.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2021-07-02T09:35:34.713Z
Answers.LastActivityDate: 2021-07-02T09:35:34.713Z
Answers.UserDisplayName: emdio
Body: <p>In <a href="https://chess.stackexchange.com/q/35470/19465">my last question</a>, I asked why engines sometimes force a draw when they can still win. Now, I'm asking about the opposite situation:</p>
  <pre><code>[FEN &quot;5K2/5n2/8/3n2k1/8/8/8/8 w - - 0 1&quot;]
  
  1. Ke8? (1. Kxf7) 1... Nd6+ 2. Kf8 Kh6 3. Kg8 Ne7+ 4. Kh8?? Nf7#
  </code></pre>
  <p>It's completely impossible for White to win here, but Black winning is still possible, if White blunders into the corner or runs out of time. Isn't the obvious move then for White to play Kxf7, to secure the draw immediately? Why does Stockfish instead <a href="https://lichess.org/analysis/standard/5K2/5n2/8/3n2k1/8/8/8/8_w_-_-_0_1" rel="nofollow noreferrer">suggest Ke8</a>, which keeps the game going and leaves open the possibility of a loss?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-02T07:38:01.203Z
Comments.Text: You are trying to project human qualities onto a computer; so far as Stockfish's evaluation is concerned, especially if it has an endgame tablebase, both Ke8 and Kxf7 are draws, so why choose one over the other? My Stockfish (without a tablebase) correctly evaluates any legal move by white as equivalently strong - because strictly they are.
Comments.UserDisplayName: Ian Bush
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-07-02T12:07:03.083Z
Comments.Text: For Stockfish, there is no possibility of a loss which it is leaving open. The question mark doesn't belong on the first move in the sequence that you give, but rather on a subsequent move which Stockfish simply wouldn't do.
Comments.UserDisplayName: John Coleman
Tags: <engines><draw>
Title: Why not immediately force a draw when losing is possible but winning isn't?
ThreadText: # Why not immediately force a draw when losing is possible but winning isn't?
  
  (Asked by: username_0 on 2021-07-02)
  
  In my last question, I asked why engines sometimes force a draw when they can still win. Now, I'm asking about the opposite situation:
  [FEN "5K2/5n2/8/3n2k1/8/8/8/8 w - - 0 1"]
  
  1. Ke8? (1. Kxf7) 1... Nd6+ 2. Kf8 Kh6 3. Kg8 Ne7+ 4. Kh8?? Nf7#
  
  It's completely impossible for White to win here, but Black winning is still possible, if White blunders into the corner or runs out of time. Isn't the obvious move then for White to play Kxf7, to secure the draw immediately? Why does Stockfish instead suggest Ke8, which keeps the game going and leaves open the possibility of a loss?
  
  **Tags:** engines, draw
  
  > **Comments:**
  > **username_1**: You are trying to project human qualities onto a computer; so far as Stockfish's evaluation is concerned, especially if it has an endgame tablebase, both Ke8 and Kxf7 are draws, so why choose one over the other? My Stockfish (without a tablebase) correctly evaluates any legal move by white as equivalently strong - because strictly they are.  
  > **username_2**: For Stockfish, there is no possibility of a loss which it is leaving open. The question mark doesn't belong on the first move in the sequence that you give, but rather on a subsequent move which Stockfish simply wouldn't do.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_3 on 2021-07-02. Score: 3
  
  Chess engines just don't work that way. They don't have a "risk" or a "just in case" module. They just try to maximize their eval function. (They value stuff like king safety, but that's something different).
  
  Typical case: on a given position white has an easy to calculate simplification that takes to a trivially winning K+P vs K endgame. Say this is a mate in 30. On the other hand, in the same position, white has a very hard to find (for humans) mate in 15. No human would risk to miscalculate the brilliant mate in 15 when you can get into a prosaic won endgame, but to the engine mate in 15 is just better than mate in 30, so there it'll go.
  
  Another reason for engines not to behave these ways; it just doesn't add Elo points to their strength.
  
  
  ---
  
  