

Pseudo-legal move generation requires trying moves, to find at least one legal move or not, while legal move generation determines the information in advance. It further depends on whether move generation relies on pseudo-legal moves or strictly legal moves. Like checkmate, stalemate is usually determined by the search if it turns out a node above the horizon becomes a terminal node without any further child nodes.
