Final Exam. CS 188 Fall Introduction to Artificial Intelligence

Size: px
Start display at page:

Download "Final Exam. CS 188 Fall Introduction to Artificial Intelligence"

Transcription

1 CS 188 Fall 2018 Introduction to rtificial Intelligence Final Exam You have 180 minutes. The time will be projected at the front of the room. You may not leave during the last 10 minutes of the exam. Do NOT open exams until told to. Write your SIDs in the top right corner of every page. If you need to go to the bathroom, bring us your exam, phone, and SID. We will record the time. In the interest of fairness, we want everyone to have access to the same information. To that end, we will not be answering questions about the content. If a clarification is needed, it will be projected at the front of the room. Make sure to periodically check the clarifications. The exam is closed book, closed laptop, and closed notes except your three-page double-sided cheat sheet. You are allowed a non-programmable calculator for this exam. Turn off and put away all other electronics. The last two sheets in your exam are scratch paper. Please detach them from your exam. Mark your answers ON THE EXM IN THE DESIGNTED NSWER RES. We will not grade anything on scratch paper. For multiple choice questions: means mark LL options that apply means mark ONE choice When selecting an answer, please fill in the bubble or square COMPLETELY ( and ) First name Last name SID Student to the right (SID and Name) Student to the left (SID and Name) Q1. gent Testing Today! /1 Q2. Short Questions /14 Q3. Treasure Hunting MDPs /12 Q4. pproximate Q-learning /8 Q5. Value of symmetric Information /16 Q6. Bayes Net Modeling /12 Q7. Help the Farmer! /14 Q8. Bayes Nets and RL /15 Q9. Decision Trees /8 Total /100 1

2 THIS PGE IS INTENTIONLLY LEFT BLNK

3 Q1. [1 pt] gent Testing Today! SID: It s testing time! Not only for you, but for our CS188 robots as well! Circle your favorite robot below. ny answer was acceptable. 3

4 Q2. [14 pts] Short Questions (a) [2 pts] Which of the following properties must a set of preferences satisfy if they are rational: ( B) OR (B ) OR (B ) (B ) ND (C ) (C B) ( B) ND (B C) [p, ; 1 p, B] [q, B; 1 q, C] B C D [p, ; 1 p, C] [p, B; 1 p, D] (B ) ND (C B) (C ) The first one is the orderability axiom that all rational preferences must satisfy. The second one is false, you could consider the utility function U() = 1, U(B) = 2, U(C) = 3 which satisfies the premises but U(B) U(C). The second one is true since, B, and C are equally preferable any lottery with those preferences is also equally preferable. It follows directly from the substitutability axiom. The fourth and fifth statements follow from the transitivity axiom. (b) [2 pts] Which of the following are true? Given a set of preferences there exists a unique utility function. U(x) = x 4 is a risk prone utility U(x) = 2x is a risk prone utility For any specific utility function, any lottery can be replaced by an appropriate deterministic utility value For the lotteries = [0.8, $4000; 0.2, $0], B = [1.0, $3000; 0.0, $0] we have B Given a set of preferences there exists an infinite number of utility functions, you may consider a fixed utility function and then apply a monotonic increasing function to it. This will result in a new utility function for that set of preferences. The second statement is risk prone since U(L) > U(EMV(L)). The third statement is risk neutral U(L) = U(EMV(L)). The fourth statement is true since given a lottery and a utility function, we consider the utility of it as the expected utility value for that lottery. The last statement is false: we can consider the utility function log(x), then we have 0.8 log(4000) < log(3000). (c) [2 pts] Which of the following paths is a feasible trajectory for the gradient ascent algorithm? 4

5 SID: B C D E F is a gradient ascent path since the gradient lines are orthogonal to the contours and the point towards the maximum. B is also a gradient ascent path with a high learning rate. C is not because the path is going towards the minimum instead of the maximum. D is not a gradient ascent path since the gradient is not orthogonal to the contour lines. E is not a gradient ascent path since it starts going towards the minimum. F is not since it goes towards the minimum and the gradients are not orthogonal to the contour lines. 5

6 (d) We are given the following 5 neural networks (NN) architectures. The operation represents the matrix multiplication operation, [w i1...w ik ] and [b i1...b ik ] represents the weights and the biases of the NN, the orientation (vertical and horizontal) its just for consistency in the operations. The term [ReLU σ] in B means applying a ReLU activation to the first element of the vector and a sigmoid (σ) activation to the second element. These operations are depicted in the following figures: Which of the following neural networks can represent each function? (i) [2 pts] f I (x) : B C D E and B cannot represent this plot since the ReLU activation results in a flat semi-line. C can represent it by having w 11 = 1, w 12 = 1, w 21 = 1, w 22 = 1 and the rest of the parameters being 0. D cannot because the sigmoid activations are non-linear. E is a linear function and therefore can represent the identity. (ii) [2 pts] f II (x) : B C D E This is a piecewise linear function with 6 pieces. s a result you can represent it by lineraly combining 5 ReLU functions. The only possible graph that can represent this function is C. 6

7 (iii) [2 pts] f III (x): B C D E This is a piecewise linear function with 2 pieces. This can be obtained by linearly combining to ReLU functions. The only possible solution is then C. Note that cannot represent this function since the last ReLU of the network would result in a flat semi-line. (iv) [2 pts] f IV (x) : B C D E This function corresponds to a scaled sigmoid function., C, E cannot represent any non-linear or nonpiecewise linear functions. B can represent it by setting w 11 = b 11 = 0. D does not work because the composition of sigmoid with sigmoid is not a sigmoid. SID: 7

8 Q3. [12 pts] Treasure Hunting MDPs In each below Gridworld, Pacman s starting position is denoted as P. G denotes the goal. t the goal, Pacman can only Exit, which will cause Pacman to exit the Gridworld and gain reward The Gridworld also has K gold nuggets g 1,..., g k which will have the properties listed below in each part. Pacman automatically picks up a gold nugget if he enters a square containing one. Finally, define P 0 as Pacman s initial state, where he is in position P and has no gold nuggets. (a) (b) (c) (a) Pacman now ventures into (a). Each gold nugget Pacman holds when he exits will add +100 to his reward, and he will receive +100 when he exits from the goal G. (i) [2 pts] When conducting value iteration, what is the first iteration at which V (P 0 ) is nonzero? nswer: 5 The shortest number of iterations is 5 because it takes 4 timesteps for Pacman to go from P to G, and 1 more timestep for Pacman to exit from the goal. It takes far more iterations for Pacman to gain reward by picking up g 1 and then exiting from G. (ii) [2 pts] ssume Pacman will act optimally. What nonzero discount factor γ ensures that the policy of picking up g 1 before going to goal G and the policy of going straight to G yield the same reward? nswer: ( 1 2 )1/6 To solve for γ, we have the equation 200γ 11 = 100γ 5, where the left hand is the reward after picking up g 1, and the right hand is the reward after going straight to and exiting from the goal G. Solving this equation yields γ 6 = 1 2, γ = (b) Pacman is now at (b), which contains a Gold Store (S). He will receive +5 per nugget. When at the Store, Pacman can either Sell to sell all his gold for +5 per nugget or Exit to exit the Gridworld. Exiting from the Store yields 0 reward. Exiting from goal G will give k, where Pacman has k nuggets. Note that Pacman can also only carry one gold nugget at a time. (i) [2 pts] When conducting value iteration, what is the first iteration at which V (P 0 ) is nonzero? nswer: 7 It takes 7 steps for Pacman to pick up g 3 and carry it to the Store to sell it. ll other methods of obtaining reward, such as exiting from goal G, selling g 1, selling g 2, or selling some combination of nuggets, takes more time than to directly carry g 3 to the store and sell it. The distance between P and S is 6, as Pacman picks g 3 up on the way, and 1 more timestep is needed to do the action Sell. (ii) [2 pts] Now Pacman is in a world with a Store that is not necessarily the Gridworld (b). ssume Pacman is acting optimally, and he begins at the Store. It takes Pacman time T 1, T 2, T 3 to go from the Store, pick up the nuggets g 1, g 2, g 3 respectively, return to the store, and sell each nugget. It takes time T G to go from the Store and exit from the goal G. ssume T 1 < T 2 < T 3 < T G. What must be true such that the better policy for Pacman would be to gather and sell all nuggets and exit from the store rather than to gather all nuggets and exit from goal G? 5(γ T1 +γ T1+T2 +γ T1+T2+T3 ) > 115γ T1+T2+T3+T G 5(γ T1 + γ T2 + γ T3 ) > 100γ T G 5(γ T1 + γ T1+T2 + γ T1+T2+T3 ) > 115γ T G 5(γ T1 + γ T1+T2 + γ T1+T2+T3 ) > 100γ T G 15γ T1+T2+T3 > 115γ T G None of the above 8

9 The first solution, which was intended but incorrect, as well as None of the above were both awarded points due to unclear problem instructions. The clarification that Pacman cannot use the Store if he holds multiple gold nuggets was added during the exam. The intended solution was to select the first option. However, it is always more optimal to pick up the gold nuggets in a single round trip, rather than returning to the store each time after a nugget is picked up, so the expression 115γ T1+T2+T3+T G does not denote the reward if Pacman acts optimally and exits from the goal. Therefore, if we specify some time T G that is the optimal time to pick up all round trip gold nuggets and exit via the goal, then the reward when acting optimally and exiting from the goal is 115γ T G. However, we never specified any such value T G, and the correct answer was not one of the listed five inequalities. Because the true answer was not included in the options, None of the above is the correct answer. (c) Finally, Pacman finds himself in Gridworld (c). There is no store. However, Pacman finds that there is now a living reward! He gets the living reward for every action he takes except the Exit action. Pacman receives +0 exiting from the Door, and +100 exiting from the Goal. Once in the Door, Pacman can only Exit. (i) [2 pts] Suppose γ = 0.5. For what living reward will Pacman receive the same reward whether he exits via the Door or exits via the goal? nswer: 50 7 The rewards are the same if RL R L R L R L = R L. Solving this yields 7 8 R L = , which reduces to R L = = (ii) [2 pts] Suppose γ = 0.5. What is the living reward such that Pacman receives the same reward if he traverses the Gridworld forever or if he goes straight to and exits from the goal? Hint: t=0 rγt = r 1 γ nswer: 50 SID: R He would want to go around forever if L = R L, which can be reduced to 2R L = R L, or 1 8 R L = = 50. The 8 in the first equation is from R L R L R L R L that Pacman accumulated on the way to the goal G. 9

10 Q4. [8 pts] pproximate Q-learning (a) [2 pts] Pacman is trying to collect all food pellets, and each treasure chest contains 10 pellets but must be unlocked with a key. Pacman will automatically pick up a pellet or key when he enters a square containing them, and he will automatically unlock a chest when he enters a square with a chest and has at least one key. key can only unlock on chest; after being used, it vanishes. To finish, Pacman must exit through either goal G 1 or G 2. The keys are shown on the map as a K, treasure chests as T, and food pellets as circles. Pacman s starting position is shown as P. The goals are G 1, G 2. When calculating features for a Q-function Q(s, a), the state the features are calculated with is the state s Pacman is in after taking action a from state s. The possible features the Q-learning can use are: N keys : Number of keys Pacman holds. D m (K): Manhattan distance to closest key. N chests : Number of chests Pacman has unlocked. D m (T ): Manhattan distance to closest chest. N food : Number of food pellets Pacman has eaten. D m (F ): Manhattan distance to closest food pellet. D m (G 1 ): Manhattan distance to G 1. D m (G 2 ): Manhattan distance to G 2. Note that the approximate Q-learning here can be any function over the features, not necessarily a weighted linear sum. Suppose we finished training an agent using approximate Q-learning and we then run the learned policy to observe the following. ssume we observe all the above paths. What is the minimal set of features that could have been used to learn this policy? N keys D m (K) N chests D m (T ) N food D m (F ) D m (G 1 ) D m (G 2 ) No features Due to the phrasing of the problem, there is some ambiguity regarding the precise minimal feature set. Full credit was given to answers that chose D m (G 1 ), at least one of {N keys, D m (K)}, at least one of {N food, D m (F )}, and did not pick any of {N chests, D m (T ), D m (G 2 )}. In episodes 1 and 3 above, Pacman walks in the direction of G 1 ; of the features provided only D m (G 1 ) could be used to learn this behavior. Based on episode 3 above, Pacman is willing to move away from G 1 to gather a food pellet. Since the food pellet is just one square away, either N food or D m (F ) could be used to learn this behavior. t the same time, after collecting the first key Pacman chooses to collect the second key instead of picking up the pellet right away; this can be explained by the use of either N keys or D m (K). Moving towards/away from the treasure chest is not required to explain Pacman s behavior, so the choices N chests and D m (T ) are incorrect. The feature D m (G 2 ) is not required, either. In episode 2, Pacman begins by collecting the key and two food pellets. t that point, moving either up or right would bring Pacman closer to G 1, so Pacman could have 10

11 broken the tie in favor of G 2, at which point Pacman happens to stumble across the second goal and the episode ends. (b) Suppose Pacman is now in an empty grid of size M M. For a Q-value Q(s, a), the features are the x- and y-position of the state Pacman is in after taking action a. Select Possible with weighted sum if the policy can be expressed by using a weighted linear sum to represent the Q-function. Select Possible with large neural net if the policy can be expressed by using a large neural net to represent the Q-function. Select Not Possible if expressing the policy with given features is impossible no matter the function. (i) [2 pts] Pacman s optimal policy is always to go upwards. Possible with large neural net Possible with weighted linear sum Not Possible (ii) [2 pts] We draw a vertical line and divide the Gridworld into two halves. SID: On the left half, Pacman s optimal policy is to go upwards, and on the right half, Pacman s optimal policy is to go downwards. Possible with large neural net Possible with weighted linear sum Not Possible (iii) [2 pts] We draw a vertical line and divide the Gridworld into two equal halves. On the left half, Pacman s optimal policy is to go upwards, and on the right half, Pacman s optimal policy is to go right. Possible with large neural net Possible with weighted linear sum Not Possible The key in this part is understanding that a large enough neural net can approximate any function, so it is always possible to use a large neural net to represent the Q-functions and express a certain policy. The first is possible with a weighted linear sum, for example, 0 x + 1 y, so Q-values are larger for states with larger y values. The second is not possible with a weighted linear sum. To make going up optimal, Q-values with larger y-values must be similarly larger. In the right half, this must be the opposite. However, the x features for two positions (x, y+1) and (x, y-1), e.g., one position is higher than the other, are the same, meaning that the x feature can only create offsets between the weighted linear sums for those states and not actually reverse the magnitude to cause (x, y-1) to have a larger Q-value than (x, y+1). That is, for some weights w x, w y, the difference in Q-values between (x, y+1), (x, y-1) is w x x+w y (y+1) (w x x+w y (y 1)) = w x x+w y y+w y w x x w y y+w y = 2w y, and is independent of both x-position and w x. The third is not possible with a weighted linear sum. For two positions (x, y+1) and (x + 1, y), we can calculate the difference in Q-values for the given positions given any weights w x, w y. The difference is then w x x + w y (y + 1) (w x (x + 1) + w y y) = w x x + w y y + w y w x x w x w y y = w y w x. We see then that this is actually completely independent of the positions and the difference will therefore always be fixed; Pacman cannot prefer to go up in some situations and right in others. 11

