Walk a knight over a board from 5 by 5 to 8 by 8 so that it lands on every square exactly once, with a hint, undo, a warning when the tour can no longer be finished, and a solver.
Squares visited 1 of 36
Moves 0
Best at this size 1 of 36
Click a marked square to move the knight
Tours finished at this size 0
Squares left 35
The knight starts in the top-left corner and must land on every square once. It moves two squares in one direction and then one square sideways, so every move changes the shade of the square it stands on. Marked squares (a dashed green ring) are the ones it can reach that it has not visited. Visited squares show the order of the visit and a line follows the route. Before your first move you can click any other square to start there. On a board with an odd side, such as 5 by 5 and 7 by 7, a complete tour has to start on a square with the same shade as the corners. The hint picks the marked square with the fewest onward moves, which is a good rule but not a guarantee. When a complete tour is no longer possible, a warning says so and Undo takes moves back. A hint or a shown tour means the tour does not count toward your finished tours. Arrow keys move around the board, Enter or Space moves the knight.
The hint chooses among the squares the knight can reach the one with the fewest onward moves, then the one farthest from the middle, then the lowest square number. Following that rule on its own finishes a tour from every square of the 6 by 6 and 8 by 8 boards. A warning appears only when a complete tour is certainly impossible: the knight has nowhere to go, a square can no longer be reached, two squares could each only ever be the last, the squares left fall into separate groups, or the shades do not add up. Show a tour runs a depth-first search from where the knight stands, trying squares in the same order and dropping a branch as soon as a square is cut off, and it stops after 300,000 squares if it has not decided. Nothing is uploaded.
As-is, no warranty. These apps are free under their listed license and run entirely in your browser. Use at your own risk — don't blame me if your PC catches fire, your dog runs away, or the math turns out wrong. Verify anything that actually matters. None of this is professional financial, medical, legal, or engineering advice.
A knight moves two squares in one direction and then one square at a right angle. The aim is to move it so that it lands on every square of the board exactly once. The board is 5 by 5, 6 by 6, 7 by 7 or 8 by 8, and the default is 6 by 6.
If a complete tour is no longer possible, a warning says so as soon as that is certain, and the status line repeats it. If the knight has no square left to go to, it is stuck, and Undo takes moves back. The tour is complete when every square is visited. A completed tour locks the board until you press New tour. A hint or a shown tour means that tour is not counted as finished.
On a board with an odd side (5 by 5 and 7 by 7) the squares are not evenly split between the two shades, and a knight changes shade at every move, so a complete tour has to start on a square with the same shade as the corners. The page tells you if you click a start where no complete tour exists. On 6 by 6 and 8 by 8 every square works as a start.
On the keyboard, the arrow keys move around the board, Home and End jump to the ends of a row, and Enter or Space moves the knight or, before the first move, picks the start. Every square is announced with its row and column and what is on it (the knight, a visited step number, or empty), marked squares are announced as places the knight can move, and the status line says what each move did.
The engine keeps a table of the squares a knight can reach from each square. A move is any reachable square that has not been visited.
The hint. Among the reachable squares it picks the one with the fewest unvisited squares a knight could go to from there. Ties go to the square farther from the middle of the board, then to the lower square number. Squares with few exits are the ones in danger of being left behind, so visiting them first keeps the tour alive.
The warning. It only speaks when it is sure. A complete tour is impossible when the knight has no square to go to, when a square left can no longer be entered, when two squares could each only ever be the last one, when the knight’s square and the squares left fall into separate groups, or when the shades do not add up: the squares still to visit have to alternate in shade starting with the opposite shade to the knight’s, so their two counts must match that pattern exactly.
Show a tour. A depth-first search tries the squares in the hint’s order and drops a branch when a square is cut off. It stops after 300,000 squares and says it could not decide.
The test suite checks these against independent code:
Nothing is uploaded and there is no account. Your longest tour and the number of tours you finished without help are saved for each size in your browser’s local storage, as small whole numbers inside a small JSON object. Clearing site data removes them. The page address carries the board size and the counts switch.
Free to play, no ads, nothing uploaded. These games are original and are not affiliated with any other game or brand.