How Koga decides
- A promotion is flagged whenever a pawn marches to the far rank and turns into a new piece — almost always a queen.
- Koga looks at the move being played first, then walks the player's own moves further down the engine's main line, so a promotion that only happens several moves later in a forcing sequence is still caught.
- When no pawn promotes within the short line, Koga still considers the motif if a pawn has just reached the 7th rank (the 2nd rank for Black), or a pawn already there has an empty, unguarded square in front of it.
- Reaching the 7th rank alone is not enough. Koga follows the whole engine line and keeps the promotion only if a pawn one step from queening actually queens later in the line, or the opponent must give up material to take it (for example a rook for the pawn), or the line ends with that pawn free to queen safely on the next move.
- A pawn the opponent simply wins for free proves nothing. It does not cancel another pawn that still queens, though — taking the first pawn can drag a rook away from the other pawn's queening square.
- Promoting to a queen is always a plain promotion.
- A non-queen promotion (rook, bishop, or knight) played as the very move being judged is usually cosmetic: the position is so winning that any piece queens the point, and the engine just happened to emit a minor piece. Koga calls that a plain promotion too.
- It is only the special tactical underpromotion when the minor piece is genuinely required — for example a queen would stalemate or walk into a forced mate, or (with an engine available) the minor piece scores clearly higher than a queen would.
- A non-queen promotion appearing deeper in the forced line is taken as a deliberate underpromotion.
Test positions (the examples that guard against regressions)
Pawn queens on the last rank
In a constructed position the pawn on e7 advances to e8 and becomes a queen. A pawn reaching the far rank is the core of the motif.
Cosmetic rook promotion
A constructed position where the pawn on e7 promotes to a rook. With no stalemate or mate at stake, a queen would have done just as well, so this counts as a plain promotion rather than a tactical underpromotion.
Cosmetic knight promotion
A constructed position where the pawn on e7 promotes to a knight that gives no check. Since a queen would have been at least as good, this is treated as a plain promotion, not an underpromotion.
Engine confirms a cosmetic underpromotion
A constructed position where the engine scores the rook promotion only a shade above the queen promotion. Because the gap is too small to call the minor piece necessary, Koga records a plain promotion.
Promotion that also delivers mate
The pawn on d2 captures to e1 and promotes to a queen, giving checkmate. The promotion is *how* the mate is delivered, so it is recorded as a co-headline alongside the mate rather than hidden behind it.
Mating promotion where a queen mates too
Lichess n5QUx. Black plays …b1=R#, delivering mate — but …b1=Q# mates just as well. The rook is not required, so this is a plain promotion, not a tactical under-promotion (which is reserved for a minor piece the queen cannot replace).
Cosmetic mating promotion deeper in the line
Lichess 0rESt. After 1…Qxc2+ 2.Ka2 the line ends with …b1=R# — but …b1=Q# mates just as well. The mating promotion sits a couple of moves into the forced line rather than being the move judged, yet the same cosmetic rule applies: a queen would mate too, so the rook is not required and Koga records a plain promotion. The board is shown right after 1…Qxc2+, so the b2-pawn still stands one step from promoting.
Promotion deep in the main line
Lichess 004b0. The line opens with the bishop check Bg5, and only at its very end does the a-pawn queen on a1 (after the a1-bishop has been deflected and traded off). The board is shown right after Bg5, so the a2-pawn is still one of several moves from promoting. Koga finds the promotion only when it follows the full main line rather than the short capped one.
Clearance that opens the queening square
Lichess 00oYS. Black's rook leaves c1 (Rd1), clearing the path so the c2-pawn can queen on c1 on the next player move. The promotion is the payoff of the clearance. The board is shown after Rd1, so the c2-pawn still stands one step from promoting on the now-empty c1.
Pawn on the 2nd rank, taken for free
Lichess eOhly. Black's pawn captures on f2 and stands one step from queening, but the king simply takes it (Kxf2) and nothing was paid to stop it. Reaching the 2nd rank alone is not a promotion.
Pawn on the 7th with a free square, but taken
A constructed position. The a7-pawn's queening square is empty and unguarded, but the rook on b7 just takes the pawn (Rxa7). A pawn that is won for free is no promotion threat.
One pawn is taken, the other queens
A constructed position. White pushes b7; the rook takes it (Rxb7) and so leaves the 8th rank, and the g7-pawn is now free to queen on g8. Losing one pawn does not cancel the other pawn's promotion.
Pawn on the 2nd rank that costs a rook
Lichess oEEQD. Black's pawn reaches b2, and White gives up the rook to take it (Rxb2 Rxb2). The opponent paid material to stop the pawn, so the promotion threat counts.
Pawn that queens a few moves later
Lichess 01Qs6. White plays c7; after Rd1+ Kc6 h6 the pawn queens on c8. The queening happens beyond the short line Koga reads first, so Koga checks the whole line to confirm the pawn really queens.
A different pawn queens later in the line
Lichess IMrOF. After Rb8 the bishop wins the a7-pawn for free (Bxa7), but then c7 Rc6 c8=Q follows. The c-pawn reaches the 7th inside the line and queens, so the promotion stands.
Golden puzzles — every real Lichess puzzle Koga is tested against for this tactic (10)
Lichess 01do1
Lichess 01do1 (rating 1102). Solution: Qxf8+ Kxf8 d8=Q+.
Lichess 01GcH
Lichess 01GcH (rating 1814). Solution: Ra1+ Kb6 e1=Q Qc7+ Qe7 Qxe7+ Kxe7.
Lichess 018Iz
Lichess 018Iz (rating 1314). Solution: h6 Kc6 h7 Kxd7 h8=Q.
Lichess 004LZ
Lichess 004LZ (rating 1187). Solution: c2+ Ka2 c1=Q Rd7+ Ke2.
Lichess 00zrq
Lichess 00zrq (rating 2071). Solution: g8=Q Rxg8 Rxg8 e2 Re1.
Lichess 00xxi
Lichess 00xxi (rating 1399). Solution: Kg7 Rd8 h8=Q Rxh8 Kxh8 Ke4 a4 Kd4 a5.
Lichess 00X2j
Lichess 00X2j (rating 1570). Solution: Rg6 Rxg6 Kxg6 d3 g8=Q.
Lichess 01z8k
Lichess 01z8k (rating 442). Solution: h3 a6 h2 Ka7 h1=Q.
Lichess 02fzY
Lichess 02fzY (rating 1353). Solution: b2 Rb7 Rxh7+ Rxh7 b1=Q.
Lichess 02QgP
Lichess 02QgP (rating 1661). Solution: c7 Rd2+ Kc3 Rxd6 c8=Q.