Answers.Body: <p>So, basically the answer is like this:
  Let's say the engine analyzes the start position at 30 PLY and recommends 1. e4 with a score of +0.7 for white. Once I made the move 1. e4 and let the engine analyze the new position to the same depth (29 PLY) it would well evaluate the position differently and give it a score of only +0.2. The reason for this is that the engine now examines more of the leafs starting with 1. e4 than it did from the start position (since it now disregards all branches starting with other first moves), and thus performs a deeper analysis (more leaves) of this branch even though it goes no further in number of moves.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-10-14T14:35:34.743Z
Answers.Text: this is the real answer
Answers.UserDisplayName: RBZ
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-15T11:12:41.300Z
Answers.LastActivityDate: 2018-03-15T11:57:22.627Z
Answers.LastEditDate: 2018-03-15T11:57:22.627Z
Answers.UserDisplayName: acye
Answers.Body: <p>Try to set 'contempt' to 0. Had the same problem, this solved it for me.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-26T09:45:48.353Z
Answers.Text: What is "contempt"?
Answers.UserDisplayName: acye
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-26T23:13:38.047Z
Answers.Text: From the stockfish support site: ''Contempt Integer, Default: 0, Min: -100, Max: 100
  Roughly equivalent to "optimism." Positive values of contempt favor more "risky" play, while negative values will favor draws. Zero is neutral.'' When I downloaded S9 contempt was set to 20 as a default leading to evaluations flopping around. Set it to 0 and S9 now behaves normally.
Answers.UserDisplayName: sue sudo
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-07-08T11:02:24.150Z
Answers.Text: @suesudo I would assume modifying that will reduce the strength of the engine.
Answers.UserDisplayName: Mateen Ulhaq
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T07:24:46.597Z
Answers.Text: Contempt tells the engine to avoid draws. Playing against an equal opponent, contempt should be 0. Against stronger opponents, set contempt negative. Against a weaker opponent, use plus contempt to prevent the engine from accepting draws. Setting a contempt of higher than 0 when playing an opponent of similar strength or stronger weakens the engine.  For analysis, setting contempt to 0 should minimize the asymmetry of evaluation between white and black.
Answers.UserDisplayName: A passerby
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-02-13T07:47:49.033Z
Answers.Text: Incidentally, human GMs do this as well, i.e. play weak moves against weak players in order to get them out of their preparation, and win more easily.
Answers.UserDisplayName: A passerby
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-06-25T13:55:00.910Z
Answers.LastActivityDate: 2018-06-25T13:55:00.910Z
Answers.UserDisplayName: sue sudo
Answers.Body: <p>There's nothing surprising here. Chess engine is not perfect, as you make a move the evaluation will likely change:</p>
  
  <ul>
  <li>The engine now sees something not seen before</li>
  <li>The engine can now search deeper</li>
  <li>The engine's hash table has relevant entries</li>
  </ul>
  
  <p>This's just how we play chess. Our positional assessment change as we make moves. If that's not the case, there's no need to play the game - we shout out win/loss/draw without making a move.</p>
  
  <p>Hint: If you're using your engine for your game, you'll need to make some moves to get better assessment. Kramnik did that for his win against Aronian:</p>
  
  <blockquote>
    <p>The computer doesn’t show it at the beginning, but then once you put it in he starts to like it a lot. </p>
  </blockquote>
  
  <p><a href="https://chess24.com/en/read/news/berlin-candidates-3-a-kramnik-immortal" rel="nofollow noreferrer">https://chess24.com/en/read/news/berlin-candidates-3-a-kramnik-immortal</a></p>
  
  <p>Sorry, chess is a hard game.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T11:25:29.847Z
Answers.Text: The title of the question is misleading but the question really was about the evaluation changing after making the move suggested by the engine. Ideally, it shouldn't change. In practice, it does.
Answers.UserDisplayName: itub
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T11:37:12.213Z
Answers.Text: @SmallChess
  Relating to your answers:
  1. Surely the same algorithm should "see" the same things in the same position each time.
  2. At depth of 26 or more PLY a mere 1 PLY gained by playing out the move shouldn't have an impact.
  3. Hash tables - not sure what you mean.
