mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Center aspiration window on last returned score
bench: 4428212
This commit is contained in:
parent
6f079ae720
commit
b50eb6bea8
1 changed files with 8 additions and 8 deletions
|
@ -335,8 +335,8 @@ namespace {
|
||||||
if (depth >= 5)
|
if (depth >= 5)
|
||||||
{
|
{
|
||||||
delta = Value(16);
|
delta = Value(16);
|
||||||
alpha = RootMoves[PVIdx].prevScore - delta;
|
alpha = std::max(RootMoves[PVIdx].prevScore - delta,-VALUE_INFINITE);
|
||||||
beta = RootMoves[PVIdx].prevScore + delta;
|
beta = std::min(RootMoves[PVIdx].prevScore + delta, VALUE_INFINITE);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Start with a small aspiration window and, in case of fail high/low,
|
// Start with a small aspiration window and, in case of fail high/low,
|
||||||
|
@ -364,18 +364,18 @@ namespace {
|
||||||
if (Signals.stop)
|
if (Signals.stop)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// In case of failing high/low increase aspiration window and
|
// In case of failing low/high increase aspiration window and
|
||||||
// research, otherwise exit the loop.
|
// research, otherwise exit the loop.
|
||||||
if (bestValue >= beta)
|
if (bestValue <= alpha)
|
||||||
beta += delta;
|
|
||||||
|
|
||||||
else if (bestValue <= alpha)
|
|
||||||
{
|
{
|
||||||
alpha -= delta;
|
alpha = std::max(bestValue - delta, -VALUE_INFINITE);
|
||||||
|
|
||||||
Signals.failedLowAtRoot = true;
|
Signals.failedLowAtRoot = true;
|
||||||
Signals.stopOnPonderhit = false;
|
Signals.stopOnPonderhit = false;
|
||||||
}
|
}
|
||||||
|
else if (bestValue >= beta)
|
||||||
|
beta = std::min(bestValue + delta, VALUE_INFINITE);
|
||||||
|
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue