Docsity

Interior Node - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS 540: Introduction to Artificial Intelligence
Midterm Exam: 7:15-9:15 pm, October 29, 2002
Room 1240 CS & Stats
CLOSED BOOK
(one sheet of notes and a calculator allowed)
Write your answers on these pages and show your work. If you feel that a question is not fully
specified, state any assumptions you need to make in order to solve the problem. You may use
the backs of these sheets for scratch work.
Write your name on this and all other pages of this exam. Make sure your exam contains six
problems on twelve pages.
Name ________________________________________________________________
Student ID ________________________________________________________________
Problem Score Max Score
1 ______ 15
2 ______ 20
3 ______ 5
4 ______ 20
5 ______ 10
6 ______ 30
TOTAL ______ 100
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Interior Node - Artificial Intelligence - Exam and more Exams Artificial Intelligence in PDF only on Docsity!

CS 540: Introduction to Artificial Intelligence

Midterm Exam: 7:15-9:15 pm, October 29, 2002 Room 1240 CS & Stats

CLOSED BOOK (one sheet of notes and a calculator allowed)

Write your answers on these pages and show your work. If you feel that a question is not fully specified, state any assumptions you need to make in order to solve the problem. You may use the backs of these sheets for scratch work.

Write your name on this and all other pages of this exam. Make sure your exam contains six problems on twelve pages.

Name ________________________________________________________________

Student ID ________________________________________________________________

Problem Score Max Score

1 ______ 15

2 ______ 20

3 ______ 5

4 ______ 20

5 ______ 10

6 ______ 30

TOTAL ______ 100

Problem 1 – Decision Trees (15 points)

Assume that you are given the set of labeled training examples below, where each feature has three possible values a, b, or c. You choose to apply the C5 algorithm to this data and select “-” as the default output.

F1 F2 F3 Output

a a a + c b c + c a c + b a a - a b c - b b c -

a) What score would the information gain calculation assign to each of the features? Be sure to show all your work (use the back of this or the previous sheet if needed).

b) Which feature would be chosen as the root of the decision tree being built? ____________ (Break ties in favor of F1 over F2 over F3.)

Problem 2 – Search (20 points)

a) Consider the search space below, where S is the start node and G1 , G2, and G3 satisfy the goal test. Arcs are labeled with the cost of traversing them and the estimated cost to a goal is reported inside nodes.

For each of the following search strategies, indicate which goal state is reached (if any) and list, in order , all the states popped off of the OPEN list. When all else is equal, nodes should be removed from OPEN in alphabetical order.

Iterative Deepening

Goal state reached: _______ States popped off OPEN: ____________________________________

Hill Climbing

Goal state reached: _______ States popped off OPEN: ____________________________________

A *

Goal state reached: _______ States popped off OPEN: ____________________________________

G 0

G 0

B (^61)

C 3

5

2

7

5

2

11

0

10

1

1

4

2

S 8

E 1

3

G 0

D 4

F 5

A 9

b) (Note: This question talks about search spaces in general and is not referring to the specific search space used in Part a.)

Consider the following scoring function for heuristic search:

score(node) = Wgt × g(node) + (1 – Wgt) × h(node) where 0 ≤ Wgt ≤ 1

i. Which search algorithm do you get with Wgt set to 0?

ii. Which search algorithm do you get with Wgt set to 1?

iii. If h(node) is an admissible heuristic, for what range of Wgt values is the above

scoring function guaranteed to produce an admissible search strategy? Explain your answer.

Problem 4 – Representation & Reasoning with Propositional Logic (20 pts)

a) Is the following WFF valid? Justify your answer using a truth table.

[ (P ∨ Q) ∧ (Q ∨ R) ] ⇒ (P ∨ R)

b) Use propositional logic to represent the following sentences.

i) Fido is always either sleeping or barking.

ii) When Fido is hungry Fido barks, but Fido barking does not necessarily mean that Fido is hungry.

c) Formally show that S follows from the “given’s” below. (Don’t deduce more than 10 additional WFF’s.)

Number WFF Justification

1 P ∧ Z given

2 ( ¬ R ∧ ¬ W) ∨ ( ¬ P) given

3 (W ∧ Q) ⇒ P given

4 Q ∨ W given

5 Q ⇒ (S ∨ P) given

6 (P ∧ Q) ⇒ (S ∨ R) given

Problem 6 – Learning, Logic, and Search Combined (30 points)

Imagine that we have a training set of labeled “fixed-length feature vectors.” However, instead of using C5 to induce a decision tree, this time we want to learn inference rules like the following sample:

( Color=red ∧ Shape=round) ⇒ positive example

Assume that each training example is described using features F 1 through F 3 and each feature has three possible values, a, b, or c Each training example is labeled is either in the positive (+) category or the negative (-) category. Also assume that you have set aside 10% of the training examples for a test set and another 10% for a tuning set.

Your task is to cast this as a search problem where your search algorithm’s job is to find the best

propositional-logic wff for this task. Your wff should use implication ( ⇒) as its main connective

and the wff should imply when an example belongs to the positive category (e.g., as done in the sample wff above).

a) Describe a search space that you could use for learning such wff’s. Show a sample node.

b) What would be the initial state?

c) Describe two (2) operators that your search algorithm would use. Be concrete.

i)

ii)

d) Would you prefer to use a goal test for this task or would you prefer to look for the highest scoring state you can find? Justify your answer.

e) What would be a good scoring function for this task? Why?