Disabling Null Move Pruning in Stockfish

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Disabling Null Move Pruning in Stockfish

Post by zullil »

Here's a lovely position (thanks, Marek):

[D]8/p7/qkpN1p2/8/1B1P4/PP3K2/5P2/8 w - -

that Stockfish cannot solve:

Code: Select all

info depth 50 seldepth 77 score cp -281 nodes 7909563742 nps 25690995 time 307873 multipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3b7 g4e5 b7c7 f4e4 a7a6 e4f4 e6f6 c5b4 c7g7 e5g4 f6f7 b4c5 f7e6 g4e5 g7c7 f4e4 c7h7 e4f4 h7h4 f4e3 e6d5 e5g6 h4e1
Komodo can't get it either

Code: Select all

info depth 35 time 392818 nodes 10270282765 score cp -155 nps 26145142 hashfull 854 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6e4 a6d3 f3f4 a7a6 c5b6 e6d5 e4f6 d5d6 f6e4 d6e7 a3a4 d3b3 a4a5 b3d5 b6c5 e7e6 f2f3 d5d8 c5b6 d8h4 f4e3 h4h6 e3e2 e6f5 b6c5 h6h2 e2e3 h2b8 c5b6 b8f4 e3e2 f4h2 e2e3 h2b2 e4g3 f5g6 g3e4 b2b3 e3f4 b3d1 f4e3 d1c1 e3f2 c1f4 b6c5 f4b8 c5b6 b8h2 f2e3 h2h6 e3f2 h6c1 
until Komodo's null move pruning is disabled with

Code: Select all

setoption name Null Move Pruning value false
Then Komodo solves almost instantly:

Code: Select all

info depth 16 time 1446 nodes 19958978 score cp -118 lowerbound nps 13802888 hashfull 60 pv b4a5 
info depth 16 time 1450 nodes 20035255 score cp -71 lowerbound nps 13807894 hashfull 60 pv b4a5 
info depth 16 time 1480 nodes 20593071 score cp 0 lowerbound nps 13904842 hashfull 62 pv b4a5 
info depth 16 time 1488 nodes 20721784 score cp 107 lowerbound nps 13925928 hashfull 62 pv b4a5 
info depth 16 time 1595 nodes 22591364 score cp 268 lowerbound nps 14154990 hashfull 67 pv b4a5 
info depth 16 time 1648 nodes 23553864 score cp 310 nps 14292393 hashfull 70 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 f5f4 f2f3 a6a3 c4a3 b5b4 a3c4 b4c3 g5f4 c3d4 c4a5 a7a6 a5c6 d4c5 c6b8 c5b5 f4e4 a6a5 
Is there a good reason why Stockfish doesn't have a UCI option "Disable Null Move Pruning", which could be set to false by default? Just wondering.
Uri Blass
Posts: 10269
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Disabling Null Move Pruning in Stockfish

Post by Uri Blass »

I only need to add two 0's to stockfish code to disable null move pruning.

depth>=2*ONE_PLY is one of the conditions to do null move pruing.
changing it to
depth >= 200 * ONE_PLY practically disable null move pruning and in this case stockfish can solve the problem.

Here is some analysis (I told it to search to depth 26 and it solved it at depth 25)

g5 c3e3 g5f5 a7a5 f5g4 e3e2 g4g5 e2f2 g5f4 f2h4 f4e3
info depth 15 seldepth 30 score cp -246 nodes 1650169 nps 1515306 time 1089 mult
ipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3c3 g4e5 e6d5 f
4g5 c3e3 g5f5 a7a5 f5g4 e3g1 g4f5 g1g2 f5f4 g2g7 f4f5 g7g3 f3f4 g3h3 f5g6 h3g3 g
6f5
info depth 16 seldepth 30 score cp -254 nodes 3052343 nps 1550199 time 1969 mult
ipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3b7 g4e5 e6d5 f
4g4 b7h7 g4g5 h7g7 g5f5 a7a6 f5f4 g7g2 f4f5 g2g3 c5b6 g3h3 f5f4 h3h6 f4g4 h6g7 g
4f4 g7f8
info depth 17 seldepth 30 score cp -254 nodes 3881591 nps 1576600 time 2462 mult
ipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3b7 g4e5 e6d5 f
4g4 b7h7 g4g5 h7g7 g5f5 a7a6 f5f4 g7g2 c5b6 g2c2 b6c5 c2g2
info depth 18 currmove d6c4 currmovenumber 2
info depth 18 currmove f3f4 currmovenumber 3
info depth 18 currmove d6e4 currmovenumber 4
info depth 18 currmove d6e8 currmovenumber 5
info depth 18 currmove f3g3 currmovenumber 6
info depth 18 currmove f3e4 currmovenumber 7
info depth 18 currmove f3g4 currmovenumber 8
info depth 18 currmove f3e3 currmovenumber 9
info depth 18 currmove d4d5 currmovenumber 10
info depth 18 currmove a3a4 currmovenumber 11
info depth 18 currmove f3g2 currmovenumber 12
info depth 18 currmove d6b5 currmovenumber 13
info depth 18 currmove d6f5 currmovenumber 14
info depth 18 currmove d6c8 currmovenumber 15
info depth 18 currmove b4c3 currmovenumber 16
info depth 18 currmove d6b7 currmovenumber 17
info depth 18 currmove b4a5 currmovenumber 18
info depth 18 currmove d6f7 currmovenumber 19
info depth 18 currmove b4e1 currmovenumber 20
info depth 18 currmove b4d2 currmovenumber 21
info depth 18 seldepth 30 score cp -254 nodes 5972292 nps 1580389 time 3779 mult
ipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3b7 g4e5 e6d5 f
4g4 b7h7 g4g5 h7g7 g5f5 a7a6 f5f4 g7g2 c5b6 g2b2 b6c5 b2g2
info depth 19 currmove b4c5 currmovenumber 1
info depth 19 currmove d6c4 currmovenumber 2
info depth 19 currmove d6e8 currmovenumber 3
info depth 19 currmove d6e4 currmovenumber 4
info depth 19 currmove f3e3 currmovenumber 5
info depth 19 currmove f3g3 currmovenumber 6
info depth 19 currmove d6f7 currmovenumber 7
info depth 19 currmove f3g4 currmovenumber 8
info depth 19 currmove f3f4 currmovenumber 9
info depth 19 currmove d6f5 currmovenumber 10
info depth 19 currmove f3e4 currmovenumber 11
info depth 19 currmove d6b5 currmovenumber 12
info depth 19 currmove f3g2 currmovenumber 13
info depth 19 currmove a3a4 currmovenumber 14
info depth 19 currmove d4d5 currmovenumber 15
info depth 19 currmove d6c8 currmovenumber 16
info depth 19 currmove b4c3 currmovenumber 17
info depth 19 currmove d6b7 currmovenumber 18
info depth 19 currmove b4a5 currmovenumber 19
info depth 19 currmove b4d2 currmovenumber 20
info depth 19 currmove b4e1 currmovenumber 21
info depth 19 seldepth 32 score cp -255 nodes 10151932 nps 1579084 time 6429 mul
tipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 f2f3 b3b7 g4e5 e6d5
f4g4 a7a6 g4f4 b7g7 e5g4 g7g6 g4e5 g6h6 f4f5 h6e3 f5g4 e3g1 g4f4 g1g7
info depth 20 currmove b4c5 currmovenumber 1
info depth 20 currmove d6c4 currmovenumber 2
info depth 20 currmove d6e4 currmovenumber 3
info depth 20 currmove d6e8 currmovenumber 4
info depth 20 currmove d6b5 currmovenumber 5
info depth 20 currmove f3g4 currmovenumber 6
info depth 20 currmove f3e3 currmovenumber 7
info depth 20 currmove f3e4 currmovenumber 8
info depth 20 currmove d6f7 currmovenumber 9
info depth 20 currmove f3g3 currmovenumber 10
info depth 20 currmove d6f5 currmovenumber 11
info depth 20 currmove f3g2 currmovenumber 12
info depth 20 currmove f3f4 currmovenumber 13
info depth 20 currmove d6c8 currmovenumber 14
info depth 20 currmove b4c3 currmovenumber 15
info depth 20 currmove a3a4 currmovenumber 16
info depth 20 currmove d4d5 currmovenumber 17
info depth 20 currmove b4a5 currmovenumber 18
info depth 20 currmove d6b7 currmovenumber 19
info depth 20 currmove b4d2 currmovenumber 20
info depth 20 currmove b4e1 currmovenumber 21
info depth 20 seldepth 41 score cp -262 nodes 19925426 nps 1589456 time 12536 mu
ltipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 c5a7 b3a3 a7c5 a3c1
g4e3 c1d2 f2f3 d2c1 f4e4 c1e1 e4f4 e1d2 f4e4 d2e1
info depth 21 currmove b4c5 currmovenumber 1
info depth 21 currmove d6c4 currmovenumber 2
info depth 21 currmove d6e4 currmovenumber 3
info depth 21 currmove d6e8 currmovenumber 4
info depth 21 currmove f3e4 currmovenumber 5
info depth 21 currmove d6f7 currmovenumber 6
info depth 21 currmove f3g4 currmovenumber 7
info depth 21 currmove f3g3 currmovenumber 8
info depth 21 currmove f3e3 currmovenumber 9
info depth 21 currmove d6b5 currmovenumber 10
info depth 21 currmove f3f4 currmovenumber 11
info depth 21 currmove d6f5 currmovenumber 12
info depth 21 currmove b4c3 currmovenumber 13
info depth 21 currmove d6b7 currmovenumber 14
info depth 21 currmove f3g2 currmovenumber 15
info depth 21 currmove b4a5 currmovenumber 16
info depth 21 currmove d6c8 currmovenumber 17
info depth 21 currmove a3a4 currmovenumber 18
info depth 21 currmove d4d5 currmovenumber 19
info depth 21 currmove b4d2 currmovenumber 20
info depth 21 currmove b4e1 currmovenumber 21
info depth 21 seldepth 41 score cp -262 nodes 26866533 nps 1584859 time 16952 mu
ltipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 c5a7 b3a3 a7c5 a3c1
g4e3 c1d2 f2f3 d2c1 f4e4 c1e1 e4f4 e1d2 f4e4 d2e1
info depth 22 currmove b4c5 currmovenumber 1
info depth 22 currmove d6c4 currmovenumber 2
info depth 22 currmove d6e4 currmovenumber 3
info depth 22 currmove d6e8 currmovenumber 4
info depth 22 currmove d6b7 currmovenumber 5
info depth 22 currmove f3f4 currmovenumber 6
info depth 22 currmove d6f5 currmovenumber 7
info depth 22 currmove d6f7 currmovenumber 8
info depth 22 currmove f3e4 currmovenumber 9
info depth 22 currmove d6b5 currmovenumber 10
info depth 22 currmove f3g4 currmovenumber 11
info depth 22 currmove f3e3 currmovenumber 12
info depth 22 currmove b4c3 currmovenumber 13
info depth 22 currmove f3g2 currmovenumber 14
info depth 22 currmove b4d2 currmovenumber 15
info depth 22 currmove b4a5 currmovenumber 16
info depth 22 currmove f3g3 currmovenumber 17
info depth 22 currmove d6c8 currmovenumber 18
info depth 22 currmove d4d5 currmovenumber 19
info depth 22 currmove a3a4 currmovenumber 20
info depth 22 currmove b4e1 currmovenumber 21
info depth 22 seldepth 41 score cp -262 nodes 39473587 nps 1588090 time 24856 mu
ltipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 c5a7 b3a3 a7c5 a3c1
g4e3 c1d2 f2f3 d2c1 f4e4 c1e1 e4f4 e1c1
info depth 23 currmove b4c5 currmovenumber 1
info depth 23 currmove d6c4 currmovenumber 2
info depth 23 currmove d6e4 currmovenumber 3
info depth 23 currmove f3e4 currmovenumber 4
info depth 23 currmove d6e8 currmovenumber 5
info depth 23 currmove f3g4 currmovenumber 6
info depth 23 currmove f3f4 currmovenumber 7
info depth 23 currmove d6b5 currmovenumber 8
info depth 23 currmove d6f7 currmovenumber 9
info depth 23 currmove f3g2 currmovenumber 10
info depth 23 currmove f3e3 currmovenumber 11
info depth 23 currmove b4c3 currmovenumber 12
info depth 23 currmove d6f5 currmovenumber 13
info depth 23 currmove f3g3 currmovenumber 14
info depth 23 currmove d6b7 currmovenumber 15
info depth 23 currmove a3a4 currmovenumber 16
info depth 23 currmove d6c8 currmovenumber 17
info depth 23 currmove d4d5 currmovenumber 18
info depth 23 currmove b4d2 currmovenumber 19
info depth 23 currmove b4a5 currmovenumber 20
info depth 23 currmove b4e1 currmovenumber 21
info depth 23 seldepth 41 score cp -262 nodes 50413779 nps 1587735 time 31752 mu
ltipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 c5a7 b3a3 a7c5 a3c1
g4e3 c1d2 f2f3 d2c1 f4e4 c1e1 e4f4 e1c1
info depth 24 currmove b4c5 currmovenumber 1
info depth 24 seldepth 43 score cp -254 lowerbound nodes 78512892 nps 1594170 ti
me 49250 multipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3
info depth 24 currmove b4c5 currmovenumber 1
info depth 24 currmove d6c4 currmovenumber 2
info depth 24 currmove d6e8 currmovenumber 3
info depth 24 currmove d6e4 currmovenumber 4
info depth 24 currmove f3e3 currmovenumber 5
info depth 24 currmove f3f4 currmovenumber 6
info depth 24 currmove d6f5 currmovenumber 7
info depth 24 currmove d6f7 currmovenumber 8
info depth 24 currmove d6b5 currmovenumber 9
info depth 24 currmove f3g4 currmovenumber 10
info depth 24 currmove f3g3 currmovenumber 11
info depth 24 currmove d6c8 currmovenumber 12
info depth 24 currmove f3e4 currmovenumber 13
info depth 24 currmove b4a5 currmovenumber 14
info depth 24 currmove f3g2 currmovenumber 15
info depth 24 currmove d6b7 currmovenumber 16
info depth 24 currmove b4c3 currmovenumber 17
info depth 24 currmove b4d2 currmovenumber 18
info depth 24 currmove a3a4 currmovenumber 19
info depth 24 currmove d4d5 currmovenumber 20
info depth 24 currmove b4e1 currmovenumber 21
info depth 24 seldepth 43 score cp -254 nodes 86891843 nps 1582498 time 54908 mu
ltipv 1 pv b4c5 b6c7 d6e8 c7d7 e8f6 d7e6 f6g4 a6d3 f3f4 d3b3 c5a7 b3a3 a7c5 a3c1
g4e3 c1d2 f2f3 d2h2 f4e4 h2f2 e3g4 f2e1 e4f4
info depth 25 currmove b4c5 currmovenumber 1
info depth 25 currmove d6c4 currmovenumber 2
info depth 25 currmove d6e4 currmovenumber 3
info depth 25 currmove d6e8 currmovenumber 4
info depth 25 currmove d6f5 currmovenumber 5
info depth 25 currmove d6f7 currmovenumber 6
info depth 25 currmove d6b5 currmovenumber 7
info depth 25 currmove f3e3 currmovenumber 8
info depth 25 currmove f3f4 currmovenumber 9
info depth 25 currmove f3e4 currmovenumber 10
info depth 25 currmove f3g4 currmovenumber 11
info depth 25 currmove d6c8 currmovenumber 12
info depth 25 currmove b4c3 currmovenumber 13
info depth 25 currmove d6b7 currmovenumber 14
info depth 25 currmove b4a5 currmovenumber 15
info depth 25 seldepth 43 score cp -246 lowerbound nodes 136699593 nps 1570068 t
ime 87066 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -238 lowerbound nodes 136753389 nps 1569496 t
ime 87132 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -226 lowerbound nodes 136821237 nps 1569068 t
ime 87199 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -208 lowerbound nodes 136854279 nps 1568728 t
ime 87239 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -180 lowerbound nodes 136896259 nps 1568526 t
ime 87277 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -139 lowerbound nodes 136967645 nps 1568355 t
ime 87332 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp -78 lowerbound nodes 137056859 nps 1568066 ti
me 87405 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp 12 lowerbound nodes 137242970 nps 1567881 tim
e 87534 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp 149 lowerbound nodes 137493804 nps 1567953 ti
me 87690 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp 354 lowerbound nodes 138146449 nps 1568366 ti
me 88083 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3 a6b
6 c4b6 a7b6 g5f4
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 seldepth 43 score cp 662 lowerbound nodes 142066331 nps 1572504 ti
me 90344 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 c6c5 d4d5 f5f4 f2f3 a6b
6 c4b6 b5b6 g5f4 a7a5 a3a4 b6c7 f4e4 c7d7 e4e5
info depth 25 currmove b4a5 currmovenumber 1
info depth 25 currmove b4c5 currmovenumber 2
info depth 25 currmove d6b5 currmovenumber 3
info depth 25 currmove d6c4 currmovenumber 4
info depth 25 currmove d6c8 currmovenumber 5
info depth 25 currmove f3f4 currmovenumber 6
info depth 25 currmove d4d5 currmovenumber 7
info depth 25 currmove d6f5 currmovenumber 8
info depth 25 currmove d6b7 currmovenumber 9
info depth 25 currmove d6e8 currmovenumber 10
info depth 25 currmove d6e4 currmovenumber 11
info depth 25 currmove a3a4 currmovenumber 12
info depth 25 currmove f3e3 currmovenumber 13
info depth 25 currmove f3e4 currmovenumber 14
info depth 25 currmove f3g4 currmovenumber 15
info depth 25 currmove b4d2 currmovenumber 16
info depth 25 currmove d6f7 currmovenumber 17
info depth 25 currmove f3g2 currmovenumber 18
info depth 25 currmove f3g3 currmovenumber 19
info depth 25 currmove b4e1 currmovenumber 20
info depth 25 currmove b4c3 currmovenumber 21
info depth 25 seldepth 43 score cp 660 nodes 145297697 nps 1573337 time 92350 mu
ltipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 a6a3 c4a3 b5b4 a3c4 a7a6 f4f5 b4c3 c4a5 c3d4
a5c6 d4c5 c6b8 c5b6 f5f6 b6b7 b8d7 b7c6 f6e6 c6b5 e6d5 b5a5 d7c5
info depth 26 currmove b4a5 currmovenumber 1
info depth 26 seldepth 43 score cp 668 lowerbound nodes 146736461 nps 1574763 ti
me 93180 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 a6a3 c4a3 b5b4 a3c4 a7a6 f4f5 b4c
3 c4a5 c3d4 a5c6 d4c5
info depth 26 currmove b4a5 currmovenumber 1
info depth 26 seldepth 43 score cp 676 lowerbound nodes 147582227 nps 1575353 ti
me 93682 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 a6a3 c4a3 b5b4 a3c4 a7a6 f4f5 b4c
3 c4a5 c3d4 a5c6 d4c5 c6b8 c5b6 f5f6 b6b7 b8d7 b7c6 f6e6 c6b5 e6d5 b5a5 d7c5 a5b
4 f2f4 a6a5 f4f5
info depth 26 currmove b4a5 currmovenumber 1
info depth 26 seldepth 43 score cp 688 lowerbound nodes 148637780 nps 1576389 ti
me 94290 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 a6a3 c4a3 b5b4 a3c4 a7a6 f4f5 b4c
3 c4a5 c3d4 a5c6 d4c5 c6b8 c5b6 f5f6 b6b7 b8d7 b7c6 f6e6 c6b5 e6d5 b5a5 d7c5 a5b
4 f2f4 a6a5 f4f5
info depth 26 currmove b4a5 currmovenumber 1
info depth 26 seldepth 43 score cp 706 lowerbound nodes 149461211 nps 1577476 ti
me 94747 multipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 a6a3 c4a3 b5b4 a3c4 a7a6 f4f5 b4c
3 c4a5 c3d4 a5c6 d4c5 c6b8 c5b6 f5f6 b6b7 b8d7 b7c6 f6e6 c6b5
info depth 26 currmove b4a5 currmovenumber 1
info depth 26 currmove b4c5 currmovenumber 2
info depth 26 currmove d6f5 currmovenumber 3
info depth 26 currmove f3f4 currmovenumber 4
info depth 26 currmove d6e4 currmovenumber 5
info depth 26 currmove d6c4 currmovenumber 6
info depth 26 currmove d6e8 currmovenumber 7
info depth 26 currmove d4d5 currmovenumber 8
info depth 26 currmove d6b7 currmovenumber 9
info depth 26 currmove d6c8 currmovenumber 10
info depth 26 currmove d6b5 currmovenumber 11
info depth 26 currmove f3e4 currmovenumber 12
info depth 26 currmove a3a4 currmovenumber 13
info depth 26 currmove f3g3 currmovenumber 14
info depth 26 currmove f3g4 currmovenumber 15
info depth 26 currmove f3e3 currmovenumber 16
info depth 26 currmove d6f7 currmovenumber 17
info depth 26 currmove b4d2 currmovenumber 18
info depth 26 currmove f3g2 currmovenumber 19
info depth 26 currmove b4e1 currmovenumber 20
info depth 26 currmove b4c3 currmovenumber 21
info depth 26 seldepth 43 score cp 709 nodes 151289824 nps 1576954 time 95938 mu
ltipv 1 pv b4a5 b6a5 d6c4 a5b5 f3f4 f6f5 f4g5 f5f4 f2f3 a6b7 c4d6 b5a6 d6b7 a6b7
g5f4
info nodes 151289824 time 95944
bestmove b4a5 ponder b6a5
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Disabling Null Move Pruning in Stockfish

