Tactical Stockfish failure

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

Moderators: hgm, Rebel, chrisw

BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Tactical Stockfish failure

Post by BeyondCritics »

[pgn][Event "Cuernavaca Young Masters"] [Site "Cuernavaca"] [Date "2006.02.06"] [Round "4"] [White "Vallejo Pons, Francisco"] [Black "Dominguez Perez, Leinier"] [Result "1/2-1/2"] [ECO "C48"] [WhiteElo "2650"] [BlackElo "2638"] [PlyCount "49"] [EventDate "2006.02.03"] [EventType "tourn"] [EventRounds "9"] [EventCountry "MEX"] [EventCategory "16"] [SourceTitle "CBM 112"] [Source "ChessBase"] [SourceDate "2006.06.07"] [SourceVersion "1"] [SourceVersionDate "2006.06.07"] [SourceQuality "1"] 1. e4 e5 2. Nc3 Nf6 3. Nf3 Nc6 4. Bb5 Nd4 5. Bc4 Bc5 6. Nxe5 Qe7 7. Nf3 d5 8. Bxd5 Bg4 9. d3 O-O-O 10. Be3 Nxd5 11. Nxd5 Rxd5 12. exd5 Re8 13. c3 Nxf3+ 14. gxf3 Qh4 15. Kd2 Rxe3 16. fxe3 Qf2+ 17. Kc1 Bxf3 18. Qe1 Bxe3+ 19. Kb1 Bxh1 20. Qxh1 Qe2 21. a4 Qxd3+ 22. Ka2 Qc4+ 23. Kb1 Qd3+ 24. Ka2 Qc4+ 25. Kb1 1/2-1/2 [/pgn]

[d]2kr3r/ppp1qppp/5n2/2bB4/3nP1b1/2NPBN2/PPP2PPP/R2QK2R b KQ - 0 10
In this position stockfish 10 fails to see 11...Nxd5! 12.Nxd5 Rxd5 for a very long time. If forced into the issue, it extricates itself immediately with 11...Rxd5, so it does seemingly some bad pruning. Such things happens from time to time and i choose to report this one.
MikeGL
Posts: 1010
Joined: Thu Sep 01, 2011 2:49 pm

Re: Tactical Stockfish failure

Post by MikeGL »

BeyondCritics wrote: Mon Sep 30, 2019 5:24 pm [pgn][Event "Cuernavaca Young Masters"] [Site "Cuernavaca"] [Date "2006.02.06"] [Round "4"] [White "Vallejo Pons, Francisco"] [Black "Dominguez Perez, Leinier"] [Result "1/2-1/2"] [ECO "C48"] [WhiteElo "2650"] [BlackElo "2638"] [PlyCount "49"] [EventDate "2006.02.03"] [EventType "tourn"] [EventRounds "9"] [EventCountry "MEX"] [EventCategory "16"] [SourceTitle "CBM 112"] [Source "ChessBase"] [SourceDate "2006.06.07"] [SourceVersion "1"] [SourceVersionDate "2006.06.07"] [SourceQuality "1"] 1. e4 e5 2. Nc3 Nf6 3. Nf3 Nc6 4. Bb5 Nd4 5. Bc4 Bc5 6. Nxe5 Qe7 7. Nf3 d5 8. Bxd5 Bg4 9. d3 O-O-O 10. Be3 Nxd5 11. Nxd5 Rxd5 12. exd5 Re8 13. c3 Nxf3+ 14. gxf3 Qh4 15. Kd2 Rxe3 16. fxe3 Qf2+ 17. Kc1 Bxf3 18. Qe1 Bxe3+ 19. Kb1 Bxh1 20. Qxh1 Qe2 21. a4 Qxd3+ 22. Ka2 Qc4+ 23. Kb1 Qd3+ 24. Ka2 Qc4+ 25. Kb1 1/2-1/2 [/pgn]

