Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: MTD: an observation and a question

Author: Dieter Buerssner

Date: 08:54:11 09/12/02

Go up one level in this thread


On September 12, 2002 at 09:28:28, Robert Hyatt wrote:

>The gotcha is to use fail-soft.  And this probably requires a few changes
>to how you back up scores.  IE you might do something like this:
>
>        v=Search(-beta, -alpha, etc);
>        if (v > alpha) {
>            if (v > beta) return beta;
>            alpha=v;
>        }
>
>That return beta is not fail-soft.  it should be changed to
>
>            if (v > beta) return v;

This is not enough. You need a new variable, for example best (intitialized to
some very bad score)

         v=Search(-beta, -alpha, etc);
         if (v > best) {
           best = v;
           /* And to the PV discussion: here the "semi-PV" must be updated */
           if (v > alpha) {
             if (v > beta) return v;
             alpha=v;
           }
         }

and out of the search loop:

  return best;

Your code snippet (Crafty, too) is essentially fail hard. In the parent node,
after you returned best, you end up returning alpha in most cases (which is
almost the same, as you would return beta in the fail high node).

Regards,
Dieter



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.