12 Q5. [16 pts] Value of symmetric Information lice and Bob are playing an adversarial game as shown in the game tree below. lice (the MX player) and Bob (the MIN player) are both rational and they both know that their opponent is also a rational player. The game tree has one chance node E whose outcome can be either E = 100 or E = +120 with equal 0.5 probability. lice Bob -20 E Each player s utility is equal to the amount of money he or she has. The value x of each leaf node in the game tree means that Bob will pay lice x dollars after the game, so that lice and Bob s utilities will be x and x respectively. (a) [2 pts] Suppose neither lice nor Bob knows the outcome of E before playing. What is lice s expected utility? nswer: 10 E s expectation is 10. Using minimax, both lice and Bob should go left. (b) Carol, a good friend of lice s, has access to E and can secretly tell lice the outcome of E before the game starts (giving lice the true outcome of E without lying). However, Bob is not aware of any communication between lice and Carol, so he still assumes that lice has no access to E. (i) [1 pt] Suppose Carol secretly tells lice that E = 100. What is lice s expected utility in this case? nswer: -20 Here, Bob will still go left as before since he isn t aware of lice s access to E. Given this, lice should now choose to go right when E = 100. (ii) [1 pt] Suppose Carol secretly tells lice that E = What is lice s expected utility in this case? nswer: 120 Here, Bob will still go left as before since he isn t aware of lice s access to E. Given this, lice should now choose to go left when E = (iii) [1 pt] What is lice s expected utility if Carol secretly tells lice the outcome of E before playing? nswer: = E is equally likely to be 100 or veraging the two cases above, We define the value of private information V pri (X) of a random variable X to a player as the difference in player s expected utility after the outcome of X becomes a private information to player, such that has access to the outcome of X, while other players have no access to X and are not aware of s access to X. (iv) [2 pts] In general, the value of private information V pri (X) of a variable X to a player always satisfies V pri (X) > 0 in all cases. always satisfies V pri (X) 0 in all cases. always satisfies V pri (X) = 0 in all cases. can possibly satisfy V pri (X) < 0 in certain cases. Since player can always choose to ignore this information and act in the same way as if he/she doesn t know this information, player is guaranteed to obtain at least the same utility as before, so V pri 12 (X) 0.

13 (v) [1 pt] What is V pri lice (E), the value of private information of E to lice in the specific game tree above? SID: nswer: 40 Subtracting the answer of (a) from the answer of (b, iii), = 40. (c) David also has access to E, and can make a public announcement of E (announcing the true outcome of E without lying), so that both lice and Bob will know the outcome of E and are both aware that their opponent also knows the outcome of E. lso, lice cannot obtain any information from Carol now. (i) [1 pt] Suppose David publicly announces that E = 100. What is lice s expected utility in this case? nswer: -20 Using minimax with E = 100, Bob will go left and lice will go right. (ii) [1 pt] Suppose David publicly announces that E = What is lice s expected utility in this case? nswer: 60 Using minimax with E = +120, Bob will go right and lice will go left. (iii) [1 pt] What is lice s expected utility if David makes a public announcement of E before the game starts? nswer: = E is equally likely to be 100 or veraging the two cases above, We define the value of public information V pub (X) of a random variable X to a player as the difference in player s expected utility after the outcome of X becomes a public information, such that everyone has access to the outcome of X and is aware that all other players also have access to X. (iv) [2 pts] In general, the value of public information V pub (X) of a variable X to a player always satisfies V pub (X) > 0 in all cases. always satisfies V pub (X) 0 in all cases. always satisfies V pub (X) = 0 in all cases. can possibly satisfy V pub (X) < 0 in certain cases. Player s utility may decrease if the outcome of X becomes a public information, since other players can now exploit this information to better play against player, especially in an adversarial setting. (v) [1 pt] What is V pub lice (E), the value of public information of E to lice in the specific game tree above? nswer: 10 Subtracting the answer of (a) from the answer of (c, iii), = 10. (vi) [2 pts] Let a = V pub lice (E) be the value of public information of E to lice. Suppose David will publicly announce the outcome of E if anyone (either lice or Bob) pays him b dollars (b > 0), and will make no announcement otherwise. Which of the following statements are True? The value of public information of E to Bob is V pub Bob (E) = a. If b < a, then lice should pay David b dollars. If b > a, then Bob should pay David b dollars. If b < a, then Bob should pay David b dollars. If b > a, then lice should pay David b dollars. There exists some value b > 0 such that both lice and Bob should pay David b dollars. There exists some value b > 0 such that neither lice nor Bob should pay David b dollars. Since lice and Bob s utilities always sum up to zero, if lice s utility increases by a after the outcome of E becomes a public information, then Bob s utility will certainly decrease by a, so V pub Bob (E) = a. lice should pay when b < V pub pub lice (E) = a, and Bob should pay when b < VBob (E) = a, which cannot happen simultaneously since b > 0. When b is large enough (b > a ), then neither lice nor Bob should pay for the announcement. 13

14 Q6. [12 pts] Bayes Net Modeling (a) Modeling Joint Distributions For each of the Bayes Net (BN) models of the true data distribution, indicate if the new Bayes Net model is guaranteed to be able to represent the true joint distribution. If it is not able to, draw the minimal number of edges such that the resulting Bayes Net can capture the joint distribution, or indicate if it is not possible. (i) [2 pts] BN Model of True Data Distribution New Bayes Net Model Can new BN represent joint distribution of True Data Distribution? If no, draw arrows needed B C B C Yes No B C D D The two Bayes Net models make the same independence assumptions. (ii) [2 pts] BN Model of True Data Distribution B D New Bayes Net Model B Can new BN represent joint distribution of True Data Distribution? Not Possible If no, draw arrows needed B C C Yes No C D E D E Not Possible The new Bayes Net model encodes the independence assumptions B C and D E, which are not present in the BN model of the true data distribution. The edge B removes the assumption B C, and the edge D E removes the assumption D E. Using a different direction for either/both edges is also correct. (iii) [2 pts] BN Model of True Data Distribution B New Bayes Net Model B Can new BN represent joint distribution of True Data Distribution? D E If no, draw arrows needed B C D C D Yes No C D E E Not Possible The new Bayes Net model encodes the independence assumptions B C, E, C D B, E, and D B, E, which are not present in the BN model of the true data distribution. The edge B removes B C. The edge E removes E. The edge C D removes C D B, E and D B, E. Using a different edge direction E is also correct. E 14

15 (b) Bayes Nets and Classification Recall from class that we can use Bayes Nets for classification by using the conditional distribution of P (Y X 1, X 2,..., X n ), where Y is the class and each of the X i are the observed features. SID: ssume all we know about the true data distribution is that it can be represented with the True Distribution Model Bayes Net structure. Indicate if the new Bayes Net models are guaranteed to be able to represent the true conditional distribution, P (Y X 1, X 2,..., X n ). Mark Yes if it can be represented and No otherwise. For all subparts of this problem, the answer to the rightmost question (with edges X 1 Y, X 2 Y,... ) is Yes. These models contain a factor P (Y X 1, X 2,..., X n ) that can represent any conditional distribution. True Distribution Model Y Y Y (i) [2 pts] X 1 X 2 X1 X2 X3 X1 X2 X3 X 3 Yes No Yes No For the left Yes/No question: based on the true distribution model, we can conclude that P (Y X 1, X 2, X 3 ) = P (Y X 1, X 2 ). In other words, X 3 is not required to model the conditional distribution. If we set P (X 3 = x 3 ) = constant for all values x 3 in its domain, the new Bayes Net model will also have P (Y X 1, X 2, X 3 ) = P (Y X 1, X 2 ). With X 3 out of the picture, the remaining difference between the two models is the direction of a single edge between Y and X 1, which does not affect the ability to model the true conditional distribution. True Distribution Model Y Y Y (ii) [2 pts] B C X1 X2 X3 X1 X2 X3 X 1 X 2 X 3 Yes No Yes No For the left Yes/No question: starting with the true distribution model, we run variable elimination to eliminate, B, and C. The result would be exactly the model shown in the middle column, so we can conclude that the answer is Yes : the new model can represent the true conditional distribution. True Distribution Model Y Y Y (iii) [2 pts] B C X 1 X 2 X 3 X 4 X 5 X 1 X 2 X 3 X 4 X 5 X 1 X 2 X 3 X 4 X 5 Yes No Yes No 15

16 For the left Yes/No question: the true data distribution can have the property that Y = X 1 XOR X 2, constructed as follows. Let Y, X 1, and X 2 be binary random variables. Let take on values from the set {(0, 0), (0, 1), (1, 0), (1, 1)}. Let P ( = (0, 0) Y = 0) = P ( = (1, 1) Y = 0) = 0.5 and P ( = (0, 1) Y = 1) = P ( = (1, 0) Y = 1) = 0.5. Let X 1 equal the first element of s value with probability 1, and let X 2 equal the second element of s value with probability 1. However, the Naive Bayes model has X 1 X 2 Y, which can t represent the XOR function. s a result, the Naive Bayes model can t represent the true distribution model. 16

