Knight Tour Mini — Visit Every Square Once
Move a chess knight to visit every square on a 5x5 board exactly once.
How to play
- Click any square to place the knight (♞) and start the tour.
- Valid knight moves are highlighted in green — click one to move there.
- Each square shows the move number it was visited on.
- Reach all 25 squares to complete the tour.
- Use 'Undo' to backtrack if you get stuck.
Click any square to place a chess knight (♞). Then click squares highlighted in green — each one must be a valid knight's move (L-shape). Try to visit all 25 squares without repeating any!
How it works
Knight Tour Mini challenges you to move a chess knight across a 5x5 board, visiting every square exactly once. The knight moves in an L-shape: two squares in one direction and one square perpendicular (or vice versa). You choose the starting square, then select each subsequent square the knight can legally jump to until all 25 squares are visited.
The puzzle is a variant of the classic Knight's Tour problem from combinatorial mathematics. On a 5x5 board, closed tours (ending adjacent to the start) and open tours (ending anywhere) both exist, but they require careful planning to achieve.
The most effective strategy is Warnsdorff's rule: always move to the square from which the knight will have the fewest onward moves. This heuristic avoids backing the knight into a dead end by prioritizing squares with limited future options. Avoid moving to corner squares early unless necessary, as corners have very few exit moves.
Knight Tour Mini is an excellent exercise in spatial planning and is a timeless recreational mathematics puzzle.
Worked example
Applying Warnsdorff's rule for the first three moves
- Start the knight on a corner square.
- List all squares the knight can reach from there and count how many onward moves each has.
- Move to the square with the fewest onward moves.
- From the new position, again list reachable unvisited squares and count their onward options.
- Choose the square with the fewest options and continue applying the rule.
The knight navigates without dead ends through the first several squares by always choosing the most constrained next option.
Common mistakes to avoid
- Moving to squares near the center early, which are easy to reach later, while leaving corner and edge squares until they become unreachable.
- Ignoring Warnsdorff's rule and moving toward squares that look convenient rather than the most constrained.
- Not planning more than one move ahead, leading to a premature dead end when most of the board is still unvisited.
Key terms
- Knight's move
- An L-shaped chess move: two squares along one axis and one square along the perpendicular axis.
- Warnsdorff's rule
- A heuristic for the Knight's Tour: always move to the square with the fewest available onward moves.
- Dead end
- A position from which all reachable squares have already been visited, ending the tour prematurely.
Frequently asked questions
- How does a knight move?
- A knight moves in an L-shape: 2 squares in one direction then 1 square perpendicular (or vice versa). It can jump over other pieces.
- Is it always possible?
- A knight's tour exists on 5x5 — there are many solutions starting from most squares. If you get stuck, try Undo to backtrack.