-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
SF depth stuck at 22 ply at one endgame position. Possibly infinitive loop. #5023
Comments
I reproduced with the same dev version:
Using dev version 1dfbde2 also gets stuck after:
SF16 doesn't get stuck:
|
I have prolonged the game by few moves:
position fen "8/p2rk3/P2r1p2/2B2Ppp/8/7P/5K2/3R4 w - h6 0 39" Here latest SF stucks at 17 ply. The reason can be that SF tries to find a win, but, the the opponent has already built a fortress, and the computer may crash because of hardware failure before SF will see draw by 50 moves rule. |
Using dev version 99cdb92 also gets stuck for a while but does complete:
|
Stockfish 16 is also stuck after depth 25 |
I let the original position (1r4k1/p2r1p1p/P2bp1p1/R7/8/3RB1PP/5P2/6K1 w - - 0 30) run for a bit and it's still stuck on depth 22 currmove 1 after ~20 hours |
Some data about the search before it gets stuck and after it gets stuck:
|
killed it after 30 hours total. Now running with 131072MiB of hash. Thought it would help (in case there's a lot of duplicated deep lines), but instead got stuck on depth 20. |
I doubt increasing the hash size will help.
Search is stuck after 1 second, and even after 2 minutes the hashfull number is almost the same. This hints to that we are repeatedly starting a search, but almost never finish it to write the result into the Transposition Table. |
position fen "1r4k1/p2r1p1p/P2bp1p1/R7/8/3RB1PP/5P2/6K1 w - - 0 30" Stockfish dev-20231021-8366ec48 by the Stockfish developers (see AUTHORS file) Stockfish dev-20240101-0fca5605 by the Stockfish developers (see AUTHORS file) First version with dual NNUE: And yesterday very surprisingly a test game came by different way to very similar position with reversed colours, and black stuck again.
Latest abrok version 2048MB/24threads stucks at 24 ply: |
Latest version without the issue: The issue began from next dev. version: |
Well, since Stockfish 16 also gets stuck which is a commit before the version you are mentioning then the issue was still there but temporarily hidden.
|
luckily the issue still occurs with latest master after the latest merge wave. so we can test a rebased fix |
In the last try for fix SF looks for fortress for both sides. I think that more efficient is to look for fortress only for opponent that has worse position, and in case of eval 0.00 to choose somehow one side for looking, for example by material balance. |
the search finished eventuall, this is with 128GiB of hash
hashfull is at 0 after 1.2T nodes, nps is roughly 5 times higher than it should be. This indicates to me very few repeating positions that hit hash hard. |
Latest version stucks at 28 ply. |
Tbh I ditched fixing this.. my proposed fix is very complexifying and it looks like this is caused because of the eval function not evaluating the position as a draw until it reaches to the 50 move rule which requires insane number of nodes to be searched with each depth.. best bet is to wish for a new net to evaluate this correctly. |
I run matches using Cutechess 1.3.1. Stockfish often stucks before or at depth 25 at KBPK ending when it has rook pawn and bishop of wrong color. Even Syzygy bases 3-4-5 don't help. Because of this I need to adjudicate draw manually, and also matches take more time. Maybe this is less complicate to fix. |
@PavelChess if you have more positions feel free to post them here. |
I think that's an example of what Pavel mentioned KBPK : 1k6/8/P7/8/K7/4B3/8/8 w - - 0 1 'stuck' on depth 20 with 4 pieces on the board (current master, all defaults). EDIT: finishes the depth after a long while:
|
Hmm, my approach would solve this too, as the opponent can set on the position keeping playing the same move over and over again... needs rethinking.. |
After upgrade of NNUE architecture the issue still exists. So the issue surely is caused by search algorithm. |
position fen r5k1/ppr2pbp/4b1p1/8/8/2NBPP2/PP3P1P/2R1K2R b K - 0 17 |
This Problem exists unfortunately still in SF17. |
Latest stockfish doing well, depth 70 and not stuck yet. |
Possibly related bug in SF17 with default net |
Latest dev does not suffer from this explosion. Perhaps this issue can be closed now? |
The issue still exists in latest development version, only stuck depth is bigger. setoption name hash value 2048 info depth 44 seldepth 105 multipv 1 score cp 147 nodes 909585072 nps 6693933 hashfull 11 tbhits 0 time 135882 pv a5a1 g8f8 a1d1 f8e7 e3c5 b8d8 d3d6 d7d6 f2f4 g6g5 g1g2 f7f6 g2f2 d8d7 f2e3 e6e5 f4f5 h7h5 e3f3 d7d8 c5a3 d8d7 f3f2 d7d8 a3c5 d8d7 d1d3 d7d8 c5a3 d8d7 a3b4 d7d8 f2g2 d8d7 d3d1 d7d8 g2f2 d8d7 b4c5 d7d8 d1d3 d8d7 d3d2 d7d8 f2g2 d8d7 c5d6 setoption name hash value 2048 info depth 29 seldepth 110 multipv 1 score cp 62 nodes 815625401 nps 6924696 hashfull 2 tbhits 0 time 117785 pv a4a3 b8a8 e3b6 a8b8 b6g1 b8a8 a3b2 a8b8 g1b6 b8a8 b2b3 a8b8 b3c2 b8a8 c2d3 a8b8 b6d4 b8a8 a6a7 a8b7 d3d2 b7a8 d4c5 a8b7 d2c3 b7a8 c3c4 a8b7 c4b4 b7a8 c5e3 a8b7 e3f2 b7a8 b4b3 a8b7 f2e3 b7a8 b3c2 a8b7 c2d1 b7a8 e3d4 a8b7 d1c1 b7a8 c1b1 a8b7 d4g1 b7a8 b1c2 a8b7 c2b2 b7a8 b2a3 a8b7 a3b4 b7a8 |
Describe the issue
I played an engine match in Cutechess interface. One game was buggy - SF depth stuck at 22 ply. the final position is endgame without deep tactics.
I compiled version with fix of depth 0 output, and it has same issue.
I also downloaded latest abrok avx2 version (Date: Fri Jan 26 21:15:07 2024 +0100
Timestamp: 1706300107 ), and it also stucks at 22 ply.
This seems to be infinitive loop.
Expected behavior
Stockfish has to increase depth very quickly, because this was endgame without deep tactics, and should quickly get even 30+ ply if requested.
Steps to reproduce
position fen "1r4k1/p2r1p1p/P2bp1p1/R7/8/3RB1PP/5P2/6K1 w - - 0 30"
go depth 25
Anything else?
Nbd7 9. Rd1 e6 10. h3 d5 11. a4 c5 12. a5 cxd4 13. exd4 dxc4 14. a6 Bd5 15. Ne5
b5 16. Nxb5 Qb8 17. Nxd7 Nxd7 18. Bxc4 Rc8 19. Na3 Nb6 20. b3 Qc7 21. Qd3 Nxc4
Here SF stucks at depth 22.
Task manager shows that SF uses resources, and didn't freeze.
In this game was used syzygy 3-4-5 pieces. But also without them latest version stucks at 22 ply.
Operating system
Windows
Stockfish version
Stockfish16 / fcbb02f
The text was updated successfully, but these errors were encountered: