0% found this document useful (0 votes)
31 views7 pages

CT1 AI Set C Answerkey

The document outlines the details of a test for the course 'Artificial Intelligence' at SRM Institute of Science and Technology for the academic year 2024-25. It includes information on course outcomes, problem-solving questions related to AI techniques, and algorithms such as A*, BFS, DFS, and UCS. Additionally, it discusses strategies for playing Tic-Tac-Toe and the implications of using Depth-First Search in a cave system scenario.

Uploaded by

vatsalbbk2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
31 views7 pages

CT1 AI Set C Answerkey

The document outlines the details of a test for the course 'Artificial Intelligence' at SRM Institute of Science and Technology for the academic year 2024-25. It includes information on course outcomes, problem-solving questions related to AI techniques, and algorithms such as A*, BFS, DFS, and UCS. Additionally, it discusses strategies for playing Tic-Tac-Toe and the implications of using Depth-First Search in a cave system scenario.

Uploaded by

vatsalbbk2
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 7

Reg No.

SRM Institute of Science and Technology


College of Engineering and Technology SET C
School of Computing
SRM Nagar, Kattankulathur – 603203, Chengalpattu District, Tamil Nadu
Academic Year: 2024-25 (EVEN) (Common to All Branches)
Test: FT2 Date: 25.02.2025
Course Code & Title: 21CSC206T Artificial Intelligence Duration: 100 Minutes
Year & Sem: II Year / IV Sem Max. Marks: 50
Course Articulation Matrix:
S. Course
PO1 PO2 PO3 PO4 PO5 PO6 PO7 PO8 PO9 PO10 PO11 PO12 PSO1 PSO2 PSO3
No Outcome
1 CO1 1 2
2 CO2 1 2 3
3 CO3 2 2
4 CO4 1 2
5 CO5 3 2 3 2
CO1: Formulate a problem as a state space search method and its solution using various AI techniques
CO2: Apply appropriate searching techniques to solve a real-world problem
PO1: Engineering Knowledge: Apply the knowledge of basic sciences and engineering fundamentals to solve engineering problems.
PO2: Problem Analysis: Analyze complex engineering problems and give solutions related to chemical & allied industries.
PO3: Design/Development of solutions: Identify the chemical engineering problems, design and formulate solutions to solve both industrial & social related
problems.
PO9: Individual and team work: Function effectively as a member or a leader in diverse teams and be competent to carry out multidisciplinary tasks.

Part – B (3 x 8 = 24 Marks)
Ques. No. 11 – Compulsory
Ques. No. 12 to 14 (Any 2 out of 3)
Qn. Question Mark B C P PI
No. L O O

11 SRM Automobile Company is planning to design a self-driving car to navigate through city traffic and 8 3 1 1.7.1
reach its destination efficiently. It must handle various challenges such as unpredictable pedestrian
movement, varying weather conditions, and sudden stops by other vehicles. It also relies on sensors
and cameras for real-time data processing. Discuss the characteristics of this problem in terms of AI
problem-solving.
Students can align these characteristics with the given scenario
Problem Characteristics – Any 4, each carries 2 marks
Is the problem decomposable?
Can solution steps be ignored or undone?
Is the universe predictable?
Is a good solution absolute or relative?
Is the solution a state or a path?
What is the role of knowledge?
Does the task require human‐interaction?

The problem of designing a self-driving car for efficient city navigation involves multiple AI problem-
solving characteristics. Let's analyze it based on various AI problem attributes:
Example
1. Is the problem decomposable?
Partially decomposable: While some tasks (e.g., object detection, path planning, and obstacle
avoidance) can be tackled separately, they are highly interdependent. For example, route optimization
depends on real-time traffic and pedestrian movement predictions.
2. Can solution steps be ignored or undone?
No, solution steps cannot be ignored or undone: Every action (such as accelerating, braking, or turning)
directly affects the car’s state. Once an action is taken (e.g., moving into an intersection), it cannot be
undone, and incorrect decisions may lead to accidents.
3. Is the universe predictable?
No, the universe is unpredictable: City environments involve dynamic and uncertain elements, such as
pedestrians, cyclists, changing traffic lights, and unexpected vehicle maneuvers. While machine
learning models can predict certain behaviors, complete certainty is impossible.
4. Is a good solution absolute or relative?
Relative: The best solution depends on traffic conditions, pedestrian density, weather, and road
regulations. An optimal path at one moment may not be optimal a few minutes later due to changing
conditions.
5. Is the solution a state or a path?
A path: The objective is to find the most efficient route from the start location to the destination,
considering traffic, safety, and efficiency. The car must continuously update its path in real-time based
on sensor input and road conditions.
6. What is the role of knowledge?
Crucial: The system relies on real-time sensor data, prior map knowledge, traffic patterns, and
predictive models. Machine learning and AI techniques help interpret this knowledge to make safe and
efficient decisions.
7. Does the task require human interaction?
Minimal, but necessary in some cases:
During normal operation, the AI should function autonomously.
However, human interaction may be needed for manual intervention in complex or high-risk situations
(e.g., extreme weather, system malfunctions).
Additionally, human oversight is essential for training, testing, and debugging self-driving algorithms.
12 Perform the A* Algorithm on the following figure. with the start state as S. Explicitly write down the 8 3 2 2 2.5.2
queue at each step.

