]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Better self-document LMR reduction() formula
[stockfish] / src / search.cpp
index ff489c9627395a99109e89fbd0186c0359d1f5d4..6a42cc50b05a233bb181ac884bcefaec6268a062 100644 (file)
@@ -216,7 +216,7 @@ namespace {
   int8_t ReductionMatrix[2][64][64]; // [pv][depth][moveNumber]
 
   template <NodeType PV>
-  inline Depth reduction(Depth d, int mn) { return (Depth) ReductionMatrix[PV][Min(d / 2, 63)][Min(mn, 63)]; }
+  inline Depth reduction(Depth d, int mn) { return (Depth) ReductionMatrix[PV][Min(d / ONE_PLY, 63)][Min(mn, 63)]; }
 
   // Easy move margin. An easy move candidate must be at least this much
   // better than the second best move.