mirror of
https://github.com/sockspls/badfish
synced 2025-07-13 04:29:15 +00:00
Simplify aspirationDelta update rule
After 7522 games: Mod vs Orig 1229 - 1148 - 5145 ELO +3 (+- 4.5) LOS 83% Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
0c775fae4b
commit
9069193125
1 changed files with 6 additions and 6 deletions
|
@ -596,7 +596,7 @@ namespace {
|
||||||
SearchStack ss[PLY_MAX_PLUS_2];
|
SearchStack ss[PLY_MAX_PLUS_2];
|
||||||
Value bestValues[PLY_MAX_PLUS_2];
|
Value bestValues[PLY_MAX_PLUS_2];
|
||||||
int bestMoveChanges[PLY_MAX_PLUS_2];
|
int bestMoveChanges[PLY_MAX_PLUS_2];
|
||||||
int depth, researchCountFL, researchCountFH, aspirationDelta;
|
int depth, aspirationDelta;
|
||||||
Value value, alpha, beta;
|
Value value, alpha, beta;
|
||||||
Move bestMove, easyMove;
|
Move bestMove, easyMove;
|
||||||
|
|
||||||
|
@ -625,7 +625,7 @@ namespace {
|
||||||
// Iterative deepening loop
|
// Iterative deepening loop
|
||||||
while (++depth <= PLY_MAX && (!MaxDepth || depth <= MaxDepth) && !StopRequest)
|
while (++depth <= PLY_MAX && (!MaxDepth || depth <= MaxDepth) && !StopRequest)
|
||||||
{
|
{
|
||||||
Rml.bestMoveChanges = researchCountFL = researchCountFH = 0;
|
Rml.bestMoveChanges = 0;
|
||||||
cout << "info depth " << depth << endl;
|
cout << "info depth " << depth << endl;
|
||||||
|
|
||||||
// Calculate dynamic aspiration window based on previous iterations
|
// Calculate dynamic aspiration window based on previous iterations
|
||||||
|
@ -666,16 +666,16 @@ namespace {
|
||||||
// otherwise exit the fail high/low loop.
|
// otherwise exit the fail high/low loop.
|
||||||
if (value >= beta)
|
if (value >= beta)
|
||||||
{
|
{
|
||||||
beta = Min(beta + aspirationDelta * (1 << researchCountFH), VALUE_INFINITE);
|
beta = Min(beta + aspirationDelta, VALUE_INFINITE);
|
||||||
researchCountFH++;
|
aspirationDelta += aspirationDelta / 2;
|
||||||
}
|
}
|
||||||
else if (value <= alpha)
|
else if (value <= alpha)
|
||||||
{
|
{
|
||||||
AspirationFailLow = true;
|
AspirationFailLow = true;
|
||||||
StopOnPonderhit = false;
|
StopOnPonderhit = false;
|
||||||
|
|
||||||
alpha = Max(alpha - aspirationDelta * (1 << researchCountFL), -VALUE_INFINITE);
|
alpha = Max(alpha - aspirationDelta, -VALUE_INFINITE);
|
||||||
researchCountFL++;
|
aspirationDelta += aspirationDelta / 2;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
Loading…
Add table
Reference in a new issue