Let's apply the A (A-star) Algorithm* to find the optimal path and cost.
Problem solving Approach – 6 marks
Correct path and cost -2 marks
13 Consider the following directed graph. Perform a breadth-first search and Depth first search, starting 8 3 2 2 2.5.2
at S and trying to reach either of the two goal vertices (G1 or G2), in what order would the vertices be
added to the frontier?
BFS- 4 marks
DFS- 4 marks

Breadth-First Search (BFS)


BFS explores all neighbors of a node before moving deeper into the graph.
We use a queue (FIFO) for BFS.
Steps for BFS Traversal:
1. Start at S → Add A, B, E to the queue.
2. Expand A → Add D to the queue.
3. Expand B → No new nodes are added (E is already in queue).
4. Expand E → Add G1 (goal reached ✅).
5. If G1 was not found, expand D → Add G2.
Order of Nodes Added to Frontier in BFS:
1. S
2. A, B, E (neighbors of S)
3. D (neighbor of A)
4. G1 (neighbor of E) (goal found, stop)
BFS Path Found:
S → B → E → G1

Depth-First Search (DFS)


DFS explores as far as possible along a branch before backtracking.
We use a stack (LIFO) for DFS.
Steps for DFS Traversal:
1. Start at S → Add A, B, E to the stack (E is last added, so processed first).
2. Expand E → Add G1 (goal reached ✅).
Order of Nodes Added to Frontier in DFS:
1. S
2. E, B, A (neighbors of S, added to stack)
3. G1 (neighbor of E) ✅ (goal found, stop)
DFS Path Found:
S → E → G1

BFS Frontier Order:


S → A, B, E → D → G1
✅ Path Found: S → B → E → G1
DFS Frontier Order:
S → E, B, A → G1
✅ Path Found: S → E → G1
S → E, B, A → G1
✅ Path Found: S → E → G1
Both searches find G1 as the first goal reached, but DFS finds it faster in this case because of its last-
in-first-out (LIFO) nature. 🚀
14 How do you traverse from S to G using greedy best-first search in the below diagram. At each iteration, 8 2 2 2 2.5.2
each node is expanded using the evaluation function f(n)=h(n) , which is given in the below table.

Solving Greedy Best-First Search (GBFS) from S to G


Given Information:
 The heuristic function f(n)=h(n)f(n) = h(n)f(n)=h(n), meaning we expand the node with the
lowest heuristic value first.
 The goal is to traverse from S to G while selecting the most promising node at each step.
Problem Solving Approach – 6 marks
Correct path – 2 marks

Step-by-Step Execution of GBFS:


1. Start at Node S
 Possible successors: A (h(A)=12h(A) = 12h(A)=12), B (h(B)=4h(B) = 4h(B)=4)
 Select the lowest h(n)h(n)h(n) → Expand B (h(B)=4h(B) = 4h(B)=4)
2. Expand Node B
 Possible successors: E (h(E)=8h(E) = 8h(E)=8), F (h(F)=2h(F) = 2h(F)=2)
 Select the lowest h(n)h(n)h(n) → Expand F (h(F)=2h(F) = 2h(F)=2)
3. Expand Node F
 Possible successors: I (h(I)=9h(I) = 9h(I)=9), G (Goal Node)
 Select the lowest h(n)h(n)h(n) → Expand G (Goal reached ✅)

Final Path Found:


S→B→F→G

Part – C (1 x 16 = 16 Marks) Instructions: Answer any one question


15 a). Consider a graph where nodes represent cities and edges represent roads with associated travel 8+8 4 2 2 2.6.3
costs. Given the following graph, apply the Uniform Cost Search (UCS) algorithm to find the shortest
path from City A to City D

b) Player X and Player O are playing a game of Tic-Tac-Toe. The board is currently in the initial state
with only one move made by Player X:
- - -

- X -

