Answers.Body: <p>I assume you used Stockfish with a GUI because the sign of the score would have been different if you didn't.</p>
  
  <p>First of all, Stockfish is well known for its instability. The strongest chess engine isn't the best engine for analysis. This is like your local chess instructor might be a better coach than Kasparov for you.</p>
  
  <p>A is obviously correct. Furthermore, the search algorithm could change as the hash-table gets filled up. The more that the engine "knows" about a particular position, the better it can analyse for the next position.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T10:23:35.883Z
Answers.Text: How can you tell what the sign is supposed to be - I just made some numbers up.  It could either be 0.6 in white's favour (what I meant) or 0.6 in black's favour and it still works :-)
Answers.UserDisplayName: Corvus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T10:24:02.117Z
Answers.Text: What engine would you recommend for analysis?
Answers.UserDisplayName: Corvus
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T11:38:32.050Z
Answers.Text: Stockfish is not bad, it is one amongst the strongest engines, you can continue using it to analyze. Also other recommended engines are - Deep Fritz and Houdini
Answers.UserDisplayName: Pavan Nadig
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T12:44:00.790Z
Answers.Text: How is instability related to being a good engine for analysis? I'd rather use an engine which honestly tells me if it is unsure of its analysis than an engine which confidently gives a possibly wrong score.
Answers.UserDisplayName: JiK
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T15:26:16.637Z
Answers.Text: @JiK Score is just a heuristic. I can scale everything up by a factor of 10 and still get the same PV. A good engine for analysis should not just give you a good move, the heuristic should not move like a roller-coaster. You could say that the deviation should be relatively close. Stockfish is not such engine.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T15:28:09.483Z
Answers.Text: @Corone Stockfish is still a very good engine for analysis. But just bear in mind that its scoring scheme is a bit optimistic. You should always check it with another engine such as Komodo or Houdini if you're curious. You can't always trust whatever Stockfish tells you.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T15:29:38.237Z
Answers.Text: @Corone The sign of the score is different if you try it without a GUI. A chess engine always report the score relative to the side to move. A GUI changes it back to what you actually see (relative to white).
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T20:57:08.957Z
Answers.Text: @StudentT As I said, I think it is good if the heuristic moves like a roller-coaster if there is something in the position which makes the engine "unsure" about the value.
Answers.UserDisplayName: JiK
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-07T00:04:36.813Z
Answers.Text: @JiK If if the position is complicated, a good engine should converge as quickly as possible. The convergence should be good. I'm talking about general positions not like problem-solving-like-crazy positions. Stockfish should have converged quicker but it isn't, although the playing strength is enormous.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-05-06T10:03:03.300Z
Answers.LastActivityDate: 2015-05-06T10:03:03.300Z
Answers.UserDisplayName: SmallChess
Answers.Body: <p>Stockfish 9 and 10 had contempt set to 20 or so by default, so that the engine would avoid draws when playing against weaker opponents (i.e. most other engines and all humans).  If you change the contempt to 0 when analyzing, that should bring the evaluations with white or black to move closer to the same number.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T11:15:32.843Z
Answers.Text: Your answer is technically correct, but it's not what the question asked for.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T07:51:52.900Z
Answers.LastActivityDate: 2019-02-13T07:51:52.900Z
Answers.UserDisplayName: A passerby
Answers.Body: <p>Yes, it's A). The engine is not perfect and can only search so far in a given time. When you make a move for White, the engine doesn't have to waste time considering White's other options anymore. It can focus on only searching down the sub-tree rooted at the move you just made for White.</p>
  
  <p>It's hard to say what this means about the positions that Stockfish is calculating. You might be tempted to say that the positions are tense and very sharp. However, using quiescence search, Stockfish tends to avoid evaluating such positions and waits until the game calms down. So it's hard to infer what the positions are like.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T17:22:56.573Z
