X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=a9fc1c6d4c80b41aec8c20c4b6b2e7c070760050;hp=a46c44627d4b1677b1f4a0a11f13825d24e0e746;hb=d39ffbeea6ad54c90123a352d50b65c5bda1561b;hpb=1052ce74f65479e5d583d349227dc101f8483a85 diff --git a/src/search.cpp b/src/search.cpp index a46c4462..a9fc1c6d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -153,11 +153,11 @@ namespace { {1, 0, 0, 0, 0, 1, 1 ,1}, }; + const size_t HalfDensitySize = std::extent::value; + Value bonus(Depth depth) { int d = depth / ONE_PLY ; return Value(d * d + 2 * d - 2); } Value penalty(Depth depth) { int d = depth / ONE_PLY ; return -Value(d * d + 4 * d + 1); } - const size_t HalfDensitySize = std::extent::value; - EasyMoveManager EasyMove; Value DrawValue[COLOR_NB]; @@ -316,8 +316,7 @@ void MainThread::search() { Depth depthDiff = th->completedDepth - bestThread->completedDepth; Value scoreDiff = th->rootMoves[0].score - bestThread->rootMoves[0].score; - if ( (depthDiff > 0 && scoreDiff >= 0) - || (scoreDiff > 0 && depthDiff >= 0)) + if (scoreDiff > 0 && depthDiff >= 0) bestThread = th; } }