Skip to content

Commit 6307fd0

Browse files
Vizvezdenecsnicolet
authored andcommitted
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 #1748 Bench: 4172767
1 parent 3ac3b68 commit 6307fd0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/search.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -723,10 +723,10 @@ namespace {
723723
else
724724
{
725725
int p = (ss-1)->statScore;
726-
int malus = p > 0 ? (p + 5000) / 1024 :
727-
p < 0 ? (p - 5000) / 1024 : 0;
726+
int bonus = p > 0 ? (-p - 2500) / 512 :
727+
p < 0 ? (-p + 2500) / 512 : 0;
728728

729-
ss->staticEval = eval = (ss-1)->currentMove != MOVE_NULL ? (pureStaticEval = evaluate(pos)) - malus
729+
ss->staticEval = eval = (ss-1)->currentMove != MOVE_NULL ? (pureStaticEval = evaluate(pos)) + bonus
730730
: (pureStaticEval = -(ss-1)->staticEval + 2 * Eval::Tempo);
731731

732732
tte->save(posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE, pureStaticEval);

0 commit comments

Comments
 (0)