diff --git a/Rapfi/search/ab/search.cpp b/Rapfi/search/ab/search.cpp index d851578..0179dbf 100644 --- a/Rapfi/search/ab/search.cpp +++ b/Rapfi/search/ab/search.cpp @@ -658,7 +658,6 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth Pos bestMove = Pos::NONE; HistoryTracker histTracker(board, ss); (ss + 2)->killers[0] = (ss + 2)->killers[1] = Pos::NONE; // Reset killer of grand-children - ss->statScore = 0; // Reset statScore // Update selDepth (selDepth counts from 1, ply from 0) if (PvNode && thisThread->selDepth <= ss->ply) @@ -1133,13 +1132,13 @@ Value search(Board &board, SearchStack *ss, Value alpha, Value beta, Depth depth r -= 1.0f; } - // Update statScore of this node - ss->statScore = searchData->mainHistory[self][move][HIST_ATTACK] + // Compute statScore of this node + int statScore = searchData->mainHistory[self][move][HIST_ATTACK] + searchData->mainHistory[self][move][HIST_QUIET] * 4 / 5 - 3391; // Decrease/increase reduction for moves with a good/bad history // Use less stat score at higher depths - r -= ss->statScore * (1.0f / (12633 + 4055 * (depth > 7))); + r -= statScore * (1.0f / (12633 + 4055 * (depth > 7))); // Allow LMR to do deeper search in some circumstances // Clamp the LMR depth to newDepth (no depth less than one) diff --git a/Rapfi/search/ab/searchstack.h b/Rapfi/search/ab/searchstack.h index e36485b..0d899ac 100644 --- a/Rapfi/search/ab/searchstack.h +++ b/Rapfi/search/ab/searchstack.h @@ -36,7 +36,6 @@ struct SearchStack int moveCount; Depth extraExtension; /// cumulative extension depth that larger than one ply int dbValueDepth; - int statScore; Value staticEval; Pos currentMove; Pos skipMove;