From: Marco Costalba Date: Sun, 24 Apr 2011 07:31:47 +0000 (+0100) Subject: Retire extensions as UCI option X-Git-Url: https://git.sesse.net/?p=stockfish;a=commitdiff_plain;h=ccd5ccbcdbfd7bc1521fe194a970ab1c6a4b55fe Retire extensions as UCI option There is no real need why an user should change these values. No functional change. Signed-off-by: Marco Costalba --- diff --git a/src/search.cpp b/src/search.cpp index 86414e7c..e6903f1d 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -180,7 +180,7 @@ namespace { // Step 9. Internal iterative deepening // Minimum depth for use of internal iterative deepening - const Depth IIDDepth[2] = { 8 * ONE_PLY /* non-PV */, 5 * ONE_PLY /* PV */}; + const Depth IIDDepth[] = { 8 * ONE_PLY, 5 * ONE_PLY }; // At Non-PV nodes we do an internal iterative deepening search // when the static evaluation is bigger then beta - IIDMargin. @@ -188,13 +188,14 @@ namespace { // Step 11. Decide the new search depth - // Extensions. Configurable UCI options. Array index 0 is used at - // non-PV nodes, index 1 at PV nodes. - Depth CheckExtension[2], PawnPushTo7thExtension[2]; - Depth PassedPawnExtension[2], PawnEndgameExtension[2]; + // Extensions. Array index 0 is used for non-PV nodes, index 1 for PV nodes + const Depth CheckExtension[] = { ONE_PLY / 2, ONE_PLY / 1 }; + const Depth PawnEndgameExtension[] = { ONE_PLY / 1, ONE_PLY / 1 }; + const Depth PawnPushTo7thExtension[] = { ONE_PLY / 2, ONE_PLY / 2 }; + const Depth PassedPawnExtension[] = { DEPTH_ZERO, ONE_PLY / 2 }; // Minimum depth for use of singular extension - const Depth SingularExtensionDepth[2] = { 8 * ONE_PLY /* non-PV */, 6 * ONE_PLY /* PV */}; + const Depth SingularExtensionDepth[] = { 8 * ONE_PLY, 6 * ONE_PLY }; // Step 12. Futility pruning @@ -205,8 +206,16 @@ namespace { Value FutilityMarginsMatrix[16][64]; // [depth][moveNumber] int FutilityMoveCountArray[32]; // [depth] - inline Value futility_margin(Depth d, int mn) { return d < 7 * ONE_PLY ? FutilityMarginsMatrix[Max(d, 1)][Min(mn, 63)] : 2 * VALUE_INFINITE; } - inline int futility_move_count(Depth d) { return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : 512; } + inline Value futility_margin(Depth d, int mn) { + + return d < 7 * ONE_PLY ? FutilityMarginsMatrix[Max(d, 1)][Min(mn, 63)] + : 2 * VALUE_INFINITE; + } + + inline int futility_move_count(Depth d) { + + return d < 16 * ONE_PLY ? FutilityMoveCountArray[d] : MOVES_MAX; + } // Step 14. Reduced search @@ -477,16 +486,8 @@ bool think(Position& pos, const SearchLimits& limits, Move searchMoves[]) { } // Read UCI options - CheckExtension[1] = Options["Check Extension (PV nodes)"].value(); - CheckExtension[0] = Options["Check Extension (non-PV nodes)"].value(); - PawnPushTo7thExtension[1] = Options["Pawn Push to 7th Extension (PV nodes)"].value(); - PawnPushTo7thExtension[0] = Options["Pawn Push to 7th Extension (non-PV nodes)"].value(); - PassedPawnExtension[1] = Options["Passed Pawn Extension (PV nodes)"].value(); - PassedPawnExtension[0] = Options["Passed Pawn Extension (non-PV nodes)"].value(); - PawnEndgameExtension[1] = Options["Pawn Endgame Extension (PV nodes)"].value(); - PawnEndgameExtension[0] = Options["Pawn Endgame Extension (non-PV nodes)"].value(); - UCIMultiPV = Options["MultiPV"].value(); - SkillLevel = Options["Skill level"].value(); + UCIMultiPV = Options["MultiPV"].value(); + SkillLevel = Options["Skill level"].value(); read_evaluation_uci_options(pos.side_to_move()); diff --git a/src/ucioption.cpp b/src/ucioption.cpp index 89e47058..a8b34c70 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -81,14 +81,6 @@ OptionsMap::OptionsMap() { o["Space"] = Option(100, 0, 200); o["Aggressiveness"] = Option(100, 0, 200); o["Cowardice"] = Option(100, 0, 200); - o["Check Extension (PV nodes)"] = Option(2, 0, 2); - o["Check Extension (non-PV nodes)"] = Option(1, 0, 2); - o["Pawn Push to 7th Extension (PV nodes)"] = Option(1, 0, 2); - o["Pawn Push to 7th Extension (non-PV nodes)"] = Option(1, 0, 2); - o["Passed Pawn Extension (PV nodes)"] = Option(1, 0, 2); - o["Passed Pawn Extension (non-PV nodes)"] = Option(0, 0, 2); - o["Pawn Endgame Extension (PV nodes)"] = Option(2, 0, 2); - o["Pawn Endgame Extension (non-PV nodes)"] = Option(2, 0, 2); o["Minimum Split Depth"] = Option(4, 4, 7); o["Maximum Number of Threads per Split Point"] = Option(5, 4, 8); o["Threads"] = Option(1, 1, MAX_THREADS);