From fbca16da570756f5220b229845e566bd05aa3ce8 Mon Sep 17 00:00:00 2001 From: Marco Costalba Date: Tue, 28 Apr 2009 08:47:26 +0200 Subject: [PATCH] Hardcode depth limit for selective search Because futility margins array has a fixed size we cannot arbitrarly choose or change the SelectiveDepth parameter, otherwise we have a crash for values bigger then array size. On the other hand tweaking of this parameter requires some modification to the hardcoded margins, so makes sense to hard code also this very bounded one. Who wants to experiment is of course free to change the sources. No functional change. Signed-off-by: Marco Costalba --- src/search.cpp | 3 +-- src/ucioption.cpp | 1 - 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/search.cpp b/src/search.cpp index a8aa1bb6..0ac38d05 100644 --- a/src/search.cpp +++ b/src/search.cpp @@ -139,7 +139,7 @@ namespace { Depth ThreatDepth; // Depth limit for selective search - Depth SelectiveDepth; + const Depth SelectiveDepth = 7*OnePly; // Use internal iterative deepening? const bool UseIIDAtPVNodes = true; @@ -426,7 +426,6 @@ void think(const Position &pos, bool infinite, bool ponder, int side_to_move, LMRPVMoves = get_option_value_int("Full Depth Moves (PV nodes)") + 1; LMRNonPVMoves = get_option_value_int("Full Depth Moves (non-PV nodes)") + 1; ThreatDepth = get_option_value_int("Threat Depth") * OnePly; - SelectiveDepth = get_option_value_int("Selective Plies") * OnePly; Chess960 = get_option_value_bool("UCI_Chess960"); ShowCurrentLine = get_option_value_bool("UCI_ShowCurrLine"); diff --git a/src/ucioption.cpp b/src/ucioption.cpp index ab76997f..006c4c56 100644 --- a/src/ucioption.cpp +++ b/src/ucioption.cpp @@ -125,7 +125,6 @@ namespace { o["Full Depth Moves (PV nodes)"] = Option(14, 1, 100); o["Full Depth Moves (non-PV nodes)"] = Option(3, 1, 100); o["Threat Depth"] = Option(5, 0, 100); - 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); -- 2.39.2