Author: Scott Gasch
Date: 18:11:12 06/01/02
Go up one level in this thread
On May 31, 2002 at 19:46:39, Gian-Carlo Pascutto wrote:
>On May 31, 2002 at 18:34:29, Omid David wrote:
>
>>The following is the code for typical AspWin search. In very rare cases it
>>happens that even after the re-search the value is out of the alpha-beta window.
>>In this case my program conducts a full window search -10000, 10000. Is there
>>any better way to deal with this problem?!
>
>I don't know. I handle it as you do.
>
I'm with GCP on this one, I do basically the same thing you are talking about:
iAlpha = -INFINITY - 1;
iBeta = INFINITY + 1;
iNumFL = 0;
for (iDepth = 1;
iDepth <= g_Options.iMaxDepth;
iDepth++)
{
do
{
iScore = RootSearch(pos,
iAlpha,
iBeta,
iDepth * ONE_PLY,
fInCheck);
mv = g_PV.mv[0][0];
//
// We could be unwinding because time to think ran out,
// the user interrupted the search, or the user made a
// move other than the ponder move.
//
if (g_MoveTimer.bvFlags & STOPPING) break;
#ifdef DEBUG
if (iScore != g_PV.iScore[0]) _asm int 3;
#endif
//
// Otherwise we completed a search of depth iDepth... see if
// our aspiration window failed or succeeded. If it failed,
// adjust it and try this depth again.
//
if ((iAlpha < iScore) && (iScore < iBeta))
{
//
// Next search will window around this one.
//
iAlpha = iScore - 100;
iBeta = iScore + 100;
//
// Remember we are not resolving anything anymore
//
g_MoveTimer.bvFlags &= ~RESOLVING_ROOT_FH;
g_MoveTimer.bvFlags &= ~RESOLVING_ROOT_FL;
[... Stuff about test suite correct moves and some timing flags omitted here]
}
else if (iScore <= iAlpha)
{
//
// Root position fail low...
//
g_MoveTimer.bvFlags |= RESOLVING_ROOT_FL;
//
// Keep track of how many we see...
//
if (iDepth > 2) iNumFL++;
if (iNumFL > 1)
{
Trace("[many root FL, thinking longer]\n");
g_MoveTimer.bvFlags |= MANY_ROOT_FLS;
}
DirtyHash();
if (TRUE == g_Options.fPost)
{
Trace("%2u- %6s %s %-9u **FL**\n",
g_PV.iDepth,
ScoreString(iScore),
TimeString(TimeStamp() - g_MoveTimer.dStartTime),
g_Counters.node.iCount);
}
//
// TODO: gradually open this?
//
iAlpha = -INFINITY - 1;
}
else
{
//
// Root fail high...
//
ASSERT(iScore >= iBeta);
g_MoveTimer.bvFlags |= RESOLVING_ROOT_FH;
DirtyHash();
if (TRUE == g_Options.fPost)
{
Trace("%2u+ %6s %s %-9u %s!!\n",
g_PV.iDepth,
ScoreString(iScore),
TimeString(TimeStamp() - g_MoveTimer.dStartTime),
g_Counters.node.iCount,
MoveToSAN(mv, pos));
}
//
// TODO: gradually open this?
//
iBeta = INFINITY + 1;
}
}
while(1);
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.