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 @SecretAgentMan's answer alludes to. I've been working on interpreting the Lichess source code lately, and you can actually see for yourself here and here 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
):
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)
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, which was determined experimentally by analyzing user games: 2 / (1 + exp(-0.00368208 * cp.value)) - 1
(ex. ~-0.3684
-> ~+0.0735
, turn=black
)
Cap both winning_chances
to be within in the range [-1, 1]
(already done)
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
)
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 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 in their code.