]> git.sesse.net Git - stockfish/commitdiff
Fix null reduction formula
authorMarco Costalba <mcostalba@gmail.com>
Mon, 27 Jan 2014 06:36:26 +0000 (07:36 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Mon, 27 Jan 2014 07:18:48 +0000 (08:18 +0100)
Depth is already dependent on the actual value
of ONE_PLY, in particular can be expressed like:

Depth = n * ONE_PLY

And because formula is used to calculate R that is
also dependent on the value of ONE_PLY and can be
expressed like:

R = x * ONE_PLY

We don't want to divide depth by a 'ply' value but
directly by an integer number.

Spotted by sf-x

No functional change.

src/search.cpp

index 93867f0f0b20859f97598d094a54dedbb0d5f171..0ee25bca1b421a159e60071e2d0d482fb3903b91 100644 (file)
@@ -632,7 +632,7 @@ namespace {
 
         // Null move dynamic reduction based on depth and value
         Depth R =  3 * ONE_PLY
-                 + depth / (2 * ONE_PLY)
+                 + depth / 4
                  + int(eval - beta) / PawnValueMg * ONE_PLY;
 
         pos.do_null_move(st);