Docsity

Task Environments - Introduction to Artificial Intelligence - Exams, Exams of Artificial Intelligence

Toggle sidebar
bg1
CS188, Spring 2004, Midterm1, Russel
You have 50 minutes. The exam is open-book, open-notes. 100 points total. Panic not.
ALL QUESTIONS IN THIS EXAM ARE TRUE/FALSE, MULTIPLE-CHOICE, OR SHORT-
ANSWER.
Mark your answers ON THE EXAM ITSELF. Write your name, SID, and section number at the
top of each page.
For true/false questions, CIRCLE True OR False.
For multiple-choice questions, CIRCLE ALL CORRECT CHOICES (in some cases, there may
be more than one).
If you are not sure of your answer you may wish to provide a brief explanation.
For official use only
Q.1
Q.2 Q.3 Q.4 Q.5 Q.6 Total
1. (12 pts) Agents and Environments
(a) (3) True/False: There exist task environments (PEAS) in which some pure reflex
agents behave rationally.
(b) (3) True/False: There exist task environments (PEAS) in which all pure reflex
agents behave irrationally.
(c) (3) True/False: The input to an agent program is the same as the input to the
corresponding agent function.
(d) (3) True/False: Every agent function is implementable by some program/machine
combination.
pf3
pf4

Partial preview of the text

Download Task Environments - Introduction to Artificial Intelligence - Exams and more Exams Artificial Intelligence in PDF only on Docsity!

CS188, Spring 2004, Midterm1, Russel

You have 50 minutes. The exam is open-book, open-notes. 100 points total. Panic not.

ALL QUESTIONS IN THIS EXAM ARE TRUE/FALSE, MULTIPLE-CHOICE, OR SHORT- ANSWER. Mark your answers ON THE EXAM ITSELF. Write your name, SID, and section number at the top of each page. For true/false questions, CIRCLE True OR False. For multiple-choice questions, CIRCLE ALL CORRECT CHOICES (in some cases, there may be more than one).

If you are not sure of your answer you may wish to provide a brief explanation.

For official use only Q.1 Q.2 Q.3 Q.4 Q.5 Q.6 Total

1. (12 pts) Agents and Environments

(a) (3) True/False: There exist task environments (PEAS) in which some pure reflex agents behave rationally.

(b) (3) True/False: There exist task environments (PEAS) in which all pure reflex agents behave irrationally.

(c) (3) True/False: The input to an agent program is the same as the input to the corresponding agent function.

(d) (3) True/False: Every agent function is implementable by some program/machine combination.

2. (15 pts.) Search Consider the problem of moving k knights from k starting squares s 1 , …, sk to k goal squares g 1 , …, gk, on an unbounded chessboard, subject to the rule that no two knights can land on the same square at the same time. Each action consists of moving up to k knights simultaneously. We would like to complete the maneuver in the smallest number of actions.

(a) (5) What is the maximum branching factor b in this state space? (i) 8k (ii) 9k (iii) 8k^ (iv) 9k

(b) (6) Suppose hi is an admissible heuristic for the problem of moving knight i to goal gi by itself. Which of the following heuristics are admissible for the k- knight problem?

(i) min{h 1 ,…,hk} (ii) max{h 1 ,…,hk} (iii) ∑ =

k i 1 hi

(c) (4) Which of these is the best heuristic?

(i) min{h 1 ,…,hk} (ii) max{h 1 ,…,hk} (iii) ∑ =

k i 1 hi

3. (25 pts.) CSPS and local search Consider the problem of placing k knights on an n x n chessboard such that no two knights are attacking each other, where k is given and k < n^2.

(a) (5) Choose a CSP formulation. In your formulation, what are the variables?

(b) (5) What are the values of each variable?

(c) (5) What sets of variables are constrained, and how?

5. (18 pts.) Propositional Logic According to political pundits, a person who is radical ( R ) is electable ( E ) if he/she is conservative ( C ), but otherwise is not electable.

(a) (12) Which of the following are correct representations of this assertion? i. ( R ∧ E ) ⇔ C

ii. R ⇒ ( E ⇔ C )

iii. R ⇒ (( C ⇒ E ) ∨ ¬ E )

(b) (6) Which of the sentences in (a) can be expressed in Horn form? (i) (ii) (iii)

6. (18 pts.) First-Order Logic

(a) (12) Which of the following are correct translations of “No two adjacent countries have the same color”?

(i) ∀ x,y ¬ Country ( x ) ∨ ¬ Country ( y) ∨ ¬ Adjacent ( x, y ) ∨ ¬( Color ( x ) = Color ( y )). (ii) ∀ x,y ( Country ( x ) ∧ Country ( y ) ∧ Adjacent ( x, y ) ∧ ¬ ( x = y )) ⇒ ¬( Color ( x ) = Color ( y )). (iii) ∀ x,y Country ( x ) ∧ Country ( y ) ∧ Adjacent ( x,y ) ∧ ¬( Color ( x ) = Color ( y )). (iv) ∀ x,y ( Country ( x ) ∧ Country ( y ) ∧ Adjacent ( x,y )) ⇒ Color ( x ≠ y ).

(b) (6) Which of the following are valid sentences? (i) (∃ x x = x )⇒ (∀ y ∃ z y = z ). (ii) ∀ x P(x) ∨ ¬ P(x). (iii) ∀ x Smart ( x ) ∨ ( x = x )