X-Git-Url: https://git.sesse.net/?a=blobdiff_plain;f=src%2Fsearch.cpp;h=636b1db404e4424721e42473108cb36869aaa21b;hb=59f64fda4fffe595d53183caae94b1d9a2062f32;hp=9f42bab77f56c0f350c8f96ba6dea19c0030c119;hpb=20e92895af45ec9599110506eea231fc689c05ba;p=stockfish diff --git a/src/search.cpp b/src/search.cpp index 9f42bab7..636b1db4 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -66,14 +66,14 @@ namespace { enum NodeType { Root, PV, NonPV }; // Razoring and futility margin based on depth - inline Value razor_margin(Depth d) { return Value(512 + 32 * d); } - inline Value futility_margin(Depth d) { return Value(200 * d); } + Value razor_margin(Depth d) { return Value(512 + 32 * d); } + Value futility_margin(Depth d) { return Value(200 * d); } // Futility and reductions lookup tables, initialized at startup int FutilityMoveCounts[2][16]; // [improving][depth] Depth Reductions[2][2][64][64]; // [pv][improving][depth][moveNumber] - template inline Depth reduction(bool i, Depth d, int mn) { + template Depth reduction(bool i, Depth d, int mn) { return Reductions[PvNode][i][std::min(d, 63 * ONE_PLY)][std::min(mn, 63)]; } @@ -960,9 +960,8 @@ moves_loop: // When in check and at SpNode search starts from here ss->reduction = reduction(improving, depth, moveCount); if ( (!PvNode && cutNode) - || ( History[pos.piece_on(to_sq(move))][to_sq(move)] - + CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq] - [pos.piece_on(to_sq(move))][to_sq(move)] < VALUE_ZERO)) + || ( History[pos.piece_on(to_sq(move))][to_sq(move)] < VALUE_ZERO + && CounterMovesHistory[pos.piece_on(prevMoveSq)][prevMoveSq][pos.piece_on(to_sq(move))][to_sq(move)] <= VALUE_ZERO)) ss->reduction += ONE_PLY; if (move == countermove)