[d]2kr3r/ppp1qppp/5n2/2bB4/3nP1b1/2NPBN2/PPP2PPP/R2QK2R b KQ - 0 10
In this position stockfish 10 fails to see 11...Nxd5! 12.Nxd5 Rxd5 for a very long time. If forced into the issue, it extricates itself immediately with 11...Rxd5, so it does seemingly some bad pruning. Such things happens from time to time and i choose to report this one.
Maybe not a tactical failure. SF just feels liquidating the pieces quickly is not a good continuation. After analyzing, SF wants to maintain pieces and maintan complexity of position. Good thing against humans and weaker engines. Why would you like to simplify quickly into a drawn endgame when you know you are stronger than the opponent. It is #1 engine after all.

Critter considers Nxd5 and Bxf3 as best. Bxf3 will transpose to Nxd5 according to critter hence given same eval score.
I told my wife that a husband is like a fine wine; he gets better with age. The next day, she locked me in the cellar.
BeyondCritics
Posts: 396
Joined: Sat May 05, 2012 2:48 pm
Full name: Oliver Roese

Re: Tactical Stockfish failure

Post by BeyondCritics »

MikeGL wrote: Mon Sep 30, 2019 6:26 pm
Maybe not a tactical failure. SF just feels liquidating the pieces quickly is not a good continuation. After analyzing, SF wants to maintain pieces and maintan complexity of position. Good thing against humans and weaker engines. Why would you like to simplify quickly into a drawn endgame when you know you are stronger than the opponent. It is #1 engine after all.

Critter considers Nxd5 and Bxf3 as best. Bxf3 will transpose to Nxd5 according to critter hence given same eval score.
The point was obviously, that stockfish thinks it has a serious disadvantage at the root position, at least to level 35. Even an insane contempt setting could not explain this, since stockfish clips it at 100cps.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Tactical Stockfish failure

Post by zullil »

BeyondCritics wrote: Mon Sep 30, 2019 6:38 pm
MikeGL wrote: Mon Sep 30, 2019 6:26 pm
Maybe not a tactical failure. SF just feels liquidating the pieces quickly is not a good continuation. After analyzing, SF wants to maintain pieces and maintan complexity of position. Good thing against humans and weaker engines. Why would you like to simplify quickly into a drawn endgame when you know you are stronger than the opponent. It is #1 engine after all.

Critter considers Nxd5 and Bxf3 as best. Bxf3 will transpose to Nxd5 according to critter hence given same eval score.
The point was obviously, that stockfish thinks it has a serious disadvantage at the root position, at least to level 35. Even an insane contempt setting could not explain this, since stockfish clips it at 100cps.
Stockfish-dev with default settings (so 1 thread, and reproducible) doesn't see the correct move until depth 42. Indeed, this seems like a "failure" for Stockfish.

