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>
EvalInfo ei;
StateInfo st;
EvalInfo ei;
StateInfo st;
int64_t nodes;
Move move;
Depth depth, ext, newDepth;
Value value, alpha, beta;
bool isCheck, moveIsCheck, captureOrPromotion, dangerous;
int64_t nodes;
Move move;
Depth depth, ext, newDepth;
Value value, alpha, beta;
bool isCheck, moveIsCheck, captureOrPromotion, dangerous;
+ int researchCountFH, researchCountFL;
+
+ researchCountFH = researchCountFL = 0;
alpha = *alphaPtr;
beta = *betaPtr;
alpha = *alphaPtr;
beta = *betaPtr;
isCheck = pos.is_check();
// Step 1. Initialize node and poll (omitted at root, but I can see no good reason for this, FIXME)
isCheck = pos.is_check();
// Step 1. Initialize node and poll (omitted at root, but I can see no good reason for this, FIXME)
print_pv_info(pos, ss, alpha, beta, value);
// Prepare for a research after a fail high, each time with a wider window
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
} // End of fail high loop
break;
// Prepare for a research after a fail low, each time with a wider window
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);