1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-07-11 19:49:14 +00:00

Use separated research counters in root_search()

One for failing highs and one for failing lows, this
should reduce average window size in case of positions
that fail first high and then low (or the contrary).

After ~2000 games on Joona's quad we have:

Mod - Orig: 1012- 975 (+6 elo)

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-03-07 10:02:34 +02:00
parent 7ff9678651
commit c835ee8853

View file

@ -789,15 +789,17 @@ namespace {
EvalInfo ei;
StateInfo st;
CheckInfo ci(pos);
int64_t nodes;
Move move;
Depth depth, ext, newDepth;
Value value, alpha, beta;
bool isCheck, moveIsCheck, captureOrPromotion, dangerous;
int researchCount = 0;
int researchCountFH, researchCountFL;
researchCountFH = researchCountFL = 0;
alpha = *alphaPtr;
beta = *betaPtr;
CheckInfo ci(pos);
isCheck = pos.is_check();
// Step 1. Initialize node and poll (omitted at root, but I can see no good reason for this, FIXME)
@ -929,8 +931,8 @@ namespace {
print_pv_info(pos, ss, alpha, beta, value);
// Prepare for a research after a fail high, each time with a wider window
researchCount++;
*betaPtr = beta = Min(beta + AspirationDelta * (1 << researchCount), VALUE_INFINITE);
researchCountFH++;
*betaPtr = beta = Min(beta + AspirationDelta * (1 << researchCountFH), VALUE_INFINITE);
} // End of fail high loop
@ -1015,8 +1017,8 @@ namespace {
break;
// Prepare for a research after a fail low, each time with a wider window
researchCount++;
*alphaPtr = alpha = Max(alpha - AspirationDelta * (1 << researchCount), -VALUE_INFINITE);
researchCountFL++;
*alphaPtr = alpha = Max(alpha - AspirationDelta * (1 << researchCountFL), -VALUE_INFINITE);
} // Fail low loop