0% found this document useful (0 votes)
63 views

ActivitySheet2 RP Uninformed Search

The document provides practice questions about uninformed search algorithms. It includes 4 questions about applying depth-first search, breadth-first search, uniform-cost search, and iterative deepening search to various state space graphs and grids. Students are asked to determine the order states would be expanded in and the goal paths that would be returned when applying different search strategies to different search problems represented as graphs or grids.

Uploaded by

Bisma Amir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
63 views

ActivitySheet2 RP Uninformed Search

The document provides practice questions about uninformed search algorithms. It includes 4 questions about applying depth-first search, breadth-first search, uniform-cost search, and iterative deepening search to various state space graphs and grids. Students are asked to determine the order states would be expanded in and the goal paths that would be returned when applying different search strategies to different search problems represented as graphs or grids.

Uploaded by

Bisma Amir
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 4

F29AI - Artificial Intelligence and Intelligent Agents

Activity Sheet 2 – Uninformed Search


These questions are meant to give you practice with some of the lecture material we are covering this
week. For Week 2, we are starting to consider uninformed search algorithms as a simple decision-
making mechanism for goal-based agents. Try to answer as many questions as you can. When you are
finished, you can submit your completed answers on Canvas. Individual activity sheets will not be
marked but general feedback will be provided based on the common problems we see.

NAME: ________________________________________ Student ID Number: _____________________

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.

a) Depth-first search (DFS)

States expanded:

Goal path:

b) Breadth-first search (BFS)

States expanded:

Goal path:

c) Uniform-cost search (UCS)

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.

a) Depth-first search (DFS)

States expanded:

Goal path:

b) Breadth-first search (BFS)

States expanded:

Goal path:

c) Uniform-cost search (UCS)

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:

You might also like