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

Merge futility pruning from Glaurung 2.2

It seems much more powerful then previous one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
Marco Costalba 2008-12-23 12:01:48 +01:00
parent e3b03f13b3
commit e96f56adfa
2 changed files with 7 additions and 7 deletions

View file

@ -166,7 +166,7 @@ namespace {
// nodes, and at pre-frontier nodes // nodes, and at pre-frontier nodes
Value FutilityMargin0 = Value(0x80); Value FutilityMargin0 = Value(0x80);
Value FutilityMargin1 = Value(0x100); Value FutilityMargin1 = Value(0x100);
Value FutilityMargin2 = Value(0x300); Value FutilityMargin2 = Value(0x200);
// Razoring // Razoring
Depth RazorDepth = 4*OnePly; Depth RazorDepth = 4*OnePly;
@ -1308,18 +1308,18 @@ namespace {
&& !moveIsCapture && !moveIsCapture
&& !move_promotion(move)) && !move_promotion(move))
{ {
// History pruning. See ok_to_prune() definition. // History pruning. See ok_to_prune() definition
if ( moveCount >= 2 + int(depth) if ( moveCount >= 2 + int(depth)
&& ok_to_prune(pos, move, ss[ply].threatMove, depth)) && ok_to_prune(pos, move, ss[ply].threatMove, depth))
continue; continue;
// Value based pruning. // Value based pruning
if (depth < 3 * OnePly && approximateEval < beta) if (depth < 6 * OnePly && approximateEval < beta)
{ {
if (futilityValue == VALUE_NONE) if (futilityValue == VALUE_NONE)
futilityValue = evaluate(pos, ei, threadID) futilityValue = evaluate(pos, ei, threadID)
+ (depth < 2 * OnePly ? FutilityMargin1 : FutilityMargin2); + (depth < 2 * OnePly ? FutilityMargin1
: FutilityMargin2 + (depth - 2*OnePly) * 32);
if (futilityValue < beta) if (futilityValue < beta)
{ {
if (futilityValue > bestValue) if (futilityValue > bestValue)

View file

@ -125,7 +125,7 @@ namespace {
o.push_back(Option("Futility Pruning (Quiescence Search)", true)); o.push_back(Option("Futility Pruning (Quiescence Search)", true));
o.push_back(Option("Futility Margin 0", 50, 0, 1000)); o.push_back(Option("Futility Margin 0", 50, 0, 1000));
o.push_back(Option("Futility Margin 1", 100, 0, 1000)); o.push_back(Option("Futility Margin 1", 100, 0, 1000));
o.push_back(Option("Futility Margin 2", 300, 0, 1000)); o.push_back(Option("Futility Margin 2", 200, 0, 1000));
o.push_back(Option("Maximum Razoring Depth", 3, 0, 4)); o.push_back(Option("Maximum Razoring Depth", 3, 0, 4));
o.push_back(Option("Razoring Margin", 300, 150, 600)); o.push_back(Option("Razoring Margin", 300, 150, 600));
o.push_back(Option("LSN filtering", true)); o.push_back(Option("LSN filtering", true));