🎓 A1Learner
🔍
0 of 52 lessons completed

Knight

A knight moves in an L shape. A knight is the only piece that can jump over other pieces.

Knight from its starting square

White knight is on b1. It may move to a3, c3, or d2.

FEN: 4k3/8/8/8/8/8/8/1N2K3 w - - 0 1

a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . N . . K . . . 1
  a b c d e f g h

Knight in the center

White knight is on d4. Black pawn is on e6. White may capture on e6, because e6 is a knight move away from d4.

FEN: 4k3/8/4p3/8/3N4/8/8/4K3 w - - 0 1

a b c d e f g h
8 . . . . k . . . 8
7 . . . . . . . . 7
6 . . . . p . . . 6
5 . . . . . . . . 5
4 . . . N . . . . 4
3 . . . . . . . . 3
2 . . . . . . . . 2
1 . . . . K . . . 1
  a b c d e f g h

Knight jumps over pieces

White knight is on g1. Pieces on f2 and h2 do not stop the knight from moving to f3 or h3.

FEN: rnbqkbnr/pppppppp/8/8/8/8/PPPPPPPP/RNBQKBNR w KQkq - 0 1

a b c d e f g h
8 r n b q k b n r 8
7 p p p p p p p p 7
6 . . . . . . . . 6
5 . . . . . . . . 5
4 . . . . . . . . 4
3 . . . . . . . . 3
2 P P P P P P P P 2
1 R N B Q K B N R 1
  a b c d e f g h

Key points

  • A knight moves two squares in one direction and then one square to the side.
  • A knight can jump over pieces of either colour. Pieces in its path do not stop a knight.
  • A knight always lands on a square of the opposite colour from its starting square.
  • A knight in the center can reach up to eight squares. A knight in a corner can reach only two squares.
  • A knight captures by landing on an enemy piece.

Try it Yourself

Edit the code, then press Run.

Running is simulated · Rust Playground

Exercise

White knight is on b1. Which move is legal?