Answers.LastActivityDate: 2019-02-13T17:22:56.573Z
Answers.UserDisplayName: Inertial Ignorance
Answers.Body: <p>Engines like Stockfish use something called the <a href="https://en.wikipedia.org/wiki/Minimax" rel="nofollow noreferrer">Minimax Algorithm</a>, which in short means that the engine <strong>always assumes best play</strong> by the opponent. </p>
  
  <p>That means it will not go for any traps if it sees a refutation that is beneficial to the opponent.</p>
  
  <p>The algorithm basically works so that it looks at as many positions as possible, and applying an evaluation function to them. Stockfish is extremly fast at calculating positions and thus looking pretty far ahead, but its evaluation function isn't as precise as that of Komodo, for example.</p>
  
  <p>As a consequence, the evaluation can vary quite a bit, depending on how many positions it had time to calculate. Playing a move obviously limits the search space, so the engine can give a better analysis of that specific position, so it's more likely to find something that has a major impact on the evaluation.</p>
  
  <p>TL;DR: Answer A is correct.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-14T09:00:54.633Z
Answers.LastActivityDate: 2019-02-14T09:00:54.633Z
Answers.UserDisplayName: henry.dv
Body: <p>I'm particularly thinking of Stockfish here, since that is the one I use most, but it seems to happen with other engines.</p>
  
  <p>Sometimes you have a position and the recommended move for white might be +1.7 say.  So you make the move and then for black the best move is suggested as being +0.6.</p>
  
  <p>Is this because:</p>
  
  <p>A)
  The engine is not perfect, so if it can search 19 moves ahead, then after the move it can search one ply further into the game, and that reveals something that dramatically changes the score.  If so, what does this tell us about the position?</p>
  
  <p><strong>Or</strong></p>
  
  <p>B)
  Does the engine take into account the possibility that the opponent won't play optimally.  E.g. does the engine assign any value to traps that are avoidable.  For example, Given a choice between going directly to a position, or transposing to that position via offering a trap you should clearly try the trap first.  Would the engine agree?  Is the score only reflecting the "best" line, or some average of possible lines?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-08-08T20:01:40.433Z
