Author: Bruce Moreland
Date: 15:21:05 08/31/99
Go up one level in this thread
On August 31, 1999 at 16:19:55, Daniel Clausen wrote:
>Hi
>
>I don't have question/comment to the original question but to an answer
>Mr. Hyatt posted. He said that the typical q-search looks like this:
>
>
>int Quiesce(alpha,beta) {
> val=Evaluate();
> if (val > beta) return(val);
>* alpha=val;
> foreach move in(move_list) {
> MakeMove();
> val=-Quiesce(-beta,-alpha);
> if (val > alpha) {
> if (val > beta) return(val);
> alpha=val;
> }
> }
> return(alpha);
>}
>
>
>My question: Why initialize alpha to val in the marked line above?
>If I do that with my chess program it visits more q-nodes.
>
>I use "if(val>alpha) alpha = val;". Did I miss something?
>
>cu,
> -sargon
No, yours is right, but there is another problem as well. Comparisons with
"beta" should use ">=" rather than ">". There are two lines where this happens.
bruce
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.