Answers.Body: <p>Because Black is to move, and for <em>Black</em> the position is evaluated as being 42.76 pawns behind.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T20:27:54.573Z
Answers.Text: Ho! So the evaluation is relative to the player and not to the position?
Answers.UserDisplayName: Michael Haddad
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T20:29:24.833Z
Answers.Text: Yep, that's what the UCI protocol specifies.
Answers.UserDisplayName: Glorfindel
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-21T00:59:56.620Z
Answers.Text: Note that the normal Stockfish engine evaluates relative to the position, so this case is an exception due to the UCI protocol.
Answers.UserDisplayName: Inertial Ignorance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-18T09:25:11.937Z
Answers.Text: @InertialIgnorance is this still the case, and could you please give an example?
Answers.UserDisplayName: Purefan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-19T07:17:18.273Z
Answers.Text: @Purefan Yes, same thing still. I ran Stockfish 15 via the terminal and used the OP's position with 'go depth 1', and got an eval of -815. For my 2018 comment though, I probably could have phrased that better. The "normal" Stockfish engine is really Stockfish as its developers programmed it, and it evaluates relative to the player (as dictated by the UCI protocol). It's just that Stockfish via most well-known interfaces (chessbase, lichess, etc) shows the eval relative to the position, which is what I meant by 'normal' in 2018.
Answers.UserDisplayName: Inertial Ignorance
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-20T20:26:57.663Z
Answers.LastActivityDate: 2018-06-20T20:26:57.663Z
Answers.UserDisplayName: Glorfindel
Body: <pre><code>8/3k4/8/3K4/3P4/8/8/8 b - - 0 1
  </code></pre>
  
  <p>(Black to move)</p>
  
  <p>This is a theoretical win since White has the opposition and the king is in front of the pawn.</p>
  
  <p>I have downloaded the Windows version for Stockfish 9 and followed the UCI protocol.</p>
  
  <p>Stockfish:</p>
  
  <pre><code>Stockfish 9 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
  </code></pre>
  
  <p>Input:</p>
  
  <pre><code>uci
  </code></pre>
  
  <p>Stockfish:</p>
  
  <pre><code>id name Stockfish 9 64
  id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott
  
  option name Debug Log File type string default
  option name Contempt type spin default 20 min -100 max 100
  option name Threads type spin default 1 min 1 max 512
  option name Hash type spin default 16 min 1 max 131072
  option name Clear Hash type button
  option name Ponder type check default false
  option name MultiPV type spin default 1 min 1 max 500
  option name Skill Level type spin default 20 min 0 max 20
  option name Move Overhead type spin default 30 min 0 max 5000
  option name Minimum Thinking Time type spin default 20 min 0 max 5000
  option name Slow Mover type spin default 89 min 10 max 1000
  option name nodestime type spin default 0 min 0 max 10000
  option name UCI_Chess960 type check default false
  option name SyzygyPath type string default &lt;empty&gt;
  option name SyzygyProbeDepth type spin default 1 min 1 max 100
  option name Syzygy50MoveRule type check default true
  option name SyzygyProbeLimit type spin default 6 min 0 max 6
  uciok
  </code></pre>
  
  <p>Input:</p>
  
  <pre><code>position fen 8/3k4/8/3K4/3P4/8/8/8 b - - 0 1
  go depth 1
  </code></pre>
  
  <p>Stockfish:</p>
  
  <pre><code>info depth 1 seldepth 1 multipv 1 score cp -4276 nodes 5 nps 2500 tbhits 0 time 2 pv d7e8
  bestmove d7e8
  </code></pre>
  
  <p>Why is the evaluation -4276?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2018-06-20T23:24:22.550Z
Comments.Text: The opposition has nothing to do with it, seeing as the black king is completely out of play: 1. any e6 2. any e7 3. any e8Q. Oh wait — did you accidentally post the diagram **upside down??**
Comments.UserDisplayName: bof
Tags: <stockfish><evaluation><uci>
Title: Why does Stockfish give a negative score in a theoretical win for white?
ThreadText: # Why does Stockfish give a negative score in a theoretical win for white?
  
  (Asked by: username_0 on 2018-06-20)
  
  8/3k4/8/3K4/3P4/8/8/8 b - - 0 1
  
  (Black to move)
  This is a theoretical win since White has the opposition and the king is in front of the pawn.
  I have downloaded the Windows version for Stockfish 9 and followed the UCI protocol.
  Stockfish:
  Stockfish 9 64 by T. Romstad, M. Costalba, J. Kiiski, G. Linscott
  
  Input:
  uci
  
  Stockfish:
  id name Stockfish 9 64
  id author T. Romstad, M. Costalba, J. Kiiski, G. Linscott
  
  option name Debug Log File type string default
  option name Contempt type spin default 20 min -100 max 100
  option name Threads type spin default 1 min 1 max 512
  option name Hash type spin default 16 min 1 max 131072
  option name Clear Hash type button
  option name Ponder type check default false
  option name MultiPV type spin default 1 min 1 max 500
  option name Skill Level type spin default 20 min 0 max 20
  option name Move Overhead type spin default 30 min 0 max 5000
  option name Minimum Thinking Time type spin default 20 min 0 max 5000
  option name Slow Mover type spin default 89 min 10 max 1000
  option name nodestime type spin default 0 min 0 max 10000
  option name UCI_Chess960 type check default false
  option name SyzygyPath type string default 
  option name SyzygyProbeDepth type spin default 1 min 1 max 100
  option name Syzygy50MoveRule type check default true
  option name SyzygyProbeLimit type spin default 6 min 0 max 6
  uciok
  
  Input:
  position fen 8/3k4/8/3K4/3P4/8/8/8 b - - 0 1
  go depth 1
  
  Stockfish:
  info depth 1 seldepth 1 multipv 1 score cp -4276 nodes 5 nps 2500 tbhits 0 time 2 pv d7e8
  bestmove d7e8
  
  Why is the evaluation -4276?
  
  **Tags:** stockfish, evaluation, uci
  
  > **Comments:**
  > **username_1**: The opposition has nothing to do with it, seeing as the black king is completely out of play: 1. any e6 2. any e7 3. any e8Q. Oh wait — did you accidentally post the diagram **upside down??**  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2018-06-20. Score: 8 | Accepted answer
  
  Because Black is to move, and for *Black* the position is evaluated as being 42.76 pawns behind.
  
  > **Comments:**
  > **username_0**: Ho! So the evaluation is relative to the player and not to the position?  
  > **username_2**: Yep, that's what the UCI protocol specifies.  
  > **username_3**: Note that the normal Stockfish engine evaluates relative to the position, so this case is an exception due to the UCI protocol.  
  > **username_4**: @InertialIgnorance is this still the case, and could you please give an example?  
  > **username_3**: @username_4 Yes, same thing still. I ran Stockfish 15 via the terminal and used the OP's position with 'go depth 1', and got an eval of -815. For my 2018 comment though, I probably could have phrased that better. The "normal" Stockfish engine is really Stockfish as its developers programmed it, and it evaluates relative to the player (as dictated by the UCI protocol). It's just that Stockfish via most well-known interfaces (chessbase, lichess, etc) shows the eval relative to the position, which is what I meant by 'normal' in 2018.  
  
  ---
  
  