Author: Alessandro Damiani
Date: 13:41:41 08/13/00
Go up one level in this thread
On August 13, 2000 at 13:27:44, Carlos del Cacho wrote:
>On August 12, 2000 at 18:11:48, Georg v. Zimmermann wrote:
>
>>Ok,
>>
>>any good ways to limit qsearch when you detect that the qsearch overhead is
>>getting too big, or to slowly increase the qsearch depth with the normal search
>>depth ? Any good (not risky) way to razor in qsearch at very low plys to stop
>>this problem ?
>
>Here's what I do:
>
>- write an SEE evaluator if you don't have one and prune any move whose capture
>score is below zero (not perfect because of pins, but i find it worthy).
>
>- when the piece captured doesn't get close to alpha (say 1-2 pawns), you can
>skip the evaluation at the next ply level. That ought to save some time
>(futility pruning in the quiescent search, I think). You can also do this with
>your SEE but that means more risk of making mistakes on pins...
>
>Cheers
>Carlos
The following algorithm is a very good point to start with. Currently I use it
as the base algorithm (it is from a German thesis).
int Quiescence (int alpha, int beta)
{
int best, posValue, value, winLimit;
posValue= StaticEval();
if (posValue>=beta) return posValue;
best= posValue; if (best>alpha) alpha= best;
i= 0; n= GenCaptures();
while (i<n && best<beta) {
// m[i] is the move at index i in the movelist
winLimit= posValue+EGain(m[i]);
if (winLimit>alpha) {
make(m[i]);
// calculate value = min(winLimit, beta):
if (winLimit<beta)
value= winLimit;
else
value= beta;
// it applies that alpha < value = min(winLimit, beta) <= beta
// winLimit limits the (alpha, beta)-window.
value= -Quiescence(-value, -alpha);
unmake(m[i]);
}
else
value= winLimit;
if (value>best) {
best= value;
if (best>alpha) alpha= best;
};
i= i+1;
};
return best;
}
with a possible "Estimated Gain" function like this one:
int EGain (Move m)
{
return SwapOff(fromSquare(m), toSquare(m))+DELTA;
}
DELTA could be 0.25pawn to improve the positional score.
There are a lot of ways to improve it. Have fun! :)
Alessandro
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.