X-ray Attack
An x-ray attack sees through a piece to the piece behind it. The front piece cannot move without exposing the back piece.
A queen x-rays a rook through a pawn
The queen on d1 attacks along the file, but the pawn on d5 blocks the way to the rook on d8. The queen captures the pawn on d5. The queen now attacks the rook on d8 along the open file.
FEN: 3rk3/8/8/3p4/8/8/8/3Q2K1 w - - 0 1
a b c d e f g h
8 . . . r k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . p . . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . Q . . K . 1
a b c d e f g hA bishop x-rays a queen through a pawn
The bishop on b2 attacks the queen on d4, but the pawn on c3 blocks the diagonal. The bishop captures the pawn on c3. The bishop now attacks the queen on d4 directly.
FEN: 4k3/8/8/8/3q4/2p5/1B6/7K w - - 0 1
a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . q . . . . 4
3 . . p . . . . . 3
2 . B . . . . . . 2
1 . . . . . . . K 1
a b c d e f g hKey points
- An x-ray is an attack through a piece in the way.
- The front piece stands between the attacker and the target.
- The attacker is a rook, bishop, or queen.
- If the front piece moves, the back piece is attacked.
- If the front piece is captured, the back piece is attacked.
- X-rays are strongest against a king or queen behind a pawn.
- Look for a line piece aimed at a valuable piece through one blocker.
Try it Yourself
Edit the code, then press Run.
Running is simulated · Rust Playground
Exercise
White to move. Which move uses the rook's x-ray attack on the queen on a8?