A Python project that solves the Knight's Tour Problem using search algorithms.
The program extracts the first six unique letters from a user's name and places them on an 8x8 board, then searches for a valid solution where a chess knight can visit all letters following standard knight movement rules.
- BFS (Breadth-First Search) - explores all nodes at the current depth level
- DFS (Depth-First Search) - explores as far as possible along each branch
- Extracts unique letters from user's name
- Places letters at predefined positions on the board
- Finds valid solutions using two different search algorithms
- Displays the number of states expanded during search
- Interactive interface to select starting letter
- Visual board representation with formatted output
python index.pyStudent Name: Alaa Mousa
First six unique letters: A L M O U S
Enter starting letter: A
--- BFS Solution ---
One of the goal states:
[Board display]
Solution:
[Move instructions]
Number of states expanded: [count]
- Extract up to 6 unique letters from the student's name
- Place them at fixed positions on the board
- Use BFS or DFS to find a knight's path visiting all letters
- Display the goal state and the sequence of moves
- Python 3.x
Alaa Mousa