Question: NOTE: 1 . The code should work no matter how the six letters are arranged. 2 . You must attach a file explaining how all
NOTE: The code should work no matter how the six letters are arranged.
You must attach a file explaining how all the functions work in your own way and in the language you want, in addition to pictures of the programs implementation for more than one solution.
Knight's Tour
The updated Knight's Tour challenge involves starting with an board where each square is
either empty or contains one of six unique letters based on your first and last name. In each move, a
letter can be moved to an adjacent empty square excluding diagonals The objective is to use
BreadthFirst Search and Depth first search algorithms to rearrange the letters on the board in such
a way that a knight can visit all the squares containing letters.
Here is an example: Student Name: Omar Khalil
initial state:
Note:
Define the initial state in the main method as shown in the example above.
The starting point must be a letter entered by the user.
Passing through spaces is not allowed.
Passing through the letters multiple times is not allowed.
Your program must output:
Your first name, your last name, and the first six unique letters derived from them.
For DFS and for BFS the solution must be printed as follows:
The goal state achieved using each search algorithm.
Sequence of steps, each on a separate line as shown in the example below.
The number of states expanded using each search algorithm.
For example:
Student Name: Omar Khalil
First six unique letters are: O MA K H L
Algorithm: DFS
One of the goal states:
Algorithm: BFS
One of the goal states:
Solution
Number of expanded states:.
move down
move A Left
move up
Start point in
this goalstate
could be M or L
Solution:
move left
Number of expanded states:
The End
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
