mirror of
https://github.com/sockspls/badfish
synced 2025-05-02 09:39:36 +00:00
Get correct excluded moves for split nodes
Tested setting FakeSplit to true and running ./stockfish bench 128 2 There is a different signature with and without the patch so it affects functionality but only in SMP case. bench: 8331357
This commit is contained in:
parent
c376ffce0f
commit
691ed425ba
1 changed files with 2 additions and 2 deletions
|
@ -499,6 +499,7 @@ namespace {
|
||||||
// Step 1. Initialize node
|
// Step 1. Initialize node
|
||||||
Thread* thisThread = pos.this_thread();
|
Thread* thisThread = pos.this_thread();
|
||||||
inCheck = pos.checkers();
|
inCheck = pos.checkers();
|
||||||
|
excludedMove = ss->excludedMove;
|
||||||
|
|
||||||
if (SpNode)
|
if (SpNode)
|
||||||
{
|
{
|
||||||
|
@ -507,7 +508,7 @@ namespace {
|
||||||
threatMove = splitPoint->threatMove;
|
threatMove = splitPoint->threatMove;
|
||||||
bestValue = splitPoint->bestValue;
|
bestValue = splitPoint->bestValue;
|
||||||
tte = NULL;
|
tte = NULL;
|
||||||
ttMove = excludedMove = MOVE_NONE;
|
ttMove = MOVE_NONE;
|
||||||
ttValue = VALUE_NONE;
|
ttValue = VALUE_NONE;
|
||||||
|
|
||||||
assert(splitPoint->bestValue > -VALUE_INFINITE && splitPoint->moveCount > 0);
|
assert(splitPoint->bestValue > -VALUE_INFINITE && splitPoint->moveCount > 0);
|
||||||
|
@ -547,7 +548,6 @@ namespace {
|
||||||
// Step 4. Transposition table lookup
|
// Step 4. Transposition table lookup
|
||||||
// We don't want the score of a partial search to overwrite a previous full search
|
// We don't want the score of a partial search to overwrite a previous full search
|
||||||
// TT value, so we use a different position key in case of an excluded move.
|
// TT value, so we use a different position key in case of an excluded move.
|
||||||
excludedMove = ss->excludedMove;
|
|
||||||
posKey = excludedMove ? pos.exclusion_key() : pos.key();
|
posKey = excludedMove ? pos.exclusion_key() : pos.key();
|
||||||
tte = TT.probe(posKey);
|
tte = TT.probe(posKey);
|
||||||
ttMove = RootNode ? RootMoves[PVIdx].pv[0] : tte ? tte->move() : MOVE_NONE;
|
ttMove = RootNode ? RootMoves[PVIdx].pv[0] : tte ? tte->move() : MOVE_NONE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue