ActivitySheet2 RP Uninformed Search
ActivitySheet2 RP Uninformed Search
1. Consider the above graph representing the state space and transitions in a search problem. The
nodes (states) are labelled with letters and the edges (transitions) are indicated as directional arrows
between states. Assuming S is the start state and G is the goal state, list the order in which states are
expanded using each of the following expansion strategies and the goal path from S to G.
a) Depth-first search (DFS), assuming that expansion ordering ties are broken by choosing the
alphabetically earlier letter. (E.g., if you are choosing between expanding B and D at the same depth,
choose B.) Assume that no state can be expanded more than once.
States expanded:
Goal path:
b) Depth-first search (DFS), assuming that expansion ordering ties are broken by choosing the
alphabetically later letter. (E.g., if you are choosing between expanding B and D at the same depth,
choose D.) Assume that no state can be expanded more than once.
States expanded:
Goal path:
c) What would happen if you tried to use depth-first search (DFS), assuming expansion ordering ties are
broken by choosing the alphabetically first letter, and states can be expanded more than once?
2. Consider the above graph representing the state space and transitions in a search problem. The nodes
(states) are labelled with letters and the edges (transitions) have numeric costs. Assuming S is the start
state and G is the goal state, determine the order in which states are expanded, as well as the path
returned, using the following search methods. Assume that no state can be expanded more than once
and that expansion ordering ties are resolved in a way so that states appearing earlier in alphabetical
order are expanded first.
States expanded:
Goal path:
States expanded:
Goal path:
States expanded:
Goal path:
3. Consider the above grid representing the state space and transitions in another search problem.
States are labelled with letters. An agent can move from one state to another state provided the two
states are adjacent and not blocked by a wall (the grey squares and the outer edges). Diagonal
movement is not permitted. Each move to an adjacent square costs 1 resource. Assuming S is the start
state and G is the goal state, determine the order in which states are expanded, as well as the path
returned, using the following expansion strategies. Assume that expansion ordering ties are broken by
choosing the alphabetically earlier letter. (E.g., if you are choosing between expanding B and D at the
same depth, choose B.) Assume that no state can be expanded more than once.
States expanded:
Goal path:
States expanded:
Goal path:
States expanded:
Goal path:
4. Iterative Deepening Search (IDS) is a search strategy that is a variant of depth-first search. Read more
about IDS here: http://www.macs.hw.ac.uk/~rpp6/teaching/F29AI/ids/
Using IDS and the graph from Question 1, show the states expanded at each depth level until the goal is
reached. Assume that expansion ordering ties are broken by choosing the alphabetically earlier letter
and that states can be expanded more than once.
Level 0:
Level 1:
Level 2:
Level 3:
Level 4: