Is the endgame database reliable? It contradicts stockfish analysis. Also, isn't two knights insufficient material if the b pawn is lost?

If you walk Stockfish through the tablebase mating sequence, it eventually finds mate in 12 after capturing the a3 pawn. As others have said, the tablebase is perfect, constructed by explicit brute force calculation for sufficiently simple board states, while Stockfish's search is just the best general algorithm anyone has managed to write. It's not perfect.

Curiously, even if you increase the search depth well beyond what should be sufficient to find the mate, Lichess' Stockfish misses it, indicating that it must be incorrectly evaluating that line as not promising enough to continue searching. Apparently, Lichess' Stockfish could blunder this into a draw.

/r/chess Thread Link - i.redd.it