mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 16:53:09 +00:00
Fix a minor bug in search
As Joona says: "The problem is that when doing full window search (-VALUE_INFINITE, VALUE_INFINITE), and pruning all the moves will return fail low which is mate score, because only clause touching alpha is "mate distance pruning". So we are returning mate score although we are just pruning all the moves. In reality there probably is no mate in sight. Bug spotted and fixed by Joona.
This commit is contained in:
parent
7f9ebf8e86
commit
aba152ea3a
1 changed files with 2 additions and 1 deletions
|
@ -826,7 +826,8 @@ split_point_start: // At split points actual search starts from here
|
||||||
&& !inCheck
|
&& !inCheck
|
||||||
&& !dangerous
|
&& !dangerous
|
||||||
&& move != ttMove
|
&& move != ttMove
|
||||||
&& (bestValue > VALUE_MATED_IN_MAX_PLY || bestValue == -VALUE_INFINITE))
|
&& (bestValue > VALUE_MATED_IN_MAX_PLY || ( bestValue == -VALUE_INFINITE
|
||||||
|
&& alpha > VALUE_MATED_IN_MAX_PLY)))
|
||||||
{
|
{
|
||||||
// Move count based pruning
|
// Move count based pruning
|
||||||
if ( depth < 16 * ONE_PLY
|
if ( depth < 16 * ONE_PLY
|
||||||
|
|
Loading…
Add table
Reference in a new issue