Partial sol 2

25 February 2015/R2
Name:
Group:
Pages:
Exam in Introduction to Articial Intelligence
Lecturer Adrian Groza
• Time: 3 hours. This exam is worth 90 points. Each point represents two minutes of time. Use the point
totals as a guide for budgeting your time. Use all your 180 minutes.
• Read exercises carefully. Be sure you understand exactly what is required. Questions are not allowed.
• The exam is closed-book, closed-notes, closed-phones, closed-friends, open-mind. Write clearly; unrea-
dable = wrong! If we observe any attempt of deception, the whole exam will be evaluated to 0.
Available Points
Achieved Points
Exercise 1
20
Exercise 2
15
Exercise 3
25
Exercise 4
30
Sum
90
1. Uninformed search.
(a) Explain the dierence between uninformed and informed search. List two examples of each type of
algorithm.
(b) Describe what a heuristic is and what it means for it to be admissible. List two examples of typical
heuristic functions.
(c) Draw a search tree for the 8-puzzle problem up to depth 4 (start state is depth 0) using the A*
algorithm (omit repeated states) with the evaluation function f(n) = p(n)+h(n), where p(n) is the
number of steps from the start state (start state is step 0) and h(n) is the number of misplaced
tiles. Note that the actions for sliding tiles should be used in this order: right, left, up and down.
Write the values of f and of its components p and h under each state. You may use an abbreviated
notation indicating only the tiles that change
(d) What happens when using Iterative Deepening Search if the limit is 3?
(3)
(3)
(10)
(4)
2. α − β prunning. The following tree represents all possible outcomes of a hypothetical zero-sum game:
This tree is from the perspective of the MAX player; MAX nodes are repesented by squares and MIN
nodes by circles. The leaves of the tree represent the value of the game for the MAX player. The number
of each node indicates the order in which they are considered by the Minimax and α − β pruning
algorithms.
(a) Compute the values of each node in the tree using the Minimax strategy, and write these values
into the space inside each node.
(5)
(b) Run the α − β pruning algorithm and circle each leaf and node that would NOT be considered by
the α − β pruning algorithm. (Assume that leaves are considered in left-to-right order.)
(c) Write the values of α and β that are passed as arguments to the recursive call at each node in the
space provided. The α − β pruning algorithm is initialized with α = −∞ and β = ∞ at the root
node.
(5)
(5)
Solution:
Dashed lines indicate pruned edges.
Node 3 returns 4 and thus β = 4 for node 4, but this β value is not passed back up to node 2.
Instead, node 2 returns 4 back to node 1, and thus node 1 sets α = 4 for the evaluations at node 5
and subsequent nodes.
3. Inference in rst order logic
(Based on "The Adventure of Silver Blaze", an original Sherlock Holmes mystery by Arthur Conan
Doyle) A prize-winning racehorse named Silver Blaze has been stolen from a stable, and a bookmaker
named Fitzroy Simpson has been arrested as the prime suspect by good old Inspector Gregory. Sherlock
Holmes, however, after ample use of his magnifying glass and some of the strongest black tobacco this
side of the Atlantic, nds the true thief by reasoning from the following premises:
1.
2.
3.
4.
5.
(a)
(b)
(c)
(d)
(e)
The horse was stolen either by Fitzroy or by its trainer John Straker.
The thief had to have entered the stable the night of the theft.
If a stranger enters the stable, the dog barks.
Fitzroy was a stranger.
The dog did not bark.
Who stole Silver Blaze?
Convert to rst order logic.
Prove your assertion using forward chaining
Prove your assertion using backward chaining
Prove your assertion using resolution. Show all steps required by the resolution proof.
4. Classical Planning. The monkey-and-bananas problem is faced by a monkey in a laboratory with
some bananas hanging out of reach from the ceiling. A box is available that will enable the monkey to
reach the bananas if he climbs on it. Initially, the monkey is at A, the bananas at B , and the box at C .
The monkey and box have height Low, but if the monkey climbs onto the box he will have height High,
the same as the bananas. The actions available to the monkey include Go from one place to another,
P ush an object from one place to another, ClimbU p onto or ClimbDown from an object, and Grasp or
Ungrasp an object. The result of a Grasp is that the monkey holds the object if the monkey and object
are in the same place at the same height.
(1)
(4)
(4)
(4)
(12)
(a) Write down the initial state description
(b) Write the six action schemas
(c) Suppose the monkey wants to fool the scientists, who are o to tea, by grabbing the bananas, but
leaving the box in its original place. Write this as a general goal (i.e., not assuming that the box
is necessarily at C) in the language of situation calculus. Can this goal be solved by a classical
planning system?
(d) Your schema for pushing is probably incorrect, because if the object is too heavy, its position will
remain the same when the Push schema is applied. Fix your action schema to account for heavy
objects.
(e) Use any planning algorithm from AIMA to solve the problem. Show each reasoning step.
Anonymous Questionaire
Write on an anonymous paper your opinion regarding:
1. What did you like at this course?
2. Identify what you found easiest and most dicult about this course (or during learning) and why.
3. What are the changes that would most improve the course?
4. Any additional comments on the course.
(5)
(5)
(5)
(5)
(10)