summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
191662a)
If flag StopOnPonderhit is set it means that we UseTimeManagement
and also we are at Iteration >= 3.
So we can safely simplify the formula.
No functional change.
Signed-off-by: Marco Costalba <mcostalba@gmail.com>
static int lastInfoTime;
int t = current_search_time();
static int lastInfoTime;
int t = current_search_time();
- bool stillAtFirstMove = FirstRootMove
- && !AspirationFailLow
- && t > TimeMgr.available_time();
-
- bool noMoreTime = t > TimeMgr.maximum_time()
- || stillAtFirstMove;
-
// Poll for input
if (data_available())
{
// Poll for input
if (data_available())
{
// should continue searching but switching from pondering to normal search.
Pondering = false;
// should continue searching but switching from pondering to normal search.
Pondering = false;
- if ( Iteration >= 3 && UseTimeManagement
- && (noMoreTime || StopOnPonderhit))
+ bool stillAtFirstMove = FirstRootMove
+ && !AspirationFailLow
+ && t > TimeMgr.available_time();
+
+ bool noMoreTime = t > TimeMgr.maximum_time()
+ || stillAtFirstMove;
+
if ( (Iteration >= 3 && UseTimeManagement && noMoreTime)
|| (ExactMaxTime && t >= ExactMaxTime)
|| (Iteration >= 3 && MaxNodes && pos.nodes_searched() >= MaxNodes))
if ( (Iteration >= 3 && UseTimeManagement && noMoreTime)
|| (ExactMaxTime && t >= ExactMaxTime)
|| (Iteration >= 3 && MaxNodes && pos.nodes_searched() >= MaxNodes))