Skip to content

Commit

Permalink
Change centipawn fallback to account for sharper WDL with high WDLCal…
Browse files Browse the repository at this point in the history
…ibrationElo (#2075)

* half eval fallback formula 

With WDL sharpening at 3600 Elo (most commonly used value e.g. in TCEC both for playing and for kibitzing), the old centipawn calibration is off by about a factor 2 compared to Stockfish and generally takes over too quickly around +2.00 while it should only take over around +4.00 since up to there, `WDL_mu` behaves well enough.

With lower calibration Elo (e.g. for analysis of human games / openings), the takeover point is significantly later due to lower Q from broader WDL, so this change doesn't affect anything.

Doesn't yet fix the jumpy eval behavior in draws with very low W or L but substantial L resp. W remaining.

* changed factor to +128 convention

initial oversight: in a +1 position we want to display +128, that shouldn't change
  • Loading branch information
Naphthalin authored and borg323 committed Oct 20, 2024
1 parent 964cdec commit 9f6dd16
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/mcts/search.cc
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,7 @@ void Search::SendUciInfo() REQUIRES(nodes_mutex_) REQUIRES(counters_mutex_) {
// Reports the WDL mu value whenever it is reasonable, and defaults to
// centipawn otherwise.
const float centipawn_fallback_threshold = 0.996f;
float centipawn_score = 90 * tan(1.5637541897 * wl);
float centipawn_score = 45 * tan(1.56728071628 * wl);
uci_info.score =
network_->GetCapabilities().has_wdl() && mu_uci != 0.0f &&
std::abs(wl) + d < centipawn_fallback_threshold &&
Expand Down

0 comments on commit 9f6dd16

Please sign in to comment.