How Koga decides

Idea Force a defender off its duty
  • A deflection forces an enemy piece to leave a square it was guarding, so that we can then strike where it used to defend.
  • We look at the engine's main line: our move compels the opponent to move a particular piece, that piece stops covering a key square, and a later move of ours exploits the now-undefended square.
  • Deflection is read off the forcing sequence, so the win can land immediately or several moves deeper in the line.
Forcing The move must actually force the piece to leave
  • The deflecting move has to be genuinely forcing: either it gives check, or it puts a piece in danger so the opponent must answer (a forced recapture or a real threat).
  • A quiet, perfectly safe move does not force anything — the opponent is free to keep guarding, so we do not call that a deflection even if the defender happens to wander off.
  • If the threatened piece can simply step aside and keep defending the same square from its new home, it was never deflected.
Payoff The abandonment must pay off
  • Leaving a square undefended only matters if we can use it: a capture on that square, or a checkmate that needs it.
  • A check that wins nothing does not qualify. Repetition shuffles, perpetual-check chases, and fortress wandering all produce checks on abandoned squares but never cash in — so they are rejected.
  • We also require that losing the defender truly weakens the square: after it leaves, our forces on that square must at least match the remaining defenders.
Roles How deflection ranks against neighbours
  • Deflection outranks distraction: when both could describe the same luring-away idea, we report the deflection and drop the distraction.
  • A plain hanging piece outranks deflection: if the point is simply that a piece is left en prise, that is reported instead.

Test positions (the examples that guard against regressions)

Check drags the king off guard duty

Lichess 00DBg. After ...Bc5+ the line runs Be3 Bxe3+ Kxe3, and the white king on f2 — the only guard of g3 — is dragged to e3 by the check. With the king gone, ...Qxg3 wins the knight. The deflection is the forced Kxe3, several moves into the line.

✓ detectedCheck♟ Lichess 00DBgtest_deflection_when_check_forces_king_from_guard_duty_00dbg
r n . . k . n r
p p . . . . . .
. . p . . p . .
. . . . P . . .
. . . . P . p q
. . N . b . N .
P P P . . K B .
R . . Q . R . .
Sacrificed piece
Defender (removed or overloaded)
Targeted / won piece
Attacking piece

Defender can retreat and keep defending

A constructed position. White plays Nc4, threatening the rook on b6. But the rook guards the knight on b1 and can step anywhere along the b-file — b2 through b8 — without ever leaving that defence. Because it is never forced off its duty, there is no deflection.

✗ not detectedNot forced off dutytest_no_deflection_when_defender_retreats_along_file
. . . . k . . .
. . . . . . . .
. r . . . . . .
. . . . . . . .
. . N . . . . .
. . . . . . . .
B . . . . K . .
. n . . . . . .
Defender (removed or overloaded)
Targeted / won piece
Attacking piece
Piece that moves

The forcing move must itself be forcing

From a real game (lichess.org/ekna9t19, Black to move 33...Rcc6). The line is Rcc6 Rh8+ Kxf7 Rh7+ Kg8 Rxb7, and Black's rook does leave h7 (uncovering f7) before ...Kxf7. But Rcc6 is a quiet, safe attack on the h6 pawn — it never forces the white rook to move. The white rook's Rh8+ is a desperado check of its own, so the f7 loss is incidental, not a deflection.

✗ not detectedMove not forcingtest_no_deflection_when_deflecting_move_is_safe_lichess_ekna9t19_move65
. . . . . k . .
p p . . . P . R
. . r r . . . P
. . . p . p . .
. . . p . . . .
. . . . . . . .
P P . . . P . K
. . . . . R . .
Piece that moves
Defender (removed or overloaded)
Targeted / won piece

Check that wins nothing (fortress shuffle)

From a drawn king-and-knight vs king-and-bishop fortress (game lichess.org/MEZTnWYD, 70.Ne4, eval 0.00). Ne4 attacks the bishop on g5; Black's ...Kd5 leaves d4, uncovering c3; and 71.Nc3+ lands on c3 with check. But the knight is merely escaping — the check wins nothing and the line just shuffles. Since the abandonment never pays off, it is not a deflection.

✗ not detectedCheck pays nothingtest_no_deflection_in_drawn_fortress_lichess_meztnwyd_move70
. . . . . . . .
. . . . . . . .
. . . . p p . .
. . . . . . b .
. . . k N . P .
. . . . . K . .
. . . . . . . .
. . . . . . . .
Piece that moves
Targeted / won piece
Defender (removed or overloaded)

Golden puzzles — every real Lichess puzzle Koga is tested against for this tactic (8)

Lichess 00ziz

Lichess 00ziz (rating 2053). Solution: d6 cxd6 cxb6.

✓ detectedrating 2053♟ Lichess 00ziz
. . . . . . . .
p . p . . k . p
P p . . . . . b
. P P P . K . .
. . . P . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .

Lichess 00uKb

Lichess 00uKb (rating 1548). Solution: h4 Qxh4 Qxe5+.

✓ detectedrating 1548♟ Lichess 00uKb
. . . . . . k .
p . . . . r p .
. . . . . . . .
. . p . B q . p
. . P . b . . .
. . P . . . Q P
P . . . . . P K
. . . . R . . .

Lichess 011o8

Lichess 011o8 (rating 1532). Solution: Re7+ Kg8 Qxh6.

✓ detectedrating 1532♟ Lichess 011o8
. . r . . . . .
. p . . . . . k
p . . q . . p b
. . . p . b Q n
. . . B . . . .
P . N P . N . P
. P . . . . . .
K . . . R . . .

Lichess 01g9c

Lichess 01g9c (rating 1886). Solution: Ng4+ Kf1 Rxf3#.

✓ detectedrating 1886♟ Lichess 01g9c
r . . . . r k .
p p R . . . p p
. . . . . . . .
. . . p n . B .
. . . . . . . .
. . . B . N . b
P P . . N K P b
. . . Q R . . .

Lichess 01Npb

Lichess 01Npb (rating 2098). Solution: f4 exf4 Kxd4 f5 gxf5.

✓ detectedrating 2098♟ Lichess 01Npb
. . . . . . . .
. . . . . . . .
. . p . . . p .
. . P . . p K b
. . . B k . . .
. . . . P . . .
. . . . . . . P
. . . . . . . .

Lichess 00bPT

Lichess 00bPT (rating 1878). Solution: Bh3+ Kc7 Qxe7+.

✓ detectedrating 1878♟ Lichess 00bPT
. . . . . Q . .
p p . k p p . .
. . . p . n . .
. . p P . . . .
. . P . P . . .
. . q . . P K .
. . . . . . . .
. . . . . B . .

Lichess 021cc

Lichess 021cc (rating 1395). Solution: g5 fxg5 Kxe5.

✓ detectedrating 1395♟ Lichess 021cc
. . . . . . . .
. . . . . . . .
. . p . k . p .
p . K p P . . .
P . . . . P P .
. . . . . . . .
. . . . . . . .
. . . . . . . .

Lichess 001h8

Lichess 001h8 (rating 1780). Solution: Qxh7+ Rxh7 Rxc8+ Kg7 Rc7+.

✓ detectedrating 1780♟ Lichess 001h8
. . r . . . k .
. . r . . . . p
. . . . p . p .
. p . q . p P .
p . . P . P . Q
P . . . . . . R
. . . . b B . .
. . R . . . K .