After going through a long list of test positions for my chess engine, I found this simple mate in 2 puzzle that my engine failed to see even after searching to a depth of 16 ply. I checked the puzzle with Stockfish and Stockfish also failed, playing the move Kxa2, stalemating black. This was the same move my engine played, and Stockfish continued to recommend it even until reaching high depths when it finally saw the correct move, 1. Ba3, after which 1. ...Kxf6 is forced and met with 2. Bb2#.

Anyway, here's the position (white to move):

[FEN "n1N3br/2p1Bpkr/1pP2R1b/pP3Pp1/P5P1/1P1p4/p2P4/K7 w - - 0 1"]

After testing various changes to find the cause of the bug, I found that disabling null-move pruning fixed the issue, at least for my chess engine. This makes sense since the engine probably tries 1. Ba3 Kxf6 and black can stand pat while being up lots of material, despite white's forced mate with black being in zugzwang.

My question is if null-move pruning is actually the cause in other engines and if not, what am I doing wrong and how should I fix it? Additionally, is it even a good idea to tune a chess engine based on ultra-specific composed positions like this?

  • I guess you could just run engine without null-move pruning for some amount of time, and then switch back to regular engine configuration for the majority of the analysis time. Commented Apr 9 at 18:36
  • 1
    I tried four engines, three found it, including stockfish 16.1.
    – Brad Lanam
    Commented Apr 9 at 22:38
  • @BradLanam just out of curiosity what engines did you try and what depth did they find it at? Commented Apr 10 at 2:32
  • Now can they find the full mate in 6 from the starting position of this Giegold problem? chessbase.in/news/Problems-of-Fritz-Emil-Giegold Commented Apr 11 at 4:13
  • Without null move pruning, yes, but the colossal increase in searched nodes for most positions doesn't justify it. Commented Apr 11 at 15:43


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.