Engines can't solve this puzzle (even not Stockfish 5)

Discussion of anything and everything relating to chess playing software and machines.

Moderators: hgm, Rebel, chrisw

Uri Blass
Posts: 10282
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by Uri Blass »

zullil wrote:
Uri Blass wrote: I think that you simply do not understand stockfish.

Stockfish does not see it because of very aggressive null move pruning
Can you post output from Stockfish (with null move pruning modified) that shows the mate being found. I assume you can modify the source code as needed to make the null move pruning less aggressive, and then compile your own binary.
Yes
Stockfish finds the mate at depth 58 if I disable null move pruning when the number of legal moves is not more than 1.

Note that counting the number of legal moves is expensive so I do not expect it to be better in playing mode.

It is possible to count the number of legal moves only at relatively big depths(for example depth at least 10 plies) and I guess that in this case you will see no significant change in playing strength(in this case when I did not submit the output stockfish needs depth 65 to see the mate).

Stockfish 250714 by Tord Romstad, Marco Costalba and Joona Kiiski
position fen 1n6/Pp1p1p1p/1P1P1P1P/4K3/2p5/p7/rpp1P3/qkb1R3 w - - 0 1
go depth 58
info depth 1 seldepth 1 score cp -1085 nodes 37 nps 37000 time 1 multipv 1 pv a7
b8q
info depth 2 seldepth 2 score cp -823 nodes 71 nps 14200 time 5 multipv 1 pv a7b
8q c4c3 b8b7
info depth 3 seldepth 3 score cp -823 nodes 122 nps 12200 time 10 multipv 1 pv a
7b8q c4c3 b8b7
info depth 4 seldepth 4 score cp 0 nodes 174 nps 13384 time 13 multipv 1 pv a7b8
q c4c3 b8b7
info depth 5 seldepth 4 score cp 0 nodes 226 nps 13294 time 17 multipv 1 pv a7b8
q c4c3 b8b7
info depth 6 seldepth 4 score cp 0 nodes 278 nps 13238 time 21 multipv 1 pv a7b8
q c4c3 b8b7
info depth 7 seldepth 4 score cp 0 nodes 330 nps 12222 time 27 multipv 1 pv a7b8
q c4c3 b8b7
info depth 8 seldepth 4 score cp 0 nodes 408 nps 12750 time 32 multipv 1 pv a7b8
q c4c3 b8b7
info depth 9 seldepth 4 score cp 0 nodes 487 nps 13527 time 36 multipv 1 pv a7b8
q c4c3 b8b7
info depth 10 seldepth 4 score cp 0 nodes 715 nps 17023 time 42 multipv 1 pv a7b
8q c4c3 b8b7
info depth 11 seldepth 4 score cp 0 nodes 848 nps 18434 time 46 multipv 1 pv a7b
8q c4c3 b8b7
info depth 12 seldepth 4 score cp 0 nodes 1101 nps 22020 time 50 multipv 1 pv a7
b8q c4c3 b8b7
info depth 13 seldepth 4 score cp 0 nodes 1419 nps 24465 time 58 multipv 1 pv a7
b8q c4c3 b8b7
info depth 14 seldepth 4 score cp 0 nodes 1716 nps 27238 time 63 multipv 1 pv a7
b8q c4c3 b8b7
info depth 15 seldepth 4 score cp 0 nodes 2035 nps 29492 time 69 multipv 1 pv a7
b8q c4c3 b8b7
info depth 16 seldepth 4 score cp 0 nodes 2654 nps 34921 time 76 multipv 1 pv a7
b8q c4c3 b8b7
info depth 17 seldepth 4 score cp 0 nodes 3447 nps 42036 time 82 multipv 1 pv a7
b8q c4c3 b8b7
info depth 18 seldepth 4 score cp 0 nodes 4477 nps 50303 time 89 multipv 1 pv a7
b8q c4c3 b8b7
info depth 19 seldepth 4 score cp 0 nodes 7029 nps 71000 time 99 multipv 1 pv a7
b8q c4c3 b8b7
info depth 20 seldepth 4 score cp 0 nodes 9751 nps 90287 time 108 multipv 1 pv a
7b8q c4c3 b8b7
info depth 21 seldepth 4 score cp 0 nodes 12818 nps 109555 time 117 multipv 1 pv
a7b8q c4c3 b8b7
info depth 22 seldepth 4 score cp 0 nodes 17213 nps 132407 time 130 multipv 1 pv
a7b8q c4c3 b8b7
info depth 23 seldepth 4 score cp 0 nodes 22485 nps 157237 time 143 multipv 1 pv
a7b8q c4c3 b8b7
info depth 24 seldepth 4 score cp 0 nodes 27538 nps 178818 time 154 multipv 1 pv
a7b8q c4c3 b8b7
info depth 25 seldepth 4 score cp 0 nodes 33059 nps 196779 time 168 multipv 1 pv
a7b8q c4c3 b8b7
info depth 26 seldepth 4 score cp 0 nodes 39697 nps 215744 time 184 multipv 1 pv
a7b8q c4c3 b8b7
info depth 27 seldepth 4 score cp 0 nodes 47189 nps 237130 time 199 multipv 1 pv
a7b8q c4c3 b8b7
info depth 28 seldepth 4 score cp 0 nodes 54524 nps 245603 time 222 multipv 1 pv
a7b8q c4c3 b8b7
info depth 29 seldepth 4 score cp 0 nodes 61566 nps 259772 time 237 multipv 1 pv
a7b8q c4c3 b8b7
info depth 30 seldepth 4 score cp 0 nodes 74618 nps 285892 time 261 multipv 1 pv
a7b8q c4c3 b8b7
info depth 31 seldepth 4 score cp 0 nodes 81297 nps 294554 time 276 multipv 1 pv
a7b8q c4c3 b8b7
info depth 32 seldepth 4 score cp 0 nodes 98172 nps 322934 time 304 multipv 1 pv
a7b8q c4c3 b8b7
info depth 33 seldepth 4 score cp 0 nodes 110480 nps 337859 time 327 multipv 1 p
v a7b8q c4c3 b8b7
info depth 34 seldepth 4 score cp 0 nodes 127516 nps 343708 time 371 multipv 1 p
v a7b8q c4c3 b8b7
info depth 35 seldepth 4 score cp 0 nodes 137845 nps 355270 time 388 multipv 1 p
v a7b8q c4c3 b8b7
info depth 36 seldepth 4 score cp 0 nodes 161083 nps 381713 time 422 multipv 1 p
v a7b8q c4c3 b8b7
info depth 37 seldepth 4 score cp 0 nodes 189706 nps 407969 time 465 multipv 1 p
v a7b8q c4c3 b8b7
info depth 38 seldepth 4 score cp 0 nodes 213659 nps 428174 time 499 multipv 1 p
v a7b8q c4c3 b8b7
info depth 39 seldepth 4 score cp 0 nodes 246510 nps 450658 time 547 multipv 1 p
v a7b8q c4c3 b8b7
info depth 40 seldepth 4 score cp 0 nodes 268832 nps 461910 time 582 multipv 1 p
v a7b8q c4c3 b8b7
info depth 41 seldepth 4 score cp 0 nodes 312313 nps 487227 time 641 multipv 1 p
v a7b8q c4c3 b8b7
info depth 42 seldepth 4 score cp 0 nodes 340148 nps 496566 time 685 multipv 1 p
v a7b8q c4c3 b8b7
info depth 43 seldepth 4 score cp 0 nodes 396496 nps 521019 time 761 multipv 1 p
v a7b8q c4c3 b8b7
info depth 44 seldepth 4 score cp 0 nodes 425276 nps 517997 time 821 multipv 1 p
v a7b8q c4c3 b8b7
info depth 45 seldepth 4 score cp 0 nodes 462585 nps 530487 time 872 multipv 1 p
v a7b8q c4c3 b8b7
info depth 46 seldepth 4 score cp 0 nodes 511860 nps 540506 time 947 multipv 1 p
v a7b8q c4c3 b8b7
info depth 47 seldepth 4 score cp 0 nodes 597831 nps 558720 time 1070 multipv 1
pv a7b8q c4c3 b8b7
info depth 48 seldepth 4 score cp 0 nodes 630189 nps 565191 time 1115 multipv 1
pv a7b8q c4c3 b8b7
info depth 49 seldepth 4 score cp 0 nodes 659150 nps 570692 time 1155 multipv 1
pv a7b8q c4c3 b8b7
info depth 50 seldepth 4 score cp 0 nodes 700437 nps 577441 time 1213 multipv 1
pv a7b8q c4c3 b8b7
info depth 51 seldepth 4 score cp 0 nodes 742108 nps 583418 time 1272 multipv 1
pv a7b8q c4c3 b8b7
info depth 52 seldepth 4 score cp 0 nodes 790444 nps 588565 time 1343 multipv 1
pv a7b8q c4c3 b8b7
info depth 53 seldepth 4 score cp 0 nodes 855050 nps 597937 time 1430 multipv 1
pv a7b8q c4c3 b8b7
info depth 54 seldepth 4 score cp 0 nodes 919617 nps 605409 time 1519 multipv 1
pv a7b8q c4c3 b8b7
info depth 55 seldepth 4 score cp 0 nodes 1000054 nps 613906 time 1629 multipv 1
pv a7b8q c4c3 b8b7
info depth 56 seldepth 4 score cp 0 nodes 1038109 nps 614993 time 1688 multipv 1
pv a7b8q c4c3 b8b7
info depth 57 seldepth 4 score cp 0 nodes 1078632 nps 619547 time 1741 multipv 1
pv a7b8q c4c3 b8b7
info depth 58 currmove a7b8q currmovenumber 2
info depth 58 currmove a7a8q currmovenumber 3
info depth 58 currmove a7b8r currmovenumber 4
info depth 58 currmove a7b8b currmovenumber 5
info depth 58 currmove a7a8r currmovenumber 6
info depth 58 currmove a7a8b currmovenumber 7
info depth 58 currmove a7a8n currmovenumber 8
info depth 58 currmove e2e3 currmovenumber 9
info depth 58 currmove e1h1 currmovenumber 10
info depth 58 currmove e5d4 currmovenumber 11
info depth 58 currmove e5e4 currmovenumber 12
info depth 58 currmove e5d5 currmovenumber 13
info depth 58 currmove e1g1 currmovenumber 14
info depth 58 currmove e2e4 currmovenumber 15
info depth 58 currmove e5f5 currmovenumber 16
info depth 58 currmove e1d1 currmovenumber 17
info depth 58 currmove e1f1 currmovenumber 18
info depth 58 currmove e1c1 currmovenumber 19
info depth 58 seldepth 36 score mate 18 nodes 16462784 nps 600261 time 27426 mul
tipv 1 pv a7b8n c4c3 b8a6 b7a6 b6b7 a6a5 b7b8n a5a4 b8c6 d7c6 d6d7 c6c5 d7d8n c5
c4 d8e6 f7e6 e5d6 e6e5 f6f7 e5e4 f7f8n e4e3 f8g6 h7g6 h6h7 g6g5 h7h8n g5g4 h8f7
g4g3 f7g5 g3g2 g5e4 g2g1b e4c3
info nodes 16462784 time 27441
bestmove a7b8n ponder c4c3
Last edited by Uri Blass on Fri Jul 25, 2014 1:29 pm, edited 4 times in total.
bnst
Posts: 87
Joined: Tue Sep 11, 2007 12:16 pm

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by bnst »

