X-Git-Url: https://git.sesse.net/?p=stockfish;a=blobdiff_plain;f=src%2Fsearch.cpp;h=5911e983fbae27a610110359c33de7e386c2c65e;hp=15e88ca4f2746939bd3c3e25b04ed15ff11b3824;hb=bdeb01dec09fd6e5ea77a1cb6f6f7fe51a81b7dd;hpb=f21b50398231b4846c364e23bfeeab314c7731ea diff --git a/src/search.cpp b/src/search.cpp index 15e88ca4..5911e983 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -67,10 +67,10 @@ namespace { } // Reductions lookup table, initialized at startup - int Reductions[64]; // [depth or moveNumber] + int Reductions[MAX_MOVES]; // [depth or moveNumber] template Depth reduction(bool i, Depth d, int mn) { - int r = Reductions[std::min(d / ONE_PLY, 63)] * Reductions[std::min(mn, 63)] / 1024; + int r = Reductions[d / ONE_PLY] * Reductions[mn] / 1024; return ((r + 512) / 1024 + (!i && r > 1024) - PvNode) * ONE_PLY; } @@ -147,7 +147,7 @@ namespace { void Search::init() { - for (int i = 1; i < 64; ++i) + for (int i = 1; i < MAX_MOVES; ++i) Reductions[i] = int(1024 * std::log(i) / std::sqrt(1.95)); }