]> git.sesse.net Git - stockfish/commitdiff
Better self-document LMR reduction() formula
authorMarco Costalba <mcostalba@gmail.com>
Fri, 15 Apr 2011 15:41:45 +0000 (17:41 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Sat, 16 Apr 2011 09:49:27 +0000 (10:49 +0100)
Suggested by Onno

No functional change.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
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>
   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.
 
   // Easy move margin. An easy move candidate must be at least this much
   // better than the second best move.