How did you disable null-move. By changing the source or in some simpler way ?
I would like to try this when I analyze certain positions.
Regards
Andreas
Uri Blass
Posts: 10282
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by Uri Blass »

bnst wrote:How did you disable null-move. By changing the source or in some simpler way ?
I would like to try this when I analyze certain positions.
Regards
Andreas
simply by changing the source.

I added
(MoveList<LEGAL>(pos).size()>1) to the conditions of null move pruning

This make stockfish slower in nodes per second because the check is expensive so you may try also something like
((depth<10*ONE_PLY)||(MoveList<LEGAL>(pos).size()>1))


Note that stockfish use a lot of other reductions except null move pruning
so the first condition cause stockfish to see the mate in depth 58 and the second condition cause stockfish to see the mate in depth 65.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by zullil »

Uri Blass wrote:
zullil wrote:
Uri Blass wrote: I think that you simply do not understand stockfish.

Stockfish does not see it because of very aggressive null move pruning
Can you post output from Stockfish (with null move pruning modified) that shows the mate being found. I assume you can modify the source code as needed to make the null move pruning less aggressive, and then compile your own binary.
Yes
Stockfish finds the mate at depth 58 if I disable null move pruning when the number of legal moves is not more than 1.
Thanks. So, in this position, your modification means that no null move pruning occurs when Black has the move.

