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

Simplify a bit futility marging formula

Should be a very minor change, but there is a small
functional change because futility_margin() is used in more
places then in the pruning formula.

After 999 games at 1+0
Mod vs Orig +167 =678 -154  +5 ELO

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2010-04-21 20:42:34 +01:00
parent 11207f7c1f
commit b2c1e15698

View file

@ -560,7 +560,7 @@ void init_search() {
for (int j = 0; j < 64; j++) // j == moveNumber
{
// FIXME: test using log instead of BSR
FutilityMarginsMatrix[i][j] = (i < 2 ? 0 : 112 * bitScanReverse32(i * i / 2)) - 8 * j;
FutilityMarginsMatrix[i][j] = (i < 2 ? 0 : 112 * bitScanReverse32(i * i / 2)) - 8 * j + 45;
}
// Init futility move count array
@ -1480,7 +1480,7 @@ namespace {
// Value based pruning
Depth predictedDepth = newDepth - nonpv_reduction(depth, moveCount); // We illogically ignore reduction condition depth >= 3*OnePly
futilityValueScaled = ss[ply].eval + futility_margin(predictedDepth, moveCount)
+ H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45;
+ H.gain(pos.piece_on(move_from(move)), move_to(move));
if (futilityValueScaled < beta)
{
@ -1838,7 +1838,7 @@ namespace {
// Value based pruning
Depth predictedDepth = newDepth - nonpv_reduction(sp->depth, moveCount);
futilityValueScaled = ss[sp->ply].eval + futility_margin(predictedDepth, moveCount)
+ H.gain(pos.piece_on(move_from(move)), move_to(move)) + 45;
+ H.gain(pos.piece_on(move_from(move)), move_to(move));
if (futilityValueScaled < sp->beta)
{