@@ -251,8 +251,8 @@ namespace {
251251 int MultiPV;
252252
253253 // Time managment variables
254- int SearchStartTime, MaxNodes, MaxDepth, MaxSearchTime ;
255- int AbsoluteMaxSearchTime , ExtraSearchTime, ExactMaxTime;
254+ int SearchStartTime, MaxNodes, MaxDepth, OptimumSearchTime ;
255+ int MaximumSearchTime , ExtraSearchTime, ExactMaxTime;
256256 bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit;
257257 bool FirstRootMove, AbortSearch, Quit, AspirationFailLow;
258258
@@ -401,7 +401,7 @@ bool think(const Position& pos, bool infinite, bool ponder, int time[], int incr
401401
402402 // Initialize global search variables
403403 StopOnPonderhit = AbortSearch = Quit = AspirationFailLow = false ;
404- MaxSearchTime = AbsoluteMaxSearchTime = ExtraSearchTime = 0 ;
404+ OptimumSearchTime = MaximumSearchTime = ExtraSearchTime = 0 ;
405405 NodesSincePoll = 0 ;
406406 TM .resetNodeCounters ();
407407 SearchStartTime = get_system_time ();
@@ -475,12 +475,12 @@ bool think(const Position& pos, bool infinite, bool ponder, int time[], int incr
475475 if (UseTimeManagement)
476476 {
477477 get_search_times (myTime, myIncrement, movesToGo, pos.startpos_ply_counter (),
478- &MaxSearchTime , &AbsoluteMaxSearchTime );
478+ &OptimumSearchTime , &MaximumSearchTime );
479479
480480 if (get_option_value_bool (" Ponder" ))
481481 {
482- MaxSearchTime += MaxSearchTime / 4 ;
483- MaxSearchTime = Min (MaxSearchTime, AbsoluteMaxSearchTime );
482+ OptimumSearchTime += OptimumSearchTime / 4 ;
483+ OptimumSearchTime = Min (OptimumSearchTime, MaximumSearchTime );
484484 }
485485 }
486486
@@ -626,20 +626,20 @@ namespace {
626626 if ( Iteration >= 8
627627 && EasyMove == pv[0 ]
628628 && ( ( rml.get_move_cumulative_nodes (0 ) > (nodes * 85 ) / 100
629- && current_search_time () > MaxSearchTime / 16 )
629+ && current_search_time () > OptimumSearchTime / 16 )
630630 ||( rml.get_move_cumulative_nodes (0 ) > (nodes * 98 ) / 100
631- && current_search_time () > MaxSearchTime / 32 )))
631+ && current_search_time () > OptimumSearchTime / 32 )))
632632 stopSearch = true ;
633633
634634 // Add some extra time if the best move has changed during the last two iterations
635635 if (Iteration > 5 && Iteration <= 50 )
636- ExtraSearchTime = BestMoveChangesByIteration[Iteration] * (MaxSearchTime / 2 )
637- + BestMoveChangesByIteration[Iteration-1 ] * (MaxSearchTime / 3 );
636+ ExtraSearchTime = BestMoveChangesByIteration[Iteration] * (OptimumSearchTime / 2 )
637+ + BestMoveChangesByIteration[Iteration-1 ] * (OptimumSearchTime / 3 );
638638
639639 // Stop search if most of MaxSearchTime is consumed at the end of the
640640 // iteration. We probably don't have enough time to search the first
641641 // move at the next iteration anyway.
642- if (current_search_time () > ((MaxSearchTime + ExtraSearchTime) * 80 ) / 128 )
642+ if (current_search_time () > ((OptimumSearchTime + ExtraSearchTime) * 80 ) / 128 )
643643 stopSearch = true ;
644644
645645 if (stopSearch)
@@ -2142,9 +2142,9 @@ namespace {
21422142
21432143 bool stillAtFirstMove = FirstRootMove
21442144 && !AspirationFailLow
2145- && t > MaxSearchTime + ExtraSearchTime;
2145+ && t > OptimumSearchTime + ExtraSearchTime;
21462146
2147- bool noMoreTime = t > AbsoluteMaxSearchTime
2147+ bool noMoreTime = t > MaximumSearchTime
21482148 || stillAtFirstMove;
21492149
21502150 if ( (Iteration >= 3 && UseTimeManagement && noMoreTime)
@@ -2165,9 +2165,9 @@ namespace {
21652165
21662166 bool stillAtFirstMove = FirstRootMove
21672167 && !AspirationFailLow
2168- && t > MaxSearchTime + ExtraSearchTime;
2168+ && t > OptimumSearchTime + ExtraSearchTime;
21692169
2170- bool noMoreTime = t > AbsoluteMaxSearchTime
2170+ bool noMoreTime = t > MaximumSearchTime
21712171 || stillAtFirstMove;
21722172
21732173 if (Iteration >= 3 && UseTimeManagement && (noMoreTime || StopOnPonderhit))
0 commit comments