1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 00:33:09 +00:00

Tweak dynamic contempt (the birthday patch)

Make dynamic contempt weight factor dependent on static contempt so that higher
static contempt implies less dynamic contempt and vice versa. For default contempt
24 this is a non-functional change. But tests with contempt 0 shows an elo gain.
Also today is my birthday so i have already give to myself a gift with this patch :-)!

Further proceedings:

in the past we checked for default contempt that it doesn't regress against
contempt 0. Now that the later is stronger and the former is the same strength
this should be rechecked. Perhaps the default contempt have to be lowered.
It would be interesting to get some idea of the impact of this patch outside
of the 0-24 contempt range.

STC: (both with contempt=0)
LLR: 2.95 (-2.94,2.94) [-1.50,4.50]
Total: 21912 W: 3898 L: 3740 D: 14274
http://tests.stockfishchess.org/tests/view/5db74b6f0ebc5902d1f37405

LTC: (both with contempt=0)
LLR: 2.96 (-2.94,2.94) [0.00,3.50]
Total: 27172 W: 3350 L: 3126 D: 20696
http://tests.stockfishchess.org/tests/view/5db760020ebc5902d1f375d0

Closes https://github.com/official-stockfish/Stockfish/pull/2382

No functional change (for current default contempt 24).
This commit is contained in:
Stefan Geschwentner 2019-10-29 10:35:56 +01:00 committed by Stéphane Nicolet
parent 648c7ec25d
commit 1725ed39ad

View file

@ -418,7 +418,7 @@ void Thread::search() {
beta = std::min(previousScore + delta, VALUE_INFINITE);
// Adjust contempt based on root move's previousScore (dynamic contempt)
int dct = ct + 86 * previousScore / (abs(previousScore) + 176);
int dct = ct + (111 - ct / 2) * previousScore / (abs(previousScore) + 176);
contempt = (us == WHITE ? make_score(dct, dct / 2)
: -make_score(dct, dct / 2));