With one thread, I got

Code: Select all

info depth 58 seldepth 36 score mate 18 nodes 16462784 nps 1542181 time 10675 multipv 1 pv a7b8n c4c3 b8a6 b7a6 b6b7 a6a5 b7b8n a5a4 b8c6 d7c6 d6d7 c6c5 d7d8n c5c4 d8e6 f7e6 e5d6 e6e5 f6f7 e5e4 f7f8n e4e3 f8g6 h7g6 h6h7 g6g5 h7h8n g5g4 h8f7 g4g3 f7g5 g3g2 g5e4 g2g1b e4c3
Last edited by zullil on Fri Jul 25, 2014 2:00 pm, edited 2 times in total.
Uri Blass
Posts: 10282
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by Uri Blass »

I can add that if I disable null move pruning when the number of legal moves is bigger than 2 then stockfish see the mate at depth 50(I am surprised because I thought all move of black are forced except the last move when there are 4 legal promotions so I expected it to see it at the same depth).

Disabling null move pruning when the number of legal moves is bigger than 4 does not help to see it at depth 49 and stockfish again probably needs depth 50.

Note that I think that disabling null move pruning when the number of legal moves is small is not a solution for most practical zugzwang problems that happen during games.
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by lech »

Uri Blass wrote:... Note that I think that disabling null move pruning when the number of legal moves is small is not a solution for most practical zugzwang problems that happen during games.
I am ready to publish Sting SF 4.7 with less sensitive or non-sensitive rather method to sollve this interesting question. I am waiting for the end of Graham's gauntlet (Sting SF 4.6) only. Graham's team (CCRL) is very important for my project. :D
Maybe, I can't be friendly, but let me be useful.
User avatar
vittyvirus
Posts: 646
Joined: Wed Jun 18, 2014 2:30 pm
Full name: Fahad Syed

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by vittyvirus »

lech wrote:
Uri Blass wrote:... Note that I think that disabling null move pruning when the number of legal moves is small is not a solution for most practical zugzwang problems that happen during games.
I am ready to publish Sting SF 4.7 with less sensitive or non-sensitive rather method to sollve this interesting question. I am waiting for the end of Graham's gauntlet (Sting SF 4.6) only. Graham's team (CCRL) is very important for my project. :D
on what version of stockfish is sting sf based?
lech
Posts: 1136
Joined: Sun Feb 14, 2010 10:02 pm

Re: Engines can't solve this puzzle (even not Stockfish 5)

Post by lech »

vittyvirus wrote:
lech wrote:
Uri Blass wrote:... Note that I think that disabling null move pruning when the number of legal moves is small is not a solution for most practical zugzwang problems that happen during games.
I am ready to publish Sting SF 4.7 with less sensitive or non-sensitive rather method to sollve this interesting question. I am waiting for the end of Graham's gauntlet (Sting SF 4.6) only. Graham's team (CCRL) is very important for my project. :D
on what version of stockfish is sting sf based?
Project STING is based on my deep and wide thinking as well my fantasy. As skeleton I use the old version of Stockfish 2.1.1.
Maybe, I can't be friendly, but let me be useful.