Answers.Body: <p>It varies, but in this case it looks to be about 10 full moves.</p>
  
  <p>In your screenshot, to the right of the circled -0.9, you can see some small text that says "Depth: 20". This is the number of half moves that the engine is supposedly looking.</p>
  
  <p>In practice, this number is not exact.  The engine will not examine every variation to that depth (for example, it's not likely to seriously examine Bh3 in your position), and if a variation has tactical things going on at the end, it might extend how far it looks at that variation beyond that number.</p>
  
  <blockquote>
    <p>lopsidedness will increase in positive feedback fashion such that a 1 is much higher the further an engine looks ahead.</p>
  </blockquote>
  
  <p>Sometimes, but it's not always correct that a +1 will increase if you look farther ahead.  It may decrease.  There are many endgames which are theoretical draws despite one side being one, or even two, pawns ahead.  Consider this position, from a game where I briefly thought I was going to get my first-ever win against a master:</p>
  
  <pre><code>[White "Me"]
  [Black "Opponent"]
  [FEN "7k/r6P/4K3/5P1R/8/8/8/8 w - - 17 82"]
  </code></pre>
  
  <p>Stockfish (without a tablebase) evaluated this as +2.31 because of the two advanced pawns, but it's a draw - playing f6 results in Ra6+ Kf7 Rxf6+ Kxf6 stalemate, and there's no other good way to progress.  (Oh well, drawing against a master isn't bad either.)</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-27T03:22:49.043Z
Answers.LastActivityDate: 2018-08-29T16:49:05.463Z
Answers.LastEditDate: 2018-08-29T16:49:05.463Z
Answers.UserDisplayName: D M
Answers.Body: <blockquote>
    <p>Note that there are two components to the score. First, there's a raw
    score due to some sort of piece scoring system. Second, there's a
    positional evaluation scoring element that considers future moves and
    future pieces that might be taken.</p>
  </blockquote>
  
  <p>This is wrong. The "piece scoring system" is <em>part</em> of the positional evaluation that is considered at the end of possible lines. It doesn't matter what the pieces are now, it matters what they will be in the future. Therefore the -0.9 is equal to the score after the best move black can currently do, 2...dxe4. It's also equal to the score after the best move white can answer to that, moves other than 3.d3 apparently scored worse. This is called the "minimax algorithm".</p>
  
  <p>At the time static evaluation is done, it looks only at that exact position and doesn't look ahead more moves. The looking ahead part is done by then.</p>
  
  <p>Pawns get different scores depending on where they are. I <em>think</em> that most engines compute some score that says how "endgameish" a given position is, and if it's more endgameish then a pawn gets a bigger bonus for being far advanced, but that's actually guesswork on my part.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-27T17:16:21.283Z
Answers.Text: Interestingly, the Stockfish evaluation gives a slightly bigger bonus for passed pawn rank in the endgame - unless it's on the 7th rank, in which case it gets a slightly bigger bonus in the middlegame.
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T16:55:52.340Z
Answers.Text: +4!? First you are saying that it only looks 1 move ahead. That's redic.  See e.g. https://lichess.org/EJjJxA1J/black#30 . Hit give s or solve.  Then you can see the engine. The instant the white bishop moves to the upper left the score changes, even though the best move for black is to sac black knight by a white pawn.  The ranking would not change so soon if you were right.  Per other ans. it is looking ahead 10 moves.  That's why.
  
  About me being wrong, it is mathematically the same if you evaluate now + changes to eval on line x vs. end position at line x.  (-0.9=~0-1+.1  vs -0.9=-0.9.)
Answers.UserDisplayName: Jason Arthur Taylor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T17:18:46.620Z
Answers.Text: @JasonArthurTaylor: I'm not saying that at all. I'm saying that _first_ it does minimax search, and then at the end of each possible line it does static evaluation of that position. It may be mathematically the same, but it's simply not how engines work. It's faster to only evaluate at the end of the line.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-28T17:45:10.907Z
Answers.Text: There are two issues here.  Sorry if I failed to understand you about your answer to the look ahead.  Please help me and other readers.  How many moves do you think stockfish was looking ahead in evaluating the position, if any?
Answers.UserDisplayName: Jason Arthur Taylor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T16:26:54.870Z
Answers.Text: @JasonArthurTaylor I think there's some confusion because you used the term "static". By definition, a "static" evaluation is only looking at the current board, not ahead. (I ignored that in my answer because your screenshot was obviously not showing a "static" evaluation.) You can see a truly static evaluation at https://hxim.github.io/Stockfish-Evaluation-Guide/ .
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T16:28:56.747Z
Answers.Text: @RemcoGerlich It has to evaluate before (or at least during) the minimax, doesn't it? Otherwise it won't know which is the mini and which is the max!
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T16:51:00.667Z
Answers.Text: @DM: yes, but only at the end of each line, statically. Only based on that particular board at that moment.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T17:05:46.437Z
Answers.Text: @RemcoGerlich OK, I think I misunderstood what you were saying. It's evaluating lots of positions (so it can prune and minimax and stuff), but its final evaluation score (the one it shows you) is only based on the position at the end of the minimaxed line.
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T17:58:01.940Z
Answers.Text: @DM: Yes. Sorry for being hard to understand.
Answers.UserDisplayName: RemcoGerlich
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-27T07:43:43.520Z
Answers.LastActivityDate: 2018-08-27T07:43:43.520Z
Answers.UserDisplayName: RemcoGerlich
Answers.Body: <p>The answer is looking right at you. Below engine name ("Stockfish 9+") it says: Depth 20 -- that is current evaluation depth.</p>
  
  <p><a href="https://i.sstatic.net/b9CtK.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/b9CtK.jpg" alt="enter image description here"></a></p>
  
  <p>And whatever you wrote about the pawn promotion -- that's very nice thinking, but unless there's a clear promotion within the next 15-20 moves, the engine would not consider it, until it's clear that promotion can be really done, give the both sides play at their best.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T00:49:11.610Z
Answers.Text: Re pawns: no not true.  The subroutine that does a board score eval considers pawn ranks, BUT if a deeper eval. is later done (and not pruned and not at depth limit), that deeper one will overrule the less accurate rank-based one.  Therefore, a pawn value that doesn't become queen might be greatest like on rank 3 4, depending on a lot of things.  I am not sure you will understand this but I hope you do. https://www.reddit.com/r/chess/comments/20qwe6/numerical_value_of_a_passed_pawn/cg6ehta/
Answers.UserDisplayName: Jason Arthur Taylor
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-29T16:38:45.297Z
Answers.Text: @JasonArthurTaylor Obviously, if it looks ahead, it's using whatever's in that future position instead. And yes, there are other factors involved (for example, if advancing a pawn puts it closer to the enemy king and farther from yours, the evaluation could decrease.)
Answers.UserDisplayName: D M
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2018-08-27T06:33:29.167Z
Answers.LastActivityDate: 2018-08-27T06:33:29.167Z
Answers.UserDisplayName: lenik
Body: <p>These days many online chess websites offer a board evaluation rating, often a bar, sometimes a number, sometimes both, as is the case here (see two red circles):
  <a href="https://i.sstatic.net/6HQWT.jpg" rel="nofollow noreferrer"><img src="https://i.sstatic.net/6HQWT.jpg" alt="enter image description here"></a>
  Black will take a pawn soon, so the evaluation is -0.9 pawns to white.  Note that there are two components to the score.  First, there's a raw score due to some sort of piece scoring system.  Second, there's a positional evaluation scoring element that considers future moves and future pieces that might be taken.  Seems clear, right? </p>
  
  <p>Not exactly.  Consider, near the end of the game, a pawn can get converted into a queen.  Using the most popular piece-ranking systems, a pawn=1 can switch to a queen=~9 via this process.  Therefore, if a player is a pawn ahead, and players play well, eventually, on average, one can expect that this might get promoted to a queen.  Perhaps if you averaged it would be 3 (wild guess) considering that most other pieces can't get promoted.  Anyway, one can see that the second term in the ranking scoring system has a look-ahead variability in that lopsidedness will increase in positive feedback fashion such that a 1 is much higher the further an engine looks ahead.  This positive feedback would exist even without promotions.</p>
  
  <p>My question is just how many moves these engine look ahead in ranking static boards.</p>
  
Tags: <stockfish><evaluation>
Title: How many moves out do the static board evaluations use?
ThreadText: # How many moves out do the static board evaluations use?
  
  (Asked by: username_0 on 2018-08-27)
  
  These days many online chess websites offer a board evaluation rating, often a bar, sometimes a number, sometimes both, as is the case here (see two red circles):
  [![enter image description here](https://i.sstatic.net/6HQWT.jpg)](https://i.sstatic.net/6HQWT.jpg)
  Black will take a pawn soon, so the evaluation is -0.9 pawns to white. Note that there are two components to the score. First, there's a raw score due to some sort of piece scoring system. Second, there's a positional evaluation scoring element that considers future moves and future pieces that might be taken. Seems clear, right?
  
  Not exactly. Consider, near the end of the game, a pawn can get converted into a queen. Using the most popular piece-ranking systems, a pawn=1 can switch to a queen=~9 via this process. Therefore, if a player is a pawn ahead, and players play well, eventually, on average, one can expect that this might get promoted to a queen. Perhaps if you averaged it would be 3 (wild guess) considering that most other pieces can't get promoted. Anyway, one can see that the second term in the ranking scoring system has a look-ahead variability in that lopsidedness will increase in positive feedback fashion such that a 1 is much higher the further an engine looks ahead. This positive feedback would exist even without promotions.
  
  My question is just how many moves these engine look ahead in ranking static boards.
  
  **Tags:** stockfish, evaluation
  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_1 on 2018-08-27. Score: 0 | Accepted answer
  
  It varies, but in this case it looks to be about 10 full moves.
  
  In your screenshot, to the right of the circled -0.9, you can see some small text that says "Depth: 20". This is the number of half moves that the engine is supposedly looking.
  
  In practice, this number is not exact. The engine will not examine every variation to that depth (for example, it's not likely to seriously examine Bh3 in your position), and if a variation has tactical things going on at the end, it might extend how far it looks at that variation beyond that number.
  
  > lopsidedness will increase in positive feedback fashion such that a 1 is much higher the further an engine looks ahead.
  
  Sometimes, but it's not always correct that a +1 will increase if you look farther ahead. It may decrease. There are many endgames which are theoretical draws despite one side being one, or even two, pawns ahead. Consider this position, from a game where I briefly thought I was going to get my first-ever win against a master:
  
  ```
  [White "Me"]
  [Black "Opponent"]
  [FEN "7k/r6P/4K3/5P1R/8/8/8/8 w - - 17 82"]
  
  ```
  
  Stockfish (without a tablebase) evaluated this as +2.31 because of the two advanced pawns, but it's a draw - playing f6 results in Ra6+ Kf7 Rxf6+ Kxf6 stalemate, and there's no other good way to progress. (Oh well, drawing against a master isn't bad either.)
  
  
  ---
  
  ### Answer by username_2 on 2018-08-27. Score: 4
  
  > Note that there are two components to the score. First, there's a raw
  > score due to some sort of piece scoring system. Second, there's a
  > positional evaluation scoring element that considers future moves and
  > future pieces that might be taken.
  
  This is wrong. The "piece scoring system" is *part* of the positional evaluation that is considered at the end of possible lines. It doesn't matter what the pieces are now, it matters what they will be in the future. Therefore the -0.9 is equal to the score after the best move black can currently do, 2...dxe4. It's also equal to the score after the best move white can answer to that, moves other than 3.d3 apparently scored worse. This is called the "minimax algorithm".
  
  At the time static evaluation is done, it looks only at that exact position and doesn't look ahead more moves. The looking ahead part is done by then.
  
  Pawns get different scores depending on where they are. I *think* that most engines compute some score that says how "endgameish" a given position is, and if it's more endgameish then a pawn gets a bigger bonus for being far advanced, but that's actually guesswork on my part.
  
  > **Comments:**
  > **username_1**: Interestingly, the Stockfish evaluation gives a slightly bigger bonus for passed pawn rank in the endgame - unless it's on the 7th rank, in which case it gets a slightly bigger bonus in the middlegame.  
  > **username_0**: +4!? First you are saying that it only looks 1 move ahead. That's redic.  See e.g. https://lichess.org/EJjJxA1J/black#30 . Hit give s or solve.  Then you can see the engine. The instant the white bishop moves to the upper left the score changes, even though the best move for black is to sac black knight by a white pawn.  The ranking would not change so soon if you were right.  Per other ans. it is looking ahead 10 moves.  That's why.  About me being wrong, it is mathematically the same if you evaluate now + changes to eval on line x vs. end position at line x.  (-0.9=~0-1+.1  vs -0.9=-0.9.)  
  > **username_2**: @username_0: I'm not saying that at all. I'm saying that _first_ it does minimax search, and then at the end of each possible line it does static evaluation of that position. It may be mathematically the same, but it's simply not how engines work. It's faster to only evaluate at the end of the line.  
  > **username_0**: There are two issues here.  Sorry if I failed to understand you about your answer to the look ahead.  Please help me and other readers.  How many moves do you think stockfish was looking ahead in evaluating the position, if any?  
  > **username_1**: @username_0 I think there's some confusion because you used the term "static". By definition, a "static" evaluation is only looking at the current board, not ahead. (I ignored that in my answer because your screenshot was obviously not showing a "static" evaluation.) You can see a truly static evaluation at https://hxim.github.io/Stockfish-Evaluation-Guide/ .  
  > **username_1**: @username_2 It has to evaluate before (or at least during) the minimax, doesn't it? Otherwise it won't know which is the mini and which is the max!  
  > **username_2**: @DM: yes, but only at the end of each line, statically. Only based on that particular board at that moment.  
  > **username_1**: @username_2 OK, I think I misunderstood what you were saying. It's evaluating lots of positions (so it can prune and minimax and stuff), but its final evaluation score (the one it shows you) is only based on the position at the end of the minimaxed line.  
  > **username_2**: @DM: Yes. Sorry for being hard to understand.  
  
  ---
  
  ### Answer by username_3 on 2018-08-27. Score: 0
  
  The answer is looking right at you. Below engine name ("Stockfish 9+") it says: Depth 20 -- that is current evaluation depth.
  
  [![enter image description here](https://i.sstatic.net/b9CtK.jpg)](https://i.sstatic.net/b9CtK.jpg)
  
  And whatever you wrote about the pawn promotion -- that's very nice thinking, but unless there's a clear promotion within the next 15-20 moves, the engine would not consider it, until it's clear that promotion can be really done, give the both sides play at their best.
  
  > **Comments:**
  > **username_0**: Re pawns: no not true.  The subroutine that does a board score eval considers pawn ranks, BUT if a deeper eval. is later done (and not pruned and not at depth limit), that deeper one will overrule the less accurate rank-based one.  Therefore, a pawn value that doesn't become queen might be greatest like on rank 3 4, depending on a lot of things.  I am not sure you will understand this but I hope you do. https://www.reddit.com/r/chess/comments/20qwe6/numerical_value_of_a_passed_pawn/cg6ehta/  
  > **username_1**: @username_0 Obviously, if it looks ahead, it's using whatever's in that future position instead. And yes, there are other factors involved (for example, if advancing a pawn puts it closer to the enemy king and farther from yours, the evaluation could decrease.)  
  
  ---
  
  