null move with only a minor

Programming Topics (Computer Chess) and technical aspects as test techniques, book building, program tuning etc

Moderator: Andres Valverde

null move with only a minor

Postby Daniel Shawul » 11 Jun 2005, 12:48

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
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: null move with only a minor

Postby Daniel Mehrmann » 11 Jun 2005, 13:21

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


Hi !

I disable nullmove if major pieces <= 3 (This included the kings in my engine).
greetings
Daniel
User avatar
Daniel Mehrmann
 
Posts: 127
Joined: 02 Oct 2004, 06:10
Location: Germany

Re: null move with only a minor

Postby Stan Arts » 11 Jun 2005, 15:36

Ah, I did some experiments with that again today.
(I've started working on Neurosis again since a week or so.)

Besides Zugzwang problems, I've found doing nullmoves with one minor piece left hardly usefull. (does not speed the search up much.) Instead it gives me a lot of problems, besides zugzwang, it also regularly causes missing pawnbreaks/promotions till later. (because of the reduction.) So for me the choice is easy to disable with one minor piece left. (no matter how many pawns.)
Seems any type of pruning in the near-pawnendgame is extremely dangerous, and I've not been able to come up with anything that works. :( (Luckily a hash/transpositiontable starts to become very efficient at that stage.)

Greetings
Stan
User avatar
Stan Arts
 
Posts: 28
Joined: 30 Sep 2004, 18:29
Location: The Netherlands

Re: null move with only a minor

Postby Pedro Castro » 12 Jun 2005, 02:20

I also have had many problems applying the null move with a small piece, even with rook and pawns, now I make the condition for having more a rook for the side that moves.

In order to verify Zugzwang it had the following code but it does not seem to work,

....

Code: Select all
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++;

Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: null move with only a minor

Postby Daniel Shawul » 12 Jun 2005, 05:18

Hi all
i am going to turn off null move at least when the side to move has
less or equal to a rook. IMO so many problems with out this criteria.
I tried verified null move for this positions, it solves the zugzwang but
not the problem caused by the reduction itself.
best
daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: null move with only a minor

Postby Volker Annuss » 12 Jun 2005, 06:25

I turn them off, when there is at most one piece left, that is not pinned.
Volker Annuss
 
Posts: 49
Joined: 25 Jan 2005, 11:14

Re: null move with only a minor

Postby Uri Blass » 12 Jun 2005, 08:47

1)I use verified null move pruning in endgame(value of pieces of both sides not more than 24 pawns.

2)I never use null move pruning when the number of legal moves is not bigger than 9.

3)I do not use null move pruning when the remaining depth is less than 2 plies(I have other pruning rules in this case).

Uri
User avatar
Uri Blass
 
Posts: 727
Joined: 09 Oct 2004, 05:59
Location: Tel-Aviv

Re: null move with only a minor

Postby Reinhard Scharnagl » 12 Jun 2005, 09:28

Hi Daniel,
i have collected 4 positions where scorpio loses because of this problem.
Could you list those four example positions as FEN?

Reinhard
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Daniel Shawul » 13 Jun 2005, 07:29

Hi Reinhard
This may not be real zugzwang positions

8/8/1n6/8/8/1k6/p2K4/B7 w - - 0 31
At this position it showed a score of -10.5 and resigned,
but the position can be drawn easily. With null move off it can handle it.

7K/8/6P1/4kn2/4p3/8/2p1N3/8 w - - 4 55

At this on it shows a score of 0, but any other engine
should show at least a score of -5.0.

8/3p4/p1bk3p/Pp6/1Kp1PpPp/2P2P1P/2P5/5B2 b - - 0 1

this one is position 29 of LCT2, it can solve this at ply 10 with out null move, but never with null move.

best
daniel
User avatar
Daniel Shawul
 
Posts: 366
Joined: 28 Sep 2004, 09:33
Location: Ethiopia

Re: null move with only a minor

Postby Reinhard Scharnagl » 13 Jun 2005, 10:29

Hi Daniel,

Smirf Beta BC-062 actually has some stability problems. But concerning zugzwang it should be save since some days:

a) FEN: 8/8/1n6/8/8/1k6/p2K4/B7 w - - 0 31

