3

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.

  • 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. – RemcoGerlich Mar 14 '18 at 10:59
  • This is similar to chess.stackexchange.com/questions/18240/… and SmallChess has given a similar answer – Brian Towers Mar 14 '18 at 11:40
  • @BrianTowers - not really similar at all. – acye Mar 14 '18 at 11:44
5

Try to set 'contempt' to 0. Had the same problem, this solved it for me.

  • What is "contempt"? – acye Jun 26 '18 at 9:45
  • 2
    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. – sue sudo Jun 26 '18 at 23:13
  • @suesudo I would assume modifying that will reduce the strength of the engine. – Mateen Ulhaq Jul 8 '18 at 11:02
  • 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. – A passerby Feb 13 at 7:24
  • 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. – A passerby Feb 13 at 7:47
4

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.

  • I've edited the question to clarify. – acye Mar 14 '18 at 11:25
  • 3
    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. – itub Mar 14 '18 at 11:25
  • 1
    @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. – Annatar Mar 14 '18 at 12:33
  • 1
    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. – Annatar Mar 14 '18 at 12:37
  • 1
    @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. – D M Mar 14 '18 at 17:24
0

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.

  • 1
    this is the real answer – RBZ Oct 14 '18 at 14:35

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.