One of the more interesting puzzles for chess buffs is the Knight's Tour problem, originally proposed by the mathematician Euler. The question is this: Can the chess piece called the knight move around an empty chessboard and touch each of the 64 squares once and only once? The knight makes L-shaped moves (over two in on direction and then over one in perpendicular direction). Thus, from a square in the middle of an empty chessboard, the knight can make eight different moved (numbered 0 through 7) as shown below.
One way is to use first-come-first-serve method, which is non-intelligent method and moves knight whenever the box is empty.
One other way to improve success is to use a heuristic (strategy) for moving the knight. Heuristics do not guarantee success, but a carefully developed heuristic generally improves the chance of success. In this method, knight moves to the corners first and based on the priority. The priority grid is shown below.
- GUI will be used for the illustration of working of both the algorithms.
- Program will prompt for number of time game should run.
- Program will prompt for number of start row and col.
- Press Intelligent or Non-Intelligent button to run respective version of game.
- Windows Computer.
- Visual Studio Community/Professional.
- Brain.
- Clone project or download zip.
- Open .sln file. (Solution File)
- Build project.
- Run Project.
This sometimes happens when you have cloned project that was built on another Visual Studio Version with different user.
- Solution:
- Completely Close Visual Studio. (Very Important)
- On the main project directory, look for .vs hidden folder, navigate inside and find .suo file.
- Delete .suo file.
- Load .sln file again.
- If error is still present.
- Open .csproj file inside Project Directory.