How Koga decides
- A discovered attack happens when the piece we move was standing in front of one of our own long-range pieces — a rook, bishop, or queen — and stepping aside opens that piece's line.
- The piece that moves and the slider behind it must start on the same rank, file, or diagonal; the mover was the only thing blocking the view.
- Once the line is opened, the slider must newly attack an enemy piece it was not attacking before. If the freshly exposed piece is the enemy king, it is also a discovered check (the king target is reported alongside).
- If the newly attacked piece has more of our attackers than its own defenders, it is plainly winnable and the discovered attack is accepted at once.
- If the piece is adequately defended, we do not trust the bare geometry — we require the main line to actually show that piece being captured (or the discovery itself giving check) before we call it a discovered attack.
- This filters out 'phantom' discoveries: a slider that lines up on a well-guarded piece which is only ever taken because it is forced to capture elsewhere, not because the discovery won it.
- A discovered attack always outranks a plain double attack or an insufficiently-defended capture made by the same move: opening the hidden line is the real idea, so those simpler labels are dropped.
- Against a fork or a pinned-defender on the same move, we compare what each actually wins. The motif that captures the heavier piece is kept; the other is suppressed. Ties keep the more specific motif.
- New discovery (motif) — the move itself opens the line and reveals the attack.
- Set up by a sacrifice (promoted to motif) — when the move sacrifices a piece that the opponent then recaptures, and the discovery appears only on the next move, the discovery is treated as the whole point of the sacrifice rather than an afterthought.
Test positions (the examples that guard against regressions)
Discovered check (and attack)
In a constructed position, the knight steps from e4 to d6 and unmasks the rook on e1, which now attacks the black king on e8 along the open e-file. Because the exposed piece is the king, Koga reports both a discovered check and a discovered attack.
Quiet discovered attack on an undefended queen
A constructed position. The bishop on a3 slides to b4 — a quiet move, no check, no fork — and uncovers the rook on a1, which now bears down the open a-file at the black queen on a8. The queen has no defender, so the discovery is accepted immediately even from a one-move line.
Discovery outranks a double attack
Played in a real game (Bh7+). The bishop leaves e4 to give check, and in doing so it unmasks the queen on e1, which now attacks the black queen on e5 down the e-file. The move could look like a double attack, but the hidden queen's line is the real idea, so the double-attack label is suppressed in favour of the discovered attack.
Discovery beats an incidental fork
Played in a real game (f5+). The pawn advance checks the king and also happens to attack the g4 pawn (a king-and-pawn fork), but at the same time it uncovers the rook on c7, which now hits the undefended white rook on h7. Winning the rook is the point, so the small fork is suppressed and the discovered attack is kept.
Discovery that traps the attacked piece
Lichess 06tuT. After the rook trade Qxc5 bxc5, White plays c4: the pawn advances and uncovers the bishop on d2, which now attacks the black knight on a5. The knight has no safe square — the line ends with it lost (a5–b7, then Bxb7) — so this discovery also traps a piece.
Discovery set up by a sacrifice
Played in a real game (Nxf7). White sacrifices the knight so the king must recapture (Kxf7); then Ng5+ steps the other knight aside and uncovers the bishop on g2, which rakes the long diagonal onto the bishop on b7. The discovery only appears after the sacrifice, but since the sacrifice exists precisely to set it up, Koga promotes it to the main motif. The board is shown right after the sacrifice; the g2 bishop's line still runs through the f3 knight until it moves.
Phantom discovery — rejected
Lichess zv50i. Black plays Nxc2+, forking the king, the a1 rook and the e3 pawn, and the knight's departure also lines up the queen on d8 down the d-file at the white queen on d1. But d1 has two defenders (king e1 and knight c3) against one attacker, so it is not actually winnable. The queen is captured later only because she is forced to take the checking knight — so the discovery is rejected and the fork is kept.
No discovery from a quiet pawn push
1.e4 from the starting position. The pawn moves, but there is no friendly long-range piece lined up behind it to unmask, so nothing is discovered.
Golden puzzles — every real Lichess puzzle Koga is tested against for this tactic (11)
Lichess 001XA
Lichess 001XA (rating 1686). Solution: Rxb7 Qxb7 Nf6+ Bxf6 Bxb7.
Koga flags discovered attack as a follow-up here — it fires later in the line, on Nf6+, not on the move shown above.
Lichess 01q4A
Lichess 01q4A (rating 1791). Solution: Nf2+ Kh2 Qxd1 Rxd1 Nxd1.
Lichess 01I9O
Lichess 01I9O (rating 1337). Solution: Rg4+ hxg4 Qxh6 Rxf1+ Kxf1.
Lichess 012QY
Lichess 012QY (rating 1223). Solution: Nxe6 fxe6 Rxd8.
Lichess 00mvP
Lichess 00mvP (rating 995). Solution: Nf3+ gxf3 Qxd4.
Lichess 00XQ8
Lichess 00XQ8 (rating 1488). Solution: Qe3+ Kb1 Rxf1 Qg8+ Re8.
Lichess 00AdI
Lichess 00AdI (rating 1253). Solution: Rd3+ g3 Rxg3+ Kh2 Rc3+.
Koga flags discovered attack as a follow-up here — it fires later in the line, on Rc3+, not on the move shown above.
Lichess 01dLk
Lichess 01dLk (rating 1486). Solution: Nxf6+ gxf6 Qxe8+ Qxe8 Rxe8+ Rxe8 Nxd4.
Lichess 00Kia
Lichess 00Kia (rating 1723). Solution: Qe5+ Kg8 Bd5+ Nxd5 Qxe1.
Koga flags discovered attack as a follow-up here — it fires later in the line, on Bd5+, not on the move shown above.
Lichess 01Ni2
Lichess 01Ni2 (rating 1738). Solution: Ng1+ Kd2 Rxf2+ Bxf2 h1=Q.
Lichess 03Sxg
Lichess 03Sxg (rating 1631). Solution: c2+ Ke4 Bc3 Rc6 c1=Q.