Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: AlphaBeta has a bug.

Author: Vincent Diepeveen

Date: 20:48:54 08/25/99

Go up one level in this thread


On August 25, 1999 at 15:19:00, Bas Hamstra wrote:

>Well at least the popular ab approaches have a bug.
>
>Suppose you had no tricks, no extensions, no nothing. Just ab and a qsearch on
>top of it. You set an aspiration window at the root, say [200, 300].
>
>Now *if* the true ab value lies within this window, it should find it, right?
>
>WRONG!
>
>The fact that everyone has a
>
>      if(Eval >= Beta) return Beta;
>
>somewhere in the qsearch, makes that this no longer must be true. Reason:
>suppose you sacrifice lots of material, but can win more material back, due to
>severe mating threats, or whatever. With the window [240, 260] the qsearch
>concludes at some point to return Beta because of the material advantage (3
>pieces sacced), resulting in a fail-low on the [240, 260] window. However whith
>a wider window it can NOT do this, and finds the true value of 246. It now sees
>the material can be won back with rent.

I'm not sure how your Qsearch works, but mine will never do this.
In qsearch it's in DIEP basically like this:

  best = eval(side);
  if( eval >= beta )
    return(eval);
  else for all moves
    best = max(best,qsearch(..));
    if( best >= beta )
      break;
  return best;

So in Qsearch there is NO need to go on. The evaluation
of the current position can *always* be returned in case of doubts
that any move leads to a better score.

If a side has a score of 50 for its eval,
then it doesn't detect any threats.

What you need is to clearify your problem with your qsearch with
an example step by step using the above 'pseudo code', because it seems
very unlikely that the above threat occurs, as i never need to return
the result of a search.

If a score which gets returned because score >= beta, then it can still
return that score (evaluation) with a bigger window.

best doesn't get initialized at -infinite, but at eval, so it can
*always* return that.

Nullmove has nothing to do with this. Alfabeta has nothing to do with this.
Implementation of qsearch has. And yes there might happen strange things
in qsearch, but not this.



>My conclusion is that a fail low on [240, 260] followed by a result of 246
>on [-inf, inf] is completely normal and unavoidable in many cases. It also
>explains this:
>
>  fail low on [240, 260]
>  fail high on [-inf, 241]
>  value = 246 on [-inf, inf]
>
>I don't like it. Suppose you start ab with [-inf, inf] and after a while
>alphabeta itsself has established a window of [x, y], halfway the search.
>Shouldn't the same phenomenon be possible?
>
>
>
>Regards,
>Bas Hamstra.



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.