Answers.Body: <p>This is largely due to the mathematics behind the game in my opinion, you let it run from 1. e4, this is an inconceivable amount of possible games/positions, so in short, the engine is calculating an extreme amount of variations and lines. Compare this to if you did this with an endgame or even a late middlegame, I suspect that no matter how many lines you ask it to calculate (within reason) it will come up with the same best move more or less every time, and will begin to rank other moves in relation to the best.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-25T17:00:24.453Z
Answers.Text: Any sources? Anything more than in my opinion?
Answers.UserDisplayName: Starship
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-01T05:32:51.120Z
Answers.Text: Im not sure how youd even go about googling this question to find sources, but its mathematically intuitive due to the sheer volume of possible games from the first couple moves, Claude Shannon could be a person to look into. [https://en.wikipedia.org/wiki/Shannon_number]
Answers.UserDisplayName: Crogmcrob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-01T09:47:24.950Z
Answers.Text: They way you would go about googling it would be too.... type in a related search term and look at the results. In my opinion answers generally arent a great fit here. If you some actual calculations/sources then the answer is valid. Otherwise, it has no validity as it is backed by nothing but "i think" and "in my opinion" @Crogmcrob
Answers.UserDisplayName: Starship
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-05-02T02:10:16.430Z
Answers.Text: Shannons number is estimated on the assumption that the average position has 40 legal moves, so the formula for the amount of possible games after n plies (each move by a player is a ply) would roughly be on the order of 40^n, which shoots off to infinity very quickly, 40^8 for example is 6.5536 x 10^12. This takes computing time to calculate and is subject to massive change at deeper calculation
Answers.UserDisplayName: Crogmcrob
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-04-21T15:36:08.697Z
Answers.LastActivityDate: 2023-04-21T15:36:08.697Z
Answers.UserDisplayName: Crogmcrob
Body: <p>No matter whether I test it online on lichess or locally: Stockfish shows different variations and evaluations depending on the number of variations displayed.</p>
  <p>Where does this behaviour come from, and how to find out SF's true objective evaluation for a position?</p>
  <p>These images are from a locally run Stockfish 15, where it analyzed the position after 1. e4. It was interesting to watch how the different openings rise and fall in Stockfish's evaluation. For example, Stockfish considered the Ruy Lopez as the best for White against 1. ..e5, but didn't find anything against it after looking deeply enough, so it switched to the Italian, which it had thought not to be promising for an edge all the time up to depth 44. This is similar to what we see in top-level chess nowadays, the Italian game is back after a long break!</p>
  <p><a href="https://i.sstatic.net/OTAoP.png" rel="noreferrer"><img src="https://i.sstatic.net/OTAoP.png" alt="Seven variations after 1. e4 , local SF 15" /></a></p>
  <p>However when rerunning the experiment with only 3 variations, Stockfish still tries to combat the Berlin defense. It even thinks that the Caro-Kann is the best reply against e4 and only changed mind at depth 46, where it considered 1. ..e5 the best and 1. ..c5 slightly better than the Caro-Kann.</p>
  <p><a href="https://i.sstatic.net/X7AYh.png" rel="noreferrer"><img src="https://i.sstatic.net/X7AYh.png" alt="Three variations after 1. e4, local SF 15" /></a></p>
  <p>I have noticed the same on lichess frequently. (Side note: this isn't a question about openings; it happens in other positions as well.)</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-08T13:14:30.687Z
Comments.Text: Please use the search function. This question has been asked and answered before.
Comments.UserDisplayName: Brian Towers
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-08T13:41:36.450Z
Comments.Text: Are you sure? I could only find two questions, that are related, but not quite the same: 22300 and 25278.
Comments.UserDisplayName: Hauptideal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-09T02:19:08.893Z
Comments.Text: I would guess that the answer at https://chess.stackexchange.com/questions/25278/why-can-stockfish-give-different-evaluations-at-the-same-depth would also apply here. Having to search the other moves would certainly change what's in the hashtables.
Comments.UserDisplayName: D M
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-09-09T13:40:02.287Z
Comments.Text: @DM that's what I assume, too. But as this is a FAQ site that also helps people who google stuff it makes sense to put an answer to this question, so that it can be found when searching for an answer online.
Comments.UserDisplayName: Hauptideal
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-04-05T19:18:21.553Z
Comments.Text: Ask ChatGPT something naunced twice in a row.
Comments.UserDisplayName: Starship
Tags: <engines><stockfish>
Title: Why does Stockfish change evaluations and best moves depending on the number of displayed variations?
ThreadText: # Why does Stockfish change evaluations and best moves depending on the number of displayed variations?
  
  (Asked by: username_0 on 2022-09-08)
  
  No matter whether I test it online on lichess or locally: Stockfish shows different variations and evaluations depending on the number of variations displayed.
  
  Where does this behaviour come from, and how to find out SF's true objective evaluation for a position?
  
  These images are from a locally run Stockfish 15, where it analyzed the position after 1. e4. It was interesting to watch how the different openings rise and fall in Stockfish's evaluation. For example, Stockfish considered the Ruy Lopez as the best for White against 1. ..e5, but didn't find anything against it after looking deeply enough, so it switched to the Italian, which it had thought not to be promising for an edge all the time up to depth 44. This is similar to what we see in top-level chess nowadays, the Italian game is back after a long break!
  
  [![Seven variations after 1. e4 , local SF 15](https://i.sstatic.net/OTAoP.png)](https://i.sstatic.net/OTAoP.png)
  
  However when rerunning the experiment with only 3 variations, Stockfish still tries to combat the Berlin defense. It even thinks that the Caro-Kann is the best reply against e4 and only changed mind at depth 46, where it considered 1. ..e5 the best and 1. ..c5 slightly better than the Caro-Kann.
  
  [![Three variations after 1. e4, local SF 15](https://i.sstatic.net/X7AYh.png)](https://i.sstatic.net/X7AYh.png)
  
  I have noticed the same on lichess frequently. (Side note: this isn't a question about openings; it happens in other positions as well.)
  
  **Tags:** engines, stockfish
  
  > **Comments:**
  > **username_1**: Please use the search function. This question has been asked and answered before.  
  > **username_0**: Are you sure? I could only find two questions, that are related, but not quite the same: 22300 and 25278.  
  > **username_2**: I would guess that the answer at https://chess.stackexchange.com/questions/25278/why-can-stockfish-give-different-evaluations-at-the-same-depth would also apply here. Having to search the other moves would certainly change what's in the hashtables.  
  > **username_0**: @DM that's what I assume, too. But as this is a FAQ site that also helps people who google stuff it makes sense to put an answer to this question, so that it can be found when searching for an answer online.  
  > **username_3**: Ask ChatGPT something naunced twice in a row.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_4 on 2023-04-21. Score: 1
  
  This is largely due to the mathematics behind the game in my opinion, you let it run from 1. e4, this is an inconceivable amount of possible games/positions, so in short, the engine is calculating an extreme amount of variations and lines. Compare this to if you did this with an endgame or even a late middlegame, I suspect that no matter how many lines you ask it to calculate (within reason) it will come up with the same best move more or less every time, and will begin to rank other moves in relation to the best.
  
  > **Comments:**
  > **username_3**: Any sources? Anything more than in my opinion?  
  > **username_4**: Im not sure how youd even go about googling this question to find sources, but its mathematically intuitive due to the sheer volume of possible games from the first couple moves, Claude Shannon could be a person to look into. [https://en.wikipedia.org/wiki/Shannon_number]  
  > **username_3**: They way you would go about googling it would be too.... type in a related search term and look at the results. In my opinion answers generally arent a great fit here. If you some actual calculations/sources then the answer is valid. Otherwise, it has no validity as it is backed by nothing but "i think" and "in my opinion" @username_4  
  > **username_4**: Shannons number is estimated on the assumption that the average position has 40 legal moves, so the formula for the amount of possible games after n plies (each move by a player is a ply) would roughly be on the order of 40^n, which shoots off to infinity very quickly, 40^8 for example is 6.5536 x 10^12. This takes computing time to calculate and is subject to massive change at deeper calculation  
  
  ---
  
  