From f434cea287d3fae6b719816df0aa89a3d8579fa9 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Mon, 27 Jan 2014 07:36:26 +0100 Subject: [PATCH] Fix null reduction formula 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 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/search.cpp b/src/search.cpp index 93867f0f..0ee25bca 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -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); -- 2.39.2