Computer Science 188 - Spring 1993 - Russell - Final Exam

Computer Science 188 - Spring 1993 - Russell - Final Exam -...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: CS188 Spring 1993 Intro to AI Stuart Russell Final examination You have 2 hours 50 min. The exam is open-book, open-notes. There a total of 110 points available. Only 100 points are required for full credit. Write your answers in blue books. Hand them all in. Several of the questions on this exam are true/false or multiple choice. In all the multiple choice questions more than one of the choices may be correct. Give all correct answers. Each multiple choice question will be graded as if it consisted of a set of true/false questions, one for each possible answer. 1. (12 pts.) De nitions Provide brief, precise de nitions of the following: (a) (b) (c) (d) (e) (f) Turing test Uni er Coercible world Partial-order planner Singly-connected network Perceptron 2. (20 pts.) Logical Inference 3. (17 pts.) Search in games From \Horses are animals", it follows that \The head of a horse is the head of an animal". Demonstrate that this inference is valid by carrying out the following steps: (a) (5) Translate the premise and the conclusion into the language of rst-order logic. Use three predicates: Head-of(x y): x is the head of y. Horse(x): x is a horse. Animal(x): x is an animal. (b) (6) Negate the conclusion, and convert the premise and the negated conclusion into conjunctive normal form. (c) (7) Use resolution to show that the conclusion follows from the premise. (a) (3) The following code implements minimax search in a two-player game: (defun choose (side state limit) (the-biggest #'(lambda (s) (backed-up-value (opponent side) state 1 limit)) (successors state))) (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)))) Is the search breadth- rst or depth- rst? For parts b) through f), use an evaluation function de ned as f = Number of rows, columns or diagonals containing only X's minus number of rows, columns or diagonals containing only O's. 1 4. (16 pts.) Decision theory and the value of information (b) (4) Show the game tree for tictactoe starting from an empty board down to depth 2, (i.e. one X and one O on the board), taking symmetry into account. You should have 3 positions at level 1 and 12 at level 2. (c) (3) Mark on your tree the evaluations of all the positions at level 2. (d) (2) Mark on your tree the backed-up values for the positions at levels 1 and 0, using the minimax algorithm, and use them to choose the best starting move. (e) (2) Circle the nodes at level 2 that would not be evaluated if alpha-beta pruning were applied, with the nodes generated left-to-right in the order you have shown. (f) (3) (Open ended, don't write for more than 5 minutes unless you have extra time. No BS!) Suppose we play a variant of tictactoe in which each player sees only their own moves. If they make a move on a square occupied by an opponent, the board \beeps" and they get another try. Would the backgammon model su ce for this game, or would we need something more sophisticated? Why? In this question, let Ai be an action, let K be the agent's current information, let U be the agent's utility function on world states Wj . Also, let argmaxx (f(x)) denote the value of x that gives the highest value of f(x), and let maxx (f(x)) be the highest value of f(x) over all possible values of x. (a) (3) Give a mathematical expression that evaluates to the action that a rational agent should take. (b) (4) Multiple choice: In many situations, as well as simply choosing an action one also has the option to obtain additional information E, although usually at some cost. Let the possible values of E be denoted by ek . The value of obtaining evidence E is de ned as the di erence between the expected value of acting rationally with knowledge of E and the expected value of acting rationally without knowledge of E. Which of the following equations express this, given that the value of the information must be calculated before the information is known? i. V (E) = ii. V (E) = iii. V (E) = maxA i X P (E = ek Ai K)maxA X U(Wj)P(Wj Ai K E = ek) X P (E = ek K)maxA X U(Wj )P(Wj Ai K E = ek) k j i k j i j j ; maxAi X U(Wj )P(Wj K) j j j X P(E = ek K) X U(Wj)P (Wj Ai K E = ek) k j j j ; maxAi X U(Wj)P(Wj Ai K) X U(Wj )P(Wj Ai K) j j j j j ; maxAi 5. (12 pts.) Learning in agents (c) (6) Multiple choice: Suppose you are asked to choose one of k identical doors, behind only one of which is a prize of C dollars. What is the most you should be willing to pay to sneak a peek behind the rst door before having to choose your door? i. C=k ii. C=(k + 1) iii. (k ; 1)C=k2 (d) (3) True/false: If you are allowed to buy a peek behind doors 1 and 2, it is just as good to buy two peeks at the start as to buy one, then decide whether or not to buy the second after seeing the rst. (a) (6) Consider the following data, each consisting of three input bits and a classi cation bit: (111,1) (110,1) (011,1) (010,0) (000,0). i. (3) Draw a decision tree consistent with this data. ii. (3) Draw a neural network (using a threshold activation function) consistent with this data. 2 6. (15 pts.) Natural language (b) (6) Consider a learning program LP as taking a set of classi ed examples as input, and returning a function that is supposed to calculate the appropriate classi cation given an unclassi ed example. Show how to use LP to construct a learning agent LA. The agent should learn from percepts that include the correct action to take, as well as doing the action. When a percept arrives that does not include the correct action, it should respond with the action that its past experience indicates might be appropriate. Write LA, either in pseudocode or LISP, being as precise as possible. Don't worry about e ciency. If you're not sure that your code is completely transparent, you might want to include a little comment. (a) (6) Consider the following sentence: Someone walked slowly to the Safeway. and the following set of context-free rewrite rules which give the grammatical categories of the individual words of the sentence: Pronoun !\someone" V !\walked" Adv !\slowly" Prep !\to" Det !\the" Noun !\Safeway" Which of the following three sets of rewrite rules, when added to the above rules, yield context-free grammars which can generate the above sentence? (A): (B): (C): S !NP VP S !NP VP S !NP VP NP !Pronoun NP !Pronoun NP !Pronoun NP !Det Noun NP !Noun NP !Det NP VP !VP PP NP !Det NP VP !V Adv VP !VP Adv Adv VP !V Vmod Adv !Adv Adv VP !V Vmod !Adv Vmod Adv !PP PP !Prep NP Vmod !Adv PP !Prep NP NP !Noun Adv !PP NP !Noun PP !Prep NP (b) (2) Write down at least one other English sentence generated by Grammar (B) above. It should be signi cantly di erent from the above sentence, and should be at least six words long. Do not use any of the words from the above sentence instead, add grammatical rules of your own, of the form (grammatical category) !(speci c word)|for instance, Noun ! \bottle". (c) (2) Show the parse tree for your sentence. (d) (5) Which of the following: (A) \Only gentlemen of a certain stripe drink red wine with sh." (B) \The astronomy professor's presentation exhibited stellar brilliance." (C) \This classroom is on a major fault line." exhibit i. Context-sensitive reference? ii. Noun-noun modi cation? iii. Noncompositional meaning? iv. Word-level ambiguity? v. Idiomatic phrases (common constructions that cannot be understood by analysis into parts)? 3 7. (18 pts.) Perception and robotics using belief networks In this question we will consider part of the problem of building a robot that plays ping pong. One of the things it will have to do is nd out where the ball is and estimate its trajectory. Let's suppose for a moment that we have a vision system that can return an estimated instantaneous (x,y,z) position for the ball. This position estimate for time ti will be used as an evidence node Oi in a belief network that infers the desired information. The idea is that nodes Xi and Vi in the network represent the ball's instantaneous position, and velocity. The trajectory of the ball is followed by having multiple copies of these nodes, one for each time step. In addition to these nodes, we also have nodes for the instantaneous friction force Fi acting on the ball due to air resistance, which depends only on the current velocity. The times t1 , t2 , t3 : : : can be assumed to be separated by some small interval t. (a) (4) Multiple choice: Which of the following belief networks correctly (but not necessarily e ciently) represent the above information? (You may assume that second-order e ects | proportional to t2 | are ignored.) F1 F2 F3 F1 F2 F3 F1 F2 F3 V1 V2 V3 V1 V2 V3 V1 V2 V3 X1 X2 X3 X1 X2 X3 X1 X2 X3 O1 O2 O3 O1 O2 O3 O1 O2 O3 i) ii) iii) (b) (1) Multiple choice: Which is the best network? (c) (1) Multiple choice: Which networks can be solved by local propagation algorithms? (d) (4) The nodes in the networks shown above refer to past and present times. Explain how the network can be extended and used to predict the position at any future time. (e) (6) Now consider the vision subsystem, whose job it is to provide the observation evidence. Its input is an array of intensity values from the camera image. Assuming that the ball is white, while most of the room is darker, explain brie y how to calculate the position of the ball given the array. (f) (2) Does it make more sense to calculate the position in coordinates relative to the robot or relative to the room? Why? 4 ...
View Full Document

Ask a homework question - tutors are online