Answers.UserDisplayName: acye
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T11:38:17.073Z
Answers.Text: @acye As you make a move, the engine "sees" further and better.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T12:33:55.723Z
Answers.Text: @acye Keep in mind that the evaluation score you see is given for the "best" leaf of the search tree, not for the position you actually see. Going 1 ply deeper, not only does the engine "see" the next move after the leaf, but it may even completly change its opinion about what the "best" leaf is in the first place and the score you see is from a completely different leaf position now.
Answers.UserDisplayName: Annatar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T12:37:36.470Z
Answers.Text: Computing power distibuted to each path/leaf increases more than you might think: the sibling branches to 1.e4 have been cut, all effort can now go into searching the tree below 1.e4, instead of only a fraction while the rest is used to calculate 1.d4, 1.c4 and so on. It's not that improbable that the "best" leaf changes in that process.
Answers.UserDisplayName: Annatar
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T17:24:12.723Z
Answers.Text: @acye If the computer is saying it's at 26 ply, that doesn't actually mean it's actually searched *every* continuation at 26 ply.  It's only searched *some* of them that deep.
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-14T11:21:51.377Z
Answers.LastActivityDate: 2018-03-14T11:35:57.530Z
Answers.LastEditDate: 2018-03-14T11:35:57.530Z
Answers.UserDisplayName: SmallChess
Body: <p>I've noticed that the engine (Stockfish 9) evaluates positions as significantly better for white if the evaluation is performed while white is on the move. The difference is sometimes more than half a point.</p>
  
  <p>Someone else has noticed this phenomenon, and anyone has an idea what the reason is (It's not run time, as I've let the engine evaluate above 26 PLY in both cases).</p>
  
  <p>To clarify: The intention here is NOT the same position, just switching who's on the move. I will examplify by the start position. Imagine evaluating it and the engine gives +0.7 and gives the 1. e4 e5. Then you make the move 1.e4 and let the engine evaluate again, and now it gives only +0.2 and recommends 1.. e5.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-14T10:59:13.870Z
