]> git.sesse.net Git - stockfish/commitdiff
Small code tidy up and test results
authorMarco Costalba <mcostalba@gmail.com>
Sun, 19 Apr 2009 16:23:30 +0000 (17:23 +0100)
committerMarco Costalba <mcostalba@gmail.com>
Sun, 26 Apr 2009 12:51:54 +0000 (13:51 +0100)
When testing at 1'+0" time control results are still
reasonably good. We have made two sessions on two
different PC.

After 840 games Mod - Orig: +221 -194 =425 +10 ELO (two CPU)

After 935 games Mod - Orig: +246 -222 =467  +9 ELO (single CPU)

So it seems that with fast CPU and/or longer time controls
benefits of the patch are a bit reduced. This could be due
to the fact that only 3% of nodes are pruned by razoring at
depth one and these nodes are very swallow ones, mostly get
pruned anyway with only a slightly additional cost, even
without performing any do_move() call.

Another reason is that sometime (0,3%% of cases) a possible
good move is missed typically in positions when moving side
gives check, as example in the following one

3r2k1/pbpp1nbp/1p6/3P3q/6RP/1P4P1/P4Pb1/3Q2K1 w - -

The winning move Rxg7+ is missed.

Bottom line is that patch seems good for blitz times, perhaps
also for longer times. We should test against a third engine
(Toga ?) to have a final answer regarding this new setup.

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

index 5ccc72c890cb263dd40dadd102bf0f8e248493ae..4e5103f035fceb52253d00a739c701114999323a 100644 (file)
@@ -182,19 +182,18 @@ namespace {
   // and near frontier nodes
   const Value FutilityMarginQS = Value(0x80);
 
-                  //remaining depth:  1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
-  const Value FutilityMargins[12] = { Value(0x100), Value(0x120), Value(0x200), Value(0x220), Value(0x250), Value(0x270),
-                  //                  4 ply         4.5 ply       5 ply         5.5 ply       6 ply         6.5 ply
-                                      Value(0x2A0), Value(0x2C0), Value(0x340), Value(0x360), Value(0x3A0), Value(0x3C0)};
+   // Remaining depth:                  1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
+   const Value FutilityMargins[12] = { Value(0x100), Value(0x120), Value(0x200), Value(0x220), Value(0x250), Value(0x270),
+  //                                   4 ply         4.5 ply       5 ply         5.5 ply       6 ply         6.5 ply
+                                      Value(0x2A0), Value(0x2C0), Value(0x340), Value(0x360), Value(0x3A0), Value(0x3C0) };
+   // Razoring
+   const Depth RazorDepth = 4*OnePly;
 
-  // Razoring
-  const Depth RazorDepth = 4*OnePly;
+  // Remaining depth:                 1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
+  const Value RazorMargins[6]     = { Value(0x180), Value(0x300), Value(0x300), Value(0x3C0), Value(0x3C0), Value(0x3C0) };
 
-              //remaining depth:  1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
-  const Value RazorMargins[6] = { Value(0x180), Value(0x300), Value(0x300), Value(0x3C0), Value(0x3C0), Value(0x3C0) };
-
-               //remaining depth:     1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
-  const Value RazorApprMargins[6] = { Value(0x520), Value(0x300), Value(0x300), Value(0x300), Value(0x300), Value(0x300) };
+  // Remaining depth:                 1 ply         1.5 ply       2 ply         2.5 ply       3 ply         3.5 ply
+   const Value RazorApprMargins[6] = { Value(0x520), Value(0x300), Value(0x300), Value(0x300), Value(0x300), Value(0x300) };
 
   // Last seconds noise filtering (LSN)
   bool UseLSNFiltering;
@@ -444,14 +443,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move,
   UseQSearchFutilityPruning = get_option_value_bool("Futility Pruning (Quiescence Search)");
   UseFutilityPruning = get_option_value_bool("Futility Pruning (Main Search)");
 
-  //FutilityMarginQS = value_from_centipawns(get_option_value_int("Futility Margin (Quiescence Search)"));
-  //int fmScale = get_option_value_int("Futility Margin Scale Factor (Main Search)");
-  //for (int i = 0; i < 6; i++)
-  //    FutilityMargins[i] = (FutilityMargins[i] * fmScale) / 100;
-
-  //RazorDepth = (get_option_value_int("Maximum Razoring Depth") + 1) * OnePly;
-  //RazorMargin = value_from_centipawns(get_option_value_int("Razoring Margin"));
-
   UseLSNFiltering = get_option_value_bool("LSN filtering");
   LSNTime = get_option_value_int("LSN Time Margin (sec)") * 1000;
   LSNValue = value_from_centipawns(get_option_value_int("LSN Value Margin"));
index d7b3b5b4cc9a3aedb55d8e7d21a864090665712b..63c27403356251b4d703f52b825904e74f1a6f6e 100644 (file)
@@ -128,10 +128,6 @@ namespace {
     o["Selective Plies"] = Option(7, 0, 10);
     o["Futility Pruning (Main Search)"] = Option(true);
     o["Futility Pruning (Quiescence Search)"] = Option(true);
-    //o["Futility Margin (Quiescence Search)"] = Option(50, 0, 1000);
-    //o["Futility Margin Scale Factor (Main Search)"] = Option(100, 0, 1000);
-    //o["Maximum Razoring Depth"] = Option(3, 0, 4);
-    //o["Razoring Margin"] = Option(300, 150, 600);
     o["LSN filtering"] = Option(true);
     o["LSN Time Margin (sec)"] = Option(4, 1, 10);
     o["LSN Value Margin"] = Option(200, 100, 600);