Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Question regarding: Aspiraton Window Search (a correction)

Author: José Carlos

Date: 06:30:37 06/01/02

Go up one level in this thread


On June 01, 2002 at 09:19:43, Omid David wrote:

>On June 01, 2002 at 09:13:53, José Carlos wrote:
>
>>On May 31, 2002 at 18:50:18, Omid David wrote:
>>
>>>I forgot to change "negascout" to "AlphaBeta" in 7th line for better
>>>illustration. Here is the correction:
>>
>>1:  int AspWin(int estimate, int delta, int depth)
>>2:  {
>>3:  int alpha = estimate - delta;
>>4:  int beta = estimate + delta;
>>5:  int best;
>>6:
>>7:  best = AlphaBeta(alpha, beta, depth);
>>8:
>>9:  /* re-search */
>>10: if(best <= alpha)
>>11: best = AlphaBeta(-10000, beta, depth);
>>12: else if(best >= beta)
>>13: best = AlphaBeta(alpha, 10000, depth);
>>14:
>>15: /* is there any better way to handle this very rare case? */
>>16: if(best >= beta || best <= alpha)
>>17: best = AlphaBeta(-10000, 10000, depth);
>>18:
>>19: return best;
>>20: }
>>
>>  I numbered the lines for clarity. I think it should be:
>>
>>11: {alpha = -10000; best = AlphaBeta(-10000, beta, depth);}
>>13: {beta = 10000; best = AlphaBeta(alpha, 10000, depth);}
>>
>>  If you don't update alpha and beta when researching, it can happen that you
>>fail low for [alpha,beta], then you research with [-inf,beta] and return best
>>with -inf < best < alpha which is a true score and there's no need to research.
>>Same for fail high.
>>  Other than this, you're code looks correct.
>>
>>  José C.
>
>But then in line 13 it would be in fact AlphaBeta(-10000, 10000, depth) since
>alpha = -10000 in line 11.

  Maybe I'm still sleeping :)
  In your code I see:
------------------------------------
  Search asp window;
  If fail low
    search -inf,beta
  else if fail high
    search alpha,+inf

  if still outside asp window
    search -inf,+inf
------------------------------------
  Now, if you fail low, research [-inf,beta], find a true score below alpha,
there's no need to research [-inf,+inf], which you do unless you change alpha
and beta according to the research.
  Please, if forgive me if I'm wrong. I've had a bad night.

>My question is how can a full window search of
>(-10000,10000) be avoided at all costs?

  You can try some ideas like research small windows around the score found. For
example:

  alpha=-30;
  beta=30;
  search returns -50;
  you try search [-80,30]
  search returns +40 (very improbable)
  you try search [-80,+80]

  You get the idea. But I don't think it's any better than plain full with
research, and it's surely much more complex to code.

  José C.



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.