Info from timeout search

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Info from timeout search

Post by Michel »

Could somebody enlighten me what the best strategy is to deal with a timed out search?

The easiest thing seems to be to simply discard the result. Is there a better strategy?
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Info from timeout search

Post by zamar »

If you were searching first move and time ran out, I guess there is nothing you can get from it.

The only thing one can do is to avoid such situation as often as possible. Like:

1) not starting new iteration with little time left.
2) Allocating some extra time when searching the first move and opponent getting fail high at depth = 1.
3) Using relatively small aspiration window.
Joona Kiiski
P. Villanueva
Posts: 85
Joined: Sat May 17, 2008 10:57 pm
Location: Bilbao, Spain

Re: Info from timeout search

Post by P. Villanueva »

If the timed-out iteration has finded a principal variation you sould use it, because it's one play deeper than the previous iteration one. Only discard the results if there isn't pv.

NOTE: My english is very poor. I hope you understand what I mean.
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Info from timeout search

Post by bob »

Michel wrote:Could somebody enlighten me what the best strategy is to deal with a timed out search?

The easiest thing seems to be to simply discard the result. Is there a better strategy?
Yes. At the instant of time-out, anything already backed up to the root is perfectly usable. Anything "in progress" has to be tossed out. If, for example, you have searched the first 3 root moves already, before time runs out, you can certainly use the result you have so far as it is better than the result you had at the end of the last complete iteration. But if you have searched 3 root moves and are 1/2 way through searching the 4th, you can not use any information from the 4th, you have to throw that away, or so as I do and always finish searching any specific root move before timing out. If you haven't searched all root moves, that isn't a problem.
zamar
Posts: 613
Joined: Sun Jan 18, 2009 7:03 am

Re: Info from timeout search

Post by zamar »

bob wrote:or so as I do and always finish searching any specific root move before timing out.
Does that apply also for the 1st move?
Joona Kiiski
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Info from timeout search

Post by bob »

zamar wrote:
bob wrote:or so as I do and always finish searching any specific root move before timing out.
Does that apply also for the 1st move?
No. Special case. Suppose you have been pondering in a chess tournament because your opponent lost his machine connection. You get to an impossibly deep search, where the first move might take 45 minutes to resolve. :)

If I have used the "target time" and am on the first root move, I bail out unless the root move has already failed low and this is a re-search.
Michel
Posts: 2272
Joined: Mon Sep 29, 2008 1:50 am

Re: Info from timeout search

Post by Michel »

Thanks a lot for all the replies!