]> git.sesse.net Git - stockfish/commitdiff
Remove unused FailHigh flag
authorJoona Kiiski <joona.kiiski@gmail.com>
Fri, 5 Feb 2010 12:21:22 +0000 (14:21 +0200)
committerMarco Costalba <mcostalba@gmail.com>
Fri, 5 Feb 2010 14:20:57 +0000 (15:20 +0100)
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
src/search.cpp

index 6c28b52f3fad315bce9d866a926da6d5396d46f7..d1f29b8c404c6e50c3c4df964bd126a655c39a09 100644 (file)
@@ -209,7 +209,7 @@ namespace {
   int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime, ExactMaxTime;
   bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit;
   bool AbortSearch, Quit;
   int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime, ExactMaxTime;
   bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit;
   bool AbortSearch, Quit;
-  bool FailHigh, FailLow, Problem;
+  bool FailLow, Problem;
 
   // Show current line?
   bool ShowCurrentLine;
 
   // Show current line?
   bool ShowCurrentLine;
@@ -352,7 +352,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int side_to_move,
 
   // Initialize global search variables
   Idle = StopOnPonderhit = AbortSearch = Quit = false;
 
   // Initialize global search variables
   Idle = StopOnPonderhit = AbortSearch = Quit = false;
-  FailHigh = FailLow = Problem = false;
+  FailLow = Problem = false;
   NodesSincePoll = 0;
   SearchStartTime = get_system_time();
   ExactMaxTime = maxTime;
   NodesSincePoll = 0;
   SearchStartTime = get_system_time();
   ExactMaxTime = maxTime;
@@ -896,7 +896,6 @@ namespace {
             }
 
             RootMoveNumber = i + 1;
             }
 
             RootMoveNumber = i + 1;
-            FailHigh = false;
 
             // Save the current node count before the move is searched
             nodes = nodes_searched();
 
             // Save the current node count before the move is searched
             nodes = nodes_searched();
@@ -970,14 +969,7 @@ namespace {
                         value = -search(pos, ss, -alpha, newDepth, 1, true, 0);
 
                         if (value > alpha)
                         value = -search(pos, ss, -alpha, newDepth, 1, true, 0);
 
                         if (value > alpha)
-                        {
-                            // Fail high! Set the boolean variable FailHigh to true, and
-                            // re-search the move using a PV search. The variable FailHigh
-                            // is used for time managment: We try to avoid aborting the
-                            // search prematurely during a fail high research.
-                            FailHigh = true;
                             value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
                             value = -search_pv(pos, ss, -beta, -alpha, newDepth, 1, 0);
-                        }
                     }
                 }
 
                     }
                 }