X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fthread.cpp;h=de8de87d8a2b9d94f6f57b9876d658f459abfbc0;hb=a069a1bbbfb60abddbe3fe5276b06f35f783f41c;hp=fdf89095b5e79239883cd9d41d30a760f0c685c2;hpb=a105978bbde04508389abad03bd121f817f91646;p=stockfish diff --git a/src/thread.cpp b/src/thread.cpp index fdf89095..de8de87d 100644 --- a/src/thread.cpp +++ b/src/thread.cpp @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -68,6 +69,7 @@ void Thread::clear() { counterMoves.fill(MOVE_NONE); mainHistory.fill(0); captureHistory.fill(0); + pawnHistory.fill(0); for (bool inCheck : {false, true}) for (StatsType c : {NoCaptures, Captures}) @@ -234,7 +236,7 @@ Thread* ThreadPool::get_best_thread() const { votes[th->rootMoves[0].pv[0]] += thread_value(th); for (Thread* th : threads) - if (abs(bestThread->rootMoves[0].score) >= VALUE_TB_WIN_IN_MAX_PLY) + if (std::abs(bestThread->rootMoves[0].score) >= VALUE_TB_WIN_IN_MAX_PLY) { // Make sure we pick the shortest mate / TB conversion or stave off mate the longest if (th->rootMoves[0].score > bestThread->rootMoves[0].score)