Someone lit a fire under the Stockfish team

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

Moderators: hgm, Rebel, chrisw

User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Someone lit a fire under the Stockfish team

Post by MikeB »

tpoppins wrote:
zullil wrote:I may regret this interjection, but an alarming number of positions deserve 0.00.
Perhaps they do, but not for the reasons SF "thinks" they are 0.00. See your own quote below:
zullil wrote:It is my understanding, perhaps wrong, that most of Stockfish's 0.00 evaluations ultimately result from second repetitions of positions, and by the engine's inability to find anything in the search tree with a better score.
zullil wrote:One could argue that every position in any decently played game is a 0.00 position, at least in a theoretical sense.
Substitute "perfectly" for "decently" and we are in perfect agreement. But where are they, those perfectly played games? And who be the judge of perfection?
zullil wrote:About "tunnel vision", I think I largely agree with Dann. Given enough time/depth, Stockfish will almost always find a winning move if one exists. Though sometimes the wait can be excruciating. :wink:
[D] rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1

The very latest SF-dev (1 thread):

Code: Select all

info depth 70 seldepth 80 multipv 1 score cp -29 nodes 269400017121 nps 5896122 hashfull 999 tbhits 0 time 45691046 pv e6d5 b8c8 d5a8 c7c4 e5g7 b5b4 g6h6 c8c7 a8d5 c4c5 d5e4 c5a5 g7d4 a5a6 h6g5 a6a3 g5f4 c7d6 e4f3 a7a5 f4e4 a5a4 f3d1 b4b3 e4d3 b3b2 d3c2 b2b1q c2b1 a3d3 d1a4 d3d4 a4b3 d4d2 b1c1 d2f2 b3c2 d6c5 c1d1 c5d4 c2b1 f2g2 b1f5 d4c3 d1e1 g2b2 f5g4 c3d4 g4f5 d4e3 e1d1 b2e2 f5b1 e2d2 d1c1 d2h2 c1d1 e3d4 b1g6 d4c3 g6f5 c3b2 f5d3 b2b3 d3f5 b3c3 f5g6 c3d4 g6e8 d4e3 e8g6 h2f2 g6b1 f2g2 b1f5 g2d2 d1e1 d2a2 e1d1 a2f2
But I'm confident that Bd7 will emerge!.
Ah, happy thoughts! Remember this, though?
zullil wrote:
peter wrote:Hi Louis!

Very nice position indeed!

Made a .pgn about it:

Code: Select all

[Event "CCC"]
[Site "?"]
[Date "2015.04.25"]
[Round "?"]
[White "Corbit, Dann"]
[Black "Zulli, Louis"]
[Result "1-0"]
[SetUp "1"]
[FEN "4q1kr/p6p/1prQPppB/4n3/4P3/2P5/PP2B2P/R5K1 w - -"]

