X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=5b6a048500b0842c1b59a97f7913532139ae54e0;hp=7876f9314ad93e56242c569e0f79a26e0c7a5498;hb=4e2bb8fa44fe03a2fdb2d3448ac93986354bf9ae;hpb=fda0161e3a5295a759f04a0e302567a773f82595 diff --git a/src/search.cpp b/src/search.cpp index 7876f931..5b6a0485 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -303,6 +303,7 @@ void MainThread::search() { void Thread::search() { Stack stack[MAX_PLY+7], *ss = stack+4; // To reference from (ss-4) to (ss+2) + Move pv[MAX_PLY+1]; Value bestValue, alpha, beta, delta; Move lastBestMove = MOVE_NONE; Depth lastBestMoveDepth = DEPTH_ZERO; @@ -314,6 +315,7 @@ void Thread::search() { std::memset(ss-4, 0, 7 * sizeof(Stack)); for (int i = 4; i > 0; i--) (ss-i)->continuationHistory = &this->continuationHistory[NO_PIECE][0]; // Use as sentinel + ss->pv = pv; bestValue = delta = alpha = -VALUE_INFINITE; beta = VALUE_INFINITE; @@ -756,8 +758,9 @@ namespace { } // Step 7. Razoring (~2 Elo) - if ( depth < 2 * ONE_PLY - && eval <= alpha - RazorMargin) + if ( !rootNode // The required rootNode PV handling is not available in qsearch + && depth < 2 * ONE_PLY + && eval <= alpha - RazorMargin) return qsearch(pos, ss, alpha, beta); improving = ss->staticEval >= (ss-2)->staticEval