diff --git a/src/misc.cpp b/src/misc.cpp index 294b7c8f..b46786df 100644 --- a/src/misc.cpp +++ b/src/misc.cpp @@ -515,7 +515,7 @@ int best_node(size_t idx) { if (!fun1) return -1; - // First call to GetLogicalProcessorInformationEx() to get returnLength. + // First call to GetLogicalProcessorInformationEx() to get returnLength. // We expect the call to fail due to null buffer. if (fun1(RelationAll, nullptr, &returnLength)) return -1; @@ -589,13 +589,13 @@ void bindThisThread(size_t idx) { if (!fun2 || !fun3) return; - if (!fun4 || !fun5) + if (!fun4 || !fun5) { GROUP_AFFINITY affinity; if (fun2(node, &affinity)) // GetNumaNodeProcessorMaskEx fun3(GetCurrentThread(), &affinity, nullptr); // SetThreadGroupAffinity - } - else + } + else { // If a numa node has more than one processor group, we assume they are // sized equal and we spread threads evenly across the groups. diff --git a/src/misc.h b/src/misc.h index c1744130..062b420a 100644 --- a/src/misc.h +++ b/src/misc.h @@ -141,7 +141,7 @@ private: /// sigmoid(t, x0, y0, C, P, Q) implements a sigmoid-like function using only integers, /// with the following properties: -/// +/// /// - sigmoid is centered in (x0, y0) /// - sigmoid has amplitude [-P/Q , P/Q] instead of [-1 , +1] /// - limit is (y0 - P/Q) when t tends to -infinity diff --git a/src/search.cpp b/src/search.cpp index c926c1d2..5e022e66 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1065,6 +1065,8 @@ moves_loop: // When in check, search starts here history += thisThread->mainHistory[us][from_to(move)]; + lmrDepth = std::max(0, lmrDepth - (beta - alpha < thisThread->rootDelta / 4)); + // Futility pruning: parent node (~5 Elo) if ( !ss->inCheck && lmrDepth < 8