Answers.Body: <p>The maximum possible non-mate Stockfish eval is +153. It indicates a forced line leading to an endgame tablebase win. See Wikipedia article on game 65 of the <a href="https://en.wikipedia.org/wiki/TCEC_Season_14#Superfinal" rel="nofollow noreferrer">TCEC Season 14 superfinal</a>, and <a href="https://www.tcec-chess.com/archive.html?season=14&amp;div=sf&amp;game=65" rel="nofollow noreferrer">the game itself</a>.</p>
  
  <p>I don't understand Stockfish's code very well, but if you can read C++ you can try deciphering Stockfish's <a href="https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp" rel="nofollow noreferrer">search algorithm</a> yourself.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T04:28:03.857Z
Answers.Text: Uhh. Why isn't up two queens with too many pieces into the tablebase evaluated at +180?
Answers.UserDisplayName: Joshua
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T05:08:37.250Z
Answers.Text: Wow that's interesting, I haven't seen a game with evaluations that high before.
Answers.UserDisplayName: BLUC
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T05:26:32.157Z
Answers.Text: @Joshua each queen is worth about 9 pawns - being up two queens is, from a purely material point of view, only +18. (Note if you're working in the units the OP is using, the number quoted in this answer shouldn't be read as +153, but rather +15300.)
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T08:51:41.860Z
Answers.Text: @Joshua A tablebase evaluation doesn't take any material or positional evaluation into account.  The latter are only approximations to the likelihood of winning; the tablebase is absolute truth with perfect play.
Answers.UserDisplayName: Chromatix
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-21T00:49:30.830Z
Answers.LastActivityDate: 2020-01-21T00:49:30.830Z
Answers.UserDisplayName: Allure
Answers.Body: <p>Arbitrarily High.</p>
  
  <p>No bound except some position which is unknown.</p>
  
  <p>Yes depth affects the maximum bound some.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T01:46:36.997Z
Answers.LastActivityDate: 2020-01-20T01:46:36.997Z
Answers.UserDisplayName: edwina oliver
Answers.Body: <p>The best way to normalise a centipawn score to [-1,+1] range is using a sigmoid function, as that closely approximates the likelihood of a given centipawn advantage converting to a win, and avoids the need to identify a strict maximum or minimum.  This is discussed <a href="https://www.chessprogramming.org/Pawn_Advantage,_Win_Percentage,_and_Elo" rel="noreferrer">here</a>.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T11:06:52.627Z
Answers.Text: Fascinating. I believe this solves my problem.
Answers.UserDisplayName: BLUC
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-02-16T09:47:40.630Z
Answers.Text: And solves a question'o'mine before I even could post it :-) +1
Answers.UserDisplayName: Hauke Reddmann
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2020-01-20T10:52:04.850Z
Answers.LastActivityDate: 2020-01-20T10:52:04.850Z
Answers.UserDisplayName: Chromatix
Body: <p>With the exception of checkmate and mate-in-x positions, what is the highest centipawn score that a chess position might obtain upon Stockfish evaluation?</p>
  
  <p>This is a practical question because there are situations where one would want to normalize position scores to [-1, 1]. As a starting point I wrote a small script that evaluates the positions (depth=10) found in 100 PGNs and found the highest score to be 3396. Is there an upper bound (or lower bound for negative scores)? Does the evaluation depth effect the bound?</p>
  
  <p>EDIT: I've selected the answer provided by Chromatix because it solves the problem that motivated my question. For those who are curious about the actual bounds, it's worth noting that looking at approx. 400k positions from grandmaster games I found that the highest and lowest centipawn scores were 7881 and -7658, again, using Stockfish (depth=10).</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-20T03:47:18.960Z
Comments.Text: What position did you get 3396 eval in? I'm surprised it's that high, because when watching Stockfish play at TCEC, its eval caps at about +148.
Comments.UserDisplayName: Allure
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-20T05:32:52.893Z
Comments.Text: I think it's only a few positions before the forced mate is detected that the score gets ramped up. I modified the script to analyze one pgn at a time and print out the pgn along with the highest score, you can get it at https://pastebin.com/F0KsVtYc. Here is an example of one of the outputs of the script- https://pastebin.com/VMKvU04x. I copied the pgn into the chess.com analyzer and found that towards the end of the game on the last ply before forced checkmate is detected the score on chess.com jumps to 62.5 (congruent with stockfish), before which the score remains < 15.
Comments.UserDisplayName: BLUC
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-20T05:37:03.877Z
Comments.Text: Note that to get the script to work you will need to modify the values of path variables (pgn_path and engine_path) within the script. In my case, pgn points to a copy of the all.pgn found at https://chess-research-project.readthedocs.io/en/latest/ and the engine path points to a copy of stockfish though I believe it should work with any UCI/XBoard compatible engine.
Comments.UserDisplayName: BLUC
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-21T00:01:19.090Z
Comments.Text: @Allure The eval caps at 1.48 pawns?
Comments.UserDisplayName: Acccumulation
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-21T00:04:16.240Z
Comments.Text: @Acccumulation no, +148 is 148 pawns.
Comments.UserDisplayName: Allure
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-21T00:10:15.303Z
Comments.Text: @Allure "Stockish: What is the maximum (minimum)**centipawn** score that a position might be evaluated at?" Wouldn't 148 centipawns be 1.48 pawns?
Comments.UserDisplayName: Acccumulation
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-01-21T08:25:49.143Z
Comments.Text: No definite answer there. There's no clear definition of what a "centipawn" is. For example, if you take the starting position and remove Black's queen and Rooks, different algorythms could evaluate that position as +20, +50 or +1,000,000, all of them being correct
Comments.UserDisplayName: David
Tags: <stockfish><evaluation>
Title: Stockfish: What is the maximum (minimum) centipawn score that a position might be evaluated at?
ThreadText: # Stockfish: What is the maximum (minimum) centipawn score that a position might be evaluated at?
  
  (Asked by: username_0 on 2020-01-20)
  
  With the exception of checkmate and mate-in-x positions, what is the highest centipawn score that a chess position might obtain upon Stockfish evaluation?
  
  This is a practical question because there are situations where one would want to normalize position scores to [-1, 1]. As a starting point I wrote a small script that evaluates the positions (depth=10) found in 100 PGNs and found the highest score to be 3396. Is there an upper bound (or lower bound for negative scores)? Does the evaluation depth effect the bound?
  
  EDIT: I've selected the answer provided by username_5 because it solves the problem that motivated my question. For those who are curious about the actual bounds, it's worth noting that looking at approx. 400k positions from grandmaster games I found that the highest and lowest centipawn scores were 7881 and -7658, again, using Stockfish (depth=10).
  
  **Tags:** stockfish, evaluation
  
  > **Comments:**
  > **username_1**: What position did you get 3396 eval in? I'm surprised it's that high, because when watching Stockfish play at TCEC, its eval caps at about +148.  
  > **username_0**: I think it's only a few positions before the forced mate is detected that the score gets ramped up. I modified the script to analyze one pgn at a time and print out the pgn along with the highest score, you can get it at https://pastebin.com/F0KsVtYc. Here is an example of one of the outputs of the script- https://pastebin.com/VMKvU04x. I copied the pgn into the chess.com analyzer and found that towards the end of the game on the last ply before forced checkmate is detected the score on chess.com jumps to 62.5 (congruent with stockfish), before which the score remains < 15.  
  > **username_0**: Note that to get the script to work you will need to modify the values of path variables (pgn_path and engine_path) within the script. In my case, pgn points to a copy of the all.pgn found at https://chess-research-project.readthedocs.io/en/latest/ and the engine path points to a copy of stockfish though I believe it should work with any UCI/XBoard compatible engine.  
  > **username_2**: @username_1 The eval caps at 1.48 pawns?  
  > **username_1**: @username_2 no, +148 is 148 pawns.  
  > **username_2**: @username_1 "Stockish: What is the maximum (minimum)**centipawn** score that a position might be evaluated at?" Wouldn't 148 centipawns be 1.48 pawns?  
  > **username_3**: No definite answer there. There's no clear definition of what a "centipawn" is. For example, if you take the starting position and remove Black's queen and Rooks, different algorythms could evaluate that position as +20, +50 or +1,000,000, all of them being correct  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_5 on 2020-01-20. Score: 17 | Accepted answer
  
  The best way to normalise a centipawn score to [-1,+1] range is using a sigmoid function, as that closely approximates the likelihood of a given centipawn advantage converting to a win, and avoids the need to identify a strict maximum or minimum. This is discussed [here](https://www.chessprogramming.org/Pawn_Advantage,_Win_Percentage,_and_Elo).
  
  > **Comments:**
  > **username_0**: Fascinating. I believe this solves my problem.  
  > **username_7**: And solves a question'o'mine before I even could post it :-) +1  
  
  ---
  
  ### Answer by username_1 on 2020-01-21. Score: 4
  
  The maximum possible non-mate Stockfish eval is +153. It indicates a forced line leading to an endgame tablebase win. See Wikipedia article on game 65 of the [TCEC Season 14 superfinal](https://en.wikipedia.org/wiki/TCEC_Season_14#Superfinal), and [the game itself](https://www.tcec-chess.com/archive.html?season=14&div=sf&game=65).
  
  I don't understand Stockfish's code very well, but if you can read C++ you can try deciphering Stockfish's [search algorithm](https://github.com/official-stockfish/Stockfish/blob/master/src/search.cpp) yourself.
  
  > **Comments:**
  > **username_4**: Uhh. Why isn't up two queens with too many pieces into the tablebase evaluated at +180?  
  > **username_0**: Wow that's interesting, I haven't seen a game with evaluations that high before.  
  > **username_1**: @username_4 each queen is worth about 9 pawns - being up two queens is, from a purely material point of view, only +18. (Note if you're working in the units the OP is using, the number quoted in this answer shouldn't be read as +153, but rather +15300.)  
  > **username_5**: @username_4 A tablebase evaluation doesn't take any material or positional evaluation into account.  The latter are only approximations to the likelihood of winning; the tablebase is absolute truth with perfect play.  
  
  ---
  
  ### Answer by username_6 on 2020-01-20. Score: 3
  
  Arbitrarily High.
  
  No bound except some position which is unknown.
  
  Yes depth affects the maximum bound some.
  
  
  ---
  
  