Comments.Text: B is doubtful, because popular engines assume best play in their evaluation. The answer definitely deals with imperfections in the algorithm that come from practical considerations like finite resources. The problem shouldn't be present as often if you let the engine explore a position to a decent depth. For example, you might get +1.6 after 3 hours on one position, but it started off +2.1 or +0.8 when it didn't look as far. When you make a move, the depth is low once again, but after reaching a good depth, the number should be similar to +1.6. Evals will slowly drift even with engine moves.
Comments.UserDisplayName: user904963
Tags: <analysis><engines>
Title: What does it mean when engine position scores change when following the "best" move
ThreadText: # What does it mean when engine position scores change when following the "best" move
  
  (Asked by: username_0 on 2015-05-06)
  
  I'm particularly thinking of Stockfish here, since that is the one I use most, but it seems to happen with other engines.
  
  Sometimes you have a position and the recommended move for white might be +1.7 say. So you make the move and then for black the best move is suggested as being +0.6.
  
  Is this because:
  
  A)
  The engine is not perfect, so if it can search 19 moves ahead, then after the move it can search one ply further into the game, and that reveals something that dramatically changes the score. If so, what does this tell us about the position?
  
  **Or**
  
  B)
  Does the engine take into account the possibility that the opponent won't play optimally. E.g. does the engine assign any value to traps that are avoidable. For example, Given a choice between going directly to a position, or transposing to that position via offering a trap you should clearly try the trap first. Would the engine agree? Is the score only reflecting the "best" line, or some average of possible lines?
  
  **Tags:** analysis, engines
  
  > **Comments:**
  > **username_1**: B is doubtful, because popular engines assume best play in their evaluation. The answer definitely deals with imperfections in the algorithm that come from practical considerations like finite resources. The problem shouldn't be present as often if you let the engine explore a position to a decent depth. For example, you might get +1.6 after 3 hours on one position, but it started off +2.1 or +0.8 when it didn't look as far. When you make a move, the depth is low once again, but after reaching a good depth, the number should be similar to +1.6. Evals will slowly drift even with engine moves.  
  
  ---
  
  ## 4 answers
  
  ### Answer by username_2 on 2015-05-06. Score: 6
  
  I assume you used Stockfish with a GUI because the sign of the score would have been different if you didn't.
  
  First of all, Stockfish is well known for its instability. The strongest chess engine isn't the best engine for analysis. This is like your local chess instructor might be a better coach than Kasparov for you.
  
  A is obviously correct. Furthermore, the search algorithm could change as the hash-table gets filled up. The more that the engine "knows" about a particular position, the better it can analyse for the next position.
  
  > **Comments:**
  > **username_0**: How can you tell what the sign is supposed to be - I just made some numbers up.  It could either be 0.6 in white's favour (what I meant) or 0.6 in black's favour and it still works :-)  
  > **username_0**: What engine would you recommend for analysis?  
  > **username_3**: Stockfish is not bad, it is one amongst the strongest engines, you can continue using it to analyze. Also other recommended engines are - Deep Fritz and Houdini  
  > **username_4**: How is instability related to being a good engine for analysis? I'd rather use an engine which honestly tells me if it is unsure of its analysis than an engine which confidently gives a possibly wrong score.  
  > **username_2**: @username_4 Score is just a heuristic. I can scale everything up by a factor of 10 and still get the same PV. A good engine for analysis should not just give you a good move, the heuristic should not move like a roller-coaster. You could say that the deviation should be relatively close. Stockfish is not such engine.  
  > **username_2**: @Corone Stockfish is still a very good engine for analysis. But just bear in mind that its scoring scheme is a bit optimistic. You should always check it with another engine such as Komodo or Houdini if you're curious. You can't always trust whatever Stockfish tells you.  
  > **username_2**: @Corone The sign of the score is different if you try it without a GUI. A chess engine always report the score relative to the side to move. A GUI changes it back to what you actually see (relative to white).  
  > **username_4**: @StudentT As I said, I think it is good if the heuristic moves like a roller-coaster if there is something in the position which makes the engine "unsure" about the value.  
  > **username_2**: @username_4 If if the position is complicated, a good engine should converge as quickly as possible. The convergence should be good. I'm talking about general positions not like problem-solving-like-crazy positions. Stockfish should have converged quicker but it isn't, although the playing strength is enormous.  
  
  ---
  
  ### Answer by username_5 on 2019-02-13. Score: 4
  
  Stockfish 9 and 10 had contempt set to 20 or so by default, so that the engine would avoid draws when playing against weaker opponents (i.e. most other engines and all humans). If you change the contempt to 0 when analyzing, that should bring the evaluations with white or black to move closer to the same number.
  
  > **Comments:**
  > **username_2**: Your answer is technically correct, but it's not what the question asked for.  
  
  ---
  
  ### Answer by username_6 on 2019-02-13. Score: 2
  
  Yes, it's A). The engine is not perfect and can only search so far in a given time. When you make a move for White, the engine doesn't have to waste time considering White's other options anymore. It can focus on only searching down the sub-tree rooted at the move you just made for White.
  
  It's hard to say what this means about the positions that Stockfish is calculating. You might be tempted to say that the positions are tense and very sharp. However, using quiescence search, Stockfish tends to avoid evaluating such positions and waits until the game calms down. So it's hard to infer what the positions are like.
  
  
  ---
  
  ### Answer by username_7 on 2019-02-14. Score: 1
  
  Engines like Stockfish use something called the [Minimax Algorithm](https://en.wikipedia.org/wiki/Minimax), which in short means that the engine **always assumes best play** by the opponent.
  
  That means it will not go for any traps if it sees a refutation that is beneficial to the opponent.
  
  The algorithm basically works so that it looks at as many positions as possible, and applying an evaluation function to them. Stockfish is extremly fast at calculating positions and thus looking pretty far ahead, but its evaluation function isn't as precise as that of Komodo, for example.
  
  As a consequence, the evaluation can vary quite a bit, depending on how many positions it had time to calculate. Playing a move obviously limits the search space, so the engine can give a better analysis of that specific position, so it's more likely to find something that has a major impact on the evaluation.
  
  TL;DR: Answer A is correct.
  
  
  ---
  
  