info depth 42 seldepth 66 multipv 1 score cp -68 lowerbound nodes 2457028623 nps 1596438 hashfull 1000 tbhits 0 time 1539069 pv f6d5
info depth 40 currmove f6d5 currmovenumber 1
info depth 40 currmove d8d5 currmovenumber 2
info depth 40 currmove g4f3 currmovenumber 3
info depth 40 currmove d4f3 currmovenumber 4
info depth 40 currmove h8e8 currmovenumber 5
info depth 40 currmove g4h5 currmovenumber 6
info depth 40 currmove c8b8 currmovenumber 7
info depth 40 currmove c5b4 currmovenumber 8
info depth 40 currmove f6h5 currmovenumber 9
info depth 40 currmove e7f8 currmovenumber 10
info depth 40 currmove a7a6 currmovenumber 11
info depth 40 currmove c5d6 currmovenumber 12
info depth 40 currmove g7g6 currmovenumber 13
info depth 40 currmove g4d7 currmovenumber 14
info depth 40 currmove g4h3 currmovenumber 15
info depth 40 currmove h8f8 currmovenumber 16
info depth 40 currmove f6d7 currmovenumber 17
info depth 40 currmove b7b6 currmovenumber 18
info depth 40 currmove e7e5 currmovenumber 19
info depth 40 currmove d8d7 currmovenumber 20
info depth 40 currmove e7e8 currmovenumber 21
info depth 40 currmove h8g8 currmovenumber 22
info depth 40 currmove e7d6 currmovenumber 23
info depth 40 currmove d4f5 currmovenumber 24
info depth 40 currmove c7c6 currmovenumber 25
info depth 40 currmove d8e8 currmovenumber 26
info depth 40 currmove c8d7 currmovenumber 27
info depth 40 currmove c5b6 currmovenumber 28
info depth 40 currmove g4e6 currmovenumber 29
info depth 40 currmove d4b3 currmovenumber 30
info depth 40 currmove h7h5 currmovenumber 31
info depth 40 currmove d8d6 currmovenumber 32
info depth 40 currmove d8f8 currmovenumber 33
info depth 40 currmove d4e6 currmovenumber 34
info depth 40 currmove g7g5 currmovenumber 35
info depth 40 currmove g4f5 currmovenumber 36
info depth 40 currmove e7d7 currmovenumber 37
info depth 40 currmove d4b5 currmovenumber 38
info depth 40 currmove d4e2 currmovenumber 39
info depth 40 currmove c5a3 currmovenumber 40
info depth 40 currmove e7e6 currmovenumber 41
info depth 40 currmove d8g8 currmovenumber 42
info depth 40 currmove d4c6 currmovenumber 43
info depth 40 currmove h7h6 currmovenumber 44
info depth 40 currmove f6e8 currmovenumber 45
info depth 40 currmove a7a5 currmovenumber 46
info depth 40 currmove b7b5 currmovenumber 47
info depth 40 currmove f6g8 currmovenumber 48
info depth 40 currmove e7e4 currmovenumber 49
info depth 40 currmove f6e4 currmovenumber 50
info depth 40 currmove d4c2 currmovenumber 51
info depth 42 seldepth 69 multipv 1 score cp -105 upperbound nodes 2623962928 nps 1601572 hashfull 1000 tbhits 0 time 1638367 pv f6d5 c3d5
info depth 42 currmove f6d5 currmovenumber 1
info depth 42 seldepth 69 multipv 1 score cp -76 lowerbound nodes 2648000508 nps 1602780 hashfull 1000 tbhits 0 time 1652129 pv f6d5
info depth 41 currmove f6d5 currmovenumber 1
info depth 42 seldepth 69 multipv 1 score cp -37 lowerbound nodes 2664012081 nps 1603721 hashfull 1000 tbhits 0 time 1661144 pv f6d5
info depth 40 currmove f6d5 currmovenumber 1
info depth 40 currmove g4f3 currmovenumber 2
info depth 40 currmove d4f3 currmovenumber 3
info depth 40 currmove h8e8 currmovenumber 4
info depth 40 currmove g4h5 currmovenumber 5
info depth 40 currmove e7d7 currmovenumber 6
info depth 40 currmove h8g8 currmovenumber 7
info depth 40 currmove d4e6 currmovenumber 8
info depth 40 currmove d4e2 currmovenumber 9
info depth 40 currmove e7e5 currmovenumber 10
info depth 40 currmove g4d7 currmovenumber 11
info depth 40 currmove d4f5 currmovenumber 12
info depth 40 currmove h7h6 currmovenumber 13
info depth 40 currmove c8b8 currmovenumber 14
info depth 40 currmove a7a6 currmovenumber 15
info depth 40 currmove d4c6 currmovenumber 16
info depth 40 currmove b7b6 currmovenumber 17
info depth 40 currmove e7d6 currmovenumber 18
info depth 40 currmove c7c6 currmovenumber 19
info depth 40 currmove e7e8 currmovenumber 20
info depth 40 currmove d4b5 currmovenumber 21
info depth 40 currmove c5a3 currmovenumber 22
info depth 40 currmove d4b3 currmovenumber 23
info depth 40 currmove g7g6 currmovenumber 24
info depth 40 currmove g4e6 currmovenumber 25
info depth 40 currmove c8d7 currmovenumber 26
info depth 40 currmove c5b6 currmovenumber 27
info depth 40 currmove g4h3 currmovenumber 28
info depth 40 currmove h7h5 currmovenumber 29
info depth 40 currmove e7f8 currmovenumber 30
info depth 40 currmove d8d6 currmovenumber 31
info depth 40 currmove g7g5 currmovenumber 32
info depth 40 currmove c5b4 currmovenumber 33
info depth 40 currmove f6d7 currmovenumber 34
info depth 40 currmove a7a5 currmovenumber 35
info depth 40 currmove b7b5 currmovenumber 36
info depth 40 currmove e7e6 currmovenumber 37
info depth 40 currmove h8f8 currmovenumber 38
info depth 40 currmove d8d7 currmovenumber 39
info depth 40 currmove g4f5 currmovenumber 40
info depth 40 currmove f6h5 currmovenumber 41
info depth 40 currmove d8e8 currmovenumber 42
info depth 40 currmove c5d6 currmovenumber 43
info depth 40 currmove d8f8 currmovenumber 44
info depth 40 currmove f6e8 currmovenumber 45
info depth 40 currmove d8g8 currmovenumber 46
info depth 40 currmove f6g8 currmovenumber 47
info depth 40 currmove d4c2 currmovenumber 48
info depth 40 currmove f6e4 currmovenumber 49
info depth 40 currmove e7e4 currmovenumber 50
info depth 40 currmove d8d5 currmovenumber 51
info depth 42 seldepth 69 multipv 1 score cp 0 nodes 2695907083 nps 1605827 hashfull 1000 tbhits 0 time 1678827 pv f6d5 c3d5 d8d5 e4d5 h8e8 e1g1 g4f3 g2f3 e7h4 f3f4 c5d6 e3d4 d6f4 g1g2 h4g5 g2h1 g5h4
todd
Posts: 56
Joined: Thu Apr 19, 2018 9:09 pm

