Answers.Body: <p><strong>Basic Interpretation:</strong><br />
  As mentioned in <a href="https://chess.stackexchange.com/a/40239/26335">this answer</a>, the evaluation +0.5 (+50 centipawns) means a half-pawn advantage for White while a –2 evaluation (-200 centipawns) implies a 2 pawn advantage for Black.</p>
  <p><strong>Relationship to Win Probability:</strong><br />
  There is also a natural link to the probability of the game's outcome. Instead of the centipawn-based evaluation that Stockfish uses, some neural network-based engines such as AlphaZero or LeelaZero estimate the probability of a win from the position. The figure below illustrates this.<sup>(1)</sup></p>
  <p>The exact nature of the mathematical relationship may vary slightly.
  Given the probability of a win, <code>feval</code>, the centipawn evaluation has been given by <code>cp = 290.680623072 * math.tan(3.096181612 * (feval - 0.5))</code> but was updated to be <code>cp = 111.714640912 * tan(1.5620688421 * feval)</code>.<sup>(2–3)</sup></p>
  <p><strong>Various Models:</strong>
  In addition to inverting the functions above, there are additional models for converting a centipawn evaluation to the probability of a win.<sup>(1,5)</sup></p>
  <p><code>winning chances = 50 + 50 * (2 / (1 + exp(-0.004 * centipawns)) - 1)</code></p>
  <p>The figure below illustrates the model: <code>W = (1 + 10^(P/K))^(-1)</code> where W is the probability of a win, P is the pawn advantage evaluation, and K is an unknown constant (set to 4).<sup>(1)</sup></p>
  <p><a href="https://i.sstatic.net/dXxhV.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/dXxhV.png" alt="Relationship between pawn evaluation and the win probability." /></a></p>
  <p>Thus, a higher evaluation implies a higher probability of White winning and a lower evaluation (negative) implies a higher probability of Black winning.</p>
  <p><strong>100 centipawns ≠ 1 pawn.</strong> As pointed out in the <a href="https://chess.stackexchange.com/questions/40238/how-does-centipawn-scoring-work-why-is-a-higher-positive-score-horrible-while/40240#comment65216_40240">comments</a> by @<a href="https://chess.stackexchange.com/users/15223/allure">Allure</a>, 100 centipawns is no longer truly indicating a 1 pawn advantage. Stockfish's recent documentation (see <a href="https://github.com/official-stockfish/Stockfish/commit/ad2aa8c06f438de8b8bb7b7c8726430e3f2a5685" rel="nofollow noreferrer">Normalize evaluation</a>) explains that with the rise of the NNUE framework Stockfish now uses &quot;'100 centipawns' for a position if the engine has a 50% probability to win&quot; under specific conditions for the engine.</p>
  <p><sub>References</sub><br />
  <sub> 1. <a href="https://www.chessprogramming.org/Pawn_Advantage,_Win_Percentage,_and_Elo" rel="nofollow noreferrer">https://www.chessprogramming.org/Pawn_Advantage,_Win_Percentage,_and_Elo</a> </sub><br />
  <sub>2. <a href="http://chessforallages.blogspot.com/2019/08/winning-percentage-to-centipawns.html" rel="nofollow noreferrer">http://chessforallages.blogspot.com/2019/08/winning-percentage-to-centipawns.html</a></sub><br />
  <sub>3. <a href="https://github.com/LeelaChessZero/lc0/pull/841" rel="nofollow noreferrer">https://github.com/LeelaChessZero/lc0/pull/841</a></sub><br />
  <sub>4. <a href="https://zwischenzug.substack.com/p/centipawns-suck" rel="nofollow noreferrer">https://zwischenzug.substack.com/p/centipawns-suck</a></sub><br />
  <sub>5. <a href="https://lichess.org/forum/general-chess-discussion/what-does-that-evaluation-mean-" rel="nofollow noreferrer">https://lichess.org/forum/general-chess-discussion/what-does-that-evaluation-mean-</a></sub><br />
  <sub>6.<a href="https://github.com/official-stockfish/Stockfish/commit/ad2aa8c06f438de8b8bb7b7c8726430e3f2a5685" rel="nofollow noreferrer">Normalize evaluation</a>, Stockfish commit, 5 Nov 2022.</sub></p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T20:28:24.783Z