17 Q7. [14 pts] Help the Farmer! SID: Chris is a farmer. He has a hen in his barn, and it will lay at most one egg per day. Chris collects data and discovers conditions that influence his hen to lay eggs on a certain day, which he describes below. O P(O) +o 0.1 o 0.9 W P(W) +w 0.7 w 0.3 H W P(H W) +h +w 0.9 +h w 0.5 h +w 0.1 h w 0.5 S W O P(S W,O) +s +w +o 0.6 +s +w o 0.1 +s w +o 0.8 +s w o 0.1 s +w +o 0.4 s +w o 0.9 s w +o 0.2 s w o 0.9 E H S P(E H,S) +e +h +s 0.4 +e +h s 0.8 +e h +s 0.2 +e h s 0.6 e +h +s 0.6 e +h s 0.2 e h +s 0.8 e h s 0.4 E S O H W For a single hen, variables O, W, S, H, and E denote the event of an outbreak (O), sunny weather (W ), sickness (S), happiness (H), and egg being laid (E). If an event does occur, we denote it with a +, otherwise, e.g., +o denotes an outbreak having occurred and o denotes no outbreak occurred. (a) Suppose Chris wants to estimate the probability that the hen lays an egg given it s good weather and the hen is not sick, e.g., P (+e + w, s). Suppose we receive the samples: ( o, +w, s, h, +e), ( o, +w, s, +h, e), (+o, +w, s, h, e) (i) [2 pts] Similar to the likelihood weighing method, Chris weighs each of his samples after fixing evidence. However, he weighs each sample only with P ( s +w, O), i.e. he omits weighing by P (+w). Chris method results in the correct answer for the query P (+e + w, s). True False Because the probability P (+w) is constant, by not including it, the query after normalizing would be correct. (ii) [2 pts] Using likelihood weighting with the samples listed above, what is the probability the hen lays an egg given it s good weather and the hen is not sick, or P (+e + w, s)? Round your answer to the second decimal place or express it as a fraction simplified to the lowest terms The weights are for the first two and This gives us the estimation probability of (b) Chris uses Gibbs sampling to sample tuples of (O, W, S, H, E) , or a (i) [2 pts] s a step in our Gibbs sampling, suppose we currently have the assignment of ( o, w, +s, +h, +e). Then suppose we resample the sickness variable, i.e., S. What is the probability that the next assignment is the same, i.e., ( o, w, +s, +h, +e)? Round your answer to the second decimal point, or express it as a fraction simplified to the lowest terms..05 This is asking for the probability P (+s o, w, +e, +h). Mathematically, this is = This gives us P (+s, o, w,+e,+h) P (+s, o, w,+e,+h)+p ( s, o, w,+e,+h) =

18 (ii) [2 pts] What will be the most observed tuple of (O, W, S, H, E) if we keep running Gibbs sampling for a long time? Select one value from each column below to denote the assignment. +o o +w w +s s +h h +e e The most observed sample should be good weather, no outbreak, no sickness, happiness, and laying an egg. This yields probability of = (c) [3 pts] Suppose we adopt a sampling procedure where at each evidence node with probability 0.5 we fix to the evidence, otherwise we sample the outcome and reject if it doesn t match. Upon seeing an evidence node, write an expression for the value we will multiply into the weight of the sample to make this procedure consistent. The weight is initialized at the start as weight = 1. Your answer may use the variables s and p, where s is 1 if the coin flip told us to sample the evidence node, and p is the probability of the evidence given its parents. weight *= (1 s)p + s When the coin flip tells us to fix the evidence, we treat it like likelihood weighting and multiply by p. When the coin flip tells us to sample, we treat it like rejection sampling, so we don t need to change the weights. nice way of writing this is (1 s)p + s. Technically, we can also multiply by any constant (e.g..5 or p) since if every sample weight is scaled this cancels when we normalize weights to estimate probabilities. We also accepted answers written as piece-wise functions. Now, suppose there are 1000 hens, each independently modeled by the Bayes Net model below. Denote the random variables for sickness, happiness, and laying an egg as S i, H i, E i for hen i. The conditional probability tables are the same as above for each hen. E i S i O H i W (d) [3 pts] One day, Chris observed that all the hens lay eggs and the weather is bad. What s the probability of an outbreak happening? Round your answer to the second decimal point. Hint: P (O = +o, W = w, E i = +e i ) = and P (O = o, W = w, E i = +e i ) = for all i. P (+e i + o, w) = /P (+o, w) = /0.1/0.3 = 0.38 P (+e i o, w) = /P ( o, w) = /0.9/0.3 = P (O + e 1,..., +e 1000, w) P (O, +e 1,..., +e 1000, w) = 1000 i=1 P (+e i O, w)p (O)P ( w) By normalizing this, P (+o, +e 1,..., +e 1 000, w) = (0.38) (0.38) (0.66) = 1 1+(66/38)

19 Q8. [15 pts] Bayes Nets and RL SID: In this question, you will see that variable elimination can solve reinforcement learning problems. following Bayes net, where S t S, t, and R t {0, 1}: Consider the t-1 t t+1 S t S t+1 S t+2 R t R t+1 R t+2 (a) [2 pts] From the list below, select all the (conditional) independencies that are guaranteed to be true in the Bayes net above: S t+1 S t 1 S t, t R t+1 R t 1 S t, t R t+1 R t t+1 R t S t t+1 R t S t, t None of the above Let +r t:t denote the event R t = R t+1 = = R T = 1, and assume that P (a t ) = 1/. Define the following functions: β t (s t, a t ) = P (+r t:t s t, a t ), β t (s t ) = P (+r t:t s t ) = 1 β t (s t, a t ) a t Perform variable elimination to compute P ( t S t, +r t:t ). (b) [2 pts] Which of the following recursions does β t (s t, a t ) satisfy? β t (s t, a t ) = P (+r t s t ) s t+1 β t+1 (s t+1 ) β t (s t, a t ) = P (+r t s t ) s t+1 β t+1 (s t+1, a t ) β t (s t, a t ) = P (+r t+1 s t ) s t+1 β t+1 (s t+1, a t ) β t (s t, a t ) = P (+r t s t ) s t+1 P (s t+1 s t, a t )β t+1 (s t+1 ) β t (s t, a t ) = a t+1 P (+r t+1 s t+1 ) 1 None of the above s t+1 P (s t+1 s t, a t )β t+1 (s t+1 ) (c) [2 pts] Write P (a t s t, +r 1:T ) in terms of β t (s t, a t ), β t (a t ), and relevant probabilities from the Bayes net. P (a t s t, +r 1:T ) = βt(st,at) β P (+r t(s t) t s t ) P (a t s t, +r 1:T ) = βt(st,at) a t βt(st,a t ) P (a t s t, +r 1:T ) = βt(st,at) β t(s t) P (a t s t, +r 1:T ) = P (a t s t, +r 1:T ) = None of the above βt(st,at) P (+r t s t) P (+r t s t) β t(s t)β t(s t,a t) 19

20 So far, we have only discussed variable elimination in a certain Bayes net. Now, we will associate the Bayes net with an MDP with two parameters p, q (0, 1). The states are S = {x, y, z, w}, and the actions are = {a, b}. The transitions are described in this diagram: a (w/prob. p) a (w/prob. 1-p) x y z a b a, b b w a, b ll transitions are deterministic except when taking action a starting in state y this transition is determined by P (S t+1 = y S t = y, t = a) = p. The rewards are stochastic and depend only on state, taking on values in {0, 1} with probabilities P (+r t S t = x) = 1, P (+r t S t = y) = 1, P (+r t S t = z) = 0, P (+r t S t = w) = q Throughout the following questions, assume that p, q (0, 1). (d) [3 pts] Consider running the uniform policy π uniform ( t = a) = 1 2 is P ( 1 = a S 1 = x, +r 1:T +2 )? for T + 2 timesteps starting in state x. What p T +1 /(p T +1 + (2q) T +1 ) (2q) T +1 /(p T +1 +(2q) T +1 ) p T /(p T + 2 T q T +1 ) 2 T q T +1 /(p T + 2 T q T +1 ) p T /(p T + (2q) T ) (2q) T /(p T + (2q) T ) p T /(p T + q T ) q T /(p T + q T ) p T +1 /(p T +1 + q T +1 ) q T +1 /(p T +1 + q T +1 ) None of the above Since P ( 1 = a, +r 1:T +2 S 1 = x) = 1 2 x, +r 1:T +2 ) = p T /(p T + 2 T q T +1 ). ( 1 2 p) T and P (1 = b, +r 1:T +2 S 1 = x) = 1 2 qt +1, we get P ( 1 = a S 1 = (e) [2 pts] Suppose p > 2q (T +1)/T. When running π uniform, what is arg max z P ( 1 = z S 1 = x, +r 1:T +2 )? arg max z P ( 1 = z S 1 = x, +r 1:T +2 ) = a arg max z P ( 1 = z S 1 = x, +r 1:T +2 ) = b Cannot be determined If p > 2q (T +1)/T, then P ( 1 = a S 1 = x, +r 1:T +2 ) > 1/2, so a is the answer. (f) [2 pts] Suppose q > 2 T/(T +1). When running π uniform, what is arg max z P ( 1 = z S 1 = x, +r 1:T +2 )? arg max z P ( 1 = z S 1 = x, +r 1:T +2 ) = a arg max z P ( 1 = z S 1 = x, +r 1:T +2 ) = b Cannot be determined If q > 2 T/(T +1), then P ( 1 = a S 1 = x, +r 1:T +2 ) < p T /(p T + 1) < 1/2 because p < 1. So, the answer is b. (g) [2 pts] Consider running the optimal policy π for T + 1 timesteps starting in state x. When is π always guaranteed to choose b as its first action? 20

21 T > 1 (1 p)q T > 1 (1 q)p T > 1 (1 p)(1 q) T > 1 pq T < 1 (1 p)q T < 1 (1 q)p SID: T < 1 (1 p)(1 q) T < 1 pq None of the above In state y, the optimal policy will always choose action a, and its value is at most 1/(1 p). Meanwhile, in state w, the value is always qt. So, if qt > 1/(1 p), the optimal policy must go to state w, meaning that it must take action b at x. 21

22 Q9. [8 pts] Decision Trees You are given a dataset for training a decision tree. The goal is to predict the label (+ or -) given the features, B, and C. B C label First, consider building a decision tree by greedily splitting according to information gain. (a) [2 pts] Which features could be at the root of the resulting tree? Select all possible answers. B C and C yield maximal information gain at the root. (b) [2 pts] How many edges are there in the longest path of the resulting tree? Select all possible answers None of the above Regardless of the choice of the feature at the root, the resulting tree needs to consider all 3 features in a path, so there are 3 edges in that path. Now, consider building a decision tree with the smallest possible height. (c) [2 pts] Which features could be at the root of the resulting tree? Select all possible answers. B C The optimal decision tree first splits on B. For the B=0 branch, the next split is on ; for the B=1 branch, the next split is on C. (d) [2 pts] How many edges are there in the longest path of the resulting tree? Select all possible answers None of the above s can be seen from the answer to part (c), the optimal tree has two edges per path from the root to any leaf. 22

23 THIS PGE IS INTENTIONLLY LEFT BLNK

24 SCRTCH PPER INTENTIONLLY BLNK PLESE DETCH ME 24

25 SCRTCH PPER INTENTIONLLY BLNK PLESE DETCH ME 25

26 SCRTCH PPER INTENTIONLLY BLNK PLESE DETCH ME 26

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes.

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes. CS 188 Spring 2014 Introduction to Artificial Intelligence Final You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your two-page crib sheet. Mark your answers

More information

Midterm 2 V1. Introduction to Artificial Intelligence. CS 188 Spring 2015

Midterm 2 V1. Introduction to Artificial Intelligence. CS 188 Spring 2015 S 88 Spring 205 Introduction to rtificial Intelligence Midterm 2 V ˆ You have approximately 2 hours and 50 minutes. ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib

More information

CS 188 Fall Introduction to Artificial Intelligence Midterm 2

CS 188 Fall Introduction to Artificial Intelligence Midterm 2 CS 188 Fall 2013 Introduction to rtificial Intelligence Midterm 2 ˆ You have approximately 2 hours and 50 minutes. ˆ The exam is closed book, closed notes except your one-page crib sheet. ˆ Please use

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Fall 2018 Introduction to Artificial Intelligence Practice Final You have approximately 2 hours 50 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib

More information

Final. CS 188 Fall Introduction to Artificial Intelligence

Final. CS 188 Fall Introduction to Artificial Intelligence S 188 Fall 2012 Introduction to rtificial Intelligence Final You have approximately 3 hours. The exam is closed book, closed notes except your three one-page crib sheets. Please use non-programmable calculators

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Spring 2017 Introduction to Artificial Intelligence Midterm V2 You have approximately 80 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. Mark

More information

Introduction to Spring 2009 Artificial Intelligence Midterm Exam

Introduction to Spring 2009 Artificial Intelligence Midterm Exam S 188 Introduction to Spring 009 rtificial Intelligence Midterm Exam INSTRUTINS You have 3 hours. The exam is closed book, closed notes except a one-page crib sheet. Please use non-programmable calculators

More information

Final Exam December 12, 2017

Final Exam December 12, 2017 Introduction to Artificial Intelligence CSE 473, Autumn 2017 Dieter Fox Final Exam December 12, 2017 Directions This exam has 7 problems with 111 points shown in the table below, and you have 110 minutes

More information

CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm

CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm NAME: SID#: Login: Sec: 1 CS 188 Introduction to Fall 2007 Artificial Intelligence Midterm You have 80 minutes. The exam is closed book, closed notes except a one-page crib sheet, basic calculators only.

More information

Final Exam December 12, 2017

Final Exam December 12, 2017 Introduction to Artificial Intelligence CSE 473, Autumn 2017 Dieter Fox Final Exam December 12, 2017 Directions This exam has 7 problems with 111 points shown in the table below, and you have 110 minutes

More information

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes.

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes. CS 188 Spring 2013 Introduction to Artificial Intelligence Midterm II ˆ You have approximately 1 hour and 50 minutes. ˆ The exam is closed book, closed notes except a one-page crib sheet. ˆ Please use

More information

Introduction to Fall 2009 Artificial Intelligence Final Exam

Introduction to Fall 2009 Artificial Intelligence Final Exam CS 188 Introduction to Fall 2009 Artificial Intelligence Final Exam INSTRUCTIONS You have 3 hours. The exam is closed book, closed notes except a two-page crib sheet. Please use non-programmable calculators

More information

CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes

CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes CSL302/612 Artificial Intelligence End-Semester Exam 120 Minutes Name: Roll Number: Please read the following instructions carefully Ø Calculators are allowed. However, laptops or mobile phones are not

More information

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Summer 2015 Introduction to Artificial Intelligence Midterm 2 ˆ You have approximately 80 minutes. ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

More information

Final. CS 188 Fall Introduction to Artificial Intelligence

Final. CS 188 Fall Introduction to Artificial Intelligence CS 188 Fall 2012 Introduction to Artificial Intelligence Final You have approximately 3 hours. The exam is closed book, closed notes except your three one-page crib sheets. Please use non-programmable

More information

Introduction to Artificial Intelligence Midterm 2. CS 188 Spring You have approximately 2 hours and 50 minutes.

Introduction to Artificial Intelligence Midterm 2. CS 188 Spring You have approximately 2 hours and 50 minutes. CS 188 Spring 2014 Introduction to Artificial Intelligence Midterm 2 You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your two-page crib sheet. Mark your answers

More information

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. S 88 Summer 205 Introduction to rtificial Intelligence Final ˆ You have approximately 2 hours 50 minutes. ˆ The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Fall 2015 Introduction to Artificial Intelligence Final You have approximately 2 hours and 50 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 88 Fall 208 Introduction to Artificial Intelligence Practice Final You have approximately 2 hours 50 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

More information

Introduction to Fall 2011 Artificial Intelligence Final Exam

Introduction to Fall 2011 Artificial Intelligence Final Exam CS 188 Introduction to Fall 2011 rtificial Intelligence Final Exam INSTRUCTIONS You have 3 hours. The exam is closed book, closed notes except two pages of crib sheets. Please use non-programmable calculators

More information

CS 188 Fall Introduction to Artificial Intelligence Midterm 2

CS 188 Fall Introduction to Artificial Intelligence Midterm 2 CS 188 Fall 2013 Introduction to rtificial Intelligence Midterm 2 ˆ You have approximately 2 hours and 50 minutes. ˆ The exam is closed book, closed notes except your one-page crib sheet. ˆ Please use

More information

CS540 ANSWER SHEET

CS540 ANSWER SHEET CS540 ANSWER SHEET Name Email 1. 2. 3. 4. 5. 6. 7. 8. 9. 10. 11. 12. 13. 14. 15. 16. 17. 18. 19. 20. 1 2 Final Examination CS540-1: Introduction to Artificial Intelligence Fall 2016 20 questions, 5 points

More information

CSE 546 Final Exam, Autumn 2013

CSE 546 Final Exam, Autumn 2013 CSE 546 Final Exam, Autumn 0. Personal info: Name: Student ID: E-mail address:. There should be 5 numbered pages in this exam (including this cover sheet).. You can use any material you brought: any book,

More information

Final Exam, Spring 2006

Final Exam, Spring 2006 070 Final Exam, Spring 2006. Write your name and your email address below. Name: Andrew account: 2. There should be 22 numbered pages in this exam (including this cover sheet). 3. You may use any and all

More information

Final Exam, Machine Learning, Spring 2009

Final Exam, Machine Learning, Spring 2009 Name: Andrew ID: Final Exam, 10701 Machine Learning, Spring 2009 - The exam is open-book, open-notes, no electronics other than calculators. - The maximum possible score on this exam is 100. You have 3

More information

Introduction to Spring 2006 Artificial Intelligence Practice Final

Introduction to Spring 2006 Artificial Intelligence Practice Final NAME: SID#: Login: Sec: 1 CS 188 Introduction to Spring 2006 Artificial Intelligence Practice Final You have 180 minutes. The exam is open-book, open-notes, no electronics other than basic calculators.

More information

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes.

Midterm II. Introduction to Artificial Intelligence. CS 188 Spring ˆ You have approximately 1 hour and 50 minutes. CS 188 Spring 2013 Introduction to Artificial Intelligence Midterm II ˆ You have approximately 1 hour and 50 minutes. ˆ The exam is closed book, closed notes except a one-page crib sheet. ˆ Please use

More information

Name: UW CSE 473 Final Exam, Fall 2014

Name: UW CSE 473 Final Exam, Fall 2014 P1 P6 Instructions Please answer clearly and succinctly. If an explanation is requested, think carefully before writing. Points may be removed for rambling answers. If a question is unclear or ambiguous,

More information

) (d o f. For the previous layer in a neural network (just the rightmost layer if a single neuron), the required update equation is: 2.

) (d o f. For the previous layer in a neural network (just the rightmost layer if a single neuron), the required update equation is: 2. 1 Massachusetts Institute of Technology Department of Electrical Engineering and Computer Science 6.034 Artificial Intelligence, Fall 2011 Recitation 8, November 3 Corrected Version & (most) solutions

More information

Midterm. Introduction to Machine Learning. CS 189 Spring Please do not open the exam before you are instructed to do so.

Midterm. Introduction to Machine Learning. CS 189 Spring Please do not open the exam before you are instructed to do so. CS 89 Spring 07 Introduction to Machine Learning Midterm Please do not open the exam before you are instructed to do so. The exam is closed book, closed notes except your one-page cheat sheet. Electronic

More information

Introduction to Spring 2009 Artificial Intelligence Midterm Solutions

Introduction to Spring 2009 Artificial Intelligence Midterm Solutions S 88 Introduction to Spring 009 rtificial Intelligence Midterm Solutions. (6 points) True/False For the following questions, a correct answer is worth points, no answer is worth point, and an incorrect

More information

Final. Introduction to Artificial Intelligence. CS 188 Summer 2014

Final. Introduction to Artificial Intelligence. CS 188 Summer 2014 S 188 Summer 2014 Introduction to rtificial Intelligence Final You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your two-page crib sheet. Mark your answers ON

More information

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes.

Final. Introduction to Artificial Intelligence. CS 188 Spring You have approximately 2 hours and 50 minutes. CS 188 Spring 2013 Introduction to Artificial Intelligence Final You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except a three-page crib sheet. Please use non-programmable

More information

Midterm. Introduction to Artificial Intelligence. CS 188 Summer You have approximately 2 hours and 50 minutes.

Midterm. Introduction to Artificial Intelligence. CS 188 Summer You have approximately 2 hours and 50 minutes. CS 188 Summer 2014 Introduction to Artificial Intelligence Midterm You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your one-page crib sheet. Mark your answers

More information

Introduction to Fall 2008 Artificial Intelligence Midterm Exam

Introduction to Fall 2008 Artificial Intelligence Midterm Exam CS 188 Introduction to Fall 2008 Artificial Intelligence Midterm Exam INSTRUCTIONS You have 80 minutes. 70 points total. Don t panic! The exam is closed book, closed notes except a one-page crib sheet,

More information

Midterm, Fall 2003

Midterm, Fall 2003 5-78 Midterm, Fall 2003 YOUR ANDREW USERID IN CAPITAL LETTERS: YOUR NAME: There are 9 questions. The ninth may be more time-consuming and is worth only three points, so do not attempt 9 unless you are

More information

Final Exam, Fall 2002

Final Exam, Fall 2002 15-781 Final Exam, Fall 22 1. Write your name and your andrew email address below. Name: Andrew ID: 2. There should be 17 pages in this exam (excluding this cover sheet). 3. If you need more room to work

More information

16.4 Multiattribute Utility Functions

16.4 Multiattribute Utility Functions 285 Normalized utilities The scale of utilities reaches from the best possible prize u to the worst possible catastrophe u Normalized utilities use a scale with u = 0 and u = 1 Utilities of intermediate

More information

CS181 Midterm 2 Practice Solutions

CS181 Midterm 2 Practice Solutions CS181 Midterm 2 Practice Solutions 1. Convergence of -Means Consider Lloyd s algorithm for finding a -Means clustering of N data, i.e., minimizing the distortion measure objective function J({r n } N n=1,

More information

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet.

The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. CS 188 Spring 2017 Introduction to Artificial Intelligence Midterm V2 You have approximately 80 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. Mark

More information

CS 188 Introduction to AI Fall 2005 Stuart Russell Final

CS 188 Introduction to AI Fall 2005 Stuart Russell Final NAME: SID#: Section: 1 CS 188 Introduction to AI all 2005 Stuart Russell inal You have 2 hours and 50 minutes. he exam is open-book, open-notes. 100 points total. Panic not. Mark your answers ON HE EXAM

More information

CS 188: Artificial Intelligence Spring Announcements

CS 188: Artificial Intelligence Spring Announcements CS 188: Artificial Intelligence Spring 2011 Lecture 12: Probability 3/2/2011 Pieter Abbeel UC Berkeley Many slides adapted from Dan Klein. 1 Announcements P3 due on Monday (3/7) at 4:59pm W3 going out

More information

CS221 Practice Midterm

CS221 Practice Midterm CS221 Practice Midterm Autumn 2012 1 ther Midterms The following pages are excerpts from similar classes midterms. The content is similar to what we ve been covering this quarter, so that it should be

More information

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October,

MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October, MIDTERM: CS 6375 INSTRUCTOR: VIBHAV GOGATE October, 23 2013 The exam is closed book. You are allowed a one-page cheat sheet. Answer the questions in the spaces provided on the question sheets. If you run

More information

Andrew/CS ID: Midterm Solutions, Fall 2006

Andrew/CS ID: Midterm Solutions, Fall 2006 Name: Andrew/CS ID: 15-780 Midterm Solutions, Fall 2006 November 15, 2006 Place your name and your andrew/cs email address on the front page. The exam is open-book, open-notes, no electronics other than

More information

Name: Exam 2 Solutions. March 13, 2017

Name: Exam 2 Solutions. March 13, 2017 Department of Mathematics University of Notre Dame Math 00 Finite Math Spring 07 Name: Instructors: Conant/Galvin Exam Solutions March, 07 This exam is in two parts on pages and contains problems worth

More information

Machine Learning, Fall 2009: Midterm

Machine Learning, Fall 2009: Midterm 10-601 Machine Learning, Fall 009: Midterm Monday, November nd hours 1. Personal info: Name: Andrew account: E-mail address:. You are permitted two pages of notes and a calculator. Please turn off all

More information

CS 4100 // artificial intelligence. Recap/midterm review!

CS 4100 // artificial intelligence. Recap/midterm review! CS 4100 // artificial intelligence instructor: byron wallace Recap/midterm review! Attribution: many of these slides are modified versions of those distributed with the UC Berkeley CS188 materials Thanks

More information

Using first-order logic, formalize the following knowledge:

Using first-order logic, formalize the following knowledge: Probabilistic Artificial Intelligence Final Exam Feb 2, 2016 Time limit: 120 minutes Number of pages: 19 Total points: 100 You can use the back of the pages if you run out of space. Collaboration on the

More information

Uncertainty. Michael Peters December 27, 2013

Uncertainty. Michael Peters December 27, 2013 Uncertainty Michael Peters December 27, 20 Lotteries In many problems in economics, people are forced to make decisions without knowing exactly what the consequences will be. For example, when you buy

More information

Exam III #1 Solutions

Exam III #1 Solutions Department of Mathematics University of Notre Dame Math 10120 Finite Math Fall 2017 Name: Instructors: Basit & Migliore Exam III #1 Solutions November 14, 2017 This exam is in two parts on 11 pages and

More information

CSC321 Lecture 22: Q-Learning

CSC321 Lecture 22: Q-Learning CSC321 Lecture 22: Q-Learning Roger Grosse Roger Grosse CSC321 Lecture 22: Q-Learning 1 / 21 Overview Second of 3 lectures on reinforcement learning Last time: policy gradient (e.g. REINFORCE) Optimize

More information

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007.

Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Spring 2007 / Page 1 Final exam of ECE 457 Applied Artificial Intelligence for the Spring term 2007. Don t panic. Be sure to write your name and student ID number on every page of the exam. The only materials

More information

Machine Learning, Midterm Exam

Machine Learning, Midterm Exam 10-601 Machine Learning, Midterm Exam Instructors: Tom Mitchell, Ziv Bar-Joseph Wednesday 12 th December, 2012 There are 9 questions, for a total of 100 points. This exam has 20 pages, make sure you have

More information

Midterm Exam, Spring 2005

Midterm Exam, Spring 2005 10-701 Midterm Exam, Spring 2005 1. Write your name and your email address below. Name: Email address: 2. There should be 15 numbered pages in this exam (including this cover sheet). 3. Write your name

More information

Midterm 2. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

Midterm 2. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You: CS70 Discrete Mathematics and Probability Theory, Fall 2018 Midterm 2 8:00-10:00pm, 31 October Your First Name: SIGN Your Name: Your Last Name: Your SID Number: Your Exam Room: Name of Person Sitting on

More information

Do not tear exam apart!

Do not tear exam apart! 6.036: Final Exam: Fall 2017 Do not tear exam apart! This is a closed book exam. Calculators not permitted. Useful formulas on page 1. The problems are not necessarily in any order of di culty. Record

More information

Qualifier: CS 6375 Machine Learning Spring 2015

Qualifier: CS 6375 Machine Learning Spring 2015 Qualifier: CS 6375 Machine Learning Spring 2015 The exam is closed book. You are allowed to use two double-sided cheat sheets and a calculator. If you run out of room for an answer, use an additional sheet

More information

Sample questions for COMP-424 final exam

Sample questions for COMP-424 final exam Sample questions for COMP-44 final exam Doina Precup These are examples of questions from past exams. They are provided without solutions. However, Doina and the TAs would be happy to answer questions

More information

Bayes Nets: Sampling

Bayes Nets: Sampling Bayes Nets: Sampling [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley. All CS188 materials are available at http://ai.berkeley.edu.] Approximate Inference:

More information

Egyptian Fractions: Part I

Egyptian Fractions: Part I Egyptian Fractions: Part I Prepared by: Eli Jaffe October 8, 2017 1 Cutting Cakes 1. Imagine you are a teacher. Your class of 10 students is on a field trip to the bakery. At the end of the tour, the baker

More information

The topics in this section concern with the first course objective.

The topics in this section concern with the first course objective. 1.1 Systems & Probability The topics in this section concern with the first course objective. A system is one of the most fundamental concepts and one of the most useful and powerful tools in STEM (science,

More information

Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007.

Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007. Fall 2007 / Page 1 Final exam of ECE 457 Applied Artificial Intelligence for the Fall term 2007. Don t panic. Be sure to write your name and student ID number on every page of the exam. The only materials

More information

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You:

Midterm 1. Your Exam Room: Name of Person Sitting on Your Left: Name of Person Sitting on Your Right: Name of Person Sitting in Front of You: CS70 Discrete Mathematics and Probability Theory, Fall 2018 Midterm 1 8:00-10:00pm, 24 September Your First Name: SIGN Your Name: Your Last Name: Your Exam Room: Name of Person Sitting on Your Left: Name

More information

Midterm II. Introduction to Artificial Intelligence. CS 188 Fall ˆ You have approximately 3 hours.

Midterm II. Introduction to Artificial Intelligence. CS 188 Fall ˆ You have approximately 3 hours. CS 188 Fall 2012 Introduction to Artificial Intelligence Midterm II ˆ You have approximately 3 hours. ˆ The exam is closed book, closed notes except a one-page crib sheet. ˆ Please use non-programmable

More information

June If you want, you may scan your assignment and convert it to a.pdf file and it to me.

June If you want, you may scan your assignment and convert it to a.pdf file and  it to me. Summer Assignment Pre-Calculus Honors June 2016 Dear Student: This assignment is a mandatory part of the Pre-Calculus Honors course. Students who do not complete the assignment will be placed in the regular

More information

Name (NetID): (1 Point)

Name (NetID): (1 Point) CS446: Machine Learning Fall 2016 October 25 th, 2016 This is a closed book exam. Everything you need in order to solve the problems is supplied in the body of this exam. This exam booklet contains four

More information

Machine Learning, Midterm Exam: Spring 2009 SOLUTION

Machine Learning, Midterm Exam: Spring 2009 SOLUTION 10-601 Machine Learning, Midterm Exam: Spring 2009 SOLUTION March 4, 2009 Please put your name at the top of the table below. If you need more room to work out your answer to a question, use the back of

More information

Machine Learning, Midterm Exam: Spring 2008 SOLUTIONS. Q Topic Max. Score Score. 1 Short answer questions 20.

Machine Learning, Midterm Exam: Spring 2008 SOLUTIONS. Q Topic Max. Score Score. 1 Short answer questions 20. 10-601 Machine Learning, Midterm Exam: Spring 2008 Please put your name on this cover sheet If you need more room to work out your answer to a question, use the back of the page and clearly mark on the

More information

CS221 Practice Midterm #2 Solutions

CS221 Practice Midterm #2 Solutions CS221 Practice Midterm #2 Solutions Summer 2013 Updated 4:00pm, July 24 2 [Deterministic Search] Pacfamily (20 points) Pacman is trying eat all the dots, but he now has the help of his family! There are

More information

CS 188 Fall Introduction to Artificial Intelligence Midterm 1

CS 188 Fall Introduction to Artificial Intelligence Midterm 1 CS 88 Fall 207 Introduction to Artificial Intelligence Midterm You have approximately 0 minutes. The exam is closed book, closed calculator, and closed notes except your one-page crib sheet. Mark your

More information

Learning in State-Space Reinforcement Learning CIS 32

Learning in State-Space Reinforcement Learning CIS 32 Learning in State-Space Reinforcement Learning CIS 32 Functionalia Syllabus Updated: MIDTERM and REVIEW moved up one day. MIDTERM: Everything through Evolutionary Agents. HW 2 Out - DUE Sunday before the

More information

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2013

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2013 UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2013 Exam policy: This exam allows two one-page, two-sided cheat sheets; No other materials. Time: 2 hours. Be sure to write your name and

More information

Midterm: CS 6375 Spring 2015 Solutions

Midterm: CS 6375 Spring 2015 Solutions Midterm: CS 6375 Spring 2015 Solutions The exam is closed book. You are allowed a one-page cheat sheet. Answer the questions in the spaces provided on the question sheets. If you run out of room for an

More information

Midterm: CS 6375 Spring 2018

Midterm: CS 6375 Spring 2018 Midterm: CS 6375 Spring 2018 The exam is closed book (1 cheat sheet allowed). Answer the questions in the spaces provided on the question sheets. If you run out of room for an answer, use an additional

More information

Figure 1: Bayes Net. (a) (2 points) List all independence and conditional independence relationships implied by this Bayes net.

Figure 1: Bayes Net. (a) (2 points) List all independence and conditional independence relationships implied by this Bayes net. 1 Bayes Nets Unfortunately during spring due to illness and allergies, Billy is unable to distinguish the cause (X) of his symptoms which could be: coughing (C), sneezing (S), and temperature (T). If he

More information

Chapter 1 Review of Equations and Inequalities

Chapter 1 Review of Equations and Inequalities Chapter 1 Review of Equations and Inequalities Part I Review of Basic Equations Recall that an equation is an expression with an equal sign in the middle. Also recall that, if a question asks you to solve

More information

Reinforcement Learning: An Introduction

Reinforcement Learning: An Introduction Introduction Betreuer: Freek Stulp Hauptseminar Intelligente Autonome Systeme (WiSe 04/05) Forschungs- und Lehreinheit Informatik IX Technische Universität München November 24, 2004 Introduction What is

More information

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2014

UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2014 UNIVERSITY of PENNSYLVANIA CIS 520: Machine Learning Final, Fall 2014 Exam policy: This exam allows two one-page, two-sided cheat sheets (i.e. 4 sides); No other materials. Time: 2 hours. Be sure to write

More information

MIDTERM SOLUTIONS: FALL 2012 CS 6375 INSTRUCTOR: VIBHAV GOGATE

MIDTERM SOLUTIONS: FALL 2012 CS 6375 INSTRUCTOR: VIBHAV GOGATE MIDTERM SOLUTIONS: FALL 2012 CS 6375 INSTRUCTOR: VIBHAV GOGATE March 28, 2012 The exam is closed book. You are allowed a double sided one page cheat sheet. Answer the questions in the spaces provided on

More information

Bayes Nets III: Inference

Bayes Nets III: Inference 1 Hal Daumé III (me@hal3.name) Bayes Nets III: Inference Hal Daumé III Computer Science University of Maryland me@hal3.name CS 421: Introduction to Artificial Intelligence 10 Apr 2012 Many slides courtesy

More information

Unit 7 Systems and Linear Programming

Unit 7 Systems and Linear Programming Unit 7 Systems and Linear Programming PREREQUISITE SKILLS: students should be able to solve linear equations students should be able to graph linear equations students should be able to create linear equations

More information

Today s Outline. Recap: MDPs. Bellman Equations. Q-Value Iteration. Bellman Backup 5/7/2012. CSE 473: Artificial Intelligence Reinforcement Learning

Today s Outline. Recap: MDPs. Bellman Equations. Q-Value Iteration. Bellman Backup 5/7/2012. CSE 473: Artificial Intelligence Reinforcement Learning CSE 473: Artificial Intelligence Reinforcement Learning Dan Weld Today s Outline Reinforcement Learning Q-value iteration Q-learning Exploration / exploitation Linear function approximation Many slides

More information

Introduction to Artificial Intelligence (AI)

Introduction to Artificial Intelligence (AI) Introduction to Artificial Intelligence (AI) Computer Science cpsc502, Lecture 9 Oct, 11, 2011 Slide credit Approx. Inference : S. Thrun, P, Norvig, D. Klein CPSC 502, Lecture 9 Slide 1 Today Oct 11 Bayesian

More information

Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2

Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2 CS 170 Efficient Algorithms and Intractable Problems Spring 2016 Alessandro Chiesa and Umesh Vazirani Midterm 2 Name: SID: GSI and section time: Write down the names of the students around you as they

More information

CSE250A Fall 12: Discussion Week 9

CSE250A Fall 12: Discussion Week 9 CSE250A Fall 12: Discussion Week 9 Aditya Menon (akmenon@ucsd.edu) December 4, 2012 1 Schedule for today Recap of Markov Decision Processes. Examples: slot machines and maze traversal. Planning and learning.

More information

Lesson 26: Characterization of Parallel Lines

Lesson 26: Characterization of Parallel Lines Student Outcomes Students know that when a system of linear equations has no solution, i.e., no point of intersection of the lines, then the lines are parallel. Lesson Notes The discussion that begins

More information

Reinforcement Learning Wrap-up

Reinforcement Learning Wrap-up Reinforcement Learning Wrap-up Slides courtesy of Dan Klein and Pieter Abbeel University of California, Berkeley [These slides were created by Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

INF 5860 Machine learning for image classification. Lecture 14: Reinforcement learning May 9, 2018

INF 5860 Machine learning for image classification. Lecture 14: Reinforcement learning May 9, 2018 Machine learning for image classification Lecture 14: Reinforcement learning May 9, 2018 Page 3 Outline Motivation Introduction to reinforcement learning (RL) Value function based methods (Q-learning)

More information

ARTIFICIAL INTELLIGENCE. Reinforcement learning

ARTIFICIAL INTELLIGENCE. Reinforcement learning INFOB2KI 2018-2019 Utrecht University The Netherlands ARTIFICIAL INTELLIGENCE Reinforcement learning Lecturer: Silja Renooij These slides are part of the INFOB2KI Course Notes available from www.cs.uu.nl/docs/vakken/b2ki/schema.html

More information

Introduction to Fall 2008 Artificial Intelligence Final Exam

Introduction to Fall 2008 Artificial Intelligence Final Exam CS 188 Introduction to Fall 2008 Artificial Intelligence Final Exam INSTRUCTIONS You have 180 minutes. 100 points total. Don t panic! The exam is closed book, closed notes except a two-page crib sheet,

More information

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic

Announcements. CS 188: Artificial Intelligence Fall Causality? Example: Traffic. Topology Limits Distributions. Example: Reverse Traffic CS 188: Artificial Intelligence Fall 2008 Lecture 16: Bayes Nets III 10/23/2008 Announcements Midterms graded, up on glookup, back Tuesday W4 also graded, back in sections / box Past homeworks in return

More information

CS 570: Machine Learning Seminar. Fall 2016

CS 570: Machine Learning Seminar. Fall 2016 CS 570: Machine Learning Seminar Fall 2016 Class Information Class web page: http://web.cecs.pdx.edu/~mm/mlseminar2016-2017/fall2016/ Class mailing list: cs570@cs.pdx.edu My office hours: T,Th, 2-3pm or

More information

Decision Theory: Q-Learning

Decision Theory: Q-Learning Decision Theory: Q-Learning CPSC 322 Decision Theory 5 Textbook 12.5 Decision Theory: Q-Learning CPSC 322 Decision Theory 5, Slide 1 Lecture Overview 1 Recap 2 Asynchronous Value Iteration 3 Q-Learning

More information

CS 188: Artificial Intelligence. Bayes Nets

CS 188: Artificial Intelligence. Bayes Nets CS 188: Artificial Intelligence Probabilistic Inference: Enumeration, Variable Elimination, Sampling Pieter Abbeel UC Berkeley Many slides over this course adapted from Dan Klein, Stuart Russell, Andrew

More information

Final. Introduction to Artificial Intelligence. CS 188 Fall You have approximately 2 hours and 50 minutes.

Final. Introduction to Artificial Intelligence. CS 188 Fall You have approximately 2 hours and 50 minutes. S 188 Fall 2013 Introduction to rtificial Intelligence Final You have approximately 2 hours and 50 minutes. The exam is closed book, closed notes except your one-page crib sheet. Please use non-programmable

More information

Section Handout 5 Solutions

Section Handout 5 Solutions CS 188 Spring 2019 Section Handout 5 Solutions Approximate Q-Learning With feature vectors, we can treat values of states and q-states as linear value functions: V (s) = w 1 f 1 (s) + w 2 f 2 (s) +...

More information

CS 343: Artificial Intelligence

CS 343: Artificial Intelligence CS 343: Artificial Intelligence Bayes Nets: Sampling Prof. Scott Niekum The University of Texas at Austin [These slides based on those of Dan Klein and Pieter Abbeel for CS188 Intro to AI at UC Berkeley.

More information

Egyptian Fractions: Part I

Egyptian Fractions: Part I Egyptian Fractions: Part I Prepared by: Eli Jaffe October 8, 2017 1 Cutting Cakes 1. Imagine you are a teacher. Your class of 10 students is on a field trip to the bakery. At the end of the tour, the baker

More information