Author: Dieter Buerssner
Date: 16:25:38 08/07/03
Go up one level in this thread
Another interesting thing there, I cite the code from the URL:
int PrincipalVariation (pos, depth, alpha, beta)
{
if (depth == 0) return Evaluate(pos);
succ = Successors(pos);
pos = RemoveOne(succ);
best = -PrincipalVariation(pos, depth-1, -beta, -alpha);
while (not Empty(succ) && best < beta)
{
pos = RemoveOne(succ);
if (best > alpha) alpha = best;
value = -PrincipalVariation(pos, depth-1, -alpha-1, -alpha);
if (value > alpha && value < beta)
best = -PrincipalVariation(pos, depth-1, -beta, -value);
/* ^^^^^^ */
else if (value > best)
best = value;
}
return best;
}
I think, Reinefeld formulated his Negascout similarily. The research with
-value can leave you without a PV (even in the cases of a search without
qsearch/extensions/pruning). Often programs only update the PV, when it is
inside the window. But it might be the case, that the correct score is just
value. This is a bound in the research (and so not inside the window). In this
case, many typical engines would come up with no PV at at all. Using -value+1
instead would fix it.
Regards,
Dieter
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.