- - -

It is Player O’s turn. The game continues here.

Assume Player O plays optimally, how should Player X proceed in the next moves to ensure a win?
List the step-by-step moves leading to a guaranteed victory.
Constraints
● Players alternate turns.
● The game ends when a player gets three marks in a row, column, or diagonal.
● If all nine spaces are filled without a winner, the game ends in a draw.
What should Player X’s second move be to ensure victory? Provide a sequence of moves leading to
the win. Explain the best strategy for Player X from this position.
UCS – 8 marks
Tic tac- toe – 8 marks (Answer can vary based on their move)
(a) Solving Uniform Cost Search (UCS) from City A to City D

Graph Representation:

Each edge represents the travel cost between two cities:

 A → B (4)
 A → C (2)
 B → C (3)
 B → D (5)
 C → D (1)

Uniform Cost Search (UCS) Execution:

UCS expands the least-cost node first.

1. Start at A, initialize priority queue with (cost, path):


o PQ = [(0, A)]
2. Expand A:
o A → B (cost 4), PQ = [(4, A → B)]
o A → C (cost 2), PQ = [(2, A → C), (4, A → B)]
3. Expand C (lowest cost):
o C → D (cost 1), total cost = 2 + 1 = 3
o PQ = [(3, A → C → D), (4, A → B)]
4. Expand D (goal reached, cost = 3):
o The shortest path is A → C → D with cost 3.

Thus, the shortest path from A to D is A → C → D with a total cost of 3.

(b) Tic-Tac-Toe: How Should Player X Play Optimally?


Current Board State:

- - -
- X -
- - -
It's Player O’s turn.
Strategy for Player O (Optimal Move)
 The best move for O is to play in a corner or center to control the board.
 Assume O plays at (1,1) (top-left corner):
diff

O - -
- X -
- - -

Best Strategy for Player X


Player X must create a fork (multiple winning threats).
1. X should play at (1,3) (top-right corner) to maximize options:
diff

O - X
- X -
- - -

2. If O blocks at (1,2), X should play at (3,1) to create a winning threat:

O O X
- X -
X - -

3. X will then win by playing (3,2) or (3,3), creating an unstoppable fork.


Best Move for Player X Now:

Move to (1,3) (top-right corner) to create multiple winning threats.

(OR)
16 A robot is exploring a cave system represented as a tree-like graph. The robot starts at the entrance 16 4 2 2 2.6.3
(Node A) and must find the treasure (Goal Node G). However, the cave has infinitely deep paths,
meaning some paths could lead to nowhere. The graph representation is:

● A is the starting point


● G is the goal node (treasure)
● Some paths lead to dead ends (H, I)
i. If we use DFS, what potential issue could arise in this scenario?
ii. How can Depth-Limited Search (DLS) prevent these issues, and what would be a
reasonable depth limit to apply in this case?
iii. Suppose the depth limit L = 2, will the search algorithm find the goal? If not, what should be
the correct depth limit?

(i) Potential Issues with DFS in This Scenario (4 marks)


Depth-First Search (DFS) explores one branch deeply before backtracking. If the cave
system has infinitely deep paths, DFS could get stuck in an infinite loop or take a very
long time to find the goal. In this case, DFS might keep exploring down the wrong branches
(e.g., towards H or I) and fail to reach G efficiently.

(ii) How Depth-Limited Search (DLS) Prevents This Issue (6 marks)


Depth-Limited Search (DLS) sets a maximum depth limit (L) to avoid infinite loops. If a
path exceeds this limit, the search backtracks instead of continuing infinitely.
A reasonable depth limit should be at least the depth of the goal node (G). In the given
tree:
 A (Depth 0)
 B, C (Depth 1)
 D, E, F (Depth 2)
 G, H, I (Depth 3)
Since G is at depth 3, the depth limit should be at least L = 3 to guarantee finding the goal.

(iii) If L = 2, Will the Search Find the Goal? (6 marks- have to explain each limit through
diagram )
No, because the goal node G is at depth 3, and a depth limit of L = 2 will only allow
exploration up to nodes D, E, and F. The search will terminate before reaching G.
Correct Depth Limit
To ensure the search finds G, the correct depth limit should be L = 3. This will allow DLS
to expand node D and reach G successfully.

Course Outcome (CO) and Bloom’s level (BL) Coverage in Questions

CO Coverage Bloom's Level


BL1, 7%
100%
70% BL2,
BL4, 18%
50% 30% 43%

0%
CO1 CO2 CO3 CO4 CO5 BL3,
32%
Approved by
Audit Professor Course Coordinator

You might also like