Closed antoyo closed 4 years ago
Your assumptions would be correct if the engine would just do a textbook alpha-beta search. However, since modern chess engines like Stockfish apply a lot of search extensions and reductions, quiescence search, as well as aggressive forward pruning, the situation is not that simple, see e.g. https://www.chessprogramming.org/Selectivity. Therefore, even though the base depth might be 6 (ply), the engine might search specific branches of the search tree to very different depths, e.g., one branch to 3 ply and another one to 8 ply, so this is expected.
This also explains why sometimes the engine finds a longer checkmate sequence before a shorter one. For mate finding one can try to limit the reduction and pruning techniques. One simple way is by setting multipv to a larger value. There also have been SF forks specifically for mate finding in the past, but usually in practice the most efficient way is to do an interactive analysis and play candidate moves on the board, and if a sequence leads to a forced mate the engine will find and remember that when going back to the initial position.
Hi. I made an analysis:
And I was wondering if the ply (first column) is wrong. How come the engine only found the mate in 3 at ply 9? Shouldn't it have find it a ply 6? Thanks.
Edit: Also, not sure if it's related, but the engine seem to have found a checkmate in 5 before a checkmate in 3. Is this normal? What is the best way to find the shortest checkmate?