1
0
Fork 0
mirror of https://github.com/sockspls/badfish synced 2025-04-29 16:23:09 +00:00

Merge Joona's increased static null pruning

The idea is to fail high more easily in static
null test if in the parent node we are already
very deep in the move list, so the propability
to fail high there is very low.

[edit: I have slightly changed the functionality
moving

ss->futilityMoveCount = moveCount;

At the end of the pruning code, this should not affect
ELO in anyway, but makes code more natural and logic]

Test with SPRT is good at 15+0.05
LLR: 2.96 (-2.94,2.94)
Total: 50653 W: 10024 L: 9780 D: 30849

And at 60+0.05
LLR: 2.97 (-2.94,2.94)
Total: 40799 W: 7227 L: 6921 D: 26651

bench: 4530093
This commit is contained in:
Marco Costalba 2013-04-25 11:39:06 +02:00
commit 289a767ab3
2 changed files with 8 additions and 2 deletions

View file

@ -643,10 +643,10 @@ namespace {
&& !ss->skipNullMove
&& depth < 4 * ONE_PLY
&& !inCheck
&& eval - FutilityMargins[depth][0] >= beta
&& eval - futility_margin(depth, (ss-1)->futilityMoveCount) >= beta
&& abs(beta) < VALUE_MATE_IN_MAX_PLY
&& pos.non_pawn_material(pos.side_to_move()))
return eval - FutilityMargins[depth][0];
return eval - futility_margin(depth, (ss-1)->futilityMoveCount);
// Step 8. Null move search with verification search (is omitted in PV nodes)
if ( !PvNode
@ -806,6 +806,7 @@ split_point_start: // At split points actual search starts from here
<< " currmovenumber " << moveCount + PVIdx << sync_endl;
}
ss->futilityMoveCount = 0;
ext = DEPTH_ZERO;
captureOrPromotion = pos.is_capture_or_promotion(move);
givesCheck = pos.move_gives_check(move, ci);
@ -900,6 +901,10 @@ split_point_start: // At split points actual search starts from here
continue;
}
// We have not pruned the move that will be searched, but remember how
// far in the move list we are to be more aggressive in the child node.
ss->futilityMoveCount = moveCount;
}
// Check for legality only before to do the move

View file

@ -47,6 +47,7 @@ struct Stack {
Value staticEval;
Value evalMargin;
int skipNullMove;
int futilityMoveCount;
};