Artificial Intelligence Homework 5
Due date: Friday 11/07 by 11:59 pm
(Pair Programming Assignment)



Written question [30 points]

Your answers to the following question should be typed and submitted as a pdf (e.g. you can type your answers using Word and print to pdf, or use LaTeX, or write your answers by hand and then scan your paper).

Consider the WetGrass Bayesian network shown in Figure 14.12a in AIMA. Assume we observe WetGrass=false.
  1. [6 points] Compute the exact posterior probabilities p(Cloudy|WetGrass=false), p(Sprinkler|WetGrass=false), and p(Rain|WetGrass=false).
  2. [6 points] Explain and show how to generate a sample using rejection sampling.
  3. [6 points] Generate 10 samples using rejection sampling. How many samples do you get where WetGrass=false and how many do you have to reject? Estimate posterior probabilities for Cloudy, Sprinkler, and Rain based on those 10 samples.
  4. [6 points] Explain and show how to generate a sample using likelihood weighting
  5. [6 points] Generate 10 samples using likelihood weighting. Show the weights for each sample. Estimate posterior probabilities for Cloudy, Sprinkler, and Rain based on those 10 samples.
To generate a random double between [0,1] in Python use the commands: "import random" and "random.uniform(0,1)"

Programming project [70 points]

It's time to hunt ghosts! In the past, pacmen did not fear ghosts. Ghosts feared pacmen! In this assignment, you will use the exact and approximate inference algorithms we learned about (for dynamic Bayesian networks) to locate ghosts. Please start early enough so that you can complete the assignment on time.

  • You do not have to do Q6-Q7 (Joint Particle Filter)
  • You must find a different partner for this programming assignment! We have an odd number of people, so one group will have 3 people
  • If you're ready to get started, click here.

Submission Instructions for Working in Pairs
  • Include your first and last name in the filename for your written questions -- e.g., "written_questions_ChambersAmerica.pdf"
  • Put both your and your partner's pdf inside the "tracking" directory.
  • Choose one person's name and rename the tracking directory hw5_LastNameFirstName.
  • Zip (compress) your directory and upload it using this URL.


Last modified: Sun Mar 9 23:36:12 PDT 2014