1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-30 08:43:09 +00:00

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 <mcostalba@gmail.com>
This commit is contained in:
Joona Kiiski 2010-03-21 23:41:50 +02:00 committed by Marco Costalba
parent 426f55b78d
commit 42de93ac15

View file

@ -1378,6 +1378,10 @@ namespace {
if (nullValue >= beta) if (nullValue >= beta)
{ {
// Do not return unproven mate scores
if (nullValue >= value_mate_in(PLY_MAX))
nullValue = beta;
if (depth < 6 * OnePly) if (depth < 6 * OnePly)
return nullValue; return nullValue;