1. Homepage
  2. Programming
  3. CS47100: Introduction to Artificial Intelligence - Assignment 3: Probability and Uncertainty, Bayesian Networks and Pacman

CS47100: Introduction to Artificial Intelligence - Assignment 3: Probability and Uncertainty, Bayesian Networks and Pacman

Engage in a Conversation
PurdueCS47100Introduction to Artificial IntelligencePythonProbability and UncertaintyBayesian NetworksPacman

CS47100 Assignment 3 CourseNana.COM

Due date: Friday, Nov 10, 2023 (11:59 pm) CourseNana.COM

This assignment includes both written exercises and a programming component. Please follow the sub- mission instructions carefully. The “written” portion of the assignment must be typeset with LATEX us- ing the provided template. (Also on OverLeaf at https://www.overleaf.com/read/synckzdgfppw) CourseNana.COM

Part 1: Written Assignment (50 pts) Probability and Uncertainty (26 pts) CourseNana.COM

1. (8 pts) Properties of Random Variable CourseNana.COM

  1. (a)  (3 pts) Let X be a Bernoulli random, i.e., P (X = 1) = p and P (X = 0) = 1 p. The variance of a random variable is defined as Var(X) = E(X2) E(X)2. Compute E(2X) and Var(2X) in terms of p. CourseNana.COM

  2. (b)  (3pts)LetXandY bothbeaBernoullirandomandXY,i.e.,P(X=1)=p,P(X=0)= 1p,P(Y =1)=pandP(Y =0)=1p. ComputeE(X+Y)andVar(X+Y)intermsofp. CourseNana.COM

  3. (c)  (2 pts) Is the distribution of X+Y and 2X the same? CourseNana.COM

2. (10 pts) Basic Probability CourseNana.COM

  1. (a)  (2 pts) Which of the following expressions is guaranteed to be always true, given the random variables A, B, and C? CourseNana.COM

    i. P(A,B)=P(A)P(B)P(A|B) ii. P(A,B) = P(A)P(B) CourseNana.COM

    iii. P(A,B)=P(A|B)P(B)+P(B|A)P(A) iv. P(A) = PbB P(A|B = b)P(B = b) CourseNana.COM

    v. P(A,C) = PbB P(A|B = b)P(C|B = b)P(B = b) vi. P(A,B,C)=P(C|A)P(B|C,A)P(A) CourseNana.COM

  2. (b)  (2 pts) Assume that the domain of both A and B is {true and false} (A ∈ {true,false} and B ∈ {true, false}). What is P (B = true | A = false) by giving the following quantities? CourseNana.COM

    1 CourseNana.COM

    2 CourseNana.COM

    P(B=true|A=true) = 1 CourseNana.COM

    3 4 CourseNana.COM

  3. (c)  You witness a night-time hit-and-run accident involving a car in West Lafayette. Assuming that all cars in West Lafayette are black or gray. You swear, under oath, that the car you saw was black. Extensive testing shows that under dim lighting conditions, discrimination between black and gray is 70% reliable. In other words, if a car is gray, with a 70% chance it will appear gray under dim lighting conditions. Similarly, if a car is indeed black, the chance for it to appear black under dim lighting conditions is 70%. CourseNana.COM

P(A=true) = CourseNana.COM

P(B=true) = CourseNana.COM

  1. (2 pts) Is it possible to calculate the most likely color for the fled car to help the police find the suspect? Show why or why not. (Hint: distinguish carefully between the proposition that the car is black and the proposition that it appears black.) CourseNana.COM

  2. (4 pts) Now consider the case when you are given the additional information that 60 out of 100 cars in West Lafayette are black. Show whether or not it is possible to calculate the most likely color for the fled car. CourseNana.COM

3. (8 pts) Inference and Independence CourseNana.COM

  1. (a)  (5 pts) Let X1, X2 and Y be three discrete random variables. We want to calculate P (Y |X1, X2) but we do not possess any independence/conditional independence information about them. Suppose we know the probability distributions listed in each of the following five cases. Please show whether it is possible for us to calculate P (Y |X1, X2) and if yes, how to calculate. CourseNana.COM

    i. P(X1|Y ), P(X2|Y ) and P(Y ) ii. P(X1),P(X2)andP(X1,X2|Y) CourseNana.COM

    iii. P(X1,X2), P(Y) and P(X1,X2|Y)
    iv.
    P(X1), P(X2), P(X1|Y ) and P(X2|Y ) CourseNana.COM

    v. P(X1,X2), P(Y), P(X1|Y) and P(X2|Y) CourseNana.COM

  2. (b)  (3 pts) Now suppose you know that X1 X2|Y (i.e., X1 and X2 are conditionally indepen- dent with each other given Y ). Now, which of the above cases is sufficient for us to calculate P (Y |X1, X2)? Justify your answers. CourseNana.COM

Bayesian Networks (24 pts) CourseNana.COM

4. (6 pts) For the below graph, determine whether the following independences can be guaranteed to be true or not. (Justify your answers) CourseNana.COM

(a) (2 pts) F G|D (b) (2 pts) D E|B (c) (2 pts) C D|A CourseNana.COM

5. (4 pts) For the two graphs below, determine which variables are d-connected to A given S: (a) (2 pts) S = {B} CourseNana.COM

(b) (2 pts) S = {J} CourseNana.COM

6. (14 pts) Given a Bayesian network and corresponding conditional probability tables as following: P(H) CourseNana.COM

+h 0.6 P(E|H,S) CourseNana.COM

P(S) +s 0.9 CourseNana.COM

P(A|S) +s +a 0.8 s +a 0.1 CourseNana.COM

+h +s +h s h +s h s CourseNana.COM

+e 0.9 +e 0.7 +e 0.8 +e 0.1 CourseNana.COM

  1. (a)  (3 pts) Write down the joint distribution as it factorizes according to the graph above and calculate it. CourseNana.COM

  2. (b)  (3 pts) What is the probability that students attend classesP (+a)? CourseNana.COM

  3. (c)  (3 pts) What is the probability that students are studying, given that they attend the class? CourseNana.COM

  4. (d)  (3 pts)What is the probability that students study, given that they attend the class, pass the exam, and do the homework? CourseNana.COM

  5. (e)  (2 pts) What is the probability that students do homework, given that they study? CourseNana.COM

Submission CourseNana.COM

Upload your answers to the written questions as a pdf format file in Gradescope: CourseNana.COM

  • You should already have received an e-mail with the link to access Gradescope. If you haven’t, CourseNana.COM

    let the TAs know. CourseNana.COM

  • For your pdf file, use the naming convention username hw#.pdf. For example, your TA with CourseNana.COM

    username alice would name her pdf file for HW3 as alice hw3.pdf. CourseNana.COM

  • Use the provided LATEX template to typeset the assignment by editing the tex files under student response/ . CourseNana.COM

CourseNana.COM

Part 2: Programming Assignment (50 pts) CourseNana.COM

For the programming assignments, we will use the Pacman project designed for the course CS188 at UC Berkeley: https://inst.eecs.berkeley.edu/~cs188/fa20/project4/ (Note that for this homework, we will be using the Fall 2020 version). CourseNana.COM

Please remember that solutions to any assignment should be your own. Using other people’s solutions, within or outside Purdue goes against the course’s academic honesty policy. The TAs will be using code similarity measures to detect plagiarism cases when grading the assignment. CourseNana.COM

In this assignment, we will use Pacman project 4. In project 4, you will design inference methods for Pacman agents to use to locate and eat invisible ghosts. As in HW1 and HW2, the assignment includes an autograder for you to grade your answers on your machine. CourseNana.COM

1. Complete Project 4, Questions 0-4 described on the Berkeley site. Submit your modified versions of and for grading. We will multiply your original score CourseNana.COM

returned by (10 pts in total) by 5. CourseNana.COM

Submission CourseNana.COM

Please upload the following files: bustersAgents.py and inference.py to Gradescope. CourseNana.COM

inference.py
bustersAgents.py
autograder.py

Get in Touch with Our Experts

WeChat WeChat
Whatsapp WhatsApp
Purdue代写,CS47100代写,Introduction to Artificial Intelligence代写,Python代写,Probability and Uncertainty代写,Bayesian Networks代写,Pacman代写,Purdue代编,CS47100代编,Introduction to Artificial Intelligence代编,Python代编,Probability and Uncertainty代编,Bayesian Networks代编,Pacman代编,Purdue代考,CS47100代考,Introduction to Artificial Intelligence代考,Python代考,Probability and Uncertainty代考,Bayesian Networks代考,Pacman代考,Purduehelp,CS47100help,Introduction to Artificial Intelligencehelp,Pythonhelp,Probability and Uncertaintyhelp,Bayesian Networkshelp,Pacmanhelp,Purdue作业代写,CS47100作业代写,Introduction to Artificial Intelligence作业代写,Python作业代写,Probability and Uncertainty作业代写,Bayesian Networks作业代写,Pacman作业代写,Purdue编程代写,CS47100编程代写,Introduction to Artificial Intelligence编程代写,Python编程代写,Probability and Uncertainty编程代写,Bayesian Networks编程代写,Pacman编程代写,Purdueprogramming help,CS47100programming help,Introduction to Artificial Intelligenceprogramming help,Pythonprogramming help,Probability and Uncertaintyprogramming help,Bayesian Networksprogramming help,Pacmanprogramming help,Purdueassignment help,CS47100assignment help,Introduction to Artificial Intelligenceassignment help,Pythonassignment help,Probability and Uncertaintyassignment help,Bayesian Networksassignment help,Pacmanassignment help,Purduesolution,CS47100solution,Introduction to Artificial Intelligencesolution,Pythonsolution,Probability and Uncertaintysolution,Bayesian Networkssolution,Pacmansolution,