StockFish : best move not found due to MultiPV ?

Discussion of chess software programming and technical issues.

Moderators: hgm, Rebel, chrisw

User avatar
tissatussa
Posts: 31
Joined: Sat Sep 24, 2016 4:13 am
Location: Netherlands
Full name: Roelof Berkepeis

Re: StockFish : best move not found due to MultiPV ?

Post by tissatussa »

@BBauer: Because Leela Zero found it, according to the mentioned video : chess is not about material, by b4! the Bc5 is deviated from the diagonal a7-g1, so White can put a rook on the g-file and continue the attack on the Black King, which works out perfectly in this game. A human can suspect this maneuver, brute force engines like StockFish try to calculate the consequences but a neural network engine like Leela just "sees" this intuitively.
-simple is not always best but best is always simple-
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: StockFish : best move not found due to MultiPV ?

Post by syzygy »

tissatussa wrote: Sun Jul 08, 2018 10:43 pm @BBauer: Because Leela Zero found it
That's hardly a reason to think it is the best move.

SF9 would not have played any of 21...Bc5 (21...d5 instead), 22...Nf5 (22...d5 instead), 23...Qe7 (seems to be a blunder), 24...c6 (again a blunder).
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: StockFish : best move not found due to MultiPV ?

Post by Sesse »

Stockfish dev (compiled as of today, 8 GB hash) prefers Qf3, at least at single-PV depth 35.

To make sure this isn't about pruning b4, I ran separate searches from the positions after b4, Bd2 and Qf3.

d35 b4: -0.72 (best response Bxb4)
d35 Bd2: -0.48 (best response Nf5)
d35 Qf3: -0.57 (best response Qc8)

So it's not at all clear that b4 is actually the better move here.
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: StockFish : best move not found due to MultiPV ?

Post by Eelco de Groot »

White would invest a pawn with KS compensation so it is not clear Stockfish does see that without some major analysis, I mean the NN are relatively good at KS patterns. That is just an observation of course. Just a main line from Stockfish point of view (development version with a very small change) seems to be
1. b4 Bxb4 2. Rg1 d5 3. Bb2 c5 4 Qg4 Nf5
and now e6 but Stockfish lost that at high depths and little hash and played 5 a3.


59/85 932:24 -0.49 2.Rg1 d5 3.Bb2 c5 4.Qg4 Nf5 5.a3 Ba5
6.e6 d4 7.exf7+ Rbxf7 8.Ne6 Qf6
9.Qxg6+ Qxg6 10.Rxg6+ Kh7 11.Nxf8+ Rxf8
12.Rg2 c4 13.Rd1 b5 14.Rg5 Bd8
15.Rxf5 (115.950.857.178) 2072

but if I feed a few more moves into it , after the 1. b4 Bxb4 2. Rg1 d5 3. Bb2 c5 4 Qg4 Nf5, two best lines


[d]3q1rk1/pr3p2/1p4p1/2ppPnN1/1b3PQ1/7P/PB5K/R5R1 w - -


47 23:44 -0.08 5.e6 d4 6.exf7+ Rbxf7 7.Nxf7 Kxf7
8.Qxg6+ Ke7 9.Rg2 Qd6 10.Qh7+ Ke8
11.Qxa7 Qxf4+ 12.Kg1 Bd2 13.Qa8+ Kd7
14.Qb7+ Ke6 15.Rg6+ Rf6 16.Qxb6+ Nd6
17.Rxf6+ Qxf6 18.Qb3+ (3.161.975.075) 2219

47 23:44 -0.48 5.a3 Ba5 6.e6 d4 7.exf7+ Rbxf7 8.Ne6 Qf6
9.Qxg6+ Qxg6 10.Rxg6+ Kh7 11.Nxf8+ Rxf8
12.Rg2 c4 13.Rd1 b5 14.Rg5 Bd8
15.Rxf5 Rxf5 16.Rxd4 Bf6 17.Rd7+ Kg6
18.Bc1 (3.161.975.075) 2219

The line with (directly) 5. e6 (24. e6 in the original game possibly, if I look at Benard's notation above) looks more wild. I did not look at any of the video.
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
syzygy
Posts: 5557
Joined: Tue Feb 28, 2012 11:56 pm

Re: StockFish : best move not found due to MultiPV ?

Post by syzygy »

Eelco de Groot wrote: Mon Jul 09, 2018 12:48 am The line with (directly) 5. e6 (24. e6 in the original game possibly, if I look at Benard's notation above) looks more wild. I did not look at any of the video.
In the original game, 20.b4 Bxb4 21.Rg1 is followed by 21...Bc5 22.Rg4 Nf5 23.Bb2 Qe7 24.Qd3 c6 and black has managed to lose what may be a winning position.
User avatar
Eelco de Groot
Posts: 4561
Joined: Sun Mar 12, 2006 2:40 am
Full name:   

Re: StockFish : best move not found due to MultiPV ?

Post by Eelco de Groot »

Yes, but that woud be Stockfish 5, June 2014 obviously meant to reduce the Elo difference so why should we look at that :P What would Alpha Zero have gotten out of b4? white has at least a draw which seems to be typical of the won Alpha Zero games Just another observation of course... We do not know what Alpha would have played.
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
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: StockFish : best move not found due to MultiPV ?

Post by BBauer »

I played a little around with your position
[d]3q1rk1/prppnp2/1p4p1/2b1P1N1/5P2/7P/PP5K/R1BQR3 w - - 0 1
and got

Code: Select all

 38/74	10:19	 969.655k	1.565k	-0,26	b2-b4 Bc5xb4 Re1-g1 d7-d5 Bc1-b2 c7-c5 Qd1-g4 Ne7-f5 e5-e6 d5-d4 Ng5xf7 Rb7xf7 e6xf7+ Kg8xf7 Qg4xg6+ Kf7-e7 Rg1-g2 Qd8-d5 a2-a3 Bb4-a5 Rg2-e2+ Ke7-d7 Ra1-g1 Kd7-c7 Re2-e5 Qd5-f7 Qg6-g2 Nf5-h4 Qg2-e4 Qf7xf4+ Qe4xf4 Rf8xf4 Kh2-g3 Nh4-f3 Rg1-d1 Rf4-f7 Re5-e2 Kc7-d6 Re2-f2 Nf3-g5 Rf2xf7 Ng5xf7 Kg3-f4 b6-b5 h3-h4 Kd6-e6 Kf4-e4 Ba5-c7 Bb2-c1 Bc7-e5 h4-h5 c5-c4 h5-h6 d4-d3 Rd1-h1 Nf7-d6+ Ke4-e3
 39/64	13:10	 1.272.726k	1.609k	-0,20	b2-b4 Bc5xb4 Re1-g1 d7-d5 Bc1-b2 c7-c5 Qd1-g4 Ne7-f5 e5-e6 d5-d4 Ng5xf7 Rb7xf7 e6xf7+ Kg8xf7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ka3-b4 Qc2-a4+ Kb4-c5 Qa4-a5+ Kc5-c4 Qa5-a4+ Kc4-d3 Qa4-b5+ Kd3-e3 Ra1-e1+ Ke3-f4 Qb5-b8+ Kf4-f3 Qb8-a8+ Kf3-g3
 41/77	20:50	 2.006.161k	1.604k	-0,25	b2-b4 Bc5xb4 Re1-g1 d7-d5 Bc1-b2 c7-c5 Qd1-g4 Ne7-f5 e5-e6 d5-d4 e6xf7+ Rb7xf7 Ng5xf7 Kg8xf7 Qg4xg6+ Kf7-e7 Rg1-g2 Qd8-d6 Qg6-h7+ Ke7-e8 Qh7xa7 Qd6xf4+ Kh2-g1 Bb4-d2 Qa7-a8+ Ke8-f7 Qa8-b7+ Kf7-e6 Rg2-g6+ Rf8-f6 Qb7xb6+ Nf5-d6 Rg6xf6+ Qf4xf6 Qb6-b3+ c5-c4 Qb3-g3 c4-c3 Bb2-c1 Nd6-e4 Qg3-g8+ Ke6-e5 Qg8-b8+ Ke5-f5 Qb8-c8+ Kf5-f4 Bc1xd2+ Ne4xd2 Qc8-g4+ Kf4-e3 Ra1-e1+ Ke3-d3 Qg4-e2+ Kd3-c2 Qe2-d1+ Kc2-b2 Qd1-c1+ Kb2xa2 Qc1-c2+ Ka2-a3 Re1-a1+ Ka3-b4 Qc2-a4+ Kb4-c5 Qa4-a5+ Kc5-c4 Qa5-a4+ Kc4-d3 Qa4-b5+ Kd3-e3 Ra1-e1+ Ke3-f4 Qb5-b8+ Kf4-f3 Qb8-a8+ Kf3-g3
 41/67	20:50	 2.006.161k	1.604k	-0,22	b2-b4
So 1.b4 may indeed be the strongest move. Others with better hardware and better analysis skills will hopefully comment.

Kind regards
Bernhard
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: StockFish : best move not found due to MultiPV ?

Post by Sesse »

Depth 55 at root, 243 MN: 0.00, best move is Qg4.
BBauer
Posts: 658
Joined: Wed Mar 08, 2006 8:58 pm

Re: StockFish : best move not found due to MultiPV ?

Post by BBauer »

Thank you!

1. Qg4 was among the best moves I considered.
Depth 55 is quite amazing but you are known for strong hardware.

Kind regards
Bernhard
Sesse
Posts: 300
Joined: Mon Apr 30, 2018 11:51 pm

Re: StockFish : best move not found due to MultiPV ?

Post by Sesse »

Others here already reported d59 results from the b4 position :-) But at some point, I guess you want a skilled operator to guide the search. If nothing else, it's not clear at all that b4 is immediately winning and that Stockfish should have seen it at d30.