Starting from:
$30

$24

Homework #2 Solution

Programming Portion

This portion of the assignment may be completed individually or in groups of 2.







You can complete Project 3 OR Project 4 for full credit (25 points) or complete both projects for up to 10 EXTRA CREDIT points.




Project 3 is located at: http://ai.berkeley.edu/reinforcement.html and full credit requires completing Questions 1{8.




Your code for les valueIterationAgents.py, qlearningAgents.py, and analysis.py should be submitted to Blackboard for evaluation.




Project 4 is located at: http://ai.berkeley.edu/tracking.html, and full credit requires completing Ques-tion 1{7.




You code for les bustersAgents.py and inference.py should be submittd to Blackboard for evaluation.




For either project: Submitted code must be your own (or you and your partner's) code and should not be copied from any other source. We will check for similarity to other submissions and existing resources available on the web for any cheating.

Written Portion

This portion of the assignment must be completed individually.







Consider the Markov model with transition probabilities P (St+1jSt) represented using the state tran-sition diagram below.









Write the state-transition probabilities as a 3x3 matrix M in which Ma;b = P (bja). (2 points)



If the state is initially a (i.e., P (S1 = a) = 1), what is P (S3 = a)? (2 points)



What is the equilibrium distribution of this Markov model? (5 points)



The following Bayesian network might capture the relationships between fame & fortune and this course. It contains seven variables: Attending class (A); Reading the textbook (R); Mastering arti cial intelligence (M); Having good time management (T); Doing well on the homework (H); Received a great grade (G); and Finding fame & fortune (F). Each is binary-valued and can either take the value true or the value false.












For any probability distribution corresponding to this Bayesian Network, is each of the following true or false? Explain your reasoning. (10 points)



P (F; G) = P (F )P (G)



P (A; T ) = P (A)P (T )



P (A; T jR; G) = P (AjR; G)P (T jR; G)



P (F; T jR) = P (F jR)P (T jR)



P (A; MjG) = P (AjM)P (MjG)














3. Consider two Bayesian networks:













If each variable can take 5 di erent values, what is the minimum number of parameters needed to represent the conditional probabilities of each Bayesian network? (6 points)




(Hint: P(A) on the requires only four parameters, since the fth, P (A = 5) = 1 P (A = 1) P (A = 2) P (A = 3) P (A = 4), can be recovered from the other four.)
















































































































































3

More products