From 9f6dd167620ee401a79274e30e9b7007067aa2d5 Mon Sep 17 00:00:00 2001 From: Naphthalin <40385638+Naphthalin@users.noreply.github.com> Date: Fri, 18 Oct 2024 23:35:35 +0200 Subject: [PATCH] Change centipawn fallback to account for sharper WDL with high WDLCalibrationElo (#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 --- src/mcts/search.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/mcts/search.cc b/src/mcts/search.cc index 71eb543c10..b3326a7661 100644 --- a/src/mcts/search.cc +++ b/src/mcts/search.cc @@ -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 &&