0% found this document useful (0 votes)
104 views

Final Solutions

This document provides instructions for a final examination for an Artificial Intelligence course. It outlines that the exam is 120 minutes long, takes place on December 14, 2010 from 7-9pm, and is worth a total of 100 points. It consists of 5 questions worth varying points. The exam is open book and notes but no sharing of materials or electronics is allowed. Students are expected to adhere to the academic integrity policy and provide their student ID and name.

Uploaded by

Hari haran
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)
104 views

Final Solutions

This document provides instructions for a final examination for an Artificial Intelligence course. It outlines that the exam is 120 minutes long, takes place on December 14, 2010 from 7-9pm, and is worth a total of 100 points. It consists of 5 questions worth varying points. The exam is open book and notes but no sharing of materials or electronics is allowed. Students are expected to adhere to the academic integrity policy and provide their student ID and name.

Uploaded by

Hari haran
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/ 13

Final Examination

CSCI 460: Artificial Intelligence


December 14, 2010

Instructions:
1. Duration: 120 Minutes
2. Date: 12/14/2010 from 7:00 – 9:00 pm
3. Maximum credits/points for this midterm: 100 points
4. 5 questions.
5. Credits/points for each question are indicated in the brackets [ ] before the question.
6. This exam is open book and open notes. However, no sharing of reference materials
or books will be permitted. Each person must have his or her own books and -
reference materials. No cell phones or laptops will be allowed.
7. You are expected to adhere to the Academic Integrity code

Student ID: ____________________________________________________

Last Name: ______________________________________________________

First Name: _____________________________________________________

PROBLEM
MAXIMUM ACTUAL
#
1 20
2 20
3 20
4 10
5 30
TOTAL 100
1) [20 Points] Inference in First Order Logic

Consider the following 5 facts that are added to a knowledge base in turn. Hobbit, Hero,
Hafling are predicates, FinalBattle is a function, Frodo and Mount Doom are
constants, and x and y are variables that are universally quantified.

1. Journey(Frodo, Mount Doom)


2. Hafling(x) → Hobbit(x)
3. Journey(x, y) → FinalBattle(x, y)
4. Hafling(Frodo)
5. Hobbit(x) ^ FinalBattle(x, Mount Doom) → Hero(x)

a) 8 Points
Show how forward chaining can be used to infer whether Frodo is a Hero (i.e.
Hero(Frodo)). Describe each step of the inference in detail in terms of unifications, rule
firings, etc.

Rule 4: Hafling(Frodo)

Rule 2: Hafling(Frodo) → Hobbit(Frodo) x = Frodo

Rule 1: Journey(Frodo, Mount Doom)

Rule 3: Journey(Frodo, Mount Doom) → FinalBattle(Frodo, Mount Doom)


x = Frodo, y = Mount Doom

Rule 5: Hobbit(Frodo) ^ FinalBattle(Frodo, Mount Doom) → Hero(Frodo)

****Akshay. You see above that Rule 4 and Rule 1 are facts that are given. So these
Rules can be put in any order, but they obviously MUST come before the rules they
imply. For example, Rule 1 at some point has to come before Rule 3. So another
solution might be Rule 1, Rule 4, Rule 3, Rule 2 etc etc.
b) 8 Points
Show how backward chaining can be used to infer whether Frodo is a Hero (i.e.
Hero(Frodo)). Describe each step of the inference in detail in terms of unifications, rule
firings, etc

******AKSHAY. It’s possible they might write down a table instead. That is okay,
but just make sure their rule firings follow the graph above.
c) 4 Points
Consider the Prolog list given below. What is the result after the following Prolog query
is executed?

[Frodo, Bilbo, Samwise, Gollum, Meriadoc, Peregrin]

?- [X, Y, _ | Z] = [Frodo, Bilbo, Samwise, Gollum, Meriadoc, Peregrin].

X = [Frodo]
Y = [Bilbo]
Z = [Gollum, Meriadoc, Peregrin]
2) [20 Points] CNF and Resolution with FOL

a) 10 Points
Convert the following FOL formula to CNF showing all the steps involved.

x [y Animal(y) => Loves(x,y)] =>[y Loves(y,x)]


b) 10 Points

Given the following CNF knowledge base.

Determined(Mario)
¬ Determined(x) v Marry(x, Princess)
¬ Practice(x) v Defeat(x, y)
¬ Defeat(x, Bowser) v ¬ Marry(x, Princess) v Joyful(x)
¬ Determined(x) v Defeat(x, y)
¬ Practice(Mario)

Please demonstrate how one can prove Joyful(Mario) using resolution as the inference.
Show all details of unification needed for each step of the inference process. (You may
assume that Mario, Princess, and Bowser are constants, and x and y are variables).
3) [20 Points] Planning in STRIPS

Consider the following block world shown below. The puzzle has four blocks labeled A,
B, C and D and two holes. Initially, the blocks are positioned as shown with block D in
one of the holes. In order to be moved, a block must be “clear” meaning there is not
another block on top of it. The following rules apply:
 Only one block may be moved at a time
 Blocks can be moved onto the table, onto another block, or in/out
