How Koga decides

Definition Win an undefended piece
  • The move we judge must be a capture of an enemy piece or pawn.
  • If the captured square has no enemy defender, we take the piece for free — there is no recapture to give anything back. That is a hanging piece.
  • It applies to anything from a pawn to the queen: the only test is that nothing was guarding it.
Defended? What counts as a defender
  • A piece is defended if any friendly man — including a pawn — attacks the square it stands on. A pawn guard is enough to make a capture an even trade rather than a free win.
  • We also honour x-ray defenders: if a friendly piece would guard the square once an enemy slider in front of it is removed, the piece is treated as defended.
  • If the piece is defended but the capture still wins material after the full exchange, that is the separate Insufficiently Defended pattern, not a hanging piece.
Stays won The gain must hold up
  • When the engine line runs several moves on, we re-check the material balance a couple of moves later.
  • If the side that grabbed the piece has handed the advantage straight back, we do not call it a hanging piece — the point is a lasting win, not a momentary one.
Boundaries How it sits alongside other ideas
  • A hanging piece stands on its own: when the move is also a Fork or a Skewer, all of those ideas are reported together — neither pushes the hanging piece aside.
  • A hanging piece in turn outranks a bare Deflection label.

Test positions (the examples that guard against regressions)

A free knight

A constructed position. The rook on a1 takes the black knight on a5, which has no defender. Nothing recaptures, so White simply wins the knight.

✓ detectedtest_capture_undefended_knight
. . . . k . . .
. . . . . . . .
. . . . . . . .
n . . . . . . .
. . . . . . . .
. . . . . . . .
. . . . . . . .
R . . . K . . .
Attacking piece
Targeted / won piece

Even a pawn counts

A constructed position. The d4 pawn captures the undefended e5 pawn. There is no guard on e5, so the pawn is won outright — the pattern is not reserved for pieces.

✓ detectedtest_capture_undefended_pawn_is_hanging
r n b q k b n r
p p p p . p p p
. . . . . . . .
. . . . p . . .
. . . P P . . .
. . . . . . . .
P P P . . P P P
R N B Q K B N R
Attacking piece
Targeted / won piece

Defended — not hanging

A constructed position. Nxe5 grabs the e5 pawn, but that pawn is guarded by the d7 knight and the f6 knight. Because a recapture is waiting, this is not a free win and the pattern does not fire.

✗ not detectedtest_capture_defended_piece_not_hanging
r . b q k b . r
p p p n . p p p
. . . . . n . .
. . . . N . . .
. . . . P . . .
. . . . . . . .
P P P P . P P P
R N B Q K B . R
Targeted / won piece

A pawn guard is enough

A constructed position. Black's Nxd5 takes the white knight, but it is defended by the e4 pawn. A single pawn guard turns the capture into an even trade, so it is not a hanging piece.

✗ not detectedtest_capture_defended_by_pawn_not_hanging
r . b q k b . r
p p p . . p p p
. . . . . . . .
. . . n . . . .
. . . . P . . .
. . . . . . . .
P P P . . P P P
R N B Q K B . R
Targeted / won piece

No capture, no hanging piece

A constructed position. The opening move 1.e4 takes nothing, so there is no piece to win — the pattern only ever applies to captures.

✗ not detectedtest_non_capture_not_hanging
r n b q k b n r
p p p p p p p p
. . . . . . . .
. . . . . . . .
. . . . P . . .
. . . . . . . .
P P P P . P P P
R N B Q K B N R
Piece that moves

Knight snaps off a loose bishop

Lichess 002bK. After the bishop check ...Bb5+, the knight replies Nxb5, winning the bishop, which had no defender on b5.

✓ detected♟ Lichess 002bKtest_lichess_puzzle_002bK
. . . . . . . .
. . . . . . . p
. . . . k . . .
p b . p . p P B
. n . P . . . P
N . p . P . . .
. . . . K . . .
. . . . . . . .
Attacking piece
Targeted / won piece

Winning the queen for free

Lichess 00QQS. After Black plays ...Qxd4, the bishop answers Bxd4, capturing the black queen, which sat undefended on d4.

✓ detected♟ Lichess 00QQStest_lichess_puzzle_00QQS
. . r . . . k .
. p . . . p p p
. . . . p . . .
Q . . . . . . .
. . . q . . . .
P . B . . . . .
. P r . . P P P
R . . . . . K .
Attacking piece
Targeted / won piece

Recapturing a knight that has no guard

Lichess 0095W. After Nxe5 by White, Black answers fxe5, winning the knight on e5 outright — White had nothing defending it.

✓ detected♟ Lichess 0095Wtest_lichess_puzzle_0095W
. . . . . . . .
p p . r . . k p
q . . P . p p b
. . . . N . . .
. . . . P . . .
. Q . . . . . P
P P R . . P P .
. . . . . . K .
Attacking piece
Targeted / won piece

A later skewer must not steal the credit

Bxg2 wins the undefended bishop on g2 — that free piece is the real point of the move. Several moves later the bishop happens to line up against a knight with a pawn behind it (a follow-up skewer that the line never cashes in). Because that skewer only appears later, it does not push aside the hanging piece, which stays the move's own idea.

✓ detectedMotif (survives follow-up skewer)test_followup_skewer_does_not_suppress_motif_hanging_piece_in_zwmva
r . . q k b . r
p p p . . p . p
. . . . . p . .
. P . . p . . .
. . P n . . . .
P . . Q B . . .
. . . . . P b P
R . . . K B N R
Attacking piece
Targeted / won piece