Post by zullil »

Uri Blass wrote:I only need to add two 0's to stockfish code to disable null move pruning.
Yes, but a typical user doesn't modify the source code and compile on his own.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Disabling Null Move Pruning in Stockfish

Post by zullil »

It is fun to see Stockfish solve this

[D]8/8/8/2p5/1pp5/brpp4/1pprp2P/qnkbK3 w - -

in less than half-a-second:

Code: Select all

info depth 27 seldepth 27 score mate 15 nodes 441821 nps 1248081 time 354 multipv 1 pv h2h3 a1a2 h3h4 a2a1 h4h5 a1a2 h5h6 a2a1 h6h7 a1a2 h7h8n a2a1 h8f7 a1a2 f7g5 a2a1 g5e6 a1a2 e6c5 a2a1 c5e4 a1a2 e4d6 a2a1 d6c4 a1a2 c4a5
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Disabling Null Move Pruning in Stockfish

Post by phenri »

Interesting, thank you both. Uri, have you tested this change or something similar in the Fishtest?
elcabesa
Posts: 855
Joined: Sun May 23, 2010 1:32 pm

Re: Disabling Null Move Pruning in Stockfish

Post by elcabesa »

he is talking about disabling null move pruning, it will lower the ELO point very much.
in some position like the 2 posted here it helps, but in general play stockfish will be weak
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Disabling Null Move Pruning in Stockfish