00:57.0 (19.03=) -2.152 31.Kc1 (Bd4) Na4 32.Kd2 Nc5 33.Kc1 Nd3+ 34.Kd2 Nb2 35.Kc1 Na4 36.Kd2 Nc5 37.Kc1 Nd3+ 38.Kd2 Nb2
00:54.2 (19.02=) -2.152 31.Kc1 (Kd1) Na4 32.Kd2 Nc5 33.Kc1 Nd3+ 34.Kd2 Nb2 35.Kc1 Na4 36.Kd2 Nc5 37.Kc1 Nd3+ 38.Kd2 Nb2
00:49.8 (19.02+) -2.232 31.Kc1 (Kd1) Na4 32.Kd2 Nc5 33.Kc1 Ka3 34.Kc2 Nb3 35.Bb2+ Kb4 36.Ba1 Ka3 37.Bb2+ Kb4 38.Ba1 Ka3
00:47.4 (19.01=) -2.233 31.Kd1 (=/=) Nc4 32.Kc1 Nd6 33.Be5 Ne4 34.Bb2 Nc5 35.Ba1 Ka3 36.Kc2 Nb3 37.Bb2+ Kb4 38.Ba1 Ka3
00:46.2 (19.01+) -2.233 31.Kd1 (=/=) Nc4 32.Kc1 Nd6 33.Be5 Ne4 34.Bb2 Nc5 35.Ba1 Ka3 36.Kc2 Nb3 37.Bb2+ Kb4 38.Ba1 Ka3

Smirf seems to be on the way to a draw.

b) FEN: 7K/8/6P1/4kn2/4p3/8/2p1N3/8 w - - 4 55

01:03.6 (20.01=) -5.801 55.Kg8 (=/=) Kf6 56.Kh7 Ng7 57.Kh6 e3 58.Kh7 Ne6 59.Kh6 Nd4 60.g7 Nf5+ 61.Kh7 Nxg7 62.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8.Kxa6 Kxf1 9.Kxb5
00:41.9 (20.01=) +2.152 1...Bxe4 (=/=) 2.fxe4 f3 3.e5+ Kd5 4.Ka3 Kxe5 5.Kb4 Ke4 6.Kc5 Ke3 7.Kb6 Kf2 8.Kxa6 Kxf1 9.Kxb5

I hope Smirf would be on the right way here.

I solved my zugzwang problems by disabling nullmove pruning in special situations. Smirf has two concurrent / parallel pruning strategies.

Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Pedro Castro » 13 Jun 2005, 15:27

Days ago I commented that I had seen some position with rooks and pawns where the engine failed with null move, today I have discovered a position the other way around. Without null move the program is not able to find the movement at least in 3 minutes, with null move yes.

wac 2:

8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1
[diag]8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1[/diag]

Rxb2!!
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: null move with only a minor

Postby Reinhard Scharnagl » 13 Jun 2005, 16:54

Hi Pedro,

Smirf is just about to get its search procedures reworked and simplified.

FEN: 8/7p/5k2/5p2/p1p2P2/Pr1pPK2/1P1R3P/8 b - - 0 1

Here it found:

04:28.9 (21.01=) +3.391 1...Rxb2 (=/=) 2.Rxb2 c3 3.Rb6+ Ke7 4.Rc6 c2 5.Kg2 Kd8 6.Rc5 d2 7.Rxf5 c1=Q 8.Rf8+ Ke7 9.Re8+
03:11.8 (21.01+) +3.183 1...Rxb2 (=/=) 2.Rxb2 c3 3.Rb6+ Ke7 4.Rb7+ Kd8 5.Rf7 c2 6.Rxf5 c1=Q 7.Rd5+ Ke8 8.Rxd3 Qf1+ 9.Ke4
02:05.1 (20.01=) +2.996 1...Rxb2 (=/=) 2.Rxb2 c3 3.Rb6+ Ke7 4.Rb7+ Kd8 5.Rf7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kxd3 Kf5
00:01.4 (12.00-) +1.292 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 fxe4+ 4.Kxe4 Rxa3 5.h4 h5 6.Rxd3 Rxd3 7.Kxd3 Kf5
00:00.7 (11.01=) +1.378 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 Rxa3 4.Ke3 fxe4 5.Kxe4 Ke7 6.Rxd3 Rxd3 7.Kxd3 h5
00:00.5 (10.01=) +1.295 1...c3 (=/=) 2.bxc3 Rxc3 3.Kf2 Rxa3 4.Kg1 Kg7 5.Rd1 Kf8 6.h4
00:00.5 (10.00-) +1.295 1...c3 (=/=) 2.bxc3 Rxc3 3.Kf2 Rxa3 4.Kg1 Ra1+ 5.Kf2 Ra3 6.Kg1 Ra1+ 7.Kf2 Ra3 8.Kg1 Ra1+ 9.Kf2
00:00.3 (10.00-) +1.479 1...c3 (=/=) 2.bxc3 Rxc3 3.Kf2 Rxa3 4.Kg1 Ra1+ 5.Kf2 Ra3 6.Kg1 Ra1+ 7.Kf2 Ra3 8.Kg1 Ra1+ 9.Kf2
00:00.1 (09.01=) +1.578 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 Rxa3 4.exf5 Kxf5 5.Kg3 Rc3 6.Rxd3 Rxd3+ 7.Kh4
00:00.0 (06.01=) +1.138 1...c3 (=/=) 2.bxc3 Rxc3 3.Kg2 Rxa3 4.Kg1 Ra1+

Regards, Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Reinhard Scharnagl » 15 Jun 2005, 21:02

Hi Pedro,

the new internal beta Smirf BC-064 has become even more stable:

02:04.5 End of thinking (time/stop)
01:38.6 (20.01=) +3.373 1...Rxb2 (=/=) 2.Rxb2 c3 3.Rb6+ Ke7 4.Rb7+ Kd6 5.Rb6+ Kc7 6.Rb1 c2 7.Rc1 Kd8 8.Kg2 d2 9.Rxc2
01:06.8 (19.01=) +3.258 1...Rxb2 (=/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Rxa3 5.h3 Ke7 6.Rxd3 Rxd3 7.Kxd3 Ke8 8.Ke4
00:00.9 (12.01=) +1.205 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 fxe4+ 4.Kxe4 Rxa3 5.h3 Ke7 6.Rxd3 Rxd3 7.Kxd3 Ke8 8.Ke4
00:00.7 (12.00-) +1.371 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 fxe4+ 4.Kxe4 Rxa3 5.h4 Rc3 6.Rxd3 Rxd3 7.Kxd3 h5
00:00.3 (11.01=) +1.462 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 Rxa3 4.Ke3 Kf7 5.Rxd3 Rxd3+ 6.Kxd3 fxe4+ 7.Kxe4 Ke6
00:00.2 (11.01+) +1.462 1...c3 (=/=) 2.bxc3 Rxc3 3.Kf2 Rxa3 4.Ke1 Kf7 5.Rd1 Kg8 6.h4
00:00.1 (10.00-) +1.479 1...c3 (=/=) 2.bxc3 Rxc3 3.Kf2 Rxa3 4.Kg1 Ra1+ 5.Kf2 Rf1+ 6.Kxf1 h5
00:00.0 (09.01=) +1.578 1...c3 (=/=) 2.bxc3 Rxc3 3.e4 Rxa3 4.exf5 Kxf5 5.Kg3 Rc3 6.Rxd3 Rxd3+ 7.Kh4

Regards, Reinhard.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Pedro Castro » 16 Jun 2005, 00:58

Hi Reinhard,

the test of positions is interesting but in the end the good test comes when plays a match, sometimes I have better the search and it found problems me in a very fast time, but soon in the confrontation against another engine inexplicably it did worse.

Smirf play match with other engines?
Best wishes,

Pedro Castro
User avatar
Pedro Castro
 
Posts: 180
Joined: 28 Jan 2005, 01:09
Location: Pays Basque (Spain)

Re: null move with only a minor

Postby Dann Corbit » 16 Jun 2005, 02:22

Code: Select all
/* 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},
Dann Corbit
 

Re: null move with only a minor

Postby Reinhard Scharnagl » 16 Jun 2005, 07:11

Hi Pedro,
Smirf play match with other engines?
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.

According to Smirf's philosophy not to use huge look up tables for opening or end game, 8x8 Chess960 or 10x8 CRC (Capablanca Random Chess) are suited best to have test matches. And because of a free available Smirf beta unrestricted until end of June anyone is able to do such tests, too.

Reinhard.
Last edited by Reinhard Scharnagl on 16 Jun 2005, 07:34, edited 1 time in total.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Reinhard Scharnagl » 16 Jun 2005, 07:30

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.
Reinhard Scharnagl
 
Posts: 608
Joined: 01 Oct 2004, 08:36
Location: Klein-Gerau, Germany

Re: null move with only a minor

Postby Dann Corbit » 16 Jun 2005, 21:34

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.


Those conditions are also checked in Beowulf, but at another place. The main purpose of the code I posted is to calculate depth reduction amount.

But it also sets the amount to a minimal value if certain conditions are met.
Dann Corbit
 

Re: null move with only a minor

Postby diepeveen » 28 Jun 2005, 11:01

Just never turn off nullmove except in pawnendgame, in far endgame you can search plies deeper by never turning off nullmove. Most of those lines you search go to 1 ply piece endgames and it is a waste of nodes if you then have to search on all those idiot lines without nullmove.

Zugzwangs you detect by using double nullmove.

In 1 piece endgames usually zugzwang is no issue or at most 1 zugzwang. This for a small price of double nullmove (double nullmove prunes less than always doing a nullmove).

Vincent
diepeveen
 
Posts: 116
Joined: 28 Jun 2005, 01:09
Location: Netherlands

Next

Return to Programming and Technical Discussions

Who is online

Users browsing this forum: No registered users and 26 guests