Answers.Text: Thank you! It's not an answer to the question (but you already linked to the answer), but it is indeed very useful information for a beginner like me!
Answers.UserDisplayName: Opifex
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T20:46:21.717Z
Answers.Text: @Opifex Part of your question title is "Why is a higher (positive) score horrible while a lower score is better?"  I wasn't fast enough to be first, but my answer absolutely addresses the question.  I make no claims on what should be the accepted answer.  Chesskobra's answer was the fastest gun in the west and deserves recognition as a very good answer.
Answers.UserDisplayName: SecretAgentMan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-24T17:47:19.567Z
Answers.Text: Thank you. But that fit is terrible! The curve is entirely on one side of the data for most of the interesting data points. I’d be very interested in a follow-up thread finding a decent model for this. But this is not the place.
Answers.UserDisplayName: Adam Chalcraft
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-24T21:15:04.550Z
Answers.Text: @SecretAgentMan please don't feel offended, my message wasn't meant in a bad way! It was meant as a compliment! You could indeed argue that it answers the question in the title, but not so much the confusion in the body. But your answer was very useful in any case!
Answers.UserDisplayName: Opifex
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-24T21:51:27.023Z
Answers.Text: Not trying to be competitive for the karma points or anything. But I feel that the probability in your answer would mislead a reader. It is the probability that is obtained by alphazero/lc0 in its simulation model. More interesting would be an analysis of master level PGN files - you analyze them with stockfish and also estimate winning probabilities based on the game scores. This is still not straightforward and would be a separate discussion topic.
Answers.UserDisplayName: chesskobra
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-24T22:00:09.933Z
Answers.Text: I will restate my original position:  chesskobra deserves the answer and the OP is free to do what they wish anyway.  I have no need for fake internet points.  I hope that's clear.  If I need to delete my answer to prove it, that's ok too.
Answers.UserDisplayName: SecretAgentMan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-22T17:03:30.143Z
Answers.Text: @Allure Thank you for the correction.  I've updated my answer to reflect your comment.
Answers.UserDisplayName: SecretAgentMan
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2023-01-23T00:23:03.977Z
Answers.Text: @SecretAgentMan my correction turned out to be incorrect, but thanks for the update which is correct =)
Answers.UserDisplayName: Allure
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T19:41:12.003Z
Answers.LastActivityDate: 2023-01-24T15:33:30.247Z
Answers.LastEditDate: 2023-01-24T15:33:30.247Z
Answers.UserDisplayName: SecretAgentMan
Answers.Body: <p>I can go deeper on this part:</p>
  <blockquote>
  <p>I wonder why a score of +4.82 is a blunder while a score of +0.62 is &quot;decent&quot;</p>
  </blockquote>
  <p>As others have mentioned, CP scores being positive or negative reflect the computer eval being in favor of white or black respectively, with ex. +3 being an advantage the equivalent of 3 pawns for white.</p>
  <p>However, you may come to notice that the &quot;judgement&quot; on the move (<code>inaccuracy</code>, <code>mistake</code>, or <code>blunder</code> are the standard ones, with other chess programs defining others, like <code>decent</code>) is not always the same even if the difference in CP values—the CP loss or CPL—is the same. For example, if your move as white takes the CP score from <code>0</code> to <code>-200</code>, the move may be called a blunder, but if it takes you from <code>-600</code> to <code>-800</code>, the move may be called an inaccuracy.</p>
  <p>The reason for this is because judgements are made based on win probability, as <a href="https://chess.stackexchange.com/a/40240/19286">@SecretAgentMan</a>'s answer alludes to. I've been working on interpreting the Lichess source code lately, and you can actually see for yourself <a href="https://github.com/lichess-org/lila/blob/master/modules/analyse/src/main/Advice.scala#L60-L79" rel="nofollow noreferrer">here</a> and <a href="https://github.com/lichess-org/lila/blob/02242e97bf5cb7f5e60ef942f437a30cd55b80c0/modules/analyse/src/main/WinPercent.scala#L23-L26" rel="nofollow noreferrer">here</a> the source code that &quot;judges&quot; a move. Your question was not specific to Lichess, but LucasR likely does something quite similar internally. The Lichess algorithm goes like this:</p>
  <p>Given a <code>score_before</code>, <code>score_after</code>, and <code>turn</code> (ex. <code>-2.1</code> -&gt; <code>+0.4</code>, <code>turn=black</code>):</p>
  <ol>
  <li><p>Convert <code>score</code>s to <code>cp</code>s:</p>
  <p>a. If either <code>score</code> is a mate score (ex. <code>#-5</code>, black mates in 5), set its <code>cp</code> to <code>+100</code> if it's mate for white, or <code>-100</code> if it's mate for black (not applicable)</p>
  <p>b. Multiply <code>scores</code> by 100 to get <code>cp</code> values (ex. <code>-210</code> -&gt; <code>+40</code>, <code>turn=black</code>)</p>
  <p>c. Cap both <code>cp</code>s to be within the range <code>[-1000, 1000]</code> (already done)</p>
  </li>
  <li><p>Calculate <code>winning_chances_before</code> and <code>winning_chances_after</code> from <code>cp_before</code> and <code>cp_after</code> using the following formula. As of a few weeks ago, <a href="https://github.com/lichess-org/lila/blob/master/modules/analyse/src/main/WinPercent.scala" rel="nofollow noreferrer">Lichess updated to use this formula</a>, which was <a href="https://github.com/lichess-org/lila/pull/11148#issue-1296670154" rel="nofollow noreferrer">determined experimentally</a> by analyzing user games: <code>2 / (1 + exp(-0.00368208 * cp.value)) - 1</code> (ex. ~<code>-0.3684</code> -&gt; ~<code>+0.0735</code>, <code>turn=black</code>)</p>
  </li>
  <li><p>Cap both <code>winning_chances</code> to be within in the range <code>[-1, 1]</code> (already done)</p>
  </li>
  <li><p>Calculate <code>delta</code>, the loss in <code>winning_chances</code> (<code>wc</code>) with respect to <code>turn</code>. If <code>turn=white</code>, it's <code>delta = wc_before - wc_after</code>; or for <code>black</code>, <code>delta = wc_after - wc_before</code> (ex. ~<code>0.4419</code>)</p>
  </li>
  <li><p>Judge the move. If <code>delta &gt;= 0.3</code>, the move is a <code>blunder</code>; if <code>delta &gt;= 0.2</code>, it's a <code>mistake</code>; if <code>delta &gt;= 0.1</code>, it's an <code>inaccuracy</code>, else the move gets no judgement. (Ex. <code>0.4419 &gt;= 0.3</code>, so this move was a <code>blunder</code>).</p>
  </li>
  </ol>
  <p>Hope this is insightful even though it might not address the main question you were asking.</p>
  <hr />
  <p><strong>Further reading:</strong> Here's a <a href="https://1drv.ms/x/s!All0bnL0aYR_hN8aOYuAkjpkk1_y7g" rel="nofollow noreferrer">OneDrive link</a> to a spreadsheet where I manually calculate average CPL, a metric shown by Lichess after analyzing a game. It was part of some personal investigation into a <a href="https://github.com/lichess-org/lila/issues/11207" rel="nofollow noreferrer">weird bug</a> in their code.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-26T01:31:53.320Z
Answers.LastActivityDate: 2022-07-26T01:31:53.320Z
Answers.UserDisplayName: Jackson H
Answers.Body: <p>The score is from white's perspective. So 4.82 is much better for white than 0.62. Also notice that on the next move, white does not play Qa4, and loses the advantage, and the score becomes negative from white's perspective, i.e., the position is now better for black.</p>
  <p>Also, note that in the above example the score is not 4.82 centipawns (100 centipawns = 1 pawn), but 4.82 pawns, which seems reasonable since if white played Qa4, you would lose the knight, so straight 3 points (approximately 3 pawns) loss.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T20:26:41.390Z
Answers.Text: Thanks a lot! That makes sense indeed. 
  Is that a standard thing? Or just something odd in this chess-program? 
  Because to me, as a beginner, it's very confusing. Especially when it gives hints where the suggested move appears worse than my move.
Answers.UserDisplayName: Opifex
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T20:27:07.007Z
Answers.Text: Will accept answer in 24h as per SE etiquette.
Answers.UserDisplayName: Opifex
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T21:31:51.043Z
Answers.Text: It is pretty much standard nowadays, although different programs may give different numbers, and sometimes the same program may give different numbers. For example, notice that in the 4th row, when you play Nb4, the engine shows +4.82, while after white plays b3, the engine analysis is saying Qa4+ would have been +4.79 because the engine has seen a little more even though it is essentially the same principal variation. You should take the actual numbers with a grain of salt, but still +1 vs +4 vs +15 would be significant.
Answers.UserDisplayName: chesskobra
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2022-07-23T19:21:21.513Z
Answers.LastActivityDate: 2022-07-23T19:26:53.690Z
Answers.LastEditDate: 2022-07-23T19:26:53.690Z
Answers.UserDisplayName: chesskobra
Body: <p>I'm a total beginner in Chess. I've known the basic rules for at least 20 years, but have never played it somewhat serious. Only toddler-level.</p>
  <p>I recently started trying to learn how to play properly. I've been using LucasR to train myself. But I don't always how the scoring system works. Sometimes it says that a higher (positive) score is a blunder, while a lower (positive) score is a good move?</p>
  <p>Take this row in the post game analysis for example:
  <a href="https://i.sstatic.net/Tox6b.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/Tox6b.png" alt="post-game analysis" /></a></p>
  <p>(I accidentally cut off the headers, but the 2nd column is my move, the third is the &quot;best move&quot; according to the engine)</p>
  <p>So, according to the engine I made a blunder in the 4th move. I'm not asking why it is a blunder or not. But I wonder why a score of +4.82 is a blunder while a score of +0.62 is &quot;decent&quot;? I thought that this score (the centipawns) are a measure of how well your strategic position in the game is? Shouldn't a higher value be better then?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-23T19:19:40.240Z
Comments.Text: It looks like the score is from the White perspective. Higher value is better for White.
Comments.UserDisplayName: user58697
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2022-07-25T23:50:21.610Z
Comments.Text: General info on centipawns https://www.chessprogramming.org/Centipawns Note that humans do not think in terms of "this position is 1.20 pawns up"
Comments.UserDisplayName: qwr
Tags: <engines><beginner><terminology>
Title: How does centipawn scoring work?/Why is a higher (positive) score horrible while a lower score is better?
ThreadText: # How does centipawn scoring work?/Why is a higher (positive) score horrible while a lower score is better?
  
  (Asked by: username_0 on 2022-07-23)
  
  I'm a total beginner in Chess. I've known the basic rules for at least 20 years, but have never played it somewhat serious. Only toddler-level.
  
  I recently started trying to learn how to play properly. I've been using LucasR to train myself. But I don't always how the scoring system works. Sometimes it says that a higher (positive) score is a blunder, while a lower (positive) score is a good move?
  
  Take this row in the post game analysis for example:
  [![post-game analysis](https://i.sstatic.net/Tox6b.png)](https://i.sstatic.net/Tox6b.png)
  
  (I accidentally cut off the headers, but the 2nd column is my move, the third is the "best move" according to the engine)
  
  So, according to the engine I made a blunder in the 4th move. I'm not asking why it is a blunder or not. But I wonder why a score of +4.82 is a blunder while a score of +0.62 is "decent"? I thought that this score (the centipawns) are a measure of how well your strategic position in the game is? Shouldn't a higher value be better then?
  
  **Tags:** engines, beginner, terminology
  
  > **Comments:**
  > **username_1**: It looks like the score is from the White perspective. Higher value is better for White.  
  > **username_2**: General info on centipawns https://www.chessprogramming.org/Centipawns Note that humans do not think in terms of "this position is 1.20 pawns up"  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_5 on 2022-07-23. Score: 7 | Accepted answer
  
  The score is from white's perspective. So 4.82 is much better for white than 0.62. Also notice that on the next move, white does not play Qa4, and loses the advantage, and the score becomes negative from white's perspective, i.e., the position is now better for black.
  
  Also, note that in the above example the score is not 4.82 centipawns (100 centipawns = 1 pawn), but 4.82 pawns, which seems reasonable since if white played Qa4, you would lose the knight, so straight 3 points (approximately 3 pawns) loss.
  
  > **Comments:**
  > **username_0**: Thanks a lot! That makes sense indeed.  Is that a standard thing? Or just something odd in this chess-program?  Because to me, as a beginner, it's very confusing. Especially when it gives hints where the suggested move appears worse than my move.  
  > **username_0**: Will accept answer in 24h as per SE etiquette.  
  > **username_5**: It is pretty much standard nowadays, although different programs may give different numbers, and sometimes the same program may give different numbers. For example, notice that in the 4th row, when you play Nb4, the engine shows +4.82, while after white plays b3, the engine analysis is saying Qa4+ would have been +4.79 because the engine has seen a little more even though it is essentially the same principal variation. You should take the actual numbers with a grain of salt, but still +1 vs +4 vs +15 would be significant.  
  
  ---
  
  ### Answer by username_3 on 2022-07-23. Score: 7
  
  **Basic Interpretation:**  
  As mentioned in [this answer](https://chess.stackexchange.com/a/40239/26335), the evaluation +0.5 (+50 centipawns) means a half-pawn advantage for White while a –2 evaluation (-200 centipawns) implies a 2 pawn advantage for Black.
  
  **Relationship to Win Probability:**  
  There is also a natural link to the probability of the game's outcome. Instead of the centipawn-based evaluation that Stockfish uses, some neural network-based engines such as AlphaZero or LeelaZero estimate the probability of a win from the position. The figure below illustrates this.(1)
  
  The exact nature of the mathematical relationship may vary slightly.
  Given the probability of a win, `feval`, the centipawn evaluation has been given by `cp = 290.680623072 * math.tan(3.096181612 * (feval - 0.5))` but was updated to be `cp = 111.714640912 * tan(1.5620688421 * feval)`.(2–3)
  
  **Various Models:**
  In addition to inverting the functions above, there are additional models for converting a centipawn evaluation to the probability of a win.(1,5)
  
  `winning chances = 50 + 50 * (2 / (1 + exp(-0.004 * centipawns)) - 1)`
  
  The figure below illustrates the model: `W = (1 + 10^(P/K))^(-1)` where W is the probability of a win, P is the pawn advantage evaluation, and K is an unknown constant (set to 4).(1)
  
  [![Relationship between pawn evaluation and the win probability.](https://i.sstatic.net/dXxhV.png)](https://i.sstatic.net/dXxhV.png)
  
  Thus, a higher evaluation implies a higher probability of White winning and a lower evaluation (negative) implies a higher probability of Black winning.
  
  **100 centipawns ≠ 1 pawn.** As pointed out in the [comments](https://chess.stackexchange.com/questions/40238/how-does-centipawn-scoring-work-why-is-a-higher-positive-score-horrible-while/40240#comment65216_40240) by @[username_6](https://chess.stackexchange.com/users/15223/username_6), 100 centipawns is no longer truly indicating a 1 pawn advantage. Stockfish's recent documentation (see [Normalize evaluation](https://github.com/official-stockfish/Stockfish/commit/ad2aa8c06f438de8b8bb7b7c8726430e3f2a5685)) explains that with the rise of the NNUE framework Stockfish now uses "'100 centipawns' for a position if the engine has a 50% probability to win" under specific conditions for the engine.
  
  References  
   1. <https://www.chessprogramming.org/Pawn_Advantage,_Win_Percentage,_and_Elo>   
  2. <http://chessforallages.blogspot.com/2019/08/winning-percentage-to-centipawns.html>  
  3. <https://github.com/LeelaChessZero/lc0/pull/841>  
  4. <https://zwischenzug.substack.com/p/centipawns-suck>  
  5. <https://lichess.org/forum/general-chess-discussion/what-does-that-evaluation-mean->  
  6.[Normalize evaluation](https://github.com/official-stockfish/Stockfish/commit/ad2aa8c06f438de8b8bb7b7c8726430e3f2a5685), Stockfish commit, 5 Nov 2022.
  
  > **Comments:**
  > **username_0**: Thank you! It's not an answer to the question (but you already linked to the answer), but it is indeed very useful information for a beginner like me!  
  > **username_3**: @username_0 Part of your question title is "Why is a higher (positive) score horrible while a lower score is better?"  I wasn't fast enough to be first, but my answer absolutely addresses the question.  I make no claims on what should be the accepted answer.  username_5's answer was the fastest gun in the west and deserves recognition as a very good answer.  
  > **username_4**: Thank you. But that fit is terrible! The curve is entirely on one side of the data for most of the interesting data points. I’d be very interested in a follow-up thread finding a decent model for this. But this is not the place.  
  > **username_0**: @username_3 please don't feel offended, my message wasn't meant in a bad way! It was meant as a compliment! You could indeed argue that it answers the question in the title, but not so much the confusion in the body. But your answer was very useful in any case!  
  > **username_5**: Not trying to be competitive for the karma points or anything. But I feel that the probability in your answer would mislead a reader. It is the probability that is obtained by alphazero/lc0 in its simulation model. More interesting would be an analysis of master level PGN files - you analyze them with stockfish and also estimate winning probabilities based on the game scores. This is still not straightforward and would be a separate discussion topic.  
  > **username_3**: I will restate my original position:  username_5 deserves the answer and the OP is free to do what they wish anyway.  I have no need for fake internet points.  I hope that's clear.  If I need to delete my answer to prove it, that's ok too.  
  > **username_3**: @username_6 Thank you for the correction.  I've updated my answer to reflect your comment.  
  > **username_6**: @username_3 my correction turned out to be incorrect, but thanks for the update which is correct =)  
  
  ---
  
  ### Answer by username_7 on 2022-07-26. Score: 1
  
  I can go deeper on this part:
  
  > I wonder why a score of +4.82 is a blunder while a score of +0.62 is "decent"
  
  As others have mentioned, CP scores being positive or negative reflect the computer eval being in favor of white or black respectively, with ex. +3 being an advantage the equivalent of 3 pawns for white.
  
  However, you may come to notice that the "judgement" on the move (`inaccuracy`, `mistake`, or `blunder` are the standard ones, with other chess programs defining others, like `decent`) is not always the same even if the difference in CP values—the CP loss or CPL—is the same. For example, if your move as white takes the CP score from `0` to `-200`, the move may be called a blunder, but if it takes you from `-600` to `-800`, the move may be called an inaccuracy.
  
  The reason for this is because judgements are made based on win probability, as [@username_3](https://chess.stackexchange.com/a/40240/19286)'s answer alludes to. I've been working on interpreting the Lichess source code lately, and you can actually see for yourself [here](https://github.com/lichess-org/lila/blob/master/modules/analyse/src/main/Advice.scala#L60-L79) and [here](https://github.com/lichess-org/lila/blob/02242e97bf5cb7f5e60ef942f437a30cd55b80c0/modules/analyse/src/main/WinPercent.scala#L23-L26) the source code that "judges" a move. Your question was not specific to Lichess, but LucasR likely does something quite similar internally. The Lichess algorithm goes like this:
  
  Given a `score_before`, `score_after`, and `turn` (ex. `-2.1` -> `+0.4`, `turn=black`):
  
  1. Convert `score`s to `cp`s:
  
     a. If either `score` is a mate score (ex. `#-5`, black mates in 5), set its `cp` to `+100` if it's mate for white, or `-100` if it's mate for black (not applicable)
  
     b. Multiply `scores` by 100 to get `cp` values (ex. `-210` -> `+40`, `turn=black`)
  
     c. Cap both `cp`s to be within the range `[-1000, 1000]` (already done)
  2. Calculate `winning_chances_before` and `winning_chances_after` from `cp_before` and `cp_after` using the following formula. As of a few weeks ago, [Lichess updated to use this formula](https://github.com/lichess-org/lila/blob/master/modules/analyse/src/main/WinPercent.scala), which was [determined experimentally](https://github.com/lichess-org/lila/pull/11148#issue-1296670154) by analyzing user games: `2 / (1 + exp(-0.00368208 * cp.value)) - 1` (ex. ~`-0.3684` -> ~`+0.0735`, `turn=black`)
  3. Cap both `winning_chances` to be within in the range `[-1, 1]` (already done)
  4. Calculate `delta`, the loss in `winning_chances` (`wc`) with respect to `turn`. If `turn=white`, it's `delta = wc_before - wc_after`; or for `black`, `delta = wc_after - wc_before` (ex. ~`0.4419`)
  5. Judge the move. If `delta >= 0.3`, the move is a `blunder`; if `delta >= 0.2`, it's a `mistake`; if `delta >= 0.1`, it's an `inaccuracy`, else the move gets no judgement. (Ex. `0.4419 >= 0.3`, so this move was a `blunder`).
  
  Hope this is insightful even though it might not address the main question you were asking.
  
  ---
  
  **Further reading:** Here's a [OneDrive link](https://1drv.ms/x/s!All0bnL0aYR_hN8aOYuAkjpkk1_y7g) to a spreadsheet where I manually calculate average CPL, a metric shown by Lichess after analyzing a game. It was part of some personal investigation into a [weird bug](https://github.com/lichess-org/lila/issues/11207) in their code.
  
  
  ---
  
  