Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Crafty PVS question

Author: Robert Hyatt

Date: 20:35:45 08/30/02

Go up one level in this thread


On August 30, 2002 at 17:37:25, Patrik wrote:

>Hello, Dr. Hyatt.
>
>int NegaScout ( int p, alpha, beta );
>{                        /* compute minimax value of position p */
>   int a, b, t, i;
>
>   determine successors p_1,...,p_w of p;
>   if ( w = 0 )
>      return ( Evaluate(p) );                      /* leaf node */
>   a = alpha;
>   b = beta;
>   for ( i = 1; i <= w; i++ ) {
>      t = -NegaScout ( p_i, -b, -a );
>      if (t > a) && (t < beta) && (i > 1) && (d < maxdepth-1)
>         a = -NegaScout ( p_i, -beta, -t );        /* re-search */		<===== My
>question
>      a = max( a, t );
>      if ( a >= beta )
>         return ( a );                               /* cut-off */
>      b = a + 1;                         /* set new null window */
>   }
>   return ( a );
>}
>
>
>Above code is from http://theory.lcs.mit.edu/~plaat/mtdf.html#abmem.
>Below is Crafty's code.
>
>        if (value>alpha && value<beta) {
>          if (depth+extensions >= INCPLY)
>            value=-Search(tree,-beta,-alpha,ChangeSide(wtm),			// why did you
>use -alpha instead of -value?
>                          depth+extensions,ply+1,DO_NULL,recapture);
>          else
>            value=-Quiesce(tree,-beta,-alpha,ChangeSide(wtm),ply+1);
>		}
>
>Difference is that Crafty used alpha instead of value when it re-searches.
>Is there any reason to use alpha instead of value?
>Using value which is greater than alpha seems to cause more cutoffs than using
>alpha.
>
>Thanks in advance.

I do this only because it is possible to fail low on the re-search, and now you
have the question of whether this fail-high/fail-low means anything.  I choose
to go to the full window so that if it fails low, I know it is not good and I
can ignore the fail high.  This is a null-move / hashing artifact that simply
happens to anyone doing PVS, null-move and hashing, all together...



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.