out of time in PVS

Discussion of chess software programming and technical issues.

Moderators: bob, hgm, Harvey Williamson

Forum rules
This textbox is used to restore diagrams posted with the [d] tag before the upgrade.
Sven
Posts: 3822
Joined: Thu May 15, 2008 7:57 pm
Location: Berlin, Germany
Full name: Sven Schüle
Contact:

Re: out of time in PVS

Post by Sven » Sat Dec 15, 2018 7:48 pm

RubiChess wrote:
Sat Dec 15, 2018 6:56 am
Sven wrote:
Sat Dec 15, 2018 12:15 am
RubiChess wrote:
Fri Dec 14, 2018 6:31 pm
I return alpha immediately without storing to TT.
This should just throw away all unfinished searches.
Do you also use a flag indicating that the search is being stopped? If you don't then just returning alpha on detecting a timeout might be wrong since the direct parent node negates the score and performs a beta cutoff but then the parent's parent just continues with the next move after noticing that its current move has been refuted.
Yes, I have a global flag "IMMEDIATESTOP" that lets every parent node just return its alpha.
Even if the parent node is the root node? In Jumbo I only break from the move loop at root when my 'stopSearch' flag is set, so that I do not ignore the results of the current iteration that were obtained so far. Returning alpha also at root would skip the whole iteration.
Sven Schüle (engine author: Jumbo, KnockOut, Surprise)

jwes
Posts: 778
Joined: Sat Jul 01, 2006 5:11 am

Re: out of time in PVS

Post by jwes » Sat Dec 15, 2018 10:26 pm

elcabesa wrote:
Thu Dec 13, 2018 6:28 pm
One usually stop the PVS search and use the result of the previous finished iterative deepening result.
Remember that after you decide to stop the search you have also to stop saving killers, sving info to transposition tables and so on.
One thing that has not been mentioned is that if the best move of the previous iteration fails low and you have not yet found a satisfactory alternative, doing this may just lose. Adding time and continuing to search is a partial solution to this.

Ras
Posts: 1143
Joined: Tue Aug 30, 2016 6:19 pm
Contact:

Re: out of time in PVS

Post by Ras » Sat Dec 15, 2018 11:05 pm

jwes wrote:
Sat Dec 15, 2018 10:26 pm
One thing that has not been mentioned is that if the best move of the previous iteration fails low and you have not yet found a satisfactory alternative, doing this may just lose. Adding time and continuing to search is a partial solution to this.
Usually, when you fail seriously low, trying to recover is a case of "too little, too late".
Rasmus Althoff
https://www.ct800.net

User avatar
JVMerlino
Posts: 1003
Joined: Wed Mar 08, 2006 9:15 pm
Location: San Francisco, California

Re: out of time in PVS

Post by JVMerlino » Sun Dec 16, 2018 7:08 am

Ras wrote:
Sat Dec 15, 2018 11:05 pm
jwes wrote:
Sat Dec 15, 2018 10:26 pm
One thing that has not been mentioned is that if the best move of the previous iteration fails low and you have not yet found a satisfactory alternative, doing this may just lose. Adding time and continuing to search is a partial solution to this.
Usually, when you fail seriously low, trying to recover is a case of "too little, too late".
Probably, but you have to at least try. :)

I'm not sure that only breaking out of the search at the root is the best idea, although it would make things A LOT cleaner to code. But it also sounds like a really good way to get into time pressure. Myrddin's time management was created somewhat arbitrarily, but the only concession I made to root moves was to ensure that I had at least completed searching the first move in an iteration. After that, it's possible to break out at any time.

RubiChess
Posts: 107
Joined: Fri Mar 30, 2018 5:20 am

Re: out of time in PVS

Post by RubiChess » Sun Dec 16, 2018 7:19 am

Sven wrote:
Sat Dec 15, 2018 7:48 pm
RubiChess wrote:
Sat Dec 15, 2018 6:56 am
Yes, I have a global flag "IMMEDIATESTOP" that lets every parent node just return its alpha.
Even if the parent node is the root node? In Jumbo I only break from the move loop at root when my 'stopSearch' flag is set, so that I do not ignore the results of the current iteration that were obtained so far. Returning alpha also at root would skip the whole iteration.
You are right, root search is different and keeps the best move and score found so far.

Andreas

Post Reply