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

Fix aspiration corner case

Fix a corner case where we start aspiration window and
suddendly we get a VALUE_KNOWN_WIN / MATE score, this makes
aspiration to blow up in a series of researches loops.

Exit aspiration loop in that case.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2011-02-28 20:17:57 +01:00
parent af236373cb
commit 1f73a9ed63

View file

@ -643,8 +643,7 @@ namespace {
// Start with a small aspiration window and, in case of fail high/low,
// research with bigger window until not failing high/low anymore.
while (true)
{
do {
// Search starting from ss+1 to allow calling update_gains()
value = search<PV, false, true>(pos, ss+1, alpha, beta, depth * ONE_PLY, 0);
@ -680,7 +679,8 @@ namespace {
}
else
break;
}
} while (abs(value) < VALUE_KNOWN_WIN);
// Collect info about search result
bestMove = Rml[0].pv[0];