Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Tree search programs

Author: JW de Kort

Date: 14:02:03 05/25/03

Go up one level in this thread


On May 25, 2003 at 16:03:26, Tom Kerrigan wrote:

>On May 25, 2003 at 09:41:48, JW de Kort wrote:
>
>>On May 25, 2003 at 08:03:46, Tom Kerrigan wrote:
>>
>>>On May 25, 2003 at 07:53:59, JW de Kort wrote:
>>>
>>>>Hi friends,
>>>>
>>>>My chess engine currently has two search related problems.
>>>>
>>>>1) Sometime a e.g. 8 ply search only returns a pv a say 4 or 5 or sometimes even
>>>>only one move. Can this be a result of using the hashtable?
>>>
>>>The obvious possibility is that there was contention for the hash table entry
>>>that would have contained the rest of your PV. There may be additional
>>>explanations too.
>>>
>>>>2) The engine searches until a certain amount of time is spend. If the search
>>>>notices that the time has ran out, the search is stopped an beta is returned. I
>>>>think this is the correct thing to do. BUT the following happens: sometimes a 8
>>>>or 9 ply search is done and a correct move (at least a correct move in the eye
>>>>of my engine) is found but then suddenly a completely different move is
>>>>selected, most of the cases this is a blunder and often the evaluation drops
>>>>with about the score of a bishop because a bishop is lost. It is nice to have
>>>>written a enging playing like a human, but i would rather remove this problem.
>>>
>>>When time runs out, my program just stops searching and doesn't try to do
>>>anything clever that might be wrong. After every call to search, I check
>>>stop_search, and if it's TRUE, I return 0...
>>>
>>>-Tom
>>
>>Thanks Tom,
>>
>>i do not quit get what you mean. Suppose the engine has reached a depth of 4 ply
>>and time runs out. Then some value has to returned to depth 3. I use beta for
>>this. How do you solve this problem?
>
>I return 0, but it doesn't matter what value you return, because that value
>won't be used for anything. Every call to search looks like this:
>
>x = -search(-beta, -alpha, depth - 1);
>if (stop_search)
>    return 0;
>if (x > alpha) {
>    etc.
>
>So when time runs out, your entire search tree "collapses" without updating
>anything (like the PV) so your program will play whatever the best move was
>right before it ran out of time, as it should...
>
>-Tom

Dear Tom,

Thank you very much for your help. I found an error somewhere else in my
program. Th pv was updated even if a move was not completely analysed. I have
removed that by a very simple line. The response i got here set me on the right
track.

thanks!



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.