Comments.Text: Well, let's say if both sides are threatening mate in 1, who is on the move is the difference between 1-0 and 0-1. So without an example this sounds trivial, of course it matters who has the move.
Comments.UserDisplayName: RemcoGerlich
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-14T11:40:23.850Z
Comments.Text: This is similar to https://chess.stackexchange.com/questions/18240/why-can-a-chess-move-improve-the-chance-of-winning-according-to-the-computer and SmallChess has given a similar answer
Comments.UserDisplayName: Brian Towers
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-14T11:44:57.697Z
Comments.Text: @BrianTowers - not really similar at all.
Comments.UserDisplayName: acye
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-05-21T18:45:51.343Z
Comments.Text: acye why is it different from the other question?
Comments.UserDisplayName: BCLC
Tags: <engines><evaluation>
Title: Engine evaluating changing after making move suggested by engine
ThreadText: # Engine evaluating changing after making move suggested by engine
  
  (Asked by: username_0 on 2018-03-14)
  
  I've noticed that the engine (Stockfish 9) evaluates positions as significantly better for white if the evaluation is performed while white is on the move. The difference is sometimes more than half a point.
  
  Someone else has noticed this phenomenon, and anyone has an idea what the reason is (It's not run time, as I've let the engine evaluate above 26 PLY in both cases).
  
  To clarify: The intention here is NOT the same position, just switching who's on the move. I will examplify by the start position. Imagine evaluating it and the engine gives +0.7 and gives the 1. e4 e5. Then you make the move 1.e4 and let the engine evaluate again, and now it gives only +0.2 and recommends 1.. e5.
  
  **Tags:** engines, evaluation
  
  > **Comments:**
  > **username_1**: Well, let's say if both sides are threatening mate in 1, who is on the move is the difference between 1-0 and 0-1. So without an example this sounds trivial, of course it matters who has the move.  
  > **username_2**: This is similar to https://chess.stackexchange.com/questions/18240/why-can-a-chess-move-improve-the-chance-of-winning-according-to-the-computer and username_8 has given a similar answer  
  > **username_0**: @BrianTowers - not really similar at all.  
  > **username_3**: username_0 why is it different from the other question?  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_0 on 2018-03-15. Score: 3 | Accepted answer
  
  So, basically the answer is like this:
  Let's say the engine analyzes the start position at 30 PLY and recommends 1. e4 with a score of +0.7 for white. Once I made the move 1. e4 and let the engine analyze the new position to the same depth (29 PLY) it would well evaluate the position differently and give it a score of only +0.2. The reason for this is that the engine now examines more of the leafs starting with 1. e4 than it did from the start position (since it now disregards all branches starting with other first moves), and thus performs a deeper analysis (more leaves) of this branch even though it goes no further in number of moves.
  
  > **Comments:**
  > **username_4**: this is the real answer  
  
  ---
  
  ### Answer by username_5 on 2018-06-25. Score: 7
  
  Try to set 'contempt' to 0. Had the same problem, this solved it for me.
  
  > **Comments:**
  > **username_0**: What is "contempt"?  
  > **username_5**: From the stockfish support site: ''Contempt Integer, Default: 0, Min: -100, Max: 100 Roughly equivalent to "optimism." Positive values of contempt favor more "risky" play, while negative values will favor draws. Zero is neutral.'' When I downloaded S9 contempt was set to 20 as a default leading to evaluations flopping around. Set it to 0 and S9 now behaves normally.  
  > **username_6**: @suesudo I would assume modifying that will reduce the strength of the engine.  
  > **username_7**: Contempt tells the engine to avoid draws. Playing against an equal opponent, contempt should be 0. Against stronger opponents, set contempt negative. Against a weaker opponent, use plus contempt to prevent the engine from accepting draws. Setting a contempt of higher than 0 when playing an opponent of similar strength or stronger weakens the engine.  For analysis, setting contempt to 0 should minimize the asymmetry of evaluation between white and black.  
  > **username_7**: Incidentally, human GMs do this as well, i.e. play weak moves against weak players in order to get them out of their preparation, and win more easily.  
  
  ---
  
  ### Answer by username_8 on 2018-03-14. Score: 5
  
  There's nothing surprising here. Chess engine is not perfect, as you make a move the evaluation will likely change:
  
  * The engine now sees something not seen before
  * The engine can now search deeper
  * The engine's hash table has relevant entries
  
  This's just how we play chess. Our positional assessment change as we make moves. If that's not the case, there's no need to play the game - we shout out win/loss/draw without making a move.
  
  Hint: If you're using your engine for your game, you'll need to make some moves to get better assessment. Kramnik did that for his win against Aronian:
  
  > The computer doesn’t show it at the beginning, but then once you put it in he starts to like it a lot.
  
  <https://chess24.com/en/read/news/berlin-candidates-3-a-kramnik-immortal>
  
  Sorry, chess is a hard game.
  
  > **Comments:**
  > **username_9**: The title of the question is misleading but the question really was about the evaluation changing after making the move suggested by the engine. Ideally, it shouldn't change. In practice, it does.  
  > **username_0**: @username_8 Relating to your answers: 1. Surely the same algorithm should "see" the same things in the same position each time. 2. At depth of 26 or more PLY a mere 1 PLY gained by playing out the move shouldn't have an impact. 3. Hash tables - not sure what you mean.  
  > **username_8**: @username_0 As you make a move, the engine "sees" further and better.  
  > **username_10**: @username_0 Keep in mind that the evaluation score you see is given for the "best" leaf of the search tree, not for the position you actually see. Going 1 ply deeper, not only does the engine "see" the next move after the leaf, but it may even completly change its opinion about what the "best" leaf is in the first place and the score you see is from a completely different leaf position now.  
  > **username_10**: Computing power distibuted to each path/leaf increases more than you might think: the sibling branches to 1.e4 have been cut, all effort can now go into searching the tree below 1.e4, instead of only a fraction while the rest is used to calculate 1.d4, 1.c4 and so on. It's not that improbable that the "best" leaf changes in that process.  
  > **username_11**: @username_0 If the computer is saying it's at 26 ply, that doesn't actually mean it's actually searched *every* continuation at 26 ply.  It's only searched *some* of them that deep.  
  
  ---
  
  