CS235 - Artificial Intelligence - Midsem - Second Revision
CS235 - Artificial Intelligence - Midsem - Second Revision
Name:
Roll:
Write the answer to PART A in the following table by filling in the circles.
Questions
01 02 03 04 05 06 07 08 09 10 11 12 13 14 15
A ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯
B ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯
Options
C ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯
D ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯ ◯
PART A A. UCS uses a priority queue with the cost to the node
from the initial state as the priority, while BFS uses a FIFO
Instructions for PART A: Each question has at least one correct queue. B. UCS can get stuck in a loop of zero-cost ac-
answer. You score (i) 2 if you select all correct answers, (ii) 1 if tion, while BFS cannot. C. UCS is guaranteed to find the
you select at least one correct answer and no wrong answer, optimal solution, while BFS is not. D. UCS considers
(iii) 0 if you do not answer, and (iv) −2/3 if you select at least path costs, while BFS only considers path length (number
one wrong answer. of steps).
1. Which of the following statements are accurate regarding 7. What is the primary advantage of Iterative Deepening
the difference between a state space and a search tree in Search (IDS) over Depth-First Search (DFS) and Breadth-
AI problem-solving? A. A search tree represents poten- First Search (BFS)? A. IDS combines the space efficiency
tial action sequences, while a state space represents all of DFS with the completeness of BFS (for finite branch-
states. B. Nodes in a search tree correspond to states ing factors). B. IDS is faster than both DFS and BFS.
in the state space. C. A state space is always finite, C. IDS has a lower space complexity than BFS. D. IDS
while a search tree can be infinite. D. The search tree is always finds a solution if one exists, even in infinite state
always a subset of state space. spaces.
2. Consider a scenario where an admissible heuristic, h(n), 8. Which of the following conditions are necessary for Bidi-
is used in an A* search. Which of the following could oc- rectional Search to be applicable? A. The search space
cur? A. The nodes are always expanded following the must be finite. B. The goal state must be explicitly de-
optimal path. B. The search may explore paths that fined. C. A method for efficiently computing prede-
are costlier than the optimal path. C. Nodes might be cessor states must exist. D. The branching factor must
expanded unnecessarily compared to using a consistent be the same in both directions.
heuristic.
9. Which of the following scenarios would make Depth-First
3. Which aspects of an agent’s design are captured in the Search (DFS) a poor choice of search algorithm? A. The
PEAS description? A. The agent’s internal data struc- state space is infinite, and solutions exist at finite depth.
tures. B. The metrics used to evaluate the agent’s B. Limited memory is available. C. The state space is a
success. C. The agent’s learning algorithm. D. How graph with many cycles. D. The state space is a very
agent will interact with environment. deep tree with solutions near the bottom.
4. In what ways does a consistent heuristic improve upon an 10. Why is the concept of a relaxed problem useful in deriving
admissible heuristic in A* search? A. It ensures that admissible heuristics? A. Relaxing the problem makes
the closed list in graph search represents optimal paths it easier to find an exact solution. B. Relaxed problem
to reached nodes. B. It never underestimates the true ensures consistency. C. The optimal cost in the relaxed
cost to reach the goal. C. It ensures that the f -values problem provides a lower bound on the optimal cost in
(evaluation function) along any path are non-decreasing. the original problem. D. Solving the relaxed problem
always gives a solution to the original problem.
5. Which of the following are valid reasons why explicitly 11. What is the purpose of the explored set (or closed list) in
building the entire state graph is often impractical in AI search algorithms? A. To keep track of nodes that have
problem-solving? A. The state space graph can’t be rep- been visited but not yet expanded. B. To prevent the
resented. B. Many problems have infinite state spaces. algorithm from revisiting states that have already been
C. It’s often computationally cheaper to generate parts of expanded. C. To keep track of the nodes in the frontier.
the state space on demand. D. The state space may be D. To store all possible states in the problem.
too large to store in memory, even for finite problems.
12. If we have two admissible heuristics, h1 (n) and h2 (n), and
6. Uniform-Cost Search (UCS) differs from Breadth-First h2 (n) ≥ h1 (n) for all nodes n, what can we conclude?
Search (BFS) in which of the following crucial ways? A. Using h2 (n) in A* search will likely lead to fewer node
expansions than using h1 (n). B. h2 (n) dominates (c) (3 points) Demonstrate the steps of the A* search al-
h1 (n). C. h1 (n) is consistent. D. h1 (n) is always a gorithm on the state space graph.
better heuristic than h2 (n). (d) (3 points) Explain whether the heuristic value h(n)
13. Why is completeness an important property of a search al- for all node n could be improved (made more informa-
gorithm? A. It guarantees that the algorithm will find tive) to maintain admissibility. If a heuristic value can
the optimal solution. B. It guarantees that the algo- be improved, state the maximum or minimum possi-
rithm will find a solution if one exists. C. It guarantees ble admissible value it could take. If it cannot be im-
that the algorithm will use memory efficiently. D. It guar- proved, explain why.
antees that the algorithm will terminate in a finite amount 18. (a) (2 points) When is the breadth-first search algorithm
of time. complete?
14. What distinguishes stochastic environments from deter- (b) (2 points) Describe the concept of a rational agent in
ministic environments? A. Deterministic environments the context of Artificial Intelligence.
are always fully observable. B. The state space is contin- (c) (5 points) Consider a scenario where a robot vacuum
uous in a stochastic environment. C. Stochastic environ- cleaner needs to clean a rectangular room. The room
ments are always partially observable. D. In stochas- is divided into a grid of squares, and each square can
tic environments, the agent’s actions have unpredictable be either clean or dirty. The robot can move North,
outcomes. South, East, or West, and it has a “Suck” action to
15. Let h1 (n) and h2 (n) be two admissible heuristics. We de- clean a dirty square. Formulate this vacuum-cleaner
h (n) + h2 (n) world as a search problem. Specifically, define:
fine a new heuristic h3 (n) = 1 , for all node n
c 1. The state space.
and c > 2. Which of the following statements are true for
2. The initial state.
h3 (n)? A. It is always an admissible heuristic. B. It
underestimates the cost. C. It overestimates the cost. 3. The successor function.
D. It may be a consistent heuristic. 4. The goal test.
5. The arc cost.
PART B
(d) (1 point) Justify Uniform Cost Search (UCS) is com-
plete when the step cost exceeds a small positive
16. (a) (4 points) Define and explain (i) completeness and (ii)
value, and the nearest goal node is at a positive cost
optimality in the context of search algorithms.
C∗ .
(b) (4 points) Explain the distinctions between the fol-
lowing pairs of environment characteristics with ex- 19. (a) (4 points) Consider the following state space graph,
amples: where S is the start state and G is the goal state. Arc
1. Fully observable vs. partially observable environ- costs are labeled on the edges.
2
ments.
G
2. Static vs. dynamic environments. D
(c) (2 points) Identify and explain the significant limita- 3
tion or potential problem when using hill-climbing. 4 7 1
1
17. Consider the following state space graph where S is the A
start node, G is the Goal node, and h indicates the heuris- 2 2
tic function. Arc costs are labeled on the edges, and the B
5 3 C
subscripts indicate the heuristic values.
3
3 1
3 S3 S
5
2 1 6
A2 C2
1 Show the order in which nodes are expanded (in which
2 1 they are removed from the frontier/open list) using
7 uniform-cost search. For each step, indicate the con-
B3 2 D2 tents of the open and closed lists.
4 G0 (b) (3 points) Explain how Iterative Deepening Search
3
(IDS) combines depth-first and breadth-first search as-
6 pects.
(c) (3 points) Explain the fundamental differences be-
(a) (2 points) Check if the heuristic is admissible. Show tween local search algorithms and the systematic
the verification for all the nodes. search algorithms (like BFS, DFS, A*)? In what types
(b) (2 points) Check if the heuristic is consistent. Show of problem scenarios are local search algorithms par-
the verification for all the nodes. ticularly well-suited?