Question: Really small problem. Just have to write the path taken by the different searches. Please do part c and d. It is just tracing Problem
Really small problem. Just have to write the path taken by the different searches. Please do part c and d. It is just tracing


Problem 1 [20] Search Algorithms In the figure below is a modified chessboard on a 5 x 5 grid. The task is to capture the black king (fixed in square H) by moving the white knight (starting in square W) using only "knight moves" as defined in Chess. Assume the successor function expands legal moves in clockwise order: (1 right, 2 up); (2 right, 1 up); (2 right,1 down) right, 2 down); (1 left, 2 down); (2 left, 1 down) (2 left, up) left, 2 up). Note that not all these moves may be legal from a given square. It is not legal for the knight to move to a square within the attack range of the black rook in square A (i.e., the knight cannot be in the same row or column with the rook) But it is legal for the knight to move to the attack range of the black king (i.e., any of the eight squares around the king) 0 (a) [5] Depth-First Search Perform depth-first search. List the squares in the order they are expanded, including the goal node if it is found. State W is expanded first. Using a stack for the Frontier means you should add states to the stack in the reverse order from that given above So, state N wll be popped and expanded second. Use the Graph-Search algorithm Figure 3.7), which uses both a Frontier set and an Explored set so that each square will be expanded at most once. Write down the list of states you expanded in the order they are expanded, including the goal state H. Write down the solution path found (if any), or explain why no solution is found (b) [5] Iterative-Deepening Search Perform iterative-deepening search until a solution is reached. Draw the sequence of trees built as you ran the algorithm (i.e. there should be a tree drawn at the end of each iterative-deepening iteration of the algorithm). Use the same order of expanding nodes as in (a), and also use the same method of repeated state checking as in (a) Problem 1 [20] Search Algorithms In the figure below is a modified chessboard on a 5 x 5 grid. The task is to capture the black king (fixed in square H) by moving the white knight (starting in square W) using only "knight moves" as defined in Chess. Assume the successor function expands legal moves in clockwise order: (1 right, 2 up); (2 right, 1 up); (2 right,1 down) right, 2 down); (1 left, 2 down); (2 left, 1 down) (2 left, up) left, 2 up). Note that not all these moves may be legal from a given square. It is not legal for the knight to move to a square within the attack range of the black rook in square A (i.e., the knight cannot be in the same row or column with the rook) But it is legal for the knight to move to the attack range of the black king (i.e., any of the eight squares around the king) 0 (a) [5] Depth-First Search Perform depth-first search. List the squares in the order they are expanded, including the goal node if it is found. State W is expanded first. Using a stack for the Frontier means you should add states to the stack in the reverse order from that given above So, state N wll be popped and expanded second. Use the Graph-Search algorithm Figure 3.7), which uses both a Frontier set and an Explored set so that each square will be expanded at most once. Write down the list of states you expanded in the order they are expanded, including the goal state H. Write down the solution path found (if any), or explain why no solution is found (b) [5] Iterative-Deepening Search Perform iterative-deepening search until a solution is reached. Draw the sequence of trees built as you ran the algorithm (i.e. there should be a tree drawn at the end of each iterative-deepening iteration of the algorithm). Use the same order of expanding nodes as in (a), and also use the same method of repeated state checking as in (a)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