Re: Tactical Stockfish failure

Post by todd »

This is a well known drawing line.

Not only does SF have trouble with the position given in the thread, but it also has trouble evaluating an alternative line for black where white sacrifices a queen for two pieces. It gives 0.00, but in practice, white has excellent chances.

Avoiding the drawing line (which it thinks is good for white until reaching high depth) in favor of a line it thinks is equal (which is not) has cost it some games against Leela, e.g. https://www.youtube.com/watch?v=Vni_w4LqUvU
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Tactical Stockfish failure

Post by jp »

todd wrote: Mon Sep 30, 2019 10:05 pm Not only does SF have trouble with the position given in the thread, but it also has trouble evaluating an alternative line for black where white sacrifices a queen for two pieces. It gives 0.00, but in practice, white has excellent chances.
What is this alternative line? Here comes another 0.00 argument.
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Tactical Stockfish failure

Post by zullil »

jp wrote: Tue Oct 01, 2019 12:01 am
todd wrote: Mon Sep 30, 2019 10:05 pm Not only does SF have trouble with the position given in the thread, but it also has trouble evaluating an alternative line for black where white sacrifices a queen for two pieces. It gives 0.00, but in practice, white has excellent chances.
What is this alternative line? Here comes another 0.00 argument.
It appears to be this, based on the link in todd's post:

[pgn]1. e4 e5 2. Nf3 Nc6 3. Nc3 Nf6 4. Bb5 Nd4 5. Bc4 Bc5 6. Nxe5 Qe7 7. Nf3 d5 8. Bxd5 Bg4 9. d3 c6 10. Bb3 Nd7 11. Be3 Ne5 [/pgn]
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Tactical Stockfish failure

Post by zullil »

zullil wrote: Tue Oct 01, 2019 12:29 am
jp wrote: Tue Oct 01, 2019 12:01 am
todd wrote: Mon Sep 30, 2019 10:05 pm Not only does SF have trouble with the position given in the thread, but it also has trouble evaluating an alternative line for black where white sacrifices a queen for two pieces. It gives 0.00, but in practice, white has excellent chances.
What is this alternative line? Here comes another 0.00 argument.
It appears to be this, based on the link in todd's post:

[pgn]1. e4 e5 2. Nf3 Nc6 3. Nc3 Nf6 4. Bb5 Nd4 5. Bc4 Bc5 6. Nxe5 Qe7 7. Nf3 d5 8. Bxd5 Bg4 9. d3 c6 10. Bb3 Nd7 11. Be3 Ne5 [/pgn]
Took a quick look with Stockfish-dev. The move 12. Nxd4 is found in about two seconds. It is initially evaluated as positive for White, but with increasing depth the evaluation gradually heads to 0.00. I stopped here:

info depth 52 seldepth 77 multipv 1 score cp 0 nodes 24567761808 nps 33540613 hashfull 1000 tbhits 0 time 732478 pv f3d4 g4d1 d4f5 e7f8 e3c5 f8c5 a1d1 g7g6 d3d4 c5f8 d4e5 g6f5 e4f5 a8d8 e1g1 d8d1 f1d1 f8c5 d1e1 e8g8 g2g4 f8e8 e5e6 f7e6 c3e4 c5e5 e1e3 g8f8 b3e6 e5b2 c2c3 e8d8 g1g2 b2b5 e4f6 f8g7 c3c4 b5b1 f6d7 d8d7 e6d7 b1a2 g4g5 a2c4 f5f6 g7f8 g2g3 c4c1 e3e8 f8f7 e8e7 f7f8
jp
Posts: 1470
Joined: Mon Apr 23, 2018 7:54 am

Re: Tactical Stockfish failure

Post by jp »

zullil wrote: Tue Oct 01, 2019 12:49 am Took a quick look with Stockfish-dev. The move 12. Nxd4 is found in about two seconds. It is initially evaluated as positive for White, but with increasing depth the evaluation gradually heads to 0.00.
Is it always SF-dev's best move (after the first 2 seconds)?
zullil
Posts: 6442
Joined: Tue Jan 09, 2007 12:31 am
Location: PA USA
Full name: Louis Zulli

Re: Tactical Stockfish failure

Post by zullil »

jp wrote: Tue Oct 01, 2019 1:46 am
zullil wrote: Tue Oct 01, 2019 12:49 am Took a quick look with Stockfish-dev. The move 12. Nxd4 is found in about two seconds. It is initially evaluated as positive for White, but with increasing depth the evaluation gradually heads to 0.00.
Is it always SF-dev's best move (after the first 2 seconds)?
Yes. After Sf-dev settles on Nxd4, that move is preferred at all iterations. Its evaluation gradually reduces to 0.00, but no other move is suggested as better.

I did a second search, this time with 6-man endgame tables and with Analysis Contempt = Off. Currently seeing

info depth 66 seldepth 84 multipv 1 score cp 0 nodes 248226926728 nps 35034247 hashfull 994 tbhits 23764664 time 7085265 pv f3d4 g4d1 d4f5 e7f8 e3c5 f8c5 a1d1 g7g6 d3d4 c5f8 d4e5 g6f5 e4f5 a8d8 e1g1 d8d1 f1d1 f8c5 d1e1 e8g8 g2g4 f8e8 e5e6 f7e6 c3e4 c5e5 e1e3 a7a5 e4g5 e5b2 g1g2 b7b5 b3e6 g8g7 h2h4 h7h6 g5f7 e8f8 f7e5 b2c2 e3d3 f8d8 d3d8 c2e4 g2h3 e4h1 h3g3 h1g1 g3f3 g1h1 f3e2 h1e4 e2d1 e4e5 g4g5 h6g5 h4g5 e5f4 d8g8 g7h7 g5g6 h7h6 g8h8 h6g7 h8h7 g7f6 g6g7 f4f2 g7g8q f2f1 d1d2 f1f2 d2d3 f2f1 d3e3 f1e1 e3f4 e1f2 f4e4 f2e2 e4d4 e2f2 d4d3

By the way, the time control in the Lc0-Stockfish game in which this appeared was apparently 5'+2". So blitz.