Computer Chess Club Archives


Search

Terms

Messages

Subject: Crafty PVS question

Author: Patrik

Date: 14:37:25 08/30/02


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.



This page took 0.01 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.