0% found this document useful (0 votes)
78 views6 pages

Mid I

The document provides instructions for a midterm exam in Artificial Intelligence consisting of 3 problems, with the first involving analyzing the admissibility and consistency of a heuristic function on a search space graph, the second assessing a greedy agent's hill-climbing approach to the 0-1 knapsack problem, and the third involving applying minimax search with alpha-beta pruning to find the best move for MAX in a game tree.
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)
78 views6 pages

Mid I

The document provides instructions for a midterm exam in Artificial Intelligence consisting of 3 problems, with the first involving analyzing the admissibility and consistency of a heuristic function on a search space graph, the second assessing a greedy agent's hill-climbing approach to the 0-1 knapsack problem, and the third involving applying minimax search with alpha-beta pruning to find the best move for MAX in a game tree.
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/ 6

National University of Computer and Emerging Sciences, Lahore Campus

Course: Artificial Intelligence Course Code: CS401


Program: BS(Computer Science) Semester: Fall 2016
Duration: 60 min Total Marks: 30
Paper Date: 28-02-2018 Weight 15%
Section: D, E Page(ss): 6
Exam: Mid I Reg. No

Name: ___________________________________
___________________________________Registration No_______________________
_______________________
Please read questions carefully, give reason/show all working for all questions
Instruction/Notes: Answer all questions are on this question paper
Rough sheets can be used and attached at the end only if necessary.
necessary

Problem 1. Consider the search space shown in the figure below. In this problem the start state
is S, and the goal state is G.. The transition costs are next to the edges, and the heuristic
estimate are given inside the node
nodes.. Assume ties are always broken by choosing the state which
comes first alphabetically

Part a) [2 + 3 Points]

i) Is the heuristic function admissible


admissible? (Give Reason)

ii) Is the heuristic function consistent? (Give Reason)

School of Computer Science Page1


Part b) What is the order of states expanded and the path found by A* graph search algorithm
when used on this problem? Also specify the nodes in the fringe/frontier/Queue when the goal
is found. [3 + 2 + 1 Points]

School of Computer Science Page2


Problem 2:

An intelligent but greedy automated agent/program is trying to solve the famous 0-1 knapsack
problem. In this problem the agent has a set of items to choose from with each item having a
weight, the agent has to carry if it picks that item, and a value the agent will gain by picking up
the item. The agent has the capicity to carry only a MAX_WEIGHT while his job is to select a
subset of items that it can carry such that the total value gained by the agent maximum.

The agent has been programmed by a slected team of students from a famous University (FAST)
situated in the city of Lahore. The team programmed the agent such that it uses hill-climbing
strategy to solve such optimization problems.

To represent state of the agent, while it is creating a plan to make a selection from a set of n
items, the team used an array of size n with an index corresponding to one of the item in the
set. Each index in the state array contains wither a 0 or a 1 where 0 at any index means that the
agent will not pick the corresponding item and a 1 means the agent will pick the corresponding
item.

Further, to generate successors of a state a very simple successor function is used that works by
selecting an index and if the corresponding item is not already in the list of items to be picked it
added it into the list by placing a 1 at the corresponding arry index.

Part a) If the ste of items contains 100 items [1 + 1 + 3 Points]

i. What is the size of search space the agent has to search from? (Justify)

ii. How many successors a state can have at max? (Justify)

iii. What will be a suitable evaluation function to carry out the hill-climbing search?

School of Computer Science Page3


Part b) Now suppose that the set of items contain only 4 items. The weights of items and their
value is given in the following table.

Item ID A B C D
Item Weight 0.8 kg 0.7 kg 2 kg 3 kg
Item Value Rs. 80 Rs. 70 Rs. 200 Rs. 320
Table 1: Item Weights and Value

If the maximum capacity of the agent is 3.5 kg. then what will be final solution found be the
agent (Show Complete Working)

i) If starts in the following state [2 Points]

Initial State 0 0 0 0

ii) If starts in the following state [3 Points]

Initial State 0 1 0 0

School of Computer Science Page4


Problem 3

Figure on the following page shows a game tree of a hypothetical game. To find the best move of MAX (denoted by upwards pointing triangle) at the
root, this game tree is to be searched using minimax with α-β pruning. Assume that the minimax search has been implemented such that the
child/successors of any node are traversed from left to right order.

Part a) If value of each leaf node (specified as a square) is as given on the figure then compute the value of each intermediate node that will be
assigned by minimax with prunning. On the figure also mark all branches that will be pruned by α-β prunning strategy and specify the corresponding
values of α and β at the time of prunning [5 + 5 Points]

School of Computer Science Page5


CS 401 AI Spring2018, Mid I Roll Number

Bonus Part

Now assue that the values of the leaf nodes are not known and you are free to specify these values. Determin values of the nodes such that maximun
number of branch will be pruned if minimax with α-β pruning is used to search the tree and children of a node are processesed from left to right. Also
specify on the figure the branches that will be pruned. [5 Points]

School of Computer Science Page6

You might also like