mirror of
https://github.com/sockspls/badfish
synced 2025-05-01 09:13:08 +00:00
Stat score initialization: grandchildren
This is the sequel of the previous patch, we now let the parent node initialize stat score to zero once for all grandchildren. Initialize statScore to zero for the grandchildren of the current position. So statScore is shared between all grandchildren and only the first grandchild starts with statScore = 0. Later grandchildren start with the last calculated statScore of the previous grandchild. This influences the reduction rules in LMR which are based on the statScore of parent position. Tests results against the previous patch: STC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 23676 W: 5417 L: 5157 D: 13102 http://tests.stockfishchess.org/tests/view/5a9423a90ebc590297cc8a46 LTC: LLR: 2.96 (-2.94,2.94) [0.00,4.00] Total: 35485 W: 6168 L: 5898 D: 23419 http://tests.stockfishchess.org/tests/view/5a9435550ebc590297cc8a54 Bench: 5643520
This commit is contained in:
parent
1463881153
commit
cccbecb6f8
1 changed files with 7 additions and 7 deletions
|
@ -517,13 +517,6 @@ namespace {
|
||||||
bestValue = -VALUE_INFINITE;
|
bestValue = -VALUE_INFINITE;
|
||||||
maxValue = VALUE_INFINITE;
|
maxValue = VALUE_INFINITE;
|
||||||
|
|
||||||
// Initialize statScore to zero for the childs of the current position.
|
|
||||||
// So statScore is shared between sibling positions and only the first sibling
|
|
||||||
// starts with statScore = 0. Later siblings start with the last calculated
|
|
||||||
// statScore of the previous sibling. This influences in LMR the reduction rules
|
|
||||||
// which based on the statScore of parent position.
|
|
||||||
(ss+1)->statScore = 0;
|
|
||||||
|
|
||||||
// Check for the available remaining time
|
// Check for the available remaining time
|
||||||
if (thisThread == Threads.main())
|
if (thisThread == Threads.main())
|
||||||
static_cast<MainThread*>(thisThread)->check_time();
|
static_cast<MainThread*>(thisThread)->check_time();
|
||||||
|
@ -560,6 +553,13 @@ namespace {
|
||||||
(ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE;
|
(ss+2)->killers[0] = (ss+2)->killers[1] = MOVE_NONE;
|
||||||
Square prevSq = to_sq((ss-1)->currentMove);
|
Square prevSq = to_sq((ss-1)->currentMove);
|
||||||
|
|
||||||
|
// Initialize statScore to zero for the grandchildren of the current position.
|
||||||
|
// So statScore is shared between all grandchildren and only the first grandchild
|
||||||
|
// starts with statScore = 0. Later grandchildren start with the last calculated
|
||||||
|
// statScore of the previous grandchild. This influences the reduction rules in
|
||||||
|
// LMR which are based on the statScore of parent position.
|
||||||
|
(ss+2)->statScore = 0;
|
||||||
|
|
||||||
// Step 4. Transposition table lookup. We don't want the score of a partial
|
// Step 4. Transposition table lookup. We don't want the score of a partial
|
||||||
// search to overwrite a previous full search TT value, so we use a different
|
// search to overwrite a previous full search TT value, so we use a different
|
||||||
// position key in case of an excluded move.
|
// position key in case of an excluded move.
|
||||||
|
|
Loading…
Add table
Reference in a new issue