Answers.Body: <p>The above output from Stockfish is what's called the Primary Variation (PV), what it considers the best line of play for both sides. But the output is the PV at each search depth: 1 ply from the start position, 3 ply, all the way up to 21 plies.</p>
  <p>So at a search depth of 21 plies (moves by both sides), it still considers 12. Bxc7 to be the best move in the current position, with an evaluation of the position resulting after those 21 plies to be +1.33 in White's favour.</p>
  <p>If you want to see the evaluation of other moves, then hit the +V button in the toolbar. Click it once, and when Stockfish analyses the position again, it should show the two best variations at each search depth.</p>
  <p>I tend to have Stockfish show either 4 or 6 variations, so I can see the relative scores between the moves -- to see if one move is significantly stronger than another.</p>
  <p>Stockfish -- as with most &quot;brute force&quot; chess engines -- uses a min-max approach, which ensures that it's considering the best move for both sides. There's various algorithms for pruning and reducing the size of the tree as the search-depth grows, which could have the effect of ignoring what in the longer-term proves to be a stronger move.</p>
  <p>If you are interested in the algorithms and patterns that make up Stockfish, try <a href="https://www.chessprogramming.org/Stockfish" rel="noreferrer">Stockfish on Chess Programming Wiki</a>:  which gives a breakdown of the board representation, the searching algorithms and the evaluation algorithms that Stockfish, as well as other engines, use.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-03T07:37:18.967Z
Answers.Text: A few notes, using Stockfish in 4 or 6 variation mode will slow it down A LOT. (the simple reason being that it now needs to provide an exact evaluation for those not-best moves instead of just an upper bound).
  As for terminology, I think you mean the right thing but I would describe plies as half-moves to make more clear that both sides moving constitutes two plies. Finally, PV stands for principle variation, not that it matters much.
Answers.UserDisplayName: koedem
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-12-03T07:21:16.093Z
Answers.LastActivityDate: 2020-12-03T07:21:16.093Z
Answers.UserDisplayName: MikeD
Body: <p>I am learning how to use Stockfish to analyze my games, and I had a question on how to understand Stockfish's output.</p>
  <p>Consider the screenshot when I request stockfish 12 to annotate my games inside <a href="http://scid.sourceforge.net/" rel="noreferrer">SCID</a>.</p>
  <p>As the number in the square brackets refers approximately to the &quot;advantage&quot; (however that may be defined) I would have if I followed the moves in the suggested lines. This is why lines that have the same initial set of moves, have a different score when they diverge e.g. lines 9 and 10 in the output which have scores of 1.12 and 1.25 respectively.</p>
  <p>But what I want to know is in what order does Stockfish suggest the various lines of output. Notice that the various lines list advantages not necessarily in increasing order. Here are my questions.</p>
  <ol>
  <li><p>Is the program, brute force checking through <strong>all</strong> possible lines of play (up to a prescribed depth) by both players and then suggesting the best lines of play found till now?</p>
  </li>
  <li><p>Does it suggest what the advantage would be for the strongest lines of play i.e. &quot;perfect&quot; play for both black and white would be N number of moves down the line given a particular move by White?</p>
  </li>
  </ol>
  <p>Basically, the fact I am asking these two questions suggests, that I  approximately (but not completely) understand what Stockfish is outputting. Sure, SCID annotates via arrows the best move at each position. But what EXACTLY are assumptions for each line of play that Stockfish is outputting? Clearly, it is not outputting disastrous lines of play, so it is not listing the advantages for ALL possible lines of play up to a certain depth.</p>
  <p>Also, the lines are numbered from 1 to 21 in the output above, but why is line 2 missing?! The image has not been edited!</p>
  <p><a href="https://i.sstatic.net/KU4XP.png" rel="noreferrer"><img src="https://i.sstatic.net/KU4XP.png" alt="enter image description here" /></a></p>
  
Tags: <analysis><stockfish>
Title: How to interpret lines of play computed by Stockfish during annotations
ThreadText: # How to interpret lines of play computed by Stockfish during annotations
  
  (Asked by: username_0 on 2020-12-03)
  
  I am learning how to use Stockfish to analyze my games, and I had a question on how to understand Stockfish's output.
  
  Consider the screenshot when I request stockfish 12 to annotate my games inside [SCID](http://scid.sourceforge.net/).
  
  As the number in the square brackets refers approximately to the "advantage" (however that may be defined) I would have if I followed the moves in the suggested lines. This is why lines that have the same initial set of moves, have a different score when they diverge e.g. lines 9 and 10 in the output which have scores of 1.12 and 1.25 respectively.
  
  But what I want to know is in what order does Stockfish suggest the various lines of output. Notice that the various lines list advantages not necessarily in increasing order. Here are my questions.
  
  1. Is the program, brute force checking through **all** possible lines of play (up to a prescribed depth) by both players and then suggesting the best lines of play found till now?
  2. Does it suggest what the advantage would be for the strongest lines of play i.e. "perfect" play for both black and white would be N number of moves down the line given a particular move by White?
  
  Basically, the fact I am asking these two questions suggests, that I approximately (but not completely) understand what Stockfish is outputting. Sure, SCID annotates via arrows the best move at each position. But what EXACTLY are assumptions for each line of play that Stockfish is outputting? Clearly, it is not outputting disastrous lines of play, so it is not listing the advantages for ALL possible lines of play up to a certain depth.
  
  Also, the lines are numbered from 1 to 21 in the output above, but why is line 2 missing?! The image has not been edited!
  
  [![enter image description here](https://i.sstatic.net/KU4XP.png)](https://i.sstatic.net/KU4XP.png)
  
  **Tags:** analysis, stockfish
  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_1 on 2020-12-03. Score: 7 | Accepted answer
  
  The above output from Stockfish is what's called the Primary Variation (PV), what it considers the best line of play for both sides. But the output is the PV at each search depth: 1 ply from the start position, 3 ply, all the way up to 21 plies.
  
  So at a search depth of 21 plies (moves by both sides), it still considers 12. Bxc7 to be the best move in the current position, with an evaluation of the position resulting after those 21 plies to be +1.33 in White's favour.
  
  If you want to see the evaluation of other moves, then hit the +V button in the toolbar. Click it once, and when Stockfish analyses the position again, it should show the two best variations at each search depth.
  
  I tend to have Stockfish show either 4 or 6 variations, so I can see the relative scores between the moves -- to see if one move is significantly stronger than another.
  
  Stockfish -- as with most "brute force" chess engines -- uses a min-max approach, which ensures that it's considering the best move for both sides. There's various algorithms for pruning and reducing the size of the tree as the search-depth grows, which could have the effect of ignoring what in the longer-term proves to be a stronger move.
  
  If you are interested in the algorithms and patterns that make up Stockfish, try [Stockfish on Chess Programming Wiki](https://www.chessprogramming.org/Stockfish): which gives a breakdown of the board representation, the searching algorithms and the evaluation algorithms that Stockfish, as well as other engines, use.
  
  > **Comments:**
  > **username_2**: A few notes, using Stockfish in 4 or 6 variation mode will slow it down A LOT. (the simple reason being that it now needs to provide an exact evaluation for those not-best moves instead of just an upper bound). As for terminology, I think you mean the right thing but I would describe plies as half-moves to make more clear that both sides moving constitutes two plies. Finally, PV stands for principle variation, not that it matters much.  
  
  ---
  
  