Use normalized centipawn conversion formula#2398
Use normalized centipawn conversion formula#2398Menkib64 wants to merge 6 commits intoLeelaChessZero:masterfrom
Conversation
This centipawn conversion formula has been fitted trought 3 fixed points. 75% expected score is 1.00 centipawns. 100% expected score is 128.0 centipawns. 50% expected score is 0.0 centipawns. Default score type is changed to centipawn because WDL_mu doesn't match how search ranks moves.
There was a problem hiding this comment.
Pull request overview
Adjusts how the engine reports evaluation scores over UCI by retuning the “centipawn” conversion and switching the default score display type to standard centipawns.
Changes:
- Updated the
score-type=centipawnWL→centipawn conversion constants in both classic and dag_classic search output. - Changed the default
ScoreTypeoption fromWDL_mutocentipawn.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
src/search/dag_classic/search.cc |
Updates centipawn score conversion used in UCI info score output for dag_classic search. |
src/search/classic/search.cc |
Updates centipawn score conversion used in UCI info score output for classic search. |
src/search/classic/params.cc |
Changes the default ScoreType option value to centipawn. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
You can also share your feedback on Copilot code review. Take the survey.
| } else if (score_type == "centipawn_with_drawscore") { | ||
| uci_info.score = 90 * tan(1.5637541897 * q); | ||
| } else if (score_type == "centipawn") { | ||
| uci_info.score = 90 * tan(1.5637541897 * wl); | ||
| uci_info.score = 100.79055 * tan(1.56292199291664 * wl); | ||
| } else if (score_type == "centipawn_2019") { |
| } else if (score_type == "centipawn_with_drawscore") { | ||
| uci_info.score = 90 * tan(1.5637541897 * q); | ||
| } else if (score_type == "centipawn") { | ||
| uci_info.score = 90 * tan(1.5637541897 * wl); | ||
| uci_info.score = 100.79055 * tan(1.56292199291664 * wl); | ||
| } else if (score_type == "centipawn_2019") { |
| @@ -592,7 +592,7 @@ void BaseSearchParams::Populate(OptionsParser* options) { | |||
| "Q", | |||
| "W-L", | |||
| "WDL_mu"}; | |||
| options->Add<ChoiceOption>(kScoreTypeId, score_type) = "WDL_mu"; | |||
| options->Add<ChoiceOption>(kScoreTypeId, score_type) = "centipawn"; | |||
| uci_info.score = 90 * tan(1.5637541897 * q); | ||
| } else if (score_type == "centipawn") { | ||
| uci_info.score = 90 * tan(1.5637541897 * wl); | ||
| uci_info.score = 100.79055 * tan(1.56292199291664 * wl); |
There was a problem hiding this comment.
Usually when we update centipawn formula, we keep previous as centipawn_<year> (where year is when it was introduced)
|
I'm strongly against changing the default centipawn formula back to being Q based for several reasons:
Furthermore, search doesn't order moves by Q anyway, but by nodes -- which is of course closely correlated with Q, but so is the In total, reverting back to a Q based centipawn formula would put a significant burden in interpreting and translating Leela's eval, including suffering from old issues where different nets give vastly different evals at default settings because of having different inherent draw rates. I'm not generally against adding a new |
This centipawn conversion formula has been fitted trought 3 fixed points. 75% expected score is 1.00 centipawns. 100% expected score is 128.0 centipawns. 50% expected score is 0.0 centipawns.
Default score type is changed to centipawn because WDL_mu doesn't match how search ranks moves.