If you are seeking a helpmate from a given chess position, then breadth-first search (BFS) will be able to find one in the minimum number of moves. It "looks at" each position at depth $1$, then depth $2$, and so on. As soon as it finds a win, it can return the result, and it is guaranteed to be at least equal best.
- If there was a strictly shorter win, the algorithm would have already returned it, and exited.
- There might be alternative wins at that depth (if the user is also interested in these, the algorithm can keep running until it's finished at that depth).
Note that BFS will often have impractically large memory requirements (perhaps storing all possible positions at depth $d$). A way around this is to use an iterative deepening depth-first search: i.e., we run depth first search to depth $1$, then if no helpmate is found, we run depth first search to depth $2$, and so on.
This repetition might seem wasteful, but if the branching factor is large (which it often is in chess), running DFS for depths $1,2,\ldots,d$ comprises only a small portion of the time, compared to running DFS for depths $1,2,\ldots,d+1$.
(If you (or the reader) is after a forced checkmate see Minimax.)