1. Qxe5 $1 (1. Qa3 $2 Rxe6 2. Qxa7 Qe7 3. Qa8+ Qe8 4. Qb7 
Qe7 5. Qa8+ Qe8) 1... fxe5 2. Rf1 Rc8 (2... a6 3. Bd1 b5 
(3... Rc7 4. Bb3 Re7 5. Bd5 b5 6. Kg2 a5 7. a3 b4 8. axb4 
Qb8 9. b5 Qe8 10. b6 a4 11. b7 a3 12. Rf7 axb2 13. Rxe7 Qb5 
14. Re8+ Qxe8 15. e7+ Qf7 16. e8=Q#) 4. Bb3 Rc4 5. a4 Qe7 
6. Kg2) 3. Bd1 b5 4. Bb3 Rc4 5. a4 (5. Rf3) (5. a3 a6 6. a4 
Qe7 7. Kg2 Qe8 8. Rf3 (8. h3) 8... Qd8) 5... a6 6. Ba2 Qe7 
7. Kg2 Qg7 8. Bxc4 bxc4 9. Bxg7 Kxg7 10. Rf7+ 1-0
This position is from the game below, or available at http://www.chessgames.com/perl/chessgame?gid=1472988

Here is the position after Black's 23rd move, with SF's current PV:
[D]4q1kr/p6p/1prQPppB/4n3/4P3/2P5/PP2B2P/R5K1 w - - 1 24

Code: Select all

info depth 50 seldepth 81 multipv 1 score cp 397 nodes 940558094988 nps 27958134 hashfull 999 tbhits 0 time 33641661 pv d6e5 f6e5 a1f1 a7a6 e2d1 b6b5 d1b3 c6c4 a2a4 e8e7 g1g2 e7e8 f1f3 e8e7 b3a2 e7g7 h6g7 g8g7 a2c4 b5c4 f3f7 g7h6 e6e7 h8e8 g2g3 g6g5 f7f6 h6g7 f6a6 e8e7 g3g4 e7b7 g4g5 g7f7 g5f5 b7b2 a6a7 f7e8 a4a5 e8d8 a5a6 b2a2 f5e5 d8c8 e5d5 c8b8 a7h7 a2a6 h2h4 b8c8 h4h5 c8d8 d5c4 d8e8 c4d5 a6a5 d5d4 e8f8 e4e5 a5a6 h5h6 f8g8 h7g7 g8h8
This PV was obtained by having SF search the position after 24. Qxe5 fxe5 (with 16 threads, 16 GB hash and null move pruning disabled) until it saw a promising continuation for White. The search was then stopped but the hash table was left intact, and SF was given the position above. In short, "cheating" was involved.:wink: I don't know how long SF would take to find the key move Qxe5 with an empty hash table. But, in any case, we now have strong evidence that the sacrifice is sound, and wins with correct play.

[pgn]
[Event "Molniya Sporting Society"]
[Site "Chelyabinsk RUS"]
[Date "1946.??.??"]
[EventDate "?"]
[Round "5"]
[Result "1-0"]
[White "Yuri S Gusev"]
[Black "E Auerbach"]
[ECO "B70"]
[WhiteElo "?"]
[BlackElo "?"]
[PlyCount "73"]

1.e4 c5 2.Nf3 d6 3.d4 cxd4 4.Nxd4 Nf6 5.Nc3 g6 6.Be2 Nc6 7.Nb3
Bg7 8.O-O Be6 9.f4 Rc8 10.f5 Bd7 11.g4 Ne5 12.g5 Ng8 13.Nd5 f6
14.Be3 b6 15.Nd4 Kf7 16.c3 Qe8 17.Ne6 Bxe6 18.fxe6+ Kf8
19.Nxf6 Nxf6 20.gxf6 Bxf6 21.Bh6+ Kg8 22.Rxf6 exf6 23.Qxd6 Rc6
24.Qxe5 fxe5 25.Rf1 Rc8 26.Bd1 Rc4 27.Bb3 b5 28.Bxc4 bxc4
29.b3 a5 30.bxc4 Qe7 31.Kg2 Qa3 32.Rf2 Qe7 33.Rf1 g5 34.Rf5 g4
35.c5 Qd8 36.c6 Qe7 37.c7 1-0
[/pgn]
It's been nigh three years. A somewhat more excruciating wait than the 12 hours quoted in your previous post. How do I remember? Back in my "depth is king" days I used to follow posts like these religiously; yours especially, as you had the most depth, insane (for that time) depths. I'd sit at my DualCore from 2008 and pour over the lines and centipawn evals for hours, sigh and wish I had hardware like Louis'. Some time later (oh, what a long wait it seemed at the time) I got the hardware and after spending hundreds of hours on analysis with SF I realized I'd been chasing a mirage. Ah, the sweet innocence; sometimes I wish I could have it all back...

Back to the present. Has Stockfish emerged with 24.Qxe5 yet? Clean hash, no source mods, no MultiPV? I bet it's still 24.Qa3 0.00, three years and +200 Elo later. How many more years are you prepared to wait, Louis? :)
I believe Black misplayed this -as I see no win no win for white after 29. ... cxb3. 29. ... a5 is a clunker of a move. So draw is perhaps the best white can do.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Someone lit a fire under the Stockfish team

Post by MikeB »

zullil wrote:
zullil wrote:
tpoppins wrote:
In the past two years there have been numerous posts about an alarming number of positions SF evaluates as 0.00. Someone even coined the term "Drawfish". I personally have seen hundreds of such positions on Let's Check, ranging from quiet to turbo-charged. There is a current thread discussing another such case and SF's "tunnel vision".
About "tunnel vision", I think I largely agree with Dann. Given enough time/depth, Stockfish will almost always find a winning move if one exists. Though sometimes the wait can be excruciating. :wink:
[D] rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1

The very latest SF-dev (1 thread):

Code: Select all

info depth 70 seldepth 80 multipv 1 score cp -29 nodes 269400017121 nps 5896122 hashfull 999 tbhits 0 time 45691046 pv e6d5 b8c8 d5a8 c7c4 e5g7 b5b4 g6h6 c8c7 a8d5 c4c5 d5e4 c5a5 g7d4 a5a6 h6g5 a6a3 g5f4 c7d6 e4f3 a7a5 f4e4 a5a4 f3d1 b4b3 e4d3 b3b2 d3c2 b2b1q c2b1 a3d3 d1a4 d3d4 a4b3 d4d2 b1c1 d2f2 b3c2 d6c5 c1d1 c5d4 c2b1 f2g2 b1f5 d4c3 d1e1 g2b2 f5g4 c3d4 g4f5 d4e3 e1d1 b2e2 f5b1 e2d2 d1c1 d2h2 c1d1 e3d4 b1g6 d4c3 g6f5 c3b2 f5d3 b2b3 d3f5 b3c3 f5g6 c3d4 g6e8 d4e3 e8g6 h2f2 g6b1 f2g2 b1f5 g2d2 d1e1 d2a2 e1d1 a2f2
But I'm confident that Bd7 will emerge!

Thanks to Bernhard Bauer for sharing this position.

Code: Select all

info depth 76 seldepth 88 multipv 1 score mate 5 nodes 1810956908759 nps 6781644 hashfull 999 tbhits 0 time 267038006 pv e6d7 b5b4 g6f7 h6h5 f7e7 b4b3 e7d8 b3b2 e5c7
1.8 trillion nodes to find mate-in-5!
latest dev-McB finds it in single thread mode in a relatively sparse 235M nodes with 1024M hash.

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
  54	    #5 	236.6M	2:02.10	Bd7 b4 Kf7 b3 Ke7 b2 Kd8 b1=Q Bxc7# 
 53	    #5 	235.5M	2:01.62	Bd7 b4 Kf7 b3 Ke7 b2 Kd8 b1=Q Bxc7# 
 53	    #8!	235.4M	2:01.56	Bd7! 
 52	  0.00 	201.9M	1:43.89	Bd5 Kc8 Bxa8 Rc4 Bxg7 Kc7 Kxh6 Kb6 Bb7 b4 Kg5 b3 Kf5 Kc5 Be4 Rc1 Bd3 Rd1 Ke4 Re1+ Kf4 Re6 Bb2 Re8 Bg7 Re1 Bf6 Kd5 Bb2 Re8 Bg6 Re7 Bd3 Re6 Bg7 Re8 Bb2 Re7 Kf3 Re6 Kf4 Kc5 Bg7 Kb4 Bb2 Re8 Bd4 Re7 Kf5 Rd7 Ke5 Rd8 Ke4 Rd7 Ke5 
 51	  0.00 	181.4M	1:33.43	Bd5 Kc8 Bxa8 Rc4 Bxg7 Kc7 Kxh6 Kb6 Bb7 b4 Kg5 b3 Kf5 Kc5 Be4 Rc1 Bd3 Rd1 Ke4 Re1+ Kf4 Re6 Bb2 Re8 Bg7 Re1 Bf6 Kd5 Bb2 Re8 Bg6 Re7 Bd3 Re6 Bg7 Re8 Bb2 Re7 Kf3 Re6 Kf4 Kc5 Bg7 Kb4 Bb2 Re8 Bd4 Re7 Kf5 Rd7 Ke5 Rd8 Ke4 Rd7 Ke5 
 50	  0.00 	151.7M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xa6 
 11	 -0.45 	19755  	0:00.02	Bd5 Kc8 Bxc7 Kxc7 Bxa8 Kb6 Be4 b4 Bc2 Kxa6 Bd3+ Kb6 Be4 b3 Kxg7 
 10	 -0.08 	9037    	0:00.01	Bd5 Kc8 Bxc7 Kxc7 Bxa8 b4 Bd5 Kb6 Be6 Kxa6 Kxg7 
  9	 -0.08 	2130    	0:00.00	Bd5 h5 Bxa8 Kxa8 Bxc7 h4 Kxg7 h3 Be5 h2 Bxh2 
  8	 -0.29 	1357    	0:00.00	Bd5 h5 Bxa8 h4 Bxc7+ Kxc7 Bg2 b4 Kxg7 
  7	 -0.08 	441      	0:00.00	Bd5 b4 Bxa8 Kxa8 Bxc7 b3 Be5 b2 Bxb2 
  6	 -0.08 	299      	0:00.00	Bd5 b4 Bxa8 Kxa8 Bxc7 b3 Kxg7 
  5	 -0.08 	228      	0:00.00	Bd5 b4 Bxa8 Kxa8 Bxc7 
  4	 -0.08 	148      	0:00.00	Bd5 b4 Bxa8 Kxa8 
  3	 -0.61 	105      	0:00.00	Bd5 b4 Bxa8 
  2	 -0.61 	66        	0:00.00	Bd5 b4 Bxa8 
  1	 -4.00 	32        	0:00.00	Bd5 
  0	# 
in smp mode with 12 cores, it usually finds it between depth 41 and depth 44.

Code: Select all

 44	    #5 	381.4M	0:17.27	Bd7 b4 Kf7 b3 Ke8 b2 Kd8 b1=Q Bxc7# 
 43	    #5 	381.4M	0:17.26	Bd7 b4 Kf7 b3 Ke8 b2 Kd8 b1=Q Bxc7# 
 42	    #5!	381.3M	0:17.26	Bd7! 
 41	  0.00 	285.5M	0:13.05	Bd5 Kc8 Bxa8 Rc4 Bxg7 Kc7 Kxh6 Kd6 Kg5 Rc8 Bb7 Rg8 Kf6 Kc5 Kf7 Rd8 Bf8+ Kc4 Bf3 b4 Bxb4 Kxb4 
 40	  0.00 	208.2M	0:09.50	Bd5 Kc8 Bxa8 Rc4 Bxg7 Kc7 Kxh6 Kd6 Kg5 Rc8 Bb7 Rg8 K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a8 Bxc7 b3 Be5 h5 
  6	 -0.08 	3306    	0:00.00	Bd5 b4 Bxa8 Kxa8 Bxc7 b3 Be5 
  5	 -0.21 	2629    	0:00.00	Bd5 b4 Bxa8 Kxa8 Bxc7 
  4	 -0.08 	1978    	0:00.00	Bd5 b4 Bxa8 Kxa8 
  3	 -0.08 	1459    	0:00.00	Bd5 b4 Bxa8 
  2	 -0.66 	953      	0:00.00	Bd5 b4 
  1	 -4.00 	368      	0:00.00	Bd5 
  0	# 
I just might release this version as 9.1 - it has all of the latest commits from dev-SF which have been numerous and very good actually.
Paloma
Posts: 1167
Joined: Thu Dec 25, 2008 9:07 pm
Full name: Herbert L

Re: Someone lit a fire under the Stockfish team

Post by Paloma »

29... cxb3 is indeed a draw, but white has to go with 28.a4! instead 28.Bxc4
After 28.a4 a6 29.Ba2 Qe7 30.b4 Qg7 31.Bxg7 Kxf7 32.Rf7+ wins for white.
User avatar
MikeB
Posts: 4889
Joined: Thu Mar 09, 2006 6:34 am
Location: Pen Argyl, Pennsylvania

Re: Someone lit a fire under the Stockfish team

Post by MikeB »

Paloma wrote:29... cxb3 is indeed a draw, but white has to go with 28.a4! instead 28.Bxc4
After 28.a4 a6 29.Ba2 Qe7 30.b4 Qg7 31.Bxg7 Kxf7 32.Rf7+ wins for white.
a4 !! nice find. I had purposely couched my statements since I did not look at it closely.

That's a fairly decent test position:

[d]4q1kr/p6p/4P1pB/1p2p3/2r1P3/1BP5/PP5P/5RK1 w - - 0 28

latest dev-SF-McB

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 48	+5.95 	5.04G	3:15.20	a4 a6 h4 Qe7 Kg2 Qe8 Rf2 Qe7 Ba2 Qg7 Bxg7 Kxg7 Bxc4 bxc4 Rf7+ Kh6 Ra7 Re8 Rxa6 Kg7 a5 Kf6 Rb6 h5 a6 Ke7 a7 Ra8 Ra6 Kf8 Kf2 Ke8 Ke2 Ke7 Ke3 Kf6 e7+ Kxe7 Rxg6 Kf8 Rg5 Rxa7 Rxe5 Rh7 Kd4 Rg7 Rxh5 Rg4 Rf5+ Ke7 h5 Rh4 Kxc4 Rxe4+ Kd5 R 
 48	+5.64!	4.47G	2:53.63	a4! 
 48	+5.26!	4.38G	2:50.25	a4! 
 48	+4.97!	4.35G	2:48.74	a4! 
 48	+4.75!	4.33G	2:47.92	a4! 
 48	+4.59!	4.31G	2:47.32	a4! 
 48	+4.48!	4.29G	2:46.63	a4! 
 48	+4.40!	4.26G	2:45.22	a4! 
 47	+4.33!	3.63G	2:20.83	a4! 
 47	+3.28!	3.45G	2:13.96	a4! 
 47	+2.45!	3.12G	2:00.95	a4! 
 47	+1.81!	2.88G	1:51.18	a4! 
 47	+1.31!	2.70G	1:43.95	a4! 
 47	+0.92!	2.62G	1:40.77	a4! 
 47	+0.63!	2.52G	1:36.70	a4! 
 47	+0.42!	2.47G	1:34.90	a4! 
 47	+0.26!	2.44G	1:33.70	a4! 
 47	+0.15!	2.43G	1:33.33	a4! 
 47	+0.07!	2.42G	1:32.92	a4! 
 46	  0.00 	2.33G	1:29.31	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 45	  0.00 	1.86G	1:10.40	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 44	  0.00 	1.65G	1:02.50	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 43	  0.00 	1.19G	0:44.85	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 42	  0.00 	983.3M	0:36.96	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 41	  0.00 	724.9M	0:27.14	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 40	  0.00 	595.4M	0:22.31	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 39	  0.00 	421.5M	0:15.85	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 38	  0.00 	345.3M	0:12.97	a4 a6 h4 Qe7 Kg2 Qe8 Kg1 
 37	  0.00 	290.8M	0:10.95	a4 a6 h4 Qe7 Kg2 Qe8 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1	 -4.50 	182      	0:00.00	Rf8+ Qxf8 Bxf8 Kxf8 Bxc4 bxc4 
On my machine , current dev-SF struggled a bit as does K11.3, but perhaps they were unlucky runs..below is current-dev-SF on my machine.

Code: Select all

dep	score	nodes	time	(not shown:  tbhits	knps	seldep)
 58	  0.00 	1.98G	1:18.03	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 57	  0.00 	1.78G	1:10.37	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 56	  0.00 	1.32G	0:51.99	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 55	  0.00 	1.15G	0:45.33	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 54	  0.00 	1.10G	0:43.02	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 53	  0.00 	976.3M	0:38.23	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 52	  0.00 	699.9M	0:27.31	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 51	  0.00 	682.6M	0:26.62	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
 50	  0.00 	624.7M	0:24.31	Kg2 Qe7 h4 a6 a4 Qe8 Kg1 Qe7 Kg2 
tpoppins
Posts: 919
Joined: Tue Nov 24, 2015 9:11 pm
Location: upstate

Re: Someone lit a fire under the Stockfish team

Post by tpoppins »

Paloma wrote:29... cxb3 is indeed a draw, but white has to go with 28.a4! instead 28.Bxc4
After 28.a4 a6 29.Ba2 Qe7 30.b4 Qg7 31.Bxg7 Kxf7 32.Rf7+ wins for white.
Correct.

In Nov 2015 I posted extensive analysis of the queen sacrifice on chessgames.com. The winning lines springing from 28.a4! (the move first suggested, AFAIK, by Vass on ChessPub in 2011) are demonstrated on the same page two posts down.

Since then the analysis was corroborated in the numerous lines following 24.Qxe5 on Let's Check with various versions of Houdini, Komodo and SF (it wasn't until Apr 2016 that I managed to get SF dev to back-propagate the winning eval to the root). Easily 100+ hours of analysis in several long sessions, in most lines going as deep as mate or at least a >+10.xx eval.

