This preview shows page 1. Sign up to view the full content.
Unformatted text preview: CS 188 Fall 1993 Introduction to AI Stuart Russell Midterm 1 You have 1 hour and 20 minutes. The exam is open-book, open-notes. You will not necessarily nish all questions, so do your best ones rst. Write your answers in blue books. Hand them all in. 60 points total. Panic not. 1. (15 pts.) De nitions 2. (12 pts.) Game-playing Provide brief, precise de nitions of the following: (a) (3) Accessible environment (b) (3) Truth table (c) (3) Evaluation function (d) (3) Complete search algorithm (e) (3) Sound inference rule In this question, we will consider the problem of search in a game tree when each player knows the evaluation function used by the other. The rst change to the basic program is that evaluate will return a list of two values, indicating (say) the likelihood of a win for Max according to Max and Min respectively. (a) (4) Copy and complete the following game tree by lling in the backed-up value pairs for all remaining nodes. Mark on your tree the move that should be taken at the root.
to move MAX ( ) leaf values are according to (max min) MIN ( ) ( ) MAX (3 5) ( -1 7 ) ( 2 0) ( 4 6) (b) (4) The following code implements backing-up in a regular minimax algorithm:
(defun backed-up-value (side state depth limit) (if (= depth limit) (evaluate side state) (apply (if (oddp depth) #'min #'max) (mapcar #'(lambda (s) (backed-up-value (opponent side) s (1+ depth) limit)) (successors state)))) Rewrite backed-up-value so that it works correctly with the new information. You may wish to use the functions the-biggest and the-smallest. (the-biggest f l) returns the element of l with the largest value of the function f, eg (the-biggest #'abs '(-2 4 -7)) = -7.] (c) (4) (Open-ended) Can alpha-beta pruning be applied in any straightforward way with the two-valued evaluation function? If so, how? If not, why not? 3. (12 pts.) Simple knowledge representation Translate each of the following English sentences into the language of standard rst-order logic, stating the intended interpretation for any predicate, function or constant you use. 1 4. (9 pts.) Logical Inference (a) (b) (c) (d) (3) \All PCs are computers." (3) \If someone owns a PC, then there is some computer that they own." (3) \MaryBeth owns a PC." (3) \Anyone who owns a computer is a dweeb." Write this as a rst-order Horn clause.] 5. (12 pts.) Situation calculus Consider the sentences in the previous question. (a) (1) Does 3(a) logically entail 3(b)? (Yes or No) (b) (1) Does 3(b) logically entail 3(a)? (Yes or No) (c) (2) Apply Existential Elimination to 3(c). (d) (5) Consider a knowledge base containing the sentences obtained in 3(a) 3(d) and 4(c). Show exactly how backward-chaining solves the query \Who is a dweeb?" Draw the proof tree, with uni ers, in the manner shown in chapter 9, p.183. Assume that we have logical sentences in a KB describing the distances between adjacent towns in Romania. For example Distance(Arad Sibiu 140) Distance(Sibiu Fagaras 99) The state of the agent is given by its location and fuel level. It gets 50km/gallon. (a) (5) Write axioms to de ne the PathDistance predicate which describes the length of a path through a given list of cities, for example PathDistance( Arad Sibiu Fagaras] 239) Hint: start with the base case when the path contains only one city. Then do the recursive case. You may use the x l] notation de ned in chapter 7 on p.128.] (b) (5) Write a situation calculus axiom de ning the positive e ects of the action FollowPath(p). Describe both the change in location and the change in fuel level. You must state the appropriate preconditions for following the path successfully, but need not describe what happens if those conditions are not met. You may use the function Last(l) which denotes the last element of a list, as well as any arithmetic functions. Note: this axiom does not need to be recursive. Just state the result of getting to the end of the path.] (c) (2) Describe (in words) what sorts of frame axioms you would need, if any, for this world description.
j 2 ...
View Full Document
This note was uploaded on 05/17/2009 for the course CS 188 taught by Professor Staff during the Spring '08 term at Berkeley.
- Spring '08
- Computer Science