mirror of
https://github.com/sockspls/badfish
synced 2025-04-30 08:43:09 +00:00
Retire RootMoveNumber and use FirstRootMove instead
It is more clear why we use that global flag. No functional change. Signed-off-by: Marco Costalba <mcostalba@gmail.com>
This commit is contained in:
parent
55f0d6377f
commit
cc2a249952
1 changed files with 8 additions and 8 deletions
|
@ -254,10 +254,10 @@ namespace {
|
||||||
int MultiPV;
|
int MultiPV;
|
||||||
|
|
||||||
// Time managment variables
|
// Time managment variables
|
||||||
int RootMoveNumber, SearchStartTime, MaxNodes, MaxDepth;
|
int SearchStartTime, MaxNodes, MaxDepth, MaxSearchTime;
|
||||||
int MaxSearchTime, AbsoluteMaxSearchTime, ExtraSearchTime, ExactMaxTime;
|
int AbsoluteMaxSearchTime, ExtraSearchTime, ExactMaxTime;
|
||||||
bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit;
|
bool UseTimeManagement, InfiniteSearch, PonderSearch, StopOnPonderhit;
|
||||||
bool AbortSearch, Quit, AspirationFailLow;
|
bool FirstRootMove, AbortSearch, Quit, AspirationFailLow;
|
||||||
|
|
||||||
// Show current line?
|
// Show current line?
|
||||||
bool ShowCurrentLine;
|
bool ShowCurrentLine;
|
||||||
|
@ -828,8 +828,8 @@ namespace {
|
||||||
// Step 10. Loop through all moves in the root move list
|
// Step 10. Loop through all moves in the root move list
|
||||||
for (int i = 0; i < rml.move_count() && !AbortSearch; i++)
|
for (int i = 0; i < rml.move_count() && !AbortSearch; i++)
|
||||||
{
|
{
|
||||||
// This is used by time management and starts from 1
|
// This is used by time management
|
||||||
RootMoveNumber = i + 1;
|
FirstRootMove = (i == 0);
|
||||||
|
|
||||||
// Save the current node count before the move is searched
|
// Save the current node count before the move is searched
|
||||||
nodes = TM.nodes_searched();
|
nodes = TM.nodes_searched();
|
||||||
|
@ -843,7 +843,7 @@ namespace {
|
||||||
|
|
||||||
if (current_search_time() >= 1000)
|
if (current_search_time() >= 1000)
|
||||||
cout << "info currmove " << move
|
cout << "info currmove " << move
|
||||||
<< " currmovenumber " << RootMoveNumber << endl;
|
<< " currmovenumber " << i + 1 << endl;
|
||||||
|
|
||||||
moveIsCheck = pos.move_is_check(move);
|
moveIsCheck = pos.move_is_check(move);
|
||||||
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
captureOrPromotion = pos.move_is_capture_or_promotion(move);
|
||||||
|
@ -2480,7 +2480,7 @@ namespace {
|
||||||
if (PonderSearch)
|
if (PonderSearch)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool stillAtFirstMove = RootMoveNumber == 1
|
bool stillAtFirstMove = FirstRootMove
|
||||||
&& !AspirationFailLow
|
&& !AspirationFailLow
|
||||||
&& t > MaxSearchTime + ExtraSearchTime;
|
&& t > MaxSearchTime + ExtraSearchTime;
|
||||||
|
|
||||||
|
@ -2503,7 +2503,7 @@ namespace {
|
||||||
int t = current_search_time();
|
int t = current_search_time();
|
||||||
PonderSearch = false;
|
PonderSearch = false;
|
||||||
|
|
||||||
bool stillAtFirstMove = RootMoveNumber == 1
|
bool stillAtFirstMove = FirstRootMove
|
||||||
&& !AspirationFailLow
|
&& !AspirationFailLow
|
||||||
&& t > MaxSearchTime + ExtraSearchTime;
|
&& t > MaxSearchTime + ExtraSearchTime;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue