


Study with the several resources on Docsity
Earn points by helping other students or get them with a premium plan
This page cannot be seen from the preview
Don't miss anything!



For each of the following graph search strategies, work out the order in which states are expanded, as well as the path returned by graph search. In all cases, assume ties resolve in such a way that states with earlier alphabetical order are expanded first. Remember that in graph search, a state is expanded only once.
a) Depth-first search.
b) Breadth-first search.
c) Uniform cost search.
Imagine a car-like agent wishes to exit a maze like the one shown below:
As an example: if at timestep t the agent’s current velocity is 2, by taking the fast action, the agent first increases the velocity to 3 and move 3 squares forward, such that at timestep t + 1 the agent’s current velocity will be 3 and will be 3 squares away from where it was at timestep t. If instead the agent takes the slow action, it first decreases its velocity to 1 and then moves 1 square forward, such that at timestep t + 1 the agent’s current velocity will be 1 and will be 1 squares away from where it was at timestep t. If, with an instantaneous velocity of 1 at timestep t + 1, it takes the slow action again, the agent’s current velocity will become 0, and it will not move at timestep t + 1. Then at timestep t + 2, it will be free to turn if it wishes. Note that the agent could not have turned at timestep t + 1 when it had a current velocity of 1, because it has to be stationary to turn.
(a) If the grid is M by N , what is the size of the state space? Justify your answer. You should assume that all configurations are reachable from the start state.
(b) Is the Manhattan distance from the agent’s location to the exit’s location admissible? Why or why not?
(c) State and justify a non-trivial admissible heuristic for this problem which is not the Manhattan distance to the exit.
(d) If we used an inadmissible heuristic in A* graph search, would the search be complete? Would it be optimal?
(e) Give a possible advantage that an inadmissible heuristic might have over an admissible one.
(iv) h(n) = the number of remaining ghosts.
(b) Suppose that Pacman has exactly one less Pacfriend than there are number of ghosts :) ; therefore P = G. Recall that Pacman and his Pacfriends are indistinguishable from each other. (i) What is the size of the minimal state space representation given this condition? Recall that P = G.