Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Instability thing...

Author: Sune Fischer

Date: 01:11:43 09/19/04

Go up one level in this thread


On September 18, 2004 at 19:43:55, Andrew Platt wrote:


>then you are always starting a new ply and you aren't losing any information. In
>fact, if you don't do this you have a problem because you have information
>relating to a *previous* move in the PV. Resetting the PV at this ply won't
>cause the information already backed up from the previously tried moves.

Yes my logic is a bit different, the child PV is not copied until the end.

>My routine looks something like this
>
>AlphaBeta ()
>{
>   // Try to get a cutoff with a null move
>   if (TryNullMove ())
>   {
>      return Score;
>   }
>
>   // Try to get a hash table cutoff
>   if (HashTableCutoff ())
>   {
>      return Score;
>   }
>
>   // We're going to search moves. Reset this ply in the triangular array
>   PV [Ply] [Ply] = Ply;
>
>   while (GetMove ())
>   {
>      MakeMove ();
>      Score = -AlphaBeta (..., Ply + 1);
>      UnmakeMove ();
>
>     if (Score > Alpha)
>     {
>        if (Score >= Beta)
>        {
>           return Score;
>        }
>
>        // Update the Principal variation now we have a better move
        //UpdatePV (); <- not yet...
>      }
>   }
>

    // finished searching, now clean up before returning

    if (best_score > original_alpha) {
      p->pv.Merge(&(p+1)->pv);  // note the pv at the next ply is needed!

     // do other stuff as well like record to the hash table...
    }

>   return Score;
>}
>
>
>Make sure you reset the PV if you cutoff, etc. too.

-S.

>Andy.



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.