1
0
Fork 0

Relax time constraints

Allow a seacrh to take a bit more time if needed.

This reduces the chanches of wast all the search time
for the last iteration and also allow to start the last
iteration when we have less time remaining.

Signed-off-by: Marco Costalba <mcostalba@gmail.com>
sf_2.3.1_base
Marco Costalba 2008-10-29 17:00:51 +01:00
parent 79513e3a43
commit cf2bafb661
1 changed files with 2 additions and 2 deletions

View File

@ -673,7 +673,7 @@ namespace {
// Stop search if most of MaxSearchTime is consumed at the end of the
// iteration. We probably don't have enough time to search the first
// move at the next iteration anyway.
if(current_search_time() > ((MaxSearchTime + ExtraSearchTime)*80) / 128)
if(current_search_time() > ((MaxSearchTime + ExtraSearchTime)*90) / 128)
stopSearch = true;
if(stopSearch) {
@ -2227,7 +2227,7 @@ namespace {
bool overTime = t > AbsoluteMaxSearchTime
|| (RootMoveNumber == 1 && t > MaxSearchTime + ExtraSearchTime)
|| ( !FailHigh && !fail_high_ply_1() && !Problem
&& t > 6*(MaxSearchTime + ExtraSearchTime));
&& t > 10*(MaxSearchTime + ExtraSearchTime));
if ( (Iteration >= 2 && (!InfiniteSearch && overTime))
|| (ExactMaxTime && t >= ExactMaxTime)