♞ Knight's Tour

Classic puzzle where the chess knight visits every square exactly once. Move in L-shapes to visit all squares. Includes Warnsdorff hint feature.

Moves: /064
Time:00:00
Click a square to select the starting position

way of playing (a game)

  • Click a square on the board to choose the knight's starting position
  • Click the green highlighted squares (L-shaped move destinations) to move the knight
  • Clear the puzzle by visiting every square exactly once
  • If you get stuck, use "Undo" to go back
  • When hints are turned ON, optimal moves are marked with a star based on Warnsdorff's rule

What is Knight's Tour?

Knight's Tour is a mathematical puzzle where a chess knight visits every square on a game board exactly once, moving only in the classic L-shaped pattern (two squares in one direction, one square perpendicular). The puzzle comes in three difficulty levels—standard 8×8 chessboard, 6×6, and 5×5—each providing an elegant challenge that develops spatial reasoning and algorithmic thinking through engaging interactive gameplay.

How to Use

Click the square where you want your knight to move next. The knight travels in its characteristic L-shape: two squares horizontally and one square vertically, or two squares vertically and one square horizontally. Your objective is to visit every square on the board exactly once without landing on any square twice. The tool highlights all legal moves available from your current position, helping you plan ahead. The Warnsdorff's heuristic hint suggests always moving to the square with the fewest onward options—this strategy dramatically increases your chances of completing the tour successfully.

Use Cases

Chess enthusiasts explore knight movement patterns and discover mathematical properties underlying classical piece movement. Mathematics and computer science students study Knight's Tour to understand backtracking algorithms and constraint satisfaction problems. Educators use the puzzle to teach logical reasoning, planning skills, and algorithm design concepts. Cognitive trainers recommend it for brain exercise that strengthens spatial visualization without requiring external resources. Game developers reference knight movement mechanics when designing strategy games and chess variants. Puzzle competition participants train with this classic to improve pattern recognition and problem-solving speed.

Tips & Insights

This puzzle has fascinated mathematicians for centuries—Leonhard Euler and other prominent scientists studied knight tours, discovering elegant solutions follow specific mathematical patterns. Warnsdorff's heuristic, developed in 1823, remains the most practical approach for finding solutions on larger boards. Smaller boards (5×5 and 6×6) serve as excellent training grounds before tackling the full 8×8 complexity. Understanding that constraints guide solutions—rather than restricting them—is a profound lesson in problem-solving applicable far beyond chess.

Frequently Asked Questions

How does the knight move?

The chess knight moves in an L-shape. It can move 2 squares vertically and 1 square horizontally, or 2 squares horizontally and 1 square vertically, for a total of 8 possible directions. Its defining characteristic is that it can jump over other pieces.

Can you always visit every square?

It has been mathematically proven that a knight's tour is possible from any starting position on an 8x8 board. Solutions also exist for the 6x6 board, but on the 5x5 board, complete tours are impossible from certain starting positions.

What is the hint feature?

The hint feature is based on Warnsdorff's rule. It highlights the optimal move with a star by selecting from available squares the one that has the fewest onward moves—an algorithm designed to help ensure tour completion.

What are the differences between board sizes?

5x5 (25 squares) is for beginners and can be completed quickly. 6x6 (36 squares) is for intermediate players. 8x8 (64 squares) is the standard chess board size and the most challenging. Larger boards require more moves and greater strategic thinking.

Can I undo a move?

Yes, most versions include an undo button that lets you step back one move at a time. This is helpful if you realize you've made a mistake and want to explore a different path.

What happens if I get stuck?

You can use the hint feature to get suggestions for your next move, or reset the board to start over. The tool typically shows which squares have been visited to help you plan ahead.

Are there multiple solution paths for the same puzzle?

Yes, on most board sizes there are many valid solutions that visit every square. Different strategies can lead to different paths, though some may be more efficient than others.

How does Warnsdorff's heuristic work?

Warnsdorff's algorithm moves the knight to the square from which it has the fewest onward moves. This greedy approach is highly effective at finding solutions and greatly reduces the need for backtracking.

Does the tool provide step-by-step solutions?

Some versions include a solution viewer where you can watch the complete path the knight takes to visit every square. This helps you understand different solving strategies and patterns.

Is there a time limit for solving the puzzle?

Most versions don't enforce a strict time limit, allowing you to solve at your own pace. However, optional timed challenges may be available if you want to test your speed.