mirror of
https://github.com/sockspls/badfish
synced 2025-07-11 19:49: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:
parent
11207f7c1f
commit
b2c1e15698
1 changed files with 3 additions and 3 deletions
|
@ -560,7 +560,7 @@ void init_search() {
|
||||||
for (int j = 0; j < 64; j++) // j == moveNumber
|
for (int j = 0; j < 64; j++) // j == moveNumber
|
||||||
{
|
{
|
||||||
// FIXME: test using log instead of BSR
|
// 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
|
// Init futility move count array
|
||||||
|
@ -1480,7 +1480,7 @@ namespace {
|
||||||
// Value based pruning
|
// Value based pruning
|
||||||
Depth predictedDepth = newDepth - nonpv_reduction(depth, moveCount); // We illogically ignore reduction condition depth >= 3*OnePly
|
Depth predictedDepth = newDepth - nonpv_reduction(depth, moveCount); // We illogically ignore reduction condition depth >= 3*OnePly
|
||||||
futilityValueScaled = ss[ply].eval + futility_margin(predictedDepth, moveCount)
|
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)
|
if (futilityValueScaled < beta)
|
||||||
{
|
{
|
||||||
|
@ -1838,7 +1838,7 @@ namespace {
|
||||||
// Value based pruning
|
// Value based pruning
|
||||||
Depth predictedDepth = newDepth - nonpv_reduction(sp->depth, moveCount);
|
Depth predictedDepth = newDepth - nonpv_reduction(sp->depth, moveCount);
|
||||||
futilityValueScaled = ss[sp->ply].eval + futility_margin(predictedDepth, 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)
|
if (futilityValueScaled < sp->beta)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue