From: Vizvezdenec Date: Tue, 28 Aug 2018 22:50:55 +0000 (+0200) Subject: Tweak stat bonus formula X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=6307fd08e6e8c315802301fd35b22ca2a67071a9 Tweak stat bonus formula Tweak stat bonus formula on top of latest elo gain by @snicolet STC http://tests.stockfishchess.org/tests/view/5b830a810ebc5902bdbb7e9c LLR: 2.95 (-2.94,2.94) [0.00,4.00] Total: 27797 W: 6113 L: 5842 D: 15842 LTC http://tests.stockfishchess.org/tests/view/5b831f2c0ebc5902bdbb8038 LLR: 2.95 (-2.94,2.94) [0.00,4.00] Total: 13655 W: 2294 L: 2099 D: 9262 I think that more elo can be found in tweaks of this parameters so I plan to further try some "hand-tuning", including increasing/decreasing ratio of two constants and making bonus assimetric to 0. Thx to @AndyGrant for helping with github and @jerrydonaldwatson for original idea. Closes https://github.com/official-stockfish/Stockfish/pull/1748 Bench: 4172767 --- diff --git a/src/search.cpp b/src/search.cpp index 50733950..cd435c67 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -723,10 +723,10 @@ namespace { else { int p = (ss-1)->statScore; - int malus = p > 0 ? (p + 5000) / 1024 : - p < 0 ? (p - 5000) / 1024 : 0; + int bonus = p > 0 ? (-p - 2500) / 512 : + p < 0 ? (-p + 2500) / 512 : 0; - ss->staticEval = eval = (ss-1)->currentMove != MOVE_NULL ? (pureStaticEval = evaluate(pos)) - malus + ss->staticEval = eval = (ss-1)->currentMove != MOVE_NULL ? (pureStaticEval = evaluate(pos)) + bonus : (pureStaticEval = -(ss-1)->staticEval + 2 * Eval::Tempo); tte->save(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE, pureStaticEval);