Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question about details of hashing (olithink)

Author: Dann Corbit

Date: 12:35:32 01/22/04

Go up one level in this thread


Here is the probe from Crafty's search:
/*
 ************************************************************
 *                                                          *
 *   now call HashProbe() to see if this position has been  *
 *   searched before.  if so, we may get a real score,      *
 *   produce a cutoff, or get nothing more than a good move *
 *   to try first.  there are four cases to handle:         *
 *                                                          *
 *   1. HashProbe() returned "EXACT" if this score is       *
 *   greater than beta, return beta.  otherwise, return the *
 *   score.  In either case, no further searching is needed *
 *   from this position.  note that lookup verified that    *
 *   the table position has sufficient "draft" to meet the  *
 *   requirements of the current search depth remaining.    *
 *                                                          *
 *   2. HashProbe() returned "UPPER" which means that       *
 *   when this position was searched previously, every move *
 *   was "refuted" by one of its descendents.  as a result, *
 *   when the search was completed, we returned alpha at    *
 *   that point.  we simply return alpha here as well.      *
 *                                                          *
 *   3. HashProbe() returned "LOWER" which means that       *
 *   when we encountered this position before, we searched  *
 *   one branch (probably) which promptly refuted the move  *
 *   at the previous ply.                                   *
 *                                                          *
 *   4. HashProbe() returned "AVOID_NULL_MOVE" which means  *
 *   the hashed score/bound was no good, but it indicated   *
 *   that trying a null-move in this position would be a    *
 *   waste of time.                                         *
 *                                                          *
 ************************************************************
 */
    switch (HashProbe(tree, ply, depth, wtm, &alpha, &beta, &mate_threat)) {
    case EXACT:
        if (alpha < beta)
            SavePV(tree, ply, 1);
        return (alpha);
    case EXACTEGTB:
        if (alpha < beta)
            SavePV(tree, ply, 2);
        return (alpha);
    case LOWER:
        return (beta);
    case UPPER:
        return (alpha);
    case AVOID_NULL_MOVE:
        do_null = 0;
    }



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.