Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

3. Consider the problem of finding a path in the grid shown in Figure 3.14 from the position sto the position g. A piece can

image text in transcribed

3. Consider the problem of finding a path in the grid shown in Figure 3.14 from the position sto the position g. A piece can move on the grid horizontally or vertically, one square at a time. No step may be made into a forbidden shaded area. Figure 3.14: A grid-searching problem (a) On the grid shown in Figure 3.14, number the nodes expanded in order) for a depth- first search from s to g, given that the order of the operators is up, left, right, and down. Assume there is cycle pruning. What is the first path found? (b) On a copy of the same grid, number the nodes expanded, in order, for a greedy best- first search from s to g. Manhattan distance should be used as the evaluation function. The Manhattan distance between two points is the distance in the c-direction plus the distance in the y-direction. It corresponds to the distance traveled along city streets arranged in a grid. Assume multiple-path pruning. What is the first path found? (c) On a copy of the same grid, number the nodes expanded, in order, for a heuristic depth-first search from s to g, given Manhattan distance as the evaluation function. Assume cycle pruning. What is the path found? (d) Number the nodes in order for an A* search, with multiple-path pruning, for the same grid. What is the path found? (e) Show how to solve the same problem using dynamic programming. Give the cost_to_goal value for each node, and show which path is found. (f) Based on this experience, discuss which algorithms are best suited for this problem. (g) Suppose that the grid extended infinitely in all directions. That is, there is no boundary, but 3,g, and the blocks are in the same positions relative to each other. Which methods would no longer find a path? Which would be the best method, and why? 3. Consider the problem of finding a path in the grid shown in Figure 3.14 from the position sto the position g. A piece can move on the grid horizontally or vertically, one square at a time. No step may be made into a forbidden shaded area. Figure 3.14: A grid-searching problem (a) On the grid shown in Figure 3.14, number the nodes expanded in order) for a depth- first search from s to g, given that the order of the operators is up, left, right, and down. Assume there is cycle pruning. What is the first path found? (b) On a copy of the same grid, number the nodes expanded, in order, for a greedy best- first search from s to g. Manhattan distance should be used as the evaluation function. The Manhattan distance between two points is the distance in the c-direction plus the distance in the y-direction. It corresponds to the distance traveled along city streets arranged in a grid. Assume multiple-path pruning. What is the first path found? (c) On a copy of the same grid, number the nodes expanded, in order, for a heuristic depth-first search from s to g, given Manhattan distance as the evaluation function. Assume cycle pruning. What is the path found? (d) Number the nodes in order for an A* search, with multiple-path pruning, for the same grid. What is the path found? (e) Show how to solve the same problem using dynamic programming. Give the cost_to_goal value for each node, and show which path is found. (f) Based on this experience, discuss which algorithms are best suited for this problem. (g) Suppose that the grid extended infinitely in all directions. That is, there is no boundary, but 3,g, and the blocks are in the same positions relative to each other. Which methods would no longer find a path? Which would be the best method, and why

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Modern Database Management

Authors: Jeff Hoffer, Ramesh Venkataraman, Heikki Topi

12th edition

133544613, 978-0133544619

More Books

Students also viewed these Databases questions