]> git.sesse.net Git - stockfish/commitdiff
Merge futility pruning from Glaurung 2.2
authorMarco Costalba <mcostalba@gmail.com>
Tue, 23 Dec 2008 11:01:48 +0000 (12:01 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Tue, 23 Dec 2008 11:01:48 +0000 (12:01 +0100)
It seems much more powerful then previous one.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp
src/ucioption.cpp

index 426f84d92493906ecab9c572084a9d81bbd4ba68..6f0ddea4e8671209dce93d5f7969dd844a03ef56 100644 (file)
@@ -166,7 +166,7 @@ namespace {
   // nodes, and at pre-frontier nodes
   Value FutilityMargin0 = Value(0x80);
   Value FutilityMargin1 = Value(0x100);
-  Value FutilityMargin2 = Value(0x300);
+  Value FutilityMargin2 = Value(0x200);
 
   // Razoring
   Depth RazorDepth = 4*OnePly;
@@ -1308,18 +1308,18 @@ namespace {
           && !moveIsCapture
           && !move_promotion(move))
       {
-          // History pruning. See ok_to_prune() definition.
+          // History pruning. See ok_to_prune() definition
           if (   moveCount >= 2 + int(depth)
               && ok_to_prune(pos, move, ss[ply].threatMove, depth))
               continue;
 
-          // Value based pruning.
-          if (depth < 3 * OnePly && approximateEval < beta)
+          // Value based pruning
+          if (depth < 6 * OnePly && approximateEval < beta)
           {
               if (futilityValue == VALUE_NONE)
                   futilityValue =  evaluate(pos, ei, threadID)
-                                + (depth < 2 * OnePly ? FutilityMargin1 : FutilityMargin2);
-
+                                + (depth < 2 * OnePly ? FutilityMargin1
+                                                      : FutilityMargin2 + (depth - 2*OnePly) * 32);
               if (futilityValue < beta)
               {
                   if (futilityValue > bestValue)
index a58ac1ae4a8378e12b6ade96a732739246076b4c..936d8cd81b88318a63c2cde1cddec995ed86e494 100644 (file)
@@ -125,7 +125,7 @@ namespace {
     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 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("Razoring Margin", 300, 150, 600));
     o.push_back(Option("LSN filtering", true));