Post by zullil »

elcabesa wrote:he is talking about disabling null move pruning, it will lower the ELO point very much.
in some position like the 2 posted here it helps, but in general play stockfish will be weak
Of course. But why not make it easy for a user to disable this feature if he wants to do so?
Uri Blass
Posts: 10269
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Disabling Null Move Pruning in Stockfish

Post by Uri Blass »

phenri wrote:Interesting, thank you both. Uri, have you tested this change or something similar in the Fishtest?
I tested disabling null move pruning at high depth and got solving zugzwangs with no significant loss in elo.

People seem to believe that doing it is bad but I have no evidence for it.
Null move pruning is certainly good when the remaining depth is small and more aggressive null move pruning at higher depth is better for small depths.

It does not mean that null move pruning is productive at high depth(and it is possible that it is better for stockfish not to use null move pruning when the depth is at least 20 but at fast time control stockfish hardly get depth 20 so I do not expect significant results and at slow time control than 1 minute per game on 1 cpu usually nobody test(2 minutes per game is rare and I do not remember testing at 10 minutes per game or even 5 minutes per game)

I know that people are going to blame me that I waste resources if I start testing at 10 minutes per game so I do not do it.

Edit:Note that I am not sure if 20 is enough and maybe you need depth 30 to start getting productive results by disabling null move pruning but my impression is that in some depth disabling null move pruning is productive and I hate seeing stockfish get fast to depth 100 with the wrong move
so my opinion is that if 20 does not lose elo at 1 minute per game then 30 or certainly 40 is clearly safe also for long time control and it may be better relative to the verification code that we have now that cause stockfish never to solve because of the huge reductions that stockfish does in the null searches.
phenri
Posts: 284
Joined: Tue Aug 13, 2013 9:44 am

Re: Disabling Null Move Pruning in Stockfish

Post by phenri »

What about test with 2 threads at 60 or 120 sec ?
bob
Posts: 20943
Joined: Mon Feb 27, 2006 7:30 pm
Location: Birmingham, AL

Re: Disabling Null Move Pruning in Stockfish

Post by bob »

Uri Blass wrote:
phenri wrote:Interesting, thank you both. Uri, have you tested this change or something similar in the Fishtest?
I tested disabling null move pruning at high depth and got solving zugzwangs with no significant loss in elo.

People seem to believe that doing it is bad but I have no evidence for it.
Null move pruning is certainly good when the remaining depth is small and more aggressive null move pruning at higher depth is better for small depths.

It does not mean that null move pruning is productive at high depth(and it is possible that it is better for stockfish not to use null move pruning when the depth is at least 20 but at fast time control stockfish hardly get depth 20 so I do not expect significant results and at slow time control than 1 minute per game on 1 cpu usually nobody test(2 minutes per game is rare and I do not remember testing at 10 minutes per game or even 5 minutes per game)

I know that people are going to blame me that I waste resources if I start testing at 10 minutes per game so I do not do it.

Edit:Note that I am not sure if 20 is enough and maybe you need depth 30 to start getting productive results by disabling null move pruning but my impression is that in some depth disabling null move pruning is productive and I hate seeing stockfish get fast to depth 100 with the wrong move
so my opinion is that if 20 does not lose elo at 1 minute per game then 30 or certainly 40 is clearly safe also for long time control and it may be better relative to the verification code that we have now that cause stockfish never to solve because of the huge reductions that stockfish does in the null searches.
Since null-move is pretty much a standard idea, I can easily do a test on my cluster with Crafty. I can disable null-move at several depths and plot the decay of Elo easily enough.

I'll report the results back later.