of a hole
 A block may be placed inside a hole if there is not another block
already inside

The above initial state is described in STRIPS as follows:


Clear(A), On(A, B), On(B, Table), On(C, Table), Hole1(D), Clear(D), Clear(C),
Empty(Hole 2), ¬ Empty(Hole 1)

a) 6 Points
Write down the description of the state of the blocks as shown below:

Hole1(B), Hole2(D), On(C, Table), On(A, Table), Clear(C), Clear(A), Clear(B),


Clear(D), ¬ Empty(Hole1), ¬ Empty(Hole2)
b) 7 Points
Write down the definition of a STRIPS operator MoveToHole2 that moves a block and
places it inside Hole 2.

MoveToHole2(X) Move a block and place it inside Hole 2

PRECONDITIONS:
Empty(Hole2)
¬ Hole2(X)
Clear(X)

EFFECTS:
Clear(X)
¬ Empty(Hole2)
Hole2(X)

c) 7 Points
Write down the definition of a STRIPS operator MoveOntoA that moves a block that
MUST be inside Hole 1 and places it on top of block A.

MoveOntoA(X) move a block inside Hole 1 and put it on top of A

PRECONDITIONS:
Hole1(X)
¬ Empty(Hole1)
Clear(X)
Clear(A)

EFFECTS:
Empty(Hole1)
Clear(X)
¬ Clear(A)
On(X, A)

***********AKSHAY. I made it so the problem is VERY clear. There should NOT be


many different answers. There might be slight differences, but nothing major. But
please please please, carefully read through their answers to make sure it is correct. It’s
possible they might have a different setup that still works, but you have to check it!!!
4) [10 pts] Partial Order Plan

Consider using a partial-order planning system for making an omelette. Assume that in
this domain there exist the following three STRIPS operators:

Go(a, b) Buy(o, s) Make(Omelette)


pre: At(a) pre: At(s), Sells(s, o) pre: At(Home), Have(Eggs)
effect: At(b) effect: Have(o) effect: Have(Omelette)
delete: At(a) delete: (none) delete: Have(Eggs)

Our initial state is: At(Home), Sells(Safeway, Eggs) ,


the goal state is: Have(Omelette)

Suppose we start with the partial plan shown in the following figure. The partial plan
currently contains no ordering constraints other than those implied by the partial order of
the partial plan.

Start

At(Home) Sells(Safeway,Eggs)

Go(Home,Safeway)

At(Safeway)

Buy(Eggs,Safeway)

Have(Eggs)

Make(Omelette)

Have(Omelette)

Finish
Describe the threats to any of the causal links shown in this partial plan, if any. Show
how you would resolve the conflicts in each case (Feel free to propose adding operators if
you feel you need to). If you see no threats to causal links, justify your answer in terms of
each causal link.

The threat is: Go(Home, Safeway) deletes the At(Home) which is the prediction of
Make(Omelette). The resolution is to add the operator Go(Safeway, Home) before
Make(Omelette).
5) [30 Points] Uncertainty

a) Given the following joint probability table:

Smart Successful Diligent Honest Happy


CollegeGraduate 0.2 0.05 0.06 0.3 0.06
¬ CollegeGraduate 0.1 0.01 0.06 0.1 0.06

5 Points
1. What is the probability of CollegeGraduate, namely P(CollegeGraduate)?

P(CollegeGraduate) = 0.2 + 0.05 + 0.06 + 0.3 + 0.06 = 0.67

5 Points
2. What is the probability P(Honest)?

P(Honest) = 0.3 + 0.1 = 0.4

5 Points
3. What is the probability P(¬CollegeGraduate | Smart, Honest)?

P(¬CollegeGraduate | Smart, Honest) = ____0.1 + 0.1_________ = 0.285


0.2 + 0.1 + 0.3 + 0.1
5 Points
4. This question has nothing to do with the joint probability table provided earlier. Treat
this as a separate problem.
Given that P(CollegeGraduate | American) = 0.6, P(American | CollegeGraduate) = 0.2
and P(American) = 0.1. What is the probability P(CollegeGraduate) ?

P(CollegeGraduate | American) = P(American | CollegeGraduate) * P(CollegeGraduate)_


P(American)

So then…

P(CollegeGraduate) = __P(CollegeGraduate | American) * P(American)__


P(American | CollegeGraduate)

= (0.6 * 0.1) / 0.2 = 0.3


b) 10 Points
Consider the following Bayesian Network.

P(C) = 0.5
C P(E) = 0.1
A E

P(A) = 0.2

P(B|A,C) = 0.3 P(D|C,E) = 0.8


B P(D|¬C, ¬E)=0.3 D
P(B|¬A, ¬C)=0.4
P(B|¬A, C) = 0.6 P(D|¬C, E) = 0.7
P(B|A, ¬C)=0.1 P(D|C, ¬E)=0.5

What is the probability P(¬A, B, C, D, ¬E)?

P(¬A, B, C, D, ¬E) = 0.8 * 0.6 * 0.5 * 0.5 * 0.9 = 0.108

You might also like