AI Tut Ass 1 Solution
AI Tut Ass 1 Solution
Department of CSE
B.E. CSE (AI & ML)
TUTORIAL ASSESSMENT TEST 01 Date: 29.07.2024
19N501 - ARTIFICIAL INTELLIGENCE CONCEPTS
1. For the internet shopping agent and Mathematician's theorem-proving assistant answer the
following: (10)
a) What are the percepts for this agent?
b) Characterize the operating environment.
c) What are the actions the agent can take?
d) How can one evaluate the performance of the agent?
e) What sort of agent architecture do you think is most suitable for this agent?
Answers:
a) Sensors: Ability to parse web pages, interface for user requests
b) Environment: Internet. Partially observable, partly deterministic, sequential, partly static,
discrete, single-agent (exception: auctions)
c) Actuators: Ability to follow links, fill in forms, display info to user
d) Performance measure: Obtains requested books, minimizes cost/time
e) Agent architecture: goal based agent with utilities for open-ended situations
PEAS:
2. Give the initial state, goal test, successor function, and cost function for each of the following.
Choose a formulation that is precise enough to be implemented. (10)
a) You have to color a planar map using only four colors, in such a way that no two adjacent
regions have the same color.
Answers:
Solution 1
Initial State - Position/Edges of planes
Goal Test - Are all plane colored with no adjacent regions having matching
colours
Operators - Fill plane with 1 of four colours
Past Cost - Number of actions required
Solution 2
Initial state: No regions colored.
Actions (3rd ed.)/Successors (2nd ed.): Assign a color to an uncolored region.
Transition model (3rd ed.): The previously uncolored region has the assigned
color.
Goal test: All regions colored, and no two adjacent regions have the same color.
Cost function: Number of areas.
Solution 3
b) You have three jugs, measuring 12 gallons, 8 gallons, and 3 gallons, and a water faucet.
You can fill the jugs up or empty them out from one to another or onto the ground. You
need to measure out exactly one gallon.
Answers:
Solution 1:
Solution 2:
Initial State: All three jugs are empty. G1=G2=G3=0
Goal State: Some jug contains exactly 1 gallon.
Successor function: Applying action transfer to jugs u and j which contain Gi and
Gj gallons of water leaves jug i with max(0,Gi-(Cj-Gj)) gallons of water and jug j
with min(C_j,G_i+G_j) gallonsn of water. Applying the action fill to jug i leaves it
with Ci gallons of water.
Cost function: charge one point for each gallon of water transferred and each
gallon filled.
3. Suppose you have the following search space: (10)
a) Draw the state space of this problem.
b) Assume that the initial state is A and the goal state is G. Show how A* search strategy
would create a search tree to find a path from the initial state to the goal state: