Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: How to properly handle a move in X time control?

Author: Peter Kasinski

Date: 16:17:14 02/20/99

Go up one level in this thread


On February 20, 1999 at 16:34:57, Robert Hyatt wrote:

>On February 20, 1999 at 11:08:30, Peter Kasinski wrote:
>
>>I am having problems interupting search at an arbitrary point.
>>Unless it completes the iteration I get strange results. Typically I get the PV
>>move and all is fine. Sometimes I get a PV move with a strange (usually very
>>low) score. And once in a while I get a moronic move with a low score.
>>I don't allow this before first iteration is completed.
>>Any idea what is going on?
>>
>>Thank you,
>>PK.
>
>
>this is easy and hard.  When you decide to 'time out'  all you have to do is
>start 'returning' to back your way out of the recursive calls.  But you _must_
>be certain that you know you are 'backing out'.. you do _not_ store any hash
>stuff on the way back, you do not test for cutoffs, you do not back up scores
>or PVs, you don't modify scores or the PV, ie you do _nothing_ but return.
>
>If you don't notice you are 'aborting' and update something you will get
>wildly bogus results...


That's what I get.

>
>In crafty, I do this _everywhere_ I call Search:
>
>  val=-Search(-beta,-alpha,etc)..
>
>  if (abort_search) return(0);
>
>abort_search is a global variable that is set 'true' when the time check
>says 'stop searching. You _must_ put this after _every_ call to search(),
>quiesce() or any other recursive routine you might use to do selective
>stuff...
>
>that prevents any score/pv update after that variable has been set..


Thanks Bob, as always.

PK.




This page took 0 seconds to execute

Last modified: Thu, 15 Apr 21 08:11:13 -0700

Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.