Solutions Stockfish should find 100 times faster

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

Moderator: Ras

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

Re: Solutions Stockfish should find 100 times faster

Post by zullil »

Vinvin wrote: 1.Rg4+! going for the mate
[d]8/4K2p/6pr/5pk1/1pB2R2/p4PP1/8/8 w - - 0 1
Stockfish solves this (using 20 threads):

Code: Select all

info depth 64 seldepth 82 multipv 1 score mate 27 nodes 60296977627 nps 42245985 hashfull 996 tbhits 0 time 1427283 pv f4g4 f5g4 f3f4 g5h5 e7f8 b4b3 c4b3 g6g5 b3f7 h6g6 f4f5 a3a2 f5g6 h7g6 f7a2 h5h6 a2c4 h6h5 f8f7 h5h6 c4d3 h6h7 d3g6 h7h6 g6f5 h6h5 f7f6 h5h6 f5g4 h6h7 f6g5 h7g7 g4h5 g7g8 g5g6 g8h8 g3g4 h8g8 g4g5 g8h8 g6f6 h8h7 h5f7 h7h8 f7e6 h8h7 g5g6 h7h6 g6g7 h6h5 g7g8q h5h4 g8g4
kgburcham
Posts: 2016
Joined: Sun Feb 17, 2008 4:19 pm

Re: Solutions Stockfish should find 100 times faster

Post by kgburcham »

[d] rk6/p1r3p1/P3B1K1/1p2B3/8/8/8/8 w - -


Engine: Arasan 18.0 (2048 MB)
by Jon Dart
30.01 0:23 -0.15 1.Bd5 Kc8 2.Bxa8 Rc4 3.Kf5 Kd7 4.Bxg7 Kc7 5.Bd5 Ra4 6.Bb7 Kb6 7.Bc3 b4 8.Bd4+ Kb5 9.Ke4 b3 10.Kd3 Rxd4+ 11.Kxd4 b2 12.Be4 Kxa6 13.Bd3+ Kb6 14.Kc3 (228.580.130) 9752
31.01 0:31 -0.06 1.Bd5 Kc8 2.Bxa8 Rc4 3.Kf5 Kd7 4.Bxg7 Kc7 5.Bd5 Ra4 6.Bb7 Kb6 7.Bc3 b4 8.Bd4+ Kb5 9.Ke4 b3 10.Kd3 Rxd4+ 11.Kxd4 b2 12.Be4 Kxa6 13.Kc3 Kb5 14.Bd3+ (313.981.521) 9869
32.01 0:45 +0.12++ 1.Bd7 b4 (458.486.468) 10004
32.01 0:45 +0.49++ 1.Bd7 b4 (458.486.672) 10004
32.01 0:45 +1.24++ 1.Bd7 b4 (458.486.859) 10004
32.01 0:45 +2.74++ 1.Bd7 b4 (458.487.012) 10004
32.01 0:45 +5.74++ 1.Bd7 b4 (458.487.165) 10004
32.01 0:45 +M17 1.Bd7 b4 (458.487.250) 10004
33.01 0:46 +M6 1.Bd7 b4 2.Kf7 b3 3.Ke7 g5 4.Ke8 g4 5.Kd8 b2 6.Bxc7+ (468.442.926) 10097
34.01 0:46 +M6 1.Bd7 b4 2.Kf7 b3 3.Ke7 g5 4.Ke8 g4 5.Kd8 b2 6.Bxc7+ (470.904.624) 10116
35.01 0:46 +M6 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Ke7 g4 5.Kd8 b2 6.Bxc7+ (473.940.837) 10141
36.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (474.348.497) 10146
37.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (474.662.392) 10146
38.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (475.002.593) 10150
39.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (475.340.343) 10150
40.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (475.676.697) 10154
41.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (476.087.421) 10156
42.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (476.498.139) 10158
43.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (476.892.133) 10163
44.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (477.323.846) 10165
45.01 0:46 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (477.799.746) 10169
46.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (478.223.613) 10171
47.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (478.718.925) 10171
48.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (479.202.941) 10175
49.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (479.666.629) 10178
50.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (480.174.427) 10182
51.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (480.675.550) 10182
52.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (481.110.609) 10185
53.01 0:47 +M5 1.Bd7 b4 2.Kf7 g5 3.Ke8 b3 4.Kd8 b2 5.Bxc7+ (481.664.121) 10187
no chess program was born totally from one mind. all chess programs have many ideas from many minds.
Uri Blass
Posts: 10874
Joined: Thu Mar 09, 2006 12:37 am
Location: Tel-Aviv Israel

Re: Solutions Stockfish should find 100 times faster

Post by Uri Blass »

hgm wrote:
Vinvin wrote:A lot engines have problem with this solution.
A friend rated 1600 Elo found the solution in a couple of minutes...
Well, Fairy-Max finds it in 9 sec:

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 21	+79.95 	10.5M  	0:09.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2 c7e7 b2g7 e7e3 g7d4 e3g3
 11	+2.25 	36660  	0:00.03	e6d5 b5b4 d5a8 b4b3 a8d5 b3b2 e5b2 c7e7 b2g7 e7e3 g7d4
 10	+1.81 	22153  	0:00.01	e6d5 b5b4 d5a8 b4b3 a8f3 b8c8 f3g4 c8d8 e5c7 d8c7 g6g7 b3b2
  9	+2.12 	10898  	0:00.01	e6d5 b5b4 d5a8 b4b3 a8f3 b3b2 e5b2 c7d7 b2g7
  8	+2.12 	8641    	0:00.01	e6d5 b5b4 d5a8 b4b3 a8f3 b3b2 e5b2 c7d7 b2g7
  7	+1.34 	3727    	0:00.00	e6d5 b5b4 d5a8 b4b3 e5c7 b8c7 a8d5 b3b2 g6g7
  6	+1.73 	1274    	0:00.00	e6d5 b5b4 d5a8 b4b3 e5c7 b8c7
  5	+1.74 	725      	0:00.00	e6d5 b5b4 e5c7 b8c7 d5a8 b4b3 g6g7
  4	+1.85 	517      	0:00.00	e6d5 b5b4 e5c7 b8c7 d5a8
  3	+0.61 	199      	0:00.00	e6d5 b5b4 e5c7
  2	+0.61 	117      	0:00.00	e6d5 b5b4 e5c7
  2	 -1.98 	20        	0:00.00	e5c7 b8c7 g6g7
  1	 -1.98 	11        	0:00.00	e5c7
  0	#
Weird that engines find this so difficult. It is not a null-move problem, there is no zugzwang involved.
Null move disadvantage is not only about zugzwang but also about finding long plans because R can be even more than 10 plies when the remaining depth is 20 plies based on the following formula.

Depth R = ((823 + 67 * depth) / 256 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY;
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: Solutions Stockfish should find 100 times faster

Post by BBauer »

It makes no sense to do null move if the piece mobility is too low.
If you don't do null move if piece mobility <2 you will find the solution quickly.
kind regards
Bernhard
Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Solutions Stockfish should find 100 times faster

Post by Dann Corbit »

Sounds like a good suggestion for fishtest
User avatar
hgm
Posts: 28379
Joined: Fri Mar 10, 2006 10:06 am
Location: Amsterdam
Full name: H G Muller

Re: Solutions Stockfish should find 100 times faster

Post by hgm »

Uri Blass wrote:Null move disadvantage is not only about zugzwang but also about finding long plans because R can be even more than 10 plies when the remaining depth is 20 plies based on the following formula.

Depth R = ((823 + 67 * depth) / 256 + std::min((eval - beta) / PawnValueMg, 3)) * ONE_PLY;
Well, as I just pointed out in another thread, reducing null move is a bad idea if the goal is a mate. Reductions of 10 are insane, and obviously make it impossible for the engine to be 'good at Chess' (as opposed to having a high Elo, which only means being better at beating opponents that are also not good at Chess).

Indeed there is an easy trigger here, which is that all non-Pawns have zero legal moves. The major justification for reducing null move is that the opponent can substitute it for any move he wants to delay any trouble.Obviously you cannot substitute it by anything if you have no legal moves.

Note that deepening on a node budget, rather than on plies, would also solve this: the branch where you keep the pin intact hardly branches at the black levels, (especially when taking transpositions of the Pawn moves into account), and can be searched far deeper with virtually no impact onthe total search cost. Such branches should always be extended. (e.g. with fractional plies a posiiton with only 2 legal moves should lower remaining depth only by ~ 0.2 ply.)
Dann Corbit
Posts: 12791
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Solutions Stockfish should find 100 times faster

Post by Dann Corbit »

I have often thought that null move reductions should be triggered by mobility rather than the remaining wood in the board.

9 chessmen left but 1 legal move should be null reduction of 0.
5 chessmen left but 50 legal moves should be hefty reduction.
Paloma
Posts: 1207
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: Solutions Stockfish > EPD File

Post by Paloma »

made epd list from diagrams

Code: Select all

rk6/p1r3p1/P3B1K1/1p2B3/8/8/8/8 w - - 0 1  			1.Bd7! Mate in 5
r1b3kr/pp1n2Bp/2pb2q1/3p3N/3P4/2P2Q2/P1P3PP/4RRK1 w - - 0 1  	1.Re5! going for the mate
2r2rk1/1bpR1p2/1pq1pQp1/p3P2p/P1PR3P/5N2/2P2PPK/8 w - - 0 1  	1.Kg3! going to g5
3B4/1r2p3/r2p1p2/bkp1P1p1/1p1P1PPp/p1P1K2P/PPB5/8 w - - 0 1  	1.Ba4+! closing the position
1q1r3k/3P1pp1/ppBR1n1p/4Q2P/P4P2/8/5PK1/8 w - - 0 1  		1.Rxf6!
r2q1r2/1b2bpkp/p3p1p1/2ppP1P1/7R/1PN1BQR1/1PP2P1P/4K3 w - - 0 1  1.Qf6+! going for the mate !
5rk1/2p2Rpq/p2p2n1/2pPpQPp/4P2P/3P2N1/PP6/6K1 w - - 0 1  	1.Qe6!
8/4K2p/6pr/5pk1/1pB2R2/p4PP1/8/8 w - - 0 1      		1.Rg4+! going for the mate (27#)
1k3b1q/pP2p1p1/P1K1P1Pp/7P/2B5/8/8/8 w - - 0 1  		1.Kd5!, freeing the way to trap the queen
6R1/8/2pB3k/2P4p/5p1q/5P2/4P1K1/8 w - - 0 1  			1.Bf8+!, closing the king
1r6/4k3/r2p2p1/2pR1p1p/2P1pP1P/pPK1P1P1/P7/1B6 b - - 0 1  	1.Rxb3! freeing the way to invade
2b1r3/r2ppN2/8/1p1p1k2/pP1P4/2P3R1/PP3PP1/2K5 w - - 0 1  	1.Nd6+! draws (fortress)
4q1kr/p6p/1prQPppB/4n3/4P3/2P5/PP2B2P/R5K1 w - - 0 1  		1.Qxe5!
8/8/8/5Bp1/7k/8/4pPKP/8 w - - 0 4  				1.Bg4! is draw, 1.h3 lose on 1...g4!
Henk
Posts: 7251
Joined: Mon May 27, 2013 10:31 am

Re: Solutions Stockfish should find 100 times faster

Post by Henk »

Code: Select all

Depth  Value   Time
  1   -0.20   0.017         257   e6d5 
  2   -0.20   0.005        1554   e6d5 b8c8 
  3    1.45   0.009        3699   e6d5 b5b4 e5c7 
  4    1.45   0.013        7185   e6d5 b8c8 e5c7 c8c7 
  5    1.46   0.072       32932   e6d5 b8c8 e5c7 c8c7 d5a8 
  6    1.44   0.104       37734   e6d5 b8c8 e5c7 c8c7 d5a8 c7b8 
  7    2.33   0.266       97138   e6d5 b5b4 e5c7 b8c7 d5a8 b4b3 g6g7 
  8    2.32   0.570      233356   e6d5 b5b4 d5a8 b8a8 e5c7 b4b3 c7e5 b3b2 
  9    2.31   0.862      394601   e6d5 b5b4 e5c7 b8c7 d5a8 c7d6 g6g7 d6e5 g7f8 
 10  1000.00   1.892     1091246   e6d7 b5b4 g6f7 b4b3 f7e8 b3b2 e8d8 b2b1 e5c7 
Vinvin
Posts: 5296
Joined: Thu Mar 09, 2006 9:40 am
Full name: Vincent Lejeune

Re: Solutions Stockfish > EPD File

Post by Vinvin »

Paloma wrote:made epd list from diagrams

Code: Select all

rk6/p1r3p1/P3B1K1/1p2B3/8/8/8/8 w - - 0 1  			1.Bd7! Mate in 5
r1b3kr/pp1n2Bp/2pb2q1/3p3N/3P4/2P2Q2/P1P3PP/4RRK1 w - - 0 1  	1.Re5! going for the mate
2r2rk1/1bpR1p2/1pq1pQp1/p3P2p/P1PR3P/5N2/2P2PPK/8 w - - 0 1  	1.Kg3! going to g5
3B4/1r2p3/r2p1p2/bkp1P1p1/1p1P1PPp/p1P1K2P/PPB5/8 w - - 0 1  	1.Ba4+! closing the position
1q1r3k/3P1pp1/ppBR1n1p/4Q2P/P4P2/8/5PK1/8 w - - 0 1  		1.Rxf6!
r2q1r2/1b2bpkp/p3p1p1/2ppP1P1/7R/1PN1BQR1/1PP2P1P/4K3 w - - 0 1  1.Qf6+! going for the mate !
5rk1/2p2Rpq/p2p2n1/2pPpQPp/4P2P/3P2N1/PP6/6K1 w - - 0 1  	1.Qe6!
8/4K2p/6pr/5pk1/1pB2R2/p4PP1/8/8 w - - 0 1      		1.Rg4+! going for the mate (27#)
1k3b1q/pP2p1p1/P1K1P1Pp/7P/2B5/8/8/8 w - - 0 1  		1.Kd5!, freeing the way to trap the queen
6R1/8/2pB3k/2P4p/5p1q/5P2/4P1K1/8 w - - 0 1  			1.Bf8+!, closing the king
1r6/4k3/r2p2p1/2pR1p1p/2P1pP1P/pPK1P1P1/P7/1B6 b - - 0 1  	1.Rxb3! freeing the way to invade
2b1r3/r2ppN2/8/1p1p1k2/pP1P4/2P3R1/PP3PP1/2K5 w - - 0 1  	1.Nd6+! draws (fortress)
4q1kr/p6p/1prQPppB/4n3/4P3/2P5/PP2B2P/R5K1 w - - 0 1  		1.Qxe5!
8/8/8/5Bp1/7k/8/4pPKP/8 w - - 0 4  				1.Bg4! is draw, 1.h3 lose on 1...g4!
For the last position the next move is even more clear :
1...g4! is the only good (winning) move because of 1...e1? 2.Bg4! and no mate is possible.
[d]8/8/8/5Bp1/7k/7P/4pPK1/8 b - - 0 1