Moderator: Andres Valverde
Daniel Shawul wrote:i use null move when the side to move has one piece left.
I found out that this has been causing zugzwang problems
especially during minors and pawn endings.
Surprisingly this cases are quite common in real games. i have collected
4 positions where scorpio loses because of this problem.
When do you start turning null move off? or what are the possible modifications to handle these special zugzwangs.
daniel
x = - alphabeta(-beta, -beta + 1, depth - 1 - R)
if (x >= beta) {
if ( material > ROOK)
return beta;
else {
x = alphabeta(beta - 1, beta, depth - 1 - R)
if (x >= beta)
return beta;
else
extensionzugzwang++;
}
}
else if (x < -MATE + 500)
extension++;
Could you list those four example positions as FEN?i have collected 4 positions where scorpio loses because of this problem.
/* Test to see whether or not a NULL move is safe in the given position.
* This is false if;
* (1) There is less material on the board than the defined minimum, AVOID_NULL_MAT
* (2) There are fewer pieces than AVOID_NULL_PIECES
* If a NULL move is safe then we calculate the amount by which we should reduce
* the search depth.
*/
int NullOK(Board * B, int depth)
{
int cwp = 0,
cbp = 0,
base_reduction = (depth > IGNORE_ZUGZWANG) ? 0 : ONEPLY;
/* If there is a risk of Zugzwang then return 0 (no Null move) */
if (B->side == WHITE && B->WPts < AVOID_NULL_MAT)
return base_reduction;
if (B->side == BLACK && B->BPts < AVOID_NULL_MAT)
return base_reduction;
cwp = Count(B->WhitePieces);
if (B->side == WHITE && cwp < AVOID_NULL_PIECES)
return base_reduction;
cbp = Count(B->BlackPieces);
if (B->side == BLACK && cbp < AVOID_NULL_PIECES)
return base_reduction;
if (Skill <= 8)
return Skill;
/* The formula below is from Ernst A. Heinz's book "Scalable Search in
* Computer Chess" It comes from pages 35-37 and is described elsewhere
* in the book. This method is called 'Adaptive Null Move Pruning' with
* R(adapt) = 3(6)~2. In English, the NULL move depth reduction is equal
* to two ply by default. However, if either (a) both sides have fewer
* than 3 pieces and the current depth is 8 ply or more or (b) at least
* one side has greater than 2 pieces and the current depth is 6 ply or
* more then increase the depth reduction to 3 full ply. */
/* return TWOPLY + ((depth) > ((6*ONEPLY) + (((cwp < 3 && cbp < 3) ? TWOPLY : 0))) ? ONEPLY : 0); */
/* This is Colin's formula, offering scaleable search depth reduction
* between one and 2.5 ply depending on the depth to which you are
* searching */
return ONEPLY + (depth > (ONEPLY * ONEPLY) ? (ONEPLY) : (depth / ONEPLY)) + ((depth > ONEPLY) ? (HALFPLY) : (0));
}
Default for AVOID_NULL_MAT is 5 pawns equivalent
Default for AVOID_NULL_PIECES is 3 pieces
/* Name of the parameter, enum for the parameter, default, minimum, maximum: */
const phunk phunk_list[] = {
{"avoid_null_mat", person_avoid_null_mat, 5, 0, 20},
{"avoid_null_pieces", person_avoid_null_pieces, 3, 0, 10},
of course this is very important. One problem with that is, that such games actually are done manually, because there is no GUI which supports Smirf's 8x8 and 10x8 abilities beside of my own one.Smirf play match with other engines?
Reinhard Scharnagl wrote:Hi Dann,
thank you for illustrating your ideas to the use of Nullmove restriction.
Smirf actually does not handle that question according to piece numbers. In my program there are two concurrent pruning strategies, Nullmove examination is one of them. Those are Smirf's criteria types for Nullmove pruning:
a) pruning methods should make sense at all in that situation, that is: when no main pruning then also no prior applied Nullmove pruning,
b) the active side sees chances, that applying a Nullmove could be successfull, e.g. being in advantage over the other side,
c) the active side's number of possible moves should exceed a depth depending limit,
d) never apply a Nullmove, when standing in check, it could cost the king,
e) avoid Nullmove after having applied Nullmove in preceeding ply.
Reinhard.
Return to Programming and Technical Discussions
Users browsing this forum: No registered users and 19 guests