How Koga decides
- Checkmate is the simplest test of all: after the move, the side to move is in check and has no legal reply — no capture of the checking piece, no block, no escape square for the king.
- When that is true, Koga reports Checkmate and stops looking for anything else to win; there is nothing beyond mate.
- A mate delivered purely by a knight against a king hemmed in by its own pieces is reported separately as a Smothered Mate, not as a plain Checkmate.
- When a position is mate, Checkmate becomes the move's main motif, and every other tactic on the board is demoted to a supporting role.
- The pin, fork, deflection, or sacrifice that made the mate possible is still listed, but as an enabler — it set the mate up, it is not the point itself.
- A fork is suppressed entirely under a mate: once the king cannot move, forking it alongside other pieces is meaningless.
- If the move just played already gives mate, that is reported immediately.
- Otherwise Koga follows the engine's main line: if the forcing sequence ends in mate, Checkmate is still added as the motif for the move that begins it, with the other tactics along the way marked as enablers.
- A move can carry more than one label — for example a pawn that promotes and mates on the same move keeps both its Promotion mark and the Checkmate motif.
Test positions (the examples that guard against regressions)
Mate in one
Lichess 02XGK. The queen lands on h7 and mates the black king on g8 at once: the king has no flight square and the queen cannot be taken. Checkmate is the move's motif.
Promotion that mates
Black recaptures on e1 and promotes to a queen, which checks the white king on d1 — and the pawn's departure from d2 unveils the rook on d8 checking down the file. It is a double check the king cannot answer, so it is mate. The move keeps its Promotion label while Checkmate is the motif.
Mate forced at the end of the line
Lichess 00KhM. The board shows the first move, Qxf7+ — a check, not yet mate. The king must take, and after Rxf7 the rook is pinned to g8 by the bishop on c4, so it can no longer block on f8; Rd8 is then mate. Koga credits the whole line: Checkmate is the motif and the pin is an enabler.