Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Simple qsearch question

Author: Bas Hamstra

Date: 03:26:54 03/24/99

Go up one level in this thread


On March 24, 1999 at 06:03:26, JW de Kort wrote:

Because in the qsearch there are only capturing moves, it will terminate if you
do it right. Something like this will help:

QSearch(a, b)

{Value = Evaluate();
if(Value > Alpha) Alpha = Value;
if(Value >= Beta) return Beta;

{ // try all captures here and evaluate the positions
 if(Value > Alpha) Alpha = Value;
 if(Value >= Beta) return Beta;
}

return Alpha;
}

With some pruning tricks you can limit the QSearch even more, look in the Crafty
code for a small and effective QSearch.


Bas Hamstra,



>Hi Chess friends,
>
>I have a simple question concerning the quiescence search. Standar alpha-beta
>usualy starts with something like
>
>   if (depthh == 0)
>      return evaluate (position)
>
>most qsearches i have seen do not have thsi kind of ply depth termination. Now
> i wonder how can a q search ever terminate? I have seen a question like this
>before, but could some one please explain? What i'am afraid off is that my
>qsearch will go on and on evaluating a line of play in wich white takes all the
>pieces at the kingside, while black does the same on the queen side.
>
>Thanks in advance.
>
>Jan Willem



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.