From 42de93ac15366d6d20c1b2fbf99b4780e8ac6617 Mon Sep 17 00:00:00 2001 From: Joona Kiiski Date: Sun, 21 Mar 2010 23:41:50 +0200 Subject: [PATCH] Do not return unproven mate scores from null move search Causes very small functional change which is not observable with our usual set of test positions. However change is observable fx. with following position: 4k3/3r4/5Q2/6K1/8/8/8/8 w - - 0 1 go depth 24 Signed-off-by: Marco Costalba --- src/search.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/search.cpp b/src/search.cpp index f5552e78..67c98709 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -1378,6 +1378,10 @@ namespace { if (nullValue >= beta) { + // Do not return unproven mate scores + if (nullValue >= value_mate_in(PLY_MAX)) + nullValue = beta; + if (depth < 6 * OnePly) return nullValue; -- 2.39.2