@lurarose when you say #1 highest evaluation move or #30, this supposes some evaluation function. This function measure how likely I am to win the position assuming players play best moves. This best moves assumption is wrong in our case, and therefore the worst engine move is irrelevant. Let's look at this position again: Bb1k1b2/bKp1p1p1/1pP1P1P1/pP6/6P1/P7/8/8 w - - 0 1
If you turn on the engine, it will says zeros for every move, because it understands that under the best play it is all draw. Nevertheless, from the viewpoint of finding the path to COOPERATIVE mate some white moves are better than others. You will likely not be able to lose to Stockfish if you play this position for black even if you try hard to lose, despite the fact there is a path to mate.
@Illion It is easy to solve the position with FEN above by brute-force. You can consider a directed graph whose vertices are legal positions (with marked side to move), and whose edges are legal moves connecting two positions. Some vertices of this graph are marked as "black is checkmated". The problem is find if there is a way in graph along the edges from the given vertex (position) into some of the marked vertices (checkmate to black). The most direct way is breadth-first search which is basically a brute-force of all reachable positions (you memorize the positions you reach and never do the work multiple times if there is a transposition). The complexity is number of reachable positions. It is straightforward to estimate, that there are 3 reachable pawn structures on a-file, 2 pawn structures on g-file, 3 positions of white king, 3 positions of black king, 10 positions of white bishop (including "was captured"), and 2 sides to move, which gives a crude estimate of 3 * 2 * 3 * 3 * 10 * 2 = 1080 reachable positions. This is a tiny number for modern computers.
Nevertheless, crude BFS is not applicable if there is a position with blocked pawn structure and tons of same-player-color same-square-color bishops blocked by it. These positions are solvable by finding an invariant set of square that bishops and kings can reach and proving that it is indeed invariant (pieces cannot move out of the zones if they are already there + checkmate is impossible with pieces in the zones). I think these two techniques (enumerating reachable positions + enumerating reachable zones for distinct pieces) can be combined in a meaningful way to detect most conceivable dead positions. It doesn't look like you will be able to prove it work for anything though, and it will likely actually not, just need to find even more silly positions.