Answers.Body: <p>It is difficult to say anything about it without reading the blog post.</p>
  
  <p>Regarding your thoughts:</p>
  
  <p>Evaluations of +0.2, +0.26, +0.32 are for all practical purposes the same and basically mean that the position is equal. If you use another engine you will very likely find different numbers around zero.</p>
  
  <p>Computer engines are not good for deciding on one opening variation over another, since in practical play there are more important factors than what the computer thinks is a centipawn advantage. </p>
  
  <p>Above all, for practical play you want to pick a variation that you are <em>comfortable playing</em>. Also in many cases you want to avoid variations where you are forced to make 20 precise moves in a row (or be lost otherwise) while your opponent has a large margin for potential errors. Depending on the tournament situation sometimes you might also pick more drawish lines over risky double-edged lines.</p>
  
  <p>So, all in all, using a computer engine for opening preparation in the way you suggest does not make much sense. It is better to use a database of human games, which will tell you how successful humans are in various variations, how risky (draws vs. decided games) it is, etc.</p>
  
  <p>A computer engine is still useful for checking how to punish non-theory moves or for finding novelties (typically only done by top players).</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T14:31:34.807Z
Answers.Text: Thanks for your answer, but actually I was not talking about opening preparation, I was talking about analyzing my own games after they were played. The most important positions to analyze in this case are the tactical positions, where computer-generated answers can be the best. Also in these cases, the optimizations I mention can make the principal variation fail to contain best moves, and there the difference can be important (even missing a checkmate, in theory).
Answers.UserDisplayName: LeibnizGW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T16:45:28.080Z
Answers.Text: I think the point is to disregard small evaluation differences.  When evaluations are less than 0.4 the line is probably not that relevant to your annotations.
Answers.UserDisplayName: Ywapom
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T19:23:32.673Z
Answers.Text: @Ywapom : it is not about small evaluation difference. I just added a new example with big evaluation differences to illustrate the point better.
Answers.UserDisplayName: LeibnizGW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T20:23:25.713Z
Answers.Text: @KnightoftheSquareTable I think, after you added the new example in the question, I understand what you are asking. Please ignore this answer then.
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T03:27:13.633Z
Answers.Text: @KnightoftheSquareTable Please consider my answer.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-09T14:04:49.037Z
Answers.LastActivityDate: 2018-03-09T14:04:49.037Z
Answers.UserDisplayName: user1583209
Answers.Body: <p>No. I <strong>don't</strong> think so. The point of aspiration windows to introduce better alpha-beta cutoffs.</p>
  
  <p>In your example, if your search gives +4.00 <strong>within</strong> your aspiration window that would be the best evaluation from your engine.</p>
  
  <blockquote>
    <p>concludes that 1.Bxd6+ is worth at least +4.00.</p>
  </blockquote>
  
  <p>No. +4.00 <strong>is</strong> the score, there is no such thing as "worth at least".</p>
  
  <p>We only talk about "at least" when the score is <strong>outside</strong> the window. In this case, you'd have to do a new search with a wider window. Aspiration windows doesn't make your score less reliable, it makes the search quicker by introducing more cutoffs.</p>
  
  <ol>
  <li><p>Principal variation is the moves that the engine considered the best. Of course, it's not the only way to play a position. To me, "The principal variation is almost always wrong" is not making any sense. There're many ways to play chess.</p></li>
  <li><p>You shouldn't because aspiration windows is not causing you any problem. But if you insist, you could disable the aspiration margin in the source code, and then recompile from source.</p></li>
  </ol>
  
  <p>Do you get the point? If you fail at your aspiration window, you'd have to do a new search. Otherwise, everything works. Please discard the "principal variation is always wrong" theory.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:44:16.970Z
Answers.Text: Just from a practical perspective, if I analyze a position with an engine it will show me some line (say 10 moves) together with an evaluation (say +4).  If I play through this line, and analyze the position 5 moves down the line, is it possible that the evaluation switches to +6, because some move was discarded previously?
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:45:15.820Z
Answers.Text: @user1583209 100% possible. Evaluation change the more the engine "sees". This is just like we play chess, the more time we have the more likely our assessment change.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:46:34.203Z
Answers.Text: @user1583209 But I think this question was more like confusion to aspiration windows, which is a common chess programming technique.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:47:24.333Z
Answers.Text: @SmallChesss:  If that is the case, I should not write down (in my annotation) the  10 moves I got initially, but play through the line, writing down the moves as I go along. That's how I understand the question and in this sense the "principal variation is wrong", no?
Answers.UserDisplayName: user1583209
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:50:10.570Z
Answers.Text: @user1583209 It's only "wrong" if you put it this way. PV is simply the best sequence of moves from the engine. Of course, as you go further in the game everything can change. There're many ways to play chess, and PV is just one of the possibilities that assume both players play at very strong level.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T08:52:58.067Z
Answers.Text: @user1583209 PV is always just a reference line. It's not the line that human players would play, especially if they are not very experienced.
Answers.UserDisplayName: SmallChess
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T15:54:09.400Z
Answers.Text: @SmallChess : thanks for your answer. By reading it, I saw that I made a mistake in the way I had chosen the aspiration window in my post. Sorry, it was my fault. Now I fixed it. In my intention, the aspiration window is chosen small, in a way that it is probably not met, so the exact value of the move is not determined, only a cutoff, but still it is possible to prove that a certain move is best. Please, have a look at my example again.
Answers.UserDisplayName: LeibnizGW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T16:01:37.870Z
Answers.Text: As you are saying, PV is just a line the engine is working with, and the evaluation is also just a tool for the engine. But the engine outputs these two things, and the human users try to give a meaning to them. In my second question I ask if it is possible to configure the engine in such a way that the evaluation and PV  are as close as possible to the intuitive meaning that humans want to attribute to them.
Answers.UserDisplayName: LeibnizGW
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2018-03-10T03:26:58.780Z
Answers.LastActivityDate: 2018-03-10T03:33:38.847Z
Answers.LastEditDate: 2018-03-10T03:33:38.847Z
Answers.UserDisplayName: SmallChess
Body: <p>I read in an internet blog that when analyzing my games with an engine, it is often useless to copy the principal variation to my annotations, because (they say) it is well known that the principal variation is almost always wrong. By this, they mean that the principal variation often does not contain the best moves from both sides, as one would expect.</p>
  
  <p>I am thinking about this and I am trying to understand what they really mean and why is it so. I can see two reasons:</p>
  
  <p>1) If I analyze at 20 plies depth, then the fifth move in the principal variation was probably analyzed only at 10 plies depth, so it is less reliable than the first move. This probably does not apply very much to tactical positions, where, thank to quiescence search, positions are analyzed deeper when needed.</p>
  
  <p>2) The engine is optimized to find the best move, but it doesn't care to find the best principal variation. This can be relevant when alpha-beta pruning is combined with aspiration window heuristic and incremental search. </p>
  
  <p>Imagine that the engine first analyzes at 10 plies, and it finds that the best move is evaluated at +0.50 and the other moves are all less than +0.20. When increasing the search depth to 18 plies, the engine can analyze the best move with an aspiration window between +0.20 and +0.40, asking the search to find the exact value only if lies in the interval, or a cutoff value if it lies outside.  If the search finds that the best move is valued more than +0.40, the engine only has to verify that the other moves are valued less than 0.40 and this can prove that the candidate best move is actually best without figuring out the actual value of the best move, nor the exact principal variation. </p>
  
  <p>In the example, to prove that the best move is valued more than +0.40, at some point of the principal variation some second best move from the side to move can be sufficient to prove that the variation is better than +0.40, so the principal variation will contain that second best move, and the absolute best move for that position does not need to be determined.</p>
  
  <p>See below for a more clear example of this.</p>
  
  <p>My questions are:</p>
  
  <p>1) Do you think I understand the reasons for the sentence "The principal variation is almost always wrong", or is there some other important reason that I am missing?</p>
  
  <p>2) When analyzing my games with Stockfish or another popular engine, is there a way to turn off the optimizations I discussed above, and force the engine to compute the actual precise value of the best move, and a precise principal variation?       </p>
  
  <p>EDIT</p>
  
  <p>Let me give a concrete example, otherwise what I wrote above is not so clear. This new example is super simplified, just to show the principle. Consider this case:</p>
  
  <pre><code>[FEN "1k3r2/pp6/3p4/8/8/n5B1/5PPP/5RK1 w - - 0 1"]
  
  1.Bxd6+ Kc8 2.Bxa3
  </code></pre>
  
  <p>Here it is clear that the best move is 1.Bxd6+, since no other move wins a piece. Assume the engine suspects from previous analysis that 1.Bxd6+ is the only move that wins a piece. It analyses 1.Bxd6+ with an aspiration window in the interval from +1.00 to +2.00, asking for the exact value of the moves if it lies in the interval, or a cutoff it the moves wins at least two pawns. After every possible Black's reply (1...Ka8, 1...Kc8) it tries the move 2.Bxa3 first,  evaluates it at +4.00, goes out of the window and returns this cutoff (without any need to try 2.Bxf8 at all). At the end, the engine happily concludes that 1.Bxd6+ is worth at least +4.00. Then the engine tries the other possible first moves by White, does not find anything worth so much, and correctly concludes that 1.Bxd6+ is the best move by White. But it returns an incorrect evaluation of +4.00 and an incorrect Principal Variation 1.Bxd6+ Kc8 2.Bxa3. The program never needed to find the exact evaluation to find the best move.</p>
  
  <p>The thing I would like to write in my annotations is, instead, that this move has an evaluation of +6.00, with Principal Variation 1.Bxd6+ Kc8 2.Bxf8</p>
  
  <p>So the fact that the engine is optimized only to find the best move, gives problems if I want to use it for analysis. And the mistake can be big.</p>
  
  <p>I know that this example will not manage to confuse Stockfish, it was just an illustration, but I think this kind of problems can really happen, and probably this is what the blog post mentioned above wanted to say.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-09T13:20:07.870Z
Comments.Text: Can you give us the source of this blog article ?
Comments.UserDisplayName: Evargalo
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2018-03-09T14:07:52.623Z
Comments.Text: @Evargalo: I read it some time ago, and I don't remember any more where I found it and who was the author. Probably somewhere on chess.com. I only remember that sentence, but there wasn't any additional hint on its meaning. The topic was about analyzing your own games, and not about computer chess.
Comments.UserDisplayName: LeibnizGW
Tags: <engines><analysis>
Title: The principal variation is always wrong!
ThreadText: # The principal variation is always wrong!
  
  (Asked by: username_0 on 2018-03-09)
  
  I read in an internet blog that when analyzing my games with an engine, it is often useless to copy the principal variation to my annotations, because (they say) it is well known that the principal variation is almost always wrong. By this, they mean that the principal variation often does not contain the best moves from both sides, as one would expect.
  I am thinking about this and I am trying to understand what they really mean and why is it so. I can see two reasons:
  1) If I analyze at 20 plies depth, then the fifth move in the principal variation was probably analyzed only at 10 plies depth, so it is less reliable than the first move. This probably does not apply very much to tactical positions, where, thank to quiescence search, positions are analyzed deeper when needed.
  2) The engine is optimized to find the best move, but it doesn't care to find the best principal variation. This can be relevant when alpha-beta pruning is combined with aspiration window heuristic and incremental search. 
  Imagine that the engine first analyzes at 10 plies, and it finds that the best move is evaluated at +0.50 and the other moves are all less than +0.20. When increasing the search depth to 18 plies, the engine can analyze the best move with an aspiration window between +0.20 and +0.40, asking the search to find the exact value only if lies in the interval, or a cutoff value if it lies outside.  If the search finds that the best move is valued more than +0.40, the engine only has to verify that the other moves are valued less than 0.40 and this can prove that the candidate best move is actually best without figuring out the actual value of the best move, nor the exact principal variation. 
  In the example, to prove that the best move is valued more than +0.40, at some point of the principal variation some second best move from the side to move can be sufficient to prove that the variation is better than +0.40, so the principal variation will contain that second best move, and the absolute best move for that position does not need to be determined.
  See below for a more clear example of this.
  My questions are:
  1) Do you think I understand the reasons for the sentence "The principal variation is almost always wrong", or is there some other important reason that I am missing?
  2) When analyzing my games with Stockfish or another popular engine, is there a way to turn off the optimizations I discussed above, and force the engine to compute the actual precise value of the best move, and a precise principal variation?       
  EDIT
  Let me give a concrete example, otherwise what I wrote above is not so clear. This new example is super simplified, just to show the principle. Consider this case:
  [FEN "1k3r2/pp6/3p4/8/8/n5B1/5PPP/5RK1 w - - 0 1"]
  
  1.Bxd6+ Kc8 2.Bxa3
  
  Here it is clear that the best move is 1.Bxd6+, since no other move wins a piece. Assume the engine suspects from previous analysis that 1.Bxd6+ is the only move that wins a piece. It analyses 1.Bxd6+ with an aspiration window in the interval from +1.00 to +2.00, asking for the exact value of the moves if it lies in the interval, or a cutoff it the moves wins at least two pawns. After every possible Black's reply (1...Ka8, 1...Kc8) it tries the move 2.Bxa3 first,  evaluates it at +4.00, goes out of the window and returns this cutoff (without any need to try 2.Bxf8 at all). At the end, the engine happily concludes that 1.Bxd6+ is worth at least +4.00. Then the engine tries the other possible first moves by White, does not find anything worth so much, and correctly concludes that 1.Bxd6+ is the best move by White. But it returns an incorrect evaluation of +4.00 and an incorrect Principal Variation 1.Bxd6+ Kc8 2.Bxa3. The program never needed to find the exact evaluation to find the best move.
  The thing I would like to write in my annotations is, instead, that this move has an evaluation of +6.00, with Principal Variation 1.Bxd6+ Kc8 2.Bxf8
  So the fact that the engine is optimized only to find the best move, gives problems if I want to use it for analysis. And the mistake can be big.
  I know that this example will not manage to confuse Stockfish, it was just an illustration, but I think this kind of problems can really happen, and probably this is what the blog post mentioned above wanted to say.
  
  **Tags:** engines, analysis
  
  > **Comments:**
  > **username_1**: Can you give us the source of this blog article ?  
  > **username_0**: @username_1: I read it some time ago, and I don't remember any more where I found it and who was the author. Probably somewhere on chess.com. I only remember that sentence, but there wasn't any additional hint on its meaning. The topic was about analyzing your own games, and not about computer chess.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2018-03-09. Score: 3
  
  It is difficult to say anything about it without reading the blog post.
  
  Regarding your thoughts:
  
  Evaluations of +0.2, +0.26, +0.32 are for all practical purposes the same and basically mean that the position is equal. If you use another engine you will very likely find different numbers around zero.
  
  Computer engines are not good for deciding on one opening variation over another, since in practical play there are more important factors than what the computer thinks is a centipawn advantage.
  
  Above all, for practical play you want to pick a variation that you are *comfortable playing*. Also in many cases you want to avoid variations where you are forced to make 20 precise moves in a row (or be lost otherwise) while your opponent has a large margin for potential errors. Depending on the tournament situation sometimes you might also pick more drawish lines over risky double-edged lines.
  
  So, all in all, using a computer engine for opening preparation in the way you suggest does not make much sense. It is better to use a database of human games, which will tell you how successful humans are in various variations, how risky (draws vs. decided games) it is, etc.
  
  A computer engine is still useful for checking how to punish non-theory moves or for finding novelties (typically only done by top players).
  
  > **Comments:**
  > **username_0**: Thanks for your answer, but actually I was not talking about opening preparation, I was talking about analyzing my own games after they were played. The most important positions to analyze in this case are the tactical positions, where computer-generated answers can be the best. Also in these cases, the optimizations I mention can make the principal variation fail to contain best moves, and there the difference can be important (even missing a checkmate, in theory).  
  > **username_3**: I think the point is to disregard small evaluation differences.  When evaluations are less than 0.4 the line is probably not that relevant to your annotations.  
  > **username_0**: @username_3 : it is not about small evaluation difference. I just added a new example with big evaluation differences to illustrate the point better.  
  > **username_2**: @KnightoftheSquareTable I think, after you added the new example in the question, I understand what you are asking. Please ignore this answer then.  
  > **username_4**: @KnightoftheSquareTable Please consider my answer.  
  
  ---
  
  ### Answer by username_4 on 2018-03-10. Score: 2
  
  No. I **don't** think so. The point of aspiration windows to introduce better alpha-beta cutoffs.
  
  In your example, if your search gives +4.00 **within** your aspiration window that would be the best evaluation from your engine.
  
  > concludes that 1.Bxd6+ is worth at least +4.00.
  
  No. +4.00 **is** the score, there is no such thing as "worth at least".
  
  We only talk about "at least" when the score is **outside** the window. In this case, you'd have to do a new search with a wider window. Aspiration windows doesn't make your score less reliable, it makes the search quicker by introducing more cutoffs.
  
  1. Principal variation is the moves that the engine considered the best. Of course, it's not the only way to play a position. To me, "The principal variation is almost always wrong" is not making any sense. There're many ways to play chess.
  2. You shouldn't because aspiration windows is not causing you any problem. But if you insist, you could disable the aspiration margin in the source code, and then recompile from source.
  
  Do you get the point? If you fail at your aspiration window, you'd have to do a new search. Otherwise, everything works. Please discard the "principal variation is always wrong" theory.
  
  > **Comments:**
  > **username_2**: Just from a practical perspective, if I analyze a position with an engine it will show me some line (say 10 moves) together with an evaluation (say +4).  If I play through this line, and analyze the position 5 moves down the line, is it possible that the evaluation switches to +6, because some move was discarded previously?  
  > **username_4**: @username_2 100% possible. Evaluation change the more the engine "sees". This is just like we play chess, the more time we have the more likely our assessment change.  
  > **username_4**: @username_2 But I think this question was more like confusion to aspiration windows, which is a common chess programming technique.  
  > **username_2**: @username_4s:  If that is the case, I should not write down (in my annotation) the  10 moves I got initially, but play through the line, writing down the moves as I go along. That's how I understand the question and in this sense the "principal variation is wrong", no?  
  > **username_4**: @username_2 It's only "wrong" if you put it this way. PV is simply the best sequence of moves from the engine. Of course, as you go further in the game everything can change. There're many ways to play chess, and PV is just one of the possibilities that assume both players play at very strong level.  
  > **username_4**: @username_2 PV is always just a reference line. It's not the line that human players would play, especially if they are not very experienced.  
  > **username_0**: @username_4 : thanks for your answer. By reading it, I saw that I made a mistake in the way I had chosen the aspiration window in my post. Sorry, it was my fault. Now I fixed it. In my intention, the aspiration window is chosen small, in a way that it is probably not met, so the exact value of the move is not determined, only a cutoff, but still it is possible to prove that a certain move is best. Please, have a look at my example again.  
  > **username_0**: As you are saying, PV is just a line the engine is working with, and the evaluation is also just a tool for the engine. But the engine outputs these two things, and the human users try to give a meaning to them. In my second question I ask if it is possible to configure the engine in such a way that the evaluation and PV  are as close as possible to the intuitive meaning that humans want to attribute to them.  
  
  ---
  
  