Shortest knight's sightseeing tour
Find a closed knight's sightseeing tour[1] of a 61 by 61 board. Shortest wins.
Definitions
- A square is visible from another square if it is a knight's move away from it.
- A closed knight's sightseeing tour is a sequence of distinct squares on a chequerboard that satisfies all of the following:
- Each consecutive pair of squares is a knight's move apart. That is, the pair of squares is one of:
- Differing by 1 row and 2 columns.
- Differing by 2 rows and 1 column.
- The first and last squares are also a knight's move apart (the tour is closed).
- To be a sightseeing tour, every square on the board must be visible from the tour. So every square on the board must be a knight's move away from at least 1 square in the tour.
- Each consecutive pair of squares is a knight's move apart. That is, the pair of squares is one of:
Input
- There is no input for this challenge.
Output
- A closed knight's sightseeing tour of a 61 by 61 chequerboard.
- You may hardcode some or all of your output if you wish.
- To keep tour descriptions short, the following format is used:
- Each square is represented by 2 characters, 1 for the horizontal position and 1 for the vertical position.
- Positions are labelled using 61 characters (non-zero numbers and upper and lower case letters) in the following order:
123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz - The squares are listed with no punctuation or whitespace between their characters or between the squares.
- The tour is displayed in a code block so that it stays on one line and can be easily copied and pasted for validation.
Scoring
Your score is the number of squares in the shortest tour your code finds. Lowest score wins.
Validation
You can paste your tour, or the tour from another answer, into the [validator webpage]( TODO ). This will either confirm that it is valid, and give the score and a visualisation, or indicate why it is not valid (a break in the tour, a revisited square, or a square not visible from the tour).
Answer format
The automated leaderboard will pick up the name of the programming language used and the score from the heading of your answer. It will also show the beginning of the first code block in your answer. You can show previous scores as you make improvements. The last score listed in the heading will be shown in the leaderboard.
Example answer format
Note the comma between the language name and the scores.
## Python, ~~3720~~ ~~3718~~ 3716 squares
### Code
```python
def find_short_tour():
pass
```
### Tour
```txt
11325374...
```
[](http://example.com)
(Image can be opened full size for ease of zooming.)
### Explanation
Python is ideal for finding snaking paths because...
Explanations are optional, but I'm more likely to upvote answers that have one.
Sandbox questions
- Is there a trivial modular or constructive approach to generating a minimal sightseeing tour that would make this challenge uninteresting?
- Is 61 by 61 too big or too small?
- An alternative notation would be a number from 1 to 8 to indicate the direction of the move, rather than specifying the coordinates of every square in the tour. This would allow expressing a tour in half the characters (plus the coordinates of the initial square). This would also remove the dependency on letters for notation, allowing the decision on board size to be independent of that. Would this be better?
- The specification of the initial square is not strictly necessary. Given a string of digits 1 to 8, the path can be constructed, and it can then be tested at all the positions it can fit on the board, of which there will be at most 15 (if the path is a valid sightseeing tour). The validator can check all of these and output the appropriate image if valid, or the problems with the position with fewest problems otherwise.
-
I previously defined this term in a puzzle called A knight's sightseeing tour. This contains hidden spoilers in the answers showing examples on an 8 by 8 board. This challenge is self contained so it is not required to read the puzzle before attempting it. ↩︎

1 comment thread