mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
History pruning exponential limit
Use an exponenital law instead of a linear one for history pruning. This should prune more at low depths and a bit less at high depths. After 965 games Mod vs Orig +233 =504 -228 +2 ELO Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
0eedf47661
commit
52bca81dcb
1 changed files with 19 additions and 1 deletions
|
@ -1388,6 +1388,9 @@ namespace {
|
||||||
if (tte && (tte->type() & VALUE_TYPE_EVAL))
|
if (tte && (tte->type() & VALUE_TYPE_EVAL))
|
||||||
futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2];
|
futilityValue = value_from_tt(tte->value(), ply) + FutilityMargins[int(depth) - 2];
|
||||||
|
|
||||||
|
// Move count pruning limit
|
||||||
|
const int MCLimit = 3 + (1 << (3*int(depth)/8));
|
||||||
|
|
||||||
// Loop through all legal moves until no moves remain or a beta cutoff
|
// Loop through all legal moves until no moves remain or a beta cutoff
|
||||||
// occurs.
|
// occurs.
|
||||||
while ( bestValue < beta
|
while ( bestValue < beta
|
||||||
|
@ -1412,8 +1415,23 @@ namespace {
|
||||||
&& !captureOrPromotion
|
&& !captureOrPromotion
|
||||||
&& move != ttMove)
|
&& move != ttMove)
|
||||||
{
|
{
|
||||||
|
//std::cout << std::endl;
|
||||||
|
//for (int d = 2; d <= 14; d+=2)
|
||||||
|
// std::cout << d / 2 << ", " << 3+(1 << (3*d/8)) << std::endl;
|
||||||
|
//std::cout << std::endl;
|
||||||
|
/*
|
||||||
|
3 + (1 << (3*int(depth)/8))
|
||||||
|
|
||||||
|
1 * onePly - > moveCount >= 4
|
||||||
|
2 * onePly - > moveCount >= 5
|
||||||
|
3 * onePly - > moveCount >= 7
|
||||||
|
4 * onePly - > moveCount >= 11
|
||||||
|
5 * onePly - > moveCount >= 11
|
||||||
|
6 * onePly - > moveCount >= 19
|
||||||
|
7 * onePly - > moveCount >= 35
|
||||||
|
*/
|
||||||
// History pruning. See ok_to_prune() definition
|
// History pruning. See ok_to_prune() definition
|
||||||
if ( moveCount >= 2 + int(depth)
|
if ( moveCount >= MCLimit
|
||||||
&& ok_to_prune(pos, move, ss[ply].threatMove, depth)
|
&& ok_to_prune(pos, move, ss[ply].threatMove, depth)
|
||||||
&& bestValue > value_mated_in(PLY_MAX))
|
&& bestValue > value_mated_in(PLY_MAX))
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Add table
Reference in a new issue