Skip to content

SF may emit a ponder move even if bestmove leads to a game ending draw #6676

Description

@robertnurnberg

Describe the issue

In some cases Stockfish emits a ponder move even if after the bestmove is played the games ends.

Expected behavior

Stockfish should not emit a ponder move in those cases.

Steps to reproduce

I have no deterministically reproducible example yet, but running games with the new option -check-ponder-pvs from Disservin/fastchess#997 triggers the warning PV has length 1 despite ponder move output quite often. An example from such a game is below.

position fen rnb1kbnr/ppp1pppp/8/4q3/8/2N5/PPPP1PPP/R1BQKBNR w KQkq - 2 4 moves f1e2 c8g4 d2d4 g4e2 g1e2 e5a5 d4d5 g8f6 e1g1 b8d7 a2a4 g7g6 c3b5 c7c6 b2b4 a5d8 d5c6 b7c6 b5d4 d8c7 b4b5 c6b5 a4b5 c7c4 f1e1 f8g7 d4c6 e8g8 c6e7 g8h8 e2d4 a7a6 b5a6 f6g8 e7c6 a8a6 a1a6 c4a6 d1f3 a6c4 f3b3 c4b3 c2b3 f8a8 g2g3 g8f6 c1d2 f6d5 e1d1 a8a2 d2e1 d7f6 c6e5 h8g8 g1f1 g7f8 d1c1 h7h5 e5d3 a2a8 c1c4 f6g4 h2h3 d5e3 f2e3 g4e3 f1e2 e3c4 b3c4 a8c8 c4c5 f8c5 d3c5 c8c5 e2f3 c5c1 f3f2 c1c4 d4e2 c4a4 h3h4 a4a6 e1c3 a6a2 c3d4 a2a3 e2c3 a3b3 c3d5 b3d3 d5f6 g8f8 d4e5 d3b3 e5d6 f8g7 d6e5 g7f8 e5d4 b3d3 d4c5 f8g7 f6e4 g7g8 c5b4 d3b3 b4e1 g8f8 e1d2 f8g8 d2g5 g8f8 g5h6 f8e7 h6e3 e7e8 e3c5 e8d7 e4g5 f7f6 g5e4 d7e6 c5e3 e6e5 f2f3 b3d3 e4f2 d3c3 f2h3 e5f5 h3f4 c3a3 f4h3 a3e3 f3e3 f5g4 h3f4 g4g3 f4g6 f6f5 e3e2 f5f4 e2f1 f4f3 f1e1 g3g2 g6f4 g2g3 f4g6 f3f2 e1e2 g3g2 g6f4 g2g3 f4g6 g3g2 g6f4 g2g3
isready
readyok
go wtime 498 btime 388 winc 10 binc 10
info string Available processors: 0-7
info string Using 1 thread
info string NNUE evaluation using nn-9a0cc2a62c52.nnue (105MiB, (82672, 1024, 31, 32, 1))
info string NNUE evaluation using nn-47fc8b7fff06.nnue (6MiB, (22528, 128, 15, 32, 1))
info string Network replica 1: Shared memory.
info depth 1 seldepth 5 multipv 1 score cp 0 nodes 46 nps 46000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 2 seldepth 2 multipv 1 score cp 0 nodes 70 nps 70000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 3 seldepth 2 multipv 1 score cp 0 nodes 82 nps 82000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 4 seldepth 2 multipv 1 score cp 0 nodes 95 nps 95000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 5 seldepth 2 multipv 1 score cp 0 nodes 111 nps 111000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 6 seldepth 2 multipv 1 score cp 0 nodes 128 nps 128000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 7 seldepth 2 multipv 1 score cp 0 nodes 148 nps 148000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 8 seldepth 2 multipv 1 score cp 0 nodes 179 nps 179000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 9 seldepth 2 multipv 1 score cp 0 nodes 211 nps 211000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 10 seldepth 2 multipv 1 score cp 0 nodes 247 nps 247000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 11 seldepth 2 multipv 1 score cp 0 nodes 271 nps 271000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 12 seldepth 2 multipv 1 score cp 0 nodes 306 nps 306000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 13 seldepth 2 multipv 1 score cp 0 nodes 395 nps 395000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 14 seldepth 2 multipv 1 score cp 0 nodes 435 nps 435000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 15 seldepth 2 multipv 1 score cp 0 nodes 514 nps 514000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 16 seldepth 2 multipv 1 score cp 0 nodes 732 nps 732000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 17 seldepth 2 multipv 1 score cp 0 nodes 770 nps 770000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 18 seldepth 2 multipv 1 score cp 0 nodes 1045 nps 1045000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 19 seldepth 2 multipv 1 score cp 0 nodes 1058 nps 1058000 hashfull 4 tbhits 0 time 1 pv f4g6
info depth 20 seldepth 2 multipv 1 score cp 0 nodes 1357 nps 678500 hashfull 4 tbhits 0 time 2 pv f4g6
info depth 21 seldepth 2 multipv 1 score cp 0 nodes 2892 nps 964000 hashfull 4 tbhits 0 time 3 pv f4g6
info depth 22 seldepth 2 multipv 1 score cp 0 nodes 2994 nps 998000 hashfull 4 tbhits 0 time 3 pv f4g6
info depth 23 seldepth 2 multipv 1 score cp 0 nodes 4289 nps 1072250 hashfull 4 tbhits 0 time 4 pv f4g6
bestmove f4g6 ponder g3g2

Repeating the analysis by hand (with a clean TT) yields the correct output bestmove f4g6 without ponder.

Anything else?

No response

Operating system

All

Stockfish version

master

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions