Computer Chess Club Archives


Search

Terms

Messages

Subject: Re: Alpha-Beta Window

Author: Robert Hyatt

Date: 12:54:24 01/19/99

Go up one level in this thread


On January 19, 1999 at 09:46:52, KarinsDad wrote:

>On January 19, 1999 at 08:17:30, Robert Hyatt wrote:
>
>>On January 19, 1999 at 01:57:31, KarinsDad wrote:
>>
>>>On January 18, 1999 at 18:53:02, Robert Hyatt wrote:
>>>
>>>[snip]
>>>
>>>>This is a classic question that can be answered experimentally.  There is no
>>>>'holy grail' for all programs. The iteration-to-iteration swings can cause each
>>>>program to have different.
>>>
>>>Robert,
>>>
>>>What is iteration to iteration swings? Is this when you search one more ply
>>>deeper?
>>>
>>>Isn't the difference in "optimal" alpha beta window between programs due to
>>>their evaluation function? Or am I missing something? Is there any other
>>>components (within a program) which would give varying results in an optimal
>>>alpha beta window between programs?
>>
>>think about the value of a 'tempi'.  Most good chess books would say that
>>3 tempi are worth about a pawn (hence why gambits work).  Which means that if
>>you search one ply deeper, the side getting the extra move should see some sort
>>of advantage to the extra move he gets.  So for an N ply search, you could see
>>scores like this:  ply=1 +30, ply=2, 0, ply=3, +35, ply=4, +5, etc...
>>
>
>Ok, so this explains what iterative swing is (makes sense). It also seems to
>imply that my conjecture about an optimal alpha beta window being based on a
>given evaluation function is correct (although you didn't really answer that
>question). If that is correct, then it would seem to me that it implies that a
>given alpha beta window would work fine for certain types of positions, but that
>for different types of positions, you would get more fail lows / fail highs for
>the same evaluator and that you would have to do more re-searches. Is this
>correct?
>
>KarinsDad
>
>

Still hard to answer.  IE I don't see much of a 'swing' anymore...  on typical
positions the score doesn't do this...  and the reason is two-fold.  First I do
a lot of search extensions, so on a 7 ply search, crafty is not getting 4 moves
to 3 for the opponent.  it may be 4:3, 4:4, or somewhere in between depending
on what is going on.

If you have an eval that can suddenly 'kick up to another level' and start
producing bigger scores (ie a passed pawn maybe), then this could become a
problem.  you don't want to fail high and only pick up .01 pawns.  But you
also  don't really want to not fail high when you are picking up a pawn, because
you probably had the initial window too wide.

I'm not sure this is so important with PVS any longer, but haven't taken the
time to really investigate.  IE I used the aspiration window _first_, set at
about +/- 1/3 of a pawn IIRC, and then later implemented PVS in Crafty.  So
the window might not be so important here.

One other interesting topic, however.  In Cray Blitz we had a 'multiple fail
high' algorithm.  Harry found several positions over the years where our old
'fail high from the +.3 window meant to set alpha to +infinity and research'
would blow up.  In one position, white was to move and win a pawn.  But there
were a zillion unforced mates in the position.  When we 'sniffed' the position
we would fail high quickly, but _never_ get a result back.  We later went to
a 'tiered fail high' algorithm where we searched with the normal beta=old+.3,
then on a fail high we would go to beta=old+1.3, and then beta=old+9.3, and
finally beta=+infinity.  It helped in cases.

But back to the subject of the 'normal aspiration window'.  I recommend that it
be 'centered' on the old evaluation from the last search.  Then that it be
'adjusted' if you have an odd/even swing problem.  But as far as the actual
window goes, my +/- .3 could be right for you, or it could be bad.  In fact, it
could be bad for _me_ since I haven't modified this in several years yet the
eval is far different from what it was when I started testing...


>>
>>
>>
>>>
>>>Thanks :)
>>>
>>>KarinsDad
>>>
>>>>
>>>>Try it with different windows, over a large test of positions, and just pick the
>>>>window that works best (produces the fastest time-to-depth.)  One trick..  watch
>>>>your odd/even score swings (if you have them).  And if you see them in your
>>>>program, anticipate by correcting the window so that the odd/even swings don't
>>>>take you over the edge too frequently...



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.