Docsity

Shortest Equivalent - Artificial Intelligence - Exam, Exams of Artificial Intelligence

Partial preview of the text

Download Shortest Equivalent - Artificial Intelligence - Exam and more Exams Artificial Intelligence in PDF only on Docsity!

Midterm Examination

CS540: Introduction to Artificial Intelligence

October 21, 2009

LAST NAME:

FIRST NAME:

SECTION (1=Dyer, 2=Zhu):

Problem Score Max Score

1 ___________ 10

2 ___________ 12

3 ___________ 15

4 ___________ 9

5 ___________ 9

6 ___________ 15

7 ___________ 15

8 ___________ 15

Total ___________ 100

Question 1 [10]. Entropy

Consider a six-sided die with equal probability on each side. We define the Boolean variable LARGE=True if the die roll outcome is 4, 5, or 6, and LARGE=False otherwise. We define EVEN=True if the outcome is even, and EVEN=False otherwise.

(a) [5] What is the entropy of LARGE? What is the entropy of EVEN?

(b) [5] What is the information gain in bits for LARGE in predicting EVEN? Be sure to show the formula and the steps.

Question 2 [12]. Decision Tree and Logic

Consider the following set of 4 training examples, each containing two Boolean attributes, A and B, and a desired Boolean classification.

A B Class T F T T F T F T T F F F (a) [4] Draw the decision tree trained from the above examples, with A as the root node.

(a) [5] What solution path is found by Greedy Best-first search using h2? Break ties alphabetically.

(b) [5] What solution path is found by Uniform-Cost search? Break ties alphabetically.

(c) [5] Give the three solution paths found by algorithm A using each of the three heuristic functions, respectively. Break ties alphabetically.

Question 4 [9]. Heuristics

(a) Consider the 8-puzzle in which there is a 3 x 3 board with eight tiles numbered 1 through 8. The goal is to move the tiles from a start configuration to a goal configuration, where a move consists of a horizontal or vertical move of a tile into an adjacent position where there is no tile. Each move has cost 1.

(i) [3] Is the heuristic function defined by

8

1

i i i

h  d

  admissible , where di is the

number of vertical plus the number of horizontal moves of tile i from its current position to its goal position assuming there are no other tiles on the board, and 0 ≤ a i ≤ 1 is a constant weight associated with tile i? Explain briefly why or why not.

(ii) [3] Is the heuristic defined by h ( n ) = 8 – cost( n ) admissible , where cost( n ) is the cost from start to node n? Explain briefly why or why not.

(b) [3] Given two arbitrary admissible heuristics, h1 and h2 , which composite heuristic is better to use, max( h1 , h2 ), ( h1 + h2 )/2, or min( h1 , h2 )? Explain briefly why.

Question 6 [15]. Game

Consider the following game: there are three piles of sticks, with 1, 1, and 2 sticks in each pile, respectively. There are THREE players A, B, C who play in turn in that order. Each player can take one or more sticks from one and only one pile. The player who takes the last stick wins one dollar from each of the other two players (i.e., two dollars total).

(a) [2] Circle the properties that describe this game:

two-player, zero-sum, discrete, deterministic, perfect information

(b) [4] How would you represent the game value of the leaf nodes in the game tree, now that there are three players?

(c) [6] Draw the complete game tree (hint: the piles (1,2,1) are equivalent to (1,1,2). You may want to always sort the numbers from small to large).

(d) [3] What should A’s initial move be?

Question 7 [15]. Constraint Satisfaction

Consider solving the 4-queens problem as a constraint satisfaction problem. That is, place 4 queens on a 4 × 4 board such that no queen is in the same row, column or diagonal as any other queen. One way to formulate this problem is to have a variable for each queen, and binary constraints between each pair of queens indicating that they cannot be in the same row, column or diagonal. Assuming the i th^ queen is put somewhere in the i th^ column, then the possible values in the domain for each variable are the row numbers in which it could be placed. Say we initially assign queen Q1 the unique value 3, meaning Q1 is placed in column 1 and row 3. This results in an initial constraint graph given by (the set of candidate values of each variable is shown inside the node):

(a) [5] Apply forward checking and give the remaining candidate values for the variables Q2, Q3 and Q4.

Question 8 [15]. Propositional Logic

(a) [3] Is the Propositional Logic (PL) sentence (A B) ⁄ ( ŸA ¤ B) valid, unsatisfiable, or satisfiable? Briefly explain your answer.

(b) [3] Given a domain using a vocabulary of 4 propositional symbols, A, B, C, and D, how many models are there for the following PL sentence: (A ⁄ B) ¤ (B ⁄ C)

(c) [3] Prove (A ⁄ B) |= (A  B) using a truth table.

(d) [3] Given that a sentence a in PL is satisfiable but not valid, then which of the following must also be true? Your answer can be one or more of (i) – (iv). (i) a is valid (ii) Ÿa is valid (iii) Ÿa is unsatisfiable (iv) None of the above

(e) [3] Prove whether or not the rule of inference

P Q , Q

P

is sound. Justify your

answer by showing an appropriate truth table.