There can be no shadow of doubt that Gusev's queen sacrifice wins in all lines; however, about twice a year some fool on Let's Check will run SF or Fritz for a couple of hours on the root position and bump down the 24.Qxe5 lines in favor of 24.Qa3 0.00 or some such. I corrected the situation a couple of times but later realized that this engine race is not worth my time and effort.

Here are two relics of these sessions, analysis of the root position after backsliding for hours through numerous lines:

[d]4q1kr/p6p/1prQPppB/4n3/4P3/2P5/PP2B2P/R5K1 w - - 0 24

Code: Select all

Analysis by Stockfish 240416 64 POPCNT (16 GB, with backsliding):

24.Qxe5 fxe5 25.Rf1 a6 26.Bd1 Rc4 27.Bb3 b5 28.a4 Qe7 29.Kg2 g5 30.Rf5 Qd8 31.Rf7 Qd2+ 32.Rf2 Qd8 33.Ba2 Qa8 34.Kg3 Qd8 35.Rf7 Qd3+ 36.Rf3 Qd6 37.Kg2 Qe7 38.Rf5 Qg7 39.Bxg7 Kxg7 40.Bxc4 bxc4 41.Kf3 Re8 42.Rxe5 h6 43.e7 Kf6 44.Rc5 Rxe7 45.Rxc4 Rf7 46.Rc6+ Ke5+ 47.Ke3 g4 48.Rc5+ Ke6 49.Rf5 Rb7 50.b4 Rc7 51.Rc5 Rf7 52.Kd4 Rd7+ 53.Rd5 Rb7 54.b5 axb5 55.axb5 Kf6 56.Rc5 Kg6 57.c4 h5 58.Rc6+ Kg5 59.Ke3 h4 60.Rc5+ Kg6 61.Kf4 g3 62.hxg3 h3 63.Rg5+ Kh6 64.Rg4 Rf7+ 65.Ke3 Rf1 66.Rh4+ Kg6 67.b6 Re1+ 68.Kf4 Rh1 69.c5 h2 70.Ke5 Kg7 71.c6 Rb1 72.c7 Rb5+ 73.Kf4 
  +-  (6.87)   Depth: 61/111   17:41:01  1224441MN, tb=313592914

Code: Select all

Analysis by CorChess beta 151016 x64 POPCNT (16 GB with backsliding):

24.Qxe5 fxe5 25.Rf1 Rc8 26.Bd1 b5 27.Bb3 Rc4 28.a4 a6 29.Kg2 Qe7 30.Rf2 Qe8 31.Ba2 Qa8 32.Kg3 Qe8 33.Rf1 g5 34.Rf5 Qd8 35.Rf7 Qd3+ 36.Rf3 Qd6 37.Kg2 Qe7 38.Rf5 Qg7 39.Bxg7 Kxg7 40.Bxc4 bxc4 41.Kf3 Kg6 42.e7 Re8 43.Rxe5 Kf7 44.Rf5+ Kg6 45.Ra5 Kh5 46.Rxa6 g4+ 47.Ke3 Rxe7 48.a5 Re8 49.Rc6 Ra8 50.Rc5+ Kg6 51.Kf4 h5 52.Rc6+ Kf7 53.a6 Rf8 54.Kf5 Ke7+ 55.Ke5 Kd7 56.Rh6 Rg8 57.Kf4 h4 58.Rxh4 g3 59.hxg3 Rf8+ 60.Ke3 Ra8 61.Rh6 Re8 62.Rh7+ Kc6 63.Kd4 Rd8+ 64.Kxc4 Rc8 65.Rh6+ Kc7 66.e5 Kb8+ 67.Kd5 Ka7 68.Kd6 Ra8 69.Kc5 Rc8+ 70.Kd5 Rd8+ 71.Kc4 Kb8 72.Kc5 Re8 73.Kd5 Rd8+ 74.Kc6 Rc8+ 75.Kd7 Rc7+ 76.Kd6 Rc8 77.e6 
  +- (10.71)  Depth: 68/126   15:48:16  1811931MN, tb=2147483647
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Someone lit a fire under the Stockfish team

Post by Dann Corbit »

Let's see if Uri's idea works:

Code: Select all

Searching: rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1
infinite: 0 time: 0 increment: 0 moves to go: 0

 1   -4.04   00:00    2765  Bd5 
 2   -0.08   00:00    6310  Bd5 b4 
 3   +0.00   00:00    8411  Bd5 b4 Bxa8 
 4   +0.00   00:00    9995  Bd5 b4 Bxa8 Kxa8 Bxc7 
 5   -0.08   00:00   39244  Bd5 b4 Bxa8 Kxa8 Bxc7 
 6   -0.08   00:00   73793  Bd5 Kc8 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 Kd8 b2 Bxc7+ 
48      #5   02:10 252632K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
49      #5   02:10 253001K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
50      #5   02:11 253775K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
51      #5   02:11 253873K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
52      #5   02:11 254086K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
53      #5   02:11 254176K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
54      #5   02:12 254899K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
55      #5   02:12 255867K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
56      #5   02:12 256054K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
57      #5   02:12 256427K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
58      #5   02:12 256513K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
59      #5   02:14 257770K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
60      #5   02:14 258102K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
61      #5   02:14 258937K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
62      #5   02:15 259901K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
63      #5   02:15 259966K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
64      #5   02:15 260468K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
65      #5   02:16 262126K  Bd7 b4 Kf7 h5 Ke7 b3 Kd8 b2 Bxc7+ 
Seems to solve a little faster
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Someone lit a fire under the Stockfish team

Post by Dann Corbit »

Trivial change, just like Uri said.

Code: Select all

template <NodeType NT>
Value search&#40;Position& pos, Stack* ss, Value alpha, Value beta, Depth depth, bool cutNode, bool skipEarlyPruning, bool cramped&#41; &#123;

    const bool PvNode = NT == PV;
    const bool rootNode = PvNode && ss->ply == 0;

    assert&#40;-VALUE_INFINITE <= alpha && alpha < beta && beta <= VALUE_INFINITE&#41;;
    assert&#40;PvNode || &#40;alpha == beta - 1&#41;);
    assert&#40;DEPTH_ZERO < depth && depth < DEPTH_MAX&#41;;
    assert&#40;!&#40;PvNode && cutNode&#41;);
    assert&#40;depth / ONE_PLY * ONE_PLY == depth&#41;;
    int verification_depth = Options&#91;"Nullmove Verification Depth"&#93;;
    size_t maxmove = 0;
    Move pv&#91;MAX_PLY+1&#93;, capturesSearched&#91;32&#93;, quietsSearched&#91;64&#93;;
    StateInfo st;
    TTEntry* tte;
    Key posKey;
    Move ttMove, move, excludedMove, bestMove;
    Depth extension, newDepth;
    Value bestValue, value, ttValue, eval, maxValue;
    bool ttHit, inCheck, givesCheck, singularExtensionNode, improving;
    bool captureOrPromotion, doFullDepthSearch, moveCountPruning, skipQuiets, ttCapture, pvExact;
    Piece movedPiece;
    int moveCount, captureCount, quietCount;

    // Step 1. Initialize node
    Thread* thisThread = pos.this_thread&#40;);
    inCheck = pos.checkers&#40;);
    moveCount = captureCount = quietCount = ss->moveCount = 0;
    bestValue = -VALUE_INFINITE;
    maxValue = VALUE_INFINITE;

    // Check for the available remaining time
    if &#40;thisThread == Threads.main&#40;))
        static_cast<MainThread*>&#40;thisThread&#41;->check_time&#40;);

    // Used to send selDepth info to GUI &#40;selDepth counts from 1, ply from 0&#41;
    if &#40;PvNode && thisThread->selDepth < ss->ply + 1&#41;
        thisThread->selDepth = ss->ply + 1;

    if (!rootNode&#41;
    &#123;
        // Step 2. Check for aborted search and immediate draw
        if (   Threads.stop.load&#40;std&#58;&#58;memory_order_relaxed&#41;
                || pos.is_draw&#40;ss->ply&#41;
                || ss->ply >= MAX_PLY&#41;
            return &#40;ss->ply >= MAX_PLY && !inCheck&#41; ? evaluate&#40;pos&#41; &#58; VALUE_DRAW;

        // Step 3. Mate distance pruning. Even if we mate at the next move our score
        // would be at best mate_in&#40;ss->ply+1&#41;, but if alpha is already bigger because
        // a shorter mate was found upward in the tree then there is no need to search
        // because we will never beat the current alpha. Same logic but with reversed
        // signs applies also in the opposite condition of being mated instead of giving
        // mate. In this case return a fail-high score.
        alpha = std&#58;&#58;max&#40;mated_in&#40;ss->ply&#41;, alpha&#41;;
        beta = std&#58;&#58;min&#40;mate_in&#40;ss->ply+1&#41;, beta&#41;;
        if &#40;alpha >= beta&#41;
            return alpha;
    &#125;

    assert&#40;0 <= ss->ply && ss->ply < MAX_PLY&#41;;

    &#40;ss+1&#41;->ply = ss->ply + 1;
    ss->currentMove = &#40;ss+1&#41;->excludedMove = bestMove = MOVE_NONE;
    ss->contHistory = thisThread->contHistory&#91;NO_PIECE&#93;&#91;0&#93;.get&#40;);
    &#40;ss+2&#41;->killers&#91;0&#93; = &#40;ss+2&#41;->killers&#91;1&#93; = MOVE_NONE;
    Square prevSq = to_sq&#40;&#40;ss-1&#41;->currentMove&#41;;

    // Initialize statScore to zero for the grandchildren of the current position.
    // So statScore is shared between all grandchildren and only the first grandchild
    // starts with statScore = 0. Later grandchildren start with the last calculated
    // statScore of the previous grandchild. This influences the reduction rules in
    // LMR which are based on the statScore of parent position.
    &#40;ss+2&#41;->statScore = 0;

    // Step 4. Transposition table lookup. We don't want the score of a partial
    // search to overwrite a previous full search TT value, so we use a different
    // position key in case of an excluded move.
    excludedMove = ss->excludedMove;
    posKey = pos.key&#40;) ^ Key&#40;excludedMove << 16&#41;; // Isn't a very good hash
    tte = TT.probe&#40;posKey, ttHit&#41;;
    ttValue = ttHit ? value_from_tt&#40;tte->value&#40;), ss->ply&#41; &#58; VALUE_NONE;
    ttMove =  rootNode ? thisThread->rootMoves&#91;thisThread->PVIdx&#93;.pv&#91;0&#93;
              &#58; ttHit    ? tte->move&#40;) &#58; MOVE_NONE;

    // At non-PV nodes we check for an early TT cutoff
    if (  !PvNode
            && ttHit
            && tte->depth&#40;) >= depth
            && ttValue != VALUE_NONE // Possible in case of TT access race
            && &#40;ttValue >= beta ? &#40;tte->bound&#40;) & BOUND_LOWER&#41;
                &#58; &#40;tte->bound&#40;) & BOUND_UPPER&#41;))
    &#123;
        // If ttMove is quiet, update move sorting heuristics on TT hit
        if &#40;ttMove&#41;
        &#123;
            if &#40;ttValue >= beta&#41;
            &#123;
                if (!pos.capture_or_promotion&#40;ttMove&#41;)
                    update_quiet_stats&#40;pos, ss, ttMove, nullptr, 0, stat_bonus&#40;depth&#41;);

                // Extra penalty for a quiet TT move in previous ply when it gets refuted
                if (&#40;ss-1&#41;->moveCount == 1 && !pos.captured_piece&#40;))
                    update_continuation_histories&#40;ss-1, pos.piece_on&#40;prevSq&#41;, prevSq, -stat_bonus&#40;depth + ONE_PLY&#41;);
            &#125;
            // Penalty for a quiet ttMove that fails low
            else if (!pos.capture_or_promotion&#40;ttMove&#41;)
            &#123;
                int penalty = -stat_bonus&#40;depth&#41;;
                thisThread->mainHistory&#91;pos.side_to_move&#40;)&#93;&#91;from_to&#40;ttMove&#41;&#93; << penalty;
                update_continuation_histories&#40;ss, pos.moved_piece&#40;ttMove&#41;, to_sq&#40;ttMove&#41;, penalty&#41;;
            &#125;
        &#125;
        return ttValue;
    &#125;

    // Step 5. Tablebases probe
    if (!rootNode && TB&#58;&#58;Cardinality&#41;
    &#123;
        int piecesCount = pos.count<ALL_PIECES>();

        if (    piecesCount <= TB&#58;&#58;Cardinality
                && &#40;piecesCount <  TB&#58;&#58;Cardinality || depth >= TB&#58;&#58;ProbeDepth&#41;
                &&  pos.rule50_count&#40;) == 0
                && !pos.can_castle&#40;ANY_CASTLING&#41;)
        &#123;
            TB&#58;&#58;ProbeState err;
            TB&#58;&#58;WDLScore wdl = Tablebases&#58;&#58;probe_wdl&#40;pos, &err&#41;;

            if &#40;err != TB&#58;&#58;ProbeState&#58;&#58;FAIL&#41;
            &#123;
                thisThread->tbHits.fetch_add&#40;1, std&#58;&#58;memory_order_relaxed&#41;;

                int drawScore = TB&#58;&#58;UseRule50 ? 1 &#58; 0;

                value =  wdl < -drawScore ? -VALUE_MATE + MAX_PLY + ss->ply + 1
                         &#58; wdl >  drawScore ?  VALUE_MATE - MAX_PLY - ss->ply - 1
                         &#58;  VALUE_DRAW + 2 * wdl * drawScore;

                Bound b =  wdl < -drawScore ? BOUND_UPPER
                           &#58; wdl >  drawScore ? BOUND_LOWER &#58; BOUND_EXACT;

                if (    b == BOUND_EXACT
                        || &#40;b == BOUND_LOWER ? value >= beta &#58; value <= alpha&#41;)
                &#123;
                    tte->save&#40;posKey, value_to_tt&#40;value, ss->ply&#41;, b,
                              std&#58;&#58;min&#40;DEPTH_MAX - ONE_PLY, depth + 6 * ONE_PLY&#41;,
                              MOVE_NONE, VALUE_NONE, TT.generation&#40;));

                    return value;
                &#125;

                if &#40;PvNode&#41;
                &#123;
                    if &#40;b == BOUND_LOWER&#41;
                        bestValue = value, alpha = std&#58;&#58;max&#40;alpha, bestValue&#41;;
                    else
                        maxValue = value;
                &#125;
            &#125;
        &#125;
    &#125;

    // Step 6. Evaluate the position statically
    if &#40;inCheck&#41;
    &#123;
        ss->staticEval = eval = VALUE_NONE;
        goto moves_loop;
    &#125;
    else if &#40;ttHit&#41;
    &#123;
        // Never assume anything on values stored in TT
        if (&#40;ss->staticEval = eval = tte->eval&#40;)) == VALUE_NONE&#41;
            eval = ss->staticEval = evaluate&#40;pos&#41;;

        // Can ttValue be used as a better position evaluation?
        if (    ttValue != VALUE_NONE
                && &#40;tte->bound&#40;) & &#40;ttValue > eval ? BOUND_LOWER &#58; BOUND_UPPER&#41;))
            eval = ttValue;
    &#125;
    else
    &#123;
        ss->staticEval = eval =
                             &#40;ss-1&#41;->currentMove != MOVE_NULL ? evaluate&#40;pos&#41;
                             &#58; -&#40;ss-1&#41;->staticEval + 2 * Eval&#58;&#58;Tempo;

        tte->save&#40;posKey, VALUE_NONE, BOUND_NONE, DEPTH_NONE, MOVE_NONE,
                  ss->staticEval, TT.generation&#40;));
    &#125;
    maxmove = MoveList<LEGAL>&#40;pos&#41;.size&#40;);
    if (!cramped&#41; cramped = ( maxmove <= Options&#91;"Cramped"&#93;);
    if &#40;skipEarlyPruning || !pos.non_pawn_material&#40;pos.side_to_move&#40;)) || cramped&#41;
        goto moves_loop;

    // Step 7. Razoring &#40;skipped when in check&#41;
    if (   !PvNode
            &&  depth <= ONE_PLY&#41;
    &#123;
        if &#40;eval + RazorMargin1 <= alpha&#41;
            return qsearch<NonPV, false>&#40;pos, ss, alpha, alpha+1&#41;;
    &#125;
    else if (   !PvNode
                &&  depth <= 2 * ONE_PLY
                &&  eval + RazorMargin2 <= alpha&#41;
    &#123;
        Value ralpha = alpha - RazorMargin2;
        Value v = qsearch<NonPV, false>&#40;pos, ss, ralpha, ralpha+1&#41;;
        if &#40;v <= ralpha&#41;
            return v;
    &#125;

    // Step 8. Futility pruning&#58; child node &#40;skipped when in check&#41;
    if (   !rootNode
            &&  depth < 7 * ONE_PLY
            &&  eval - futility_margin&#40;depth&#41; >= beta
            &&  eval < VALUE_KNOWN_WIN&#41; // Do not return unproven wins
        return eval;

    // Step 9. Null move search with verification search
    if (   !PvNode
            &&  eval >= beta
            &&  maxmove > Options&#91;"Cramped"&#93;
            &&  ss->staticEval >= beta - 36 * depth / ONE_PLY + 225
            && &#40;ss->ply >= thisThread->nmp_ply || ss->ply % 2 != thisThread->nmp_odd&#41;)
    &#123;
        assert&#40;eval - beta >= 0&#41;;

        // Null move dynamic reduction based on depth and value
        Depth R = (&#40;823 + 67 * depth / ONE_PLY&#41; / 256 + std&#58;&#58;min&#40;&#40;eval - beta&#41; / PawnValueMg, 3&#41;) * ONE_PLY;

        ss->currentMove = MOVE_NULL;
        ss->contHistory = thisThread->contHistory&#91;NO_PIECE&#93;&#91;0&#93;.get&#40;);

        pos.do_null_move&#40;st&#41;;
        Value nullValue = depth-R < ONE_PLY ? -qsearch<NonPV, false>&#40;pos, ss+1, -beta, -beta+1&#41;
                          &#58; - search<NonPV>&#40;pos, ss+1, -beta, -beta+1, depth-R, !cutNode, true, cramped&#41;;
        pos.undo_null_move&#40;);

        if &#40;nullValue >= beta&#41;
        &#123;
            // Do not return unproven mate scores
            if &#40;nullValue >= VALUE_MATE_IN_MAX_PLY&#41;
                nullValue = beta;

            if &#40;abs&#40;beta&#41; < VALUE_KNOWN_WIN && &#40;depth < verification_depth * ONE_PLY || thisThread->nmp_ply&#41;)
                return nullValue;

            // Do verification search at high depths. Disable null move pruning
            // for side to move for the first part of the remaining search tree.
            thisThread->nmp_ply = ss->ply + 3 * &#40;depth-R&#41; / 4;
            thisThread->nmp_odd = ss->ply % 2;

            Value v = depth-R < ONE_PLY ? qsearch<NonPV, false>&#40;pos, ss, beta-1, beta&#41;
                      &#58;  search<NonPV>&#40;pos, ss, beta-1, beta, depth-R, false, true&#41;;

            thisThread->nmp_odd = thisThread->nmp_ply = 0;

            if &#40;v >= beta&#41;
                return nullValue;
        &#125;
    &#125;

    // Step 10. ProbCut &#40;skipped when in check&#41;
    // If we have a good enough capture and a reduced search returns a value
    // much above beta, we can &#40;almost&#41; safely prune the previous move.
    if (   !PvNode
            &&  depth >= 5 * ONE_PLY
            &&  abs&#40;beta&#41; < VALUE_MATE_IN_MAX_PLY&#41;
    &#123;
        assert&#40;is_ok&#40;&#40;ss-1&#41;->currentMove&#41;);

        Value rbeta = std&#58;&#58;min&#40;beta + 200, VALUE_INFINITE&#41;;
        MovePicker mp&#40;pos, ttMove, rbeta - ss->staticEval, &thisThread->captureHistory&#41;;
        int probCutCount = 0;
        while (  &#40;move = mp.next_move&#40;)) != MOVE_NONE
                 && probCutCount < depth / ONE_PLY - 3&#41;
            if &#40;pos.legal&#40;move&#41;)
            &#123;
                probCutCount++;

                ss->currentMove = move;
                ss->contHistory = thisThread->contHistory&#91;pos.moved_piece&#40;move&#41;&#93;&#91;to_sq&#40;move&#41;&#93;.get&#40;);

                assert&#40;depth >= 5 * ONE_PLY&#41;;

                pos.do_move&#40;move, st&#41;;

                // Perform a preliminary search at depth 1 to verify that the move holds.
                // We will only do this search if the depth is not 5, thus avoiding two
                // searches at depth 1 in a row.
                if &#40;depth != 5 * ONE_PLY&#41;
                    value = -search<NonPV>&#40;pos, ss+1, -rbeta, -rbeta+1, ONE_PLY, !cutNode, true, cramped&#41;;

                // If the first search was skipped or was performed and held, perform
                // the regular search.
                if &#40;depth == 5 * ONE_PLY || value >= rbeta&#41;
                    value = -search<NonPV>&#40;pos, ss+1, -rbeta, -rbeta+1, depth - 4 * ONE_PLY, !cutNode, false, cramped&#41;;

                pos.undo_move&#40;move&#41;;
                if &#40;value >= rbeta&#41;
                    return value;
            &#125;
    &#125;

    // Step 11. Internal iterative deepening &#40;skipped when in check&#41;
    if (    depth >= 6 * ONE_PLY
            && !ttMove
            && &#40;PvNode || ss->staticEval + 256 >= beta&#41;)
    &#123;
        Depth d = 3 * depth / 4 - 2 * ONE_PLY;
        search<NT>&#40;pos, ss, alpha, beta, d, cutNode, true, cramped&#41;;

        tte = TT.probe&#40;posKey, ttHit&#41;;
        ttValue = ttHit ? value_from_tt&#40;tte->value&#40;), ss->ply&#41; &#58; VALUE_NONE;
        ttMove = ttHit ? tte->move&#40;) &#58; MOVE_NONE;
    &#125;

moves_loop&#58; // When in check, search starts from here

    const PieceToHistory* contHist&#91;&#93; = &#123; &#40;ss-1&#41;->contHistory, &#40;ss-2&#41;->contHistory, nullptr, &#40;ss-4&#41;->contHistory &#125;;
    Move countermove = thisThread->counterMoves&#91;pos.piece_on&#40;prevSq&#41;&#93;&#91;prevSq&#93;;

    MovePicker mp&#40;pos, ttMove, depth, &thisThread->mainHistory, &thisThread->captureHistory, contHist, countermove, ss->killers&#41;;
    value = bestValue; // Workaround a bogus 'uninitialized' warning under gcc
    improving =   ss->staticEval >= &#40;ss-2&#41;->staticEval
                  /* || ss->staticEval == VALUE_NONE Already implicit in the previous condition */
                  ||&#40;ss-2&#41;->staticEval == VALUE_NONE;

    singularExtensionNode =   !rootNode
                              &&  depth >= 8 * ONE_PLY
                              &&  ttMove != MOVE_NONE
                              &&  ttValue != VALUE_NONE
                              && !excludedMove // Recursive singular search is not allowed
                              && &#40;tte->bound&#40;) & BOUND_LOWER&#41;
                              &&  tte->depth&#40;) >= depth - 3 * ONE_PLY;
    skipQuiets = false;
    ttCapture = false;
    pvExact = PvNode && ttHit && tte->bound&#40;) == BOUND_EXACT;

    // Step 12. Loop through all pseudo-legal moves until no moves remain
    // or a beta cutoff occurs.
    while (&#40;move = mp.next_move&#40;skipQuiets&#41;) != MOVE_NONE&#41;
    &#123;
        assert&#40;is_ok&#40;move&#41;);

        if &#40;move == excludedMove&#41;
            continue;

        // At root obey the "searchmoves" option and skip moves not listed in Root
        // Move List. As a consequence any illegal move is also skipped. In MultiPV
        // mode we also skip PV moves which have been already searched.
        if &#40;rootNode && !std&#58;&#58;count&#40;thisThread->rootMoves.begin&#40;) + thisThread->PVIdx,
                                    thisThread->rootMoves.end&#40;), move&#41;)
            continue;

        ss->moveCount = ++moveCount;

        if &#40;rootNode && thisThread == Threads.main&#40;) && Time.elapsed&#40;) > 3000&#41;
            sync_cout << "info depth " << depth / ONE_PLY
                      << " currmove " << UCI&#58;&#58;move&#40;move, pos.is_chess960&#40;))
                      << " currmovenumber " << moveCount + thisThread->PVIdx << sync_endl;
        if &#40;PvNode&#41;
            &#40;ss+1&#41;->pv = nullptr;

        extension = DEPTH_ZERO;
        captureOrPromotion = pos.capture_or_promotion&#40;move&#41;;
        movedPiece = pos.moved_piece&#40;move&#41;;
        givesCheck = gives_check&#40;pos, move&#41;;

        moveCountPruning =   depth < 16 * ONE_PLY
                             && moveCount >= FutilityMoveCounts&#91;improving&#93;&#91;depth / ONE_PLY&#93;;

        // Step 13. Extensions

        // Singular extension search. If all moves but one fail low on a search
        // of &#40;alpha-s, beta-s&#41;, and just one fails high on &#40;alpha, beta&#41;, then
        // that move is singular and should be extended. To verify this we do a
        // reduced search on on all the other moves but the ttMove and if the
        // result is lower than ttValue minus a margin then we will extend the ttMove.
        if (    singularExtensionNode
                &&  move == ttMove
                &&  pos.legal&#40;move&#41;)
        &#123;
            Value rBeta = std&#58;&#58;max&#40;ttValue - 2 * depth / ONE_PLY, -VALUE_MATE&#41;;
            ss->excludedMove = move;
            value = search<NonPV>&#40;pos, ss, rBeta - 1, rBeta, depth / 2, cutNode, true, cramped&#41;;
            ss->excludedMove = MOVE_NONE;

            if &#40;value < rBeta&#41;
                extension = ONE_PLY;
        &#125;
        else if (    givesCheck // Check extension
                     && !moveCountPruning
                     &&  pos.see_ge&#40;move&#41;)
            extension = ONE_PLY;

        // Calculate new depth for this move
        newDepth = depth - ONE_PLY + extension;

        // Step 14. Pruning at shallow depth
        if (  !rootNode
                && pos.non_pawn_material&#40;pos.side_to_move&#40;))
                && bestValue > VALUE_MATED_IN_MAX_PLY&#41;
        &#123;
            if (   !captureOrPromotion
                    && !givesCheck
                    && (!pos.advanced_pawn_push&#40;move&#41; || pos.non_pawn_material&#40;) >= Value&#40;5000&#41;))
            &#123;
                // Move count based pruning
                if &#40;moveCountPruning&#41;
                &#123;
                    skipQuiets = true;
                    continue;
                &#125;

                // Reduced depth of the next LMR search
                int lmrDepth = std&#58;&#58;max&#40;newDepth - reduction<PvNode>&#40;improving, depth, moveCount&#41;, DEPTH_ZERO&#41; / ONE_PLY;

                // Countermoves based pruning
                if (   lmrDepth < 3
                        && (*contHist&#91;0&#93;)&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93; < CounterMovePruneThreshold
                        && (*contHist&#91;1&#93;)&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93; < CounterMovePruneThreshold&#41;
                    continue;

                // Futility pruning&#58; parent node
                if (   lmrDepth < 7
                        && !inCheck
                        && ss->staticEval + 256 + 200 * lmrDepth <= alpha&#41;
                    continue;

                // Prune moves with negative SEE
                if (   lmrDepth < 8
                        && !pos.see_ge&#40;move, Value&#40;-35 * lmrDepth * lmrDepth&#41;))
                    continue;
            &#125;
            else if (    depth < 7 * ONE_PLY
                         && !extension
                         && !pos.see_ge&#40;move, -PawnValueEg * &#40;depth / ONE_PLY&#41;))
                continue;
        &#125;

        // Speculative prefetch as early as possible
        prefetch&#40;TT.first_entry&#40;pos.key_after&#40;move&#41;));

        // Check for legality just before making the move
        if (!rootNode && !pos.legal&#40;move&#41;)
        &#123;
            ss->moveCount = --moveCount;
            continue;
        &#125;

        if &#40;move == ttMove && captureOrPromotion&#41;
            ttCapture = true;

        // Update the current move &#40;this must be done after singular extension search&#41;
        ss->currentMove = move;
        ss->contHistory = thisThread->contHistory&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93;.get&#40;);

        // Step 15. Make the move
        pos.do_move&#40;move, st, givesCheck&#41;;

        // Step 16. Reduced depth search &#40;LMR&#41;. If the move fails high it will be
        // re-searched at full depth.
        if (    depth >= 3 * ONE_PLY
                &&  moveCount > 1
                && (!captureOrPromotion || moveCountPruning&#41;)
        &#123;
            Depth r = reduction<PvNode>&#40;improving, depth, moveCount&#41;;

            if &#40;captureOrPromotion&#41;
                r -= r ? ONE_PLY &#58; DEPTH_ZERO;
            else
            &#123;
                // Decrease reduction if opponent's move count is high
                if (&#40;ss-1&#41;->moveCount > 15&#41;
                    r -= ONE_PLY;

                // Decrease reduction for exact PV nodes
                if &#40;pvExact&#41;
                    r -= ONE_PLY;

                // Increase reduction if ttMove is a capture
                if &#40;ttCapture&#41;
                    r += ONE_PLY;

                // Increase reduction for cut nodes
                if &#40;cutNode&#41;
                    r += 2 * ONE_PLY;

                // Decrease reduction for moves that escape a capture. Filter out
                // castling moves, because they are coded as "king captures rook" and
                // hence break make_move&#40;).
                else if (    type_of&#40;move&#41; == NORMAL
                             && !pos.see_ge&#40;make_move&#40;to_sq&#40;move&#41;, from_sq&#40;move&#41;)))
                    r -= 2 * ONE_PLY;

                ss->statScore =  thisThread->mainHistory&#91;~pos.side_to_move&#40;)&#93;&#91;from_to&#40;move&#41;&#93;
                                 + (*contHist&#91;0&#93;)&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93;
                                 + (*contHist&#91;1&#93;)&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93;
                                 + (*contHist&#91;3&#93;)&#91;movedPiece&#93;&#91;to_sq&#40;move&#41;&#93;
                                 - 4000;

                // Decrease/increase reduction by comparing opponent's stat score
                if &#40;ss->statScore >= 0 && &#40;ss-1&#41;->statScore < 0&#41;
                    r -= ONE_PLY;

                else if (&#40;ss-1&#41;->statScore >= 0 && ss->statScore < 0&#41;
                    r += ONE_PLY;

                // Decrease/increase reduction for moves with a good/bad history
                r = std&#58;&#58;max&#40;DEPTH_ZERO, &#40;r / ONE_PLY - ss->statScore / 20000&#41; * ONE_PLY&#41;;
            &#125;

            Depth d = std&#58;&#58;max&#40;newDepth - r, ONE_PLY&#41;;

            value = -search<NonPV>&#40;pos, ss+1, -&#40;alpha+1&#41;, -alpha, d, true, false, cramped&#41;;

            doFullDepthSearch = &#40;value > alpha && d != newDepth&#41;;
        &#125;
        else
            doFullDepthSearch = !PvNode || moveCount > 1;

        // Step 17. Full depth search when LMR is skipped or fails high
        if &#40;doFullDepthSearch&#41;
            value = newDepth <   ONE_PLY ?
                    givesCheck ? -qsearch<NonPV,  true>&#40;pos, ss+1, -&#40;alpha+1&#41;, -alpha&#41;
                    &#58; -qsearch<NonPV, false>&#40;pos, ss+1, -&#40;alpha+1&#41;, -alpha&#41;
                    &#58; - search<NonPV>&#40;pos, ss+1, -&#40;alpha+1&#41;, -alpha, newDepth, !cutNode, false, cramped&#41;;

        // For PV nodes only, do a full PV search on the first move or after a fail
        // high &#40;in the latter case search only if value < beta&#41;, otherwise let the
        // parent node fail low with value <= alpha and try another move.
        if &#40;PvNode && &#40;moveCount == 1 || &#40;value > alpha && &#40;rootNode || value < beta&#41;)))
        &#123;
            &#40;ss+1&#41;->pv = pv;
            &#40;ss+1&#41;->pv&#91;0&#93; = MOVE_NONE;

            value = newDepth <   ONE_PLY ?
                    givesCheck ? -qsearch<PV,  true>&#40;pos, ss+1, -beta, -alpha&#41;
                    &#58; -qsearch<PV, false>&#40;pos, ss+1, -beta, -alpha&#41;
                    &#58; - search<PV>&#40;pos, ss+1, -beta, -alpha, newDepth, false, false, cramped&#41;;
        &#125;

        // Step 18. Undo move
        pos.undo_move&#40;move&#41;;

        assert&#40;value > -VALUE_INFINITE && value < VALUE_INFINITE&#41;;

        // Step 19. Check for a new best move
        // Finished searching the move. If a stop occurred, the return value of
        // the search cannot be trusted, and we return immediately without
        // updating best move, PV and TT.
        if &#40;Threads.stop.load&#40;std&#58;&#58;memory_order_relaxed&#41;)
            return VALUE_ZERO;

        if &#40;rootNode&#41;
        &#123;
            RootMove& rm = *std&#58;&#58;find&#40;thisThread->rootMoves.begin&#40;),
                                      thisThread->rootMoves.end&#40;), move&#41;;

            // PV move or new best move?
            if &#40;moveCount == 1 || value > alpha&#41;
            &#123;
                rm.score = value;
                rm.selDepth = thisThread->selDepth;
                rm.pv.resize&#40;1&#41;;

                assert&#40;&#40;ss+1&#41;->pv&#41;;

                for &#40;Move* m = &#40;ss+1&#41;->pv; *m != MOVE_NONE; ++m&#41;
                    rm.pv.push_back&#40;*m&#41;;

                // We record how often the best move has been changed in each
                // iteration. This information is used for time management&#58; When
                // the best move changes frequently, we allocate some more time.
                if &#40;moveCount > 1 && thisThread == Threads.main&#40;))
                    ++static_cast<MainThread*>&#40;thisThread&#41;->bestMoveChanges;
            &#125;
            else
                // All other moves but the PV are set to the lowest value&#58; this
                // is not a problem when sorting because the sort is stable and the
                // move position in the list is preserved - just the PV is pushed up.
                rm.score = -VALUE_INFINITE;
        &#125;

        if &#40;value > bestValue&#41;
        &#123;
            bestValue = value;

            if &#40;value > alpha&#41;
            &#123;
                bestMove = move;

                if &#40;PvNode && !rootNode&#41; // Update pv even in fail-high case
                    update_pv&#40;ss->pv, move, &#40;ss+1&#41;->pv&#41;;

                if &#40;PvNode && value < beta&#41; // Update alpha! Always alpha < beta
                    alpha = value;
                else
                &#123;
                    assert&#40;value >= beta&#41;; // Fail high
                    break;
                &#125;
            &#125;
        &#125;

        if &#40;move != bestMove&#41;
        &#123;
            if &#40;captureOrPromotion && captureCount < 32&#41;
                capturesSearched&#91;captureCount++&#93; = move;

            else if (!captureOrPromotion && quietCount < 64&#41;
                quietsSearched&#91;quietCount++&#93; = move;
        &#125;
    &#125;

    // The following condition would detect a stop only after move loop has been
    // completed. But in this case bestValue is valid because we have fully
    // searched our subtree, and we can anyhow save the result in TT.
    /*
       if &#40;Threads.stop&#41;
        return VALUE_DRAW;
    */

    // Step 20. Check for mate and stalemate
    // All legal moves have been searched and if there are no legal moves, it
    // must be a mate or a stalemate. If we are in a singular extension search then
    // return a fail low score.
    assert&#40;moveCount || !inCheck || excludedMove || !maxmove&#41;;

    if (!moveCount&#41;
        bestValue = excludedMove ? alpha
                    &#58;     inCheck ? mated_in&#40;ss->ply&#41; &#58; VALUE_DRAW;
    else if &#40;bestMove&#41;
    &#123;
        // Quiet best move&#58; update move sorting heuristics
        if (!pos.capture_or_promotion&#40;bestMove&#41;)
            update_quiet_stats&#40;pos, ss, bestMove, quietsSearched, quietCount, stat_bonus&#40;depth&#41;);
        else
            update_capture_stats&#40;pos, bestMove, capturesSearched, captureCount, stat_bonus&#40;depth&#41;);

        // Extra penalty for a quiet TT move in previous ply when it gets refuted
        if (&#40;ss-1&#41;->moveCount == 1 && !pos.captured_piece&#40;))
            update_continuation_histories&#40;ss-1, pos.piece_on&#40;prevSq&#41;, prevSq, -stat_bonus&#40;depth + ONE_PLY&#41;);
    &#125;
    // Bonus for prior countermove that caused the fail low
    else if (    depth >= 3 * ONE_PLY
                 && !pos.captured_piece&#40;)
                 && is_ok&#40;&#40;ss-1&#41;->currentMove&#41;)
        update_continuation_histories&#40;ss-1, pos.piece_on&#40;prevSq&#41;, prevSq, stat_bonus&#40;depth&#41;);

    if &#40;PvNode&#41;
        bestValue = std&#58;&#58;min&#40;bestValue, maxValue&#41;;

    if (!excludedMove&#41;
        tte->save&#40;posKey, value_to_tt&#40;bestValue, ss->ply&#41;,
                  bestValue >= beta ? BOUND_LOWER &#58;
                  PvNode && bestMove ? BOUND_EXACT &#58; BOUND_UPPER,
                  depth, bestMove, ss->staticEval, TT.generation&#40;));

    assert&#40;bestValue > -VALUE_INFINITE && bestValue < VALUE_INFINITE&#41;;

    return bestValue;
&#125;

Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Someone lit a fire under the Stockfish team

Post by Dann Corbit »

To polish this idea, the cramped bool should probably be turned off for things like single reply extensions where after the forced move the position is no longer cramped.
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: Someone lit a fire under the Stockfish team

Post by Eelco de Groot »

zullil wrote:
tpoppins wrote:
In the past two years there have been numerous posts about an alarming number of positions SF evaluates as 0.00. Someone even coined the term "Drawfish". I personally have seen hundreds of such positions on Let's Check, ranging from quiet to turbo-charged. There is a current thread discussing another such case and SF's "tunnel vision".
I may regret this interjection, but an alarming number of positions deserve 0.00. One could argue that every position in any decently played game is a 0.00 position, at least in a theoretical sense.

Of course, the purpose of evaluation in an engine is not to establish the theoretical value of the position, but to help the engine choose a move to play. So the real questions are, how often does Stockfish choose a move that converts a draw into a loss---or a win into a draw---and why does Stockfish make such choices? It is my understanding, perhaps wrong, that most of Stockfish's 0.00 evaluations ultimately result from second repetitions of positions, and by the engine's inability to find anything in the search tree with a better score. Perhaps a more refined evaluation of "quiet positions" would provide such non-zero scores. Or perhaps such an evaluation would simply slow the engine down and cost it more Elo than it gains.

About "tunnel vision", I think I largely agree with Dann. Given enough time/depth, Stockfish will almost always find a winning move if one exists. Though sometimes the wait can be excruciating. :wink:
[D] rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - - 0 1

The very latest SF-dev (1 thread):

Code: Select all

info depth 70 seldepth 80 multipv 1 score cp -29 nodes 269400017121 nps 5896122 hashfull 999 tbhits 0 time 45691046 pv e6d5 b8c8 d5a8 c7c4 e5g7 b5b4 g6h6 c8c7 a8d5 c4c5 d5e4 c5a5 g7d4 a5a6 h6g5 a6a3 g5f4 c7d6 e4f3 a7a5 f4e4 a5a4 f3d1 b4b3 e4d3 b3b2 d3c2 b2b1q c2b1 a3d3 d1a4 d3d4 a4b3 d4d2 b1c1 d2f2 b3c2 d6c5 c1d1 c5d4 c2b1 f2g2 b1f5 d4c3 d1e1 g2b2 f5g4 c3d4 g4f5 d4e3 e1d1 b2e2 f5b1 e2d2 d1c1 d2h2 c1d1 e3d4 b1g6 d4c3 g6f5 c3b2 f5d3 b2b3 d3f5 b3c3 f5g6 c3d4 g6e8 d4e3 e8g6 h2f2 g6b1 f2g2 b1f5 g2d2 d1e1 d2a2 e1d1 a2f2
But I'm confident that Bd7 will emerge!

Thanks to Bernhard Bauer for sharing this position.
Is easy:

rk6/p1r3p1/P3B1Kp/1p2B3/8/8/8/8 w - -

Engine: Kaissa III 015 (1 thread, No Tablebases, Contempt = 12, 512 MB)
Based on Stockfish 2018-03-04 sources with some hacks
by T. Romstad, M. Costalba, J. Kiiski, G. Linscott

22/28 0:02 -0.32 1.Bd5 Kc8 2.Bxa8 b4 3.Bxg7 b3 4.Kxh6 Rd7
5.Be4 Kc7 6.Bf5 Rd2 7.Bc3 Ra2 8.Kg5 Kd6
9.Kf4 Rf2+ 10.Kg4 Kd5 11.Bd3 Kc5
12.Kg3 Rf7 (5.252.122) 2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6 b3 5.Kg5 Kc7 6.Kf5 Kb6 7.Bb7 Ra4
8.Bc3 Kc5 9.Ke5 Rh4 10.Bb2 Kb5
11.Bd5 Rh2 12.Bc3 b2 13.Ba2 Kxa6
14.Bd4 (180.718.895) 2752

32/39 1:18 -0.37 1.Bd5 Kc8 2.Bxa8 Rc4 3.Bxg7 b4
4.Kxh6 b3 5.Kg5 Kc7 6.Kf5 Kb6 7.Bb7 Rb4
8.Bb2 Kb5 9.Ke5 Rh4 10.Bc8 Rh5+
11.Kf4 Rc5 12.Bf5 Kxa6 13.Bd4 Rd5
14.Ke4 (215.482.994) 2751

33/40 1:30 -0.45-- 1.Bd5 Kc8 (247.749.758) 2741


33/42 1:38 +M7++ 1.Bd7 (270.115.814) 2737

33/42 1:40 +M5 1.Bd7 b4 2.Kf7 b3 3.Ke7 b2 4.Kd8 b1Q
5.Bxc7+ (274.920.635) 2734

34/10 1:45 +M5 1.Bd7 b4 2.Kf7 b3 3.Ke7 b2 4.Kd8 b1Q
5.Bxc7+ (287.618.933) 2735

35/10 1:46 +M5 1.Bd7 b4 2.Kf7 b3 3.Ke7 b2 4.Kd8 b1Q
5.Bxc7+ (292.200.879) 2733


best move: Be6-d7 time: 1:46.921 min n/s: 2.733.787 nodes: 292.200.879
Debugging is twice as hard as writing the code in the first
place. Therefore, if you write the code as cleverly as possible, you
are, by definition, not smart enough to debug it.
-- Brian W. Kernighan
Dann Corbit
Posts: 12537
Joined: Wed Mar 08, 2006 8:57 pm
Location: Redmond, WA USA

Re: Someone lit a fire under the Stockfish team

Post by Dann Corbit »

Uri's idea solves it quickly
Taking ideas is not a vice, it is a virtue. We have another word for this. It is called learning.
But sharing ideas is an even greater virtue. We have another word for this. It is called teaching.