# CS 1571: Homework 4 (written)

## Planning, Uncertainty and Probabilistic Reasoning (Chapters 10, 13-14)

Assigned: November 15, 2017

Due: December 1 , 2017

#### 1. Planning (25 pts)

Consider the following simple domain:

- Initial State: A, B, C
- Goal: C, D, E
- Operator O1 Preconditions: A; Add Effects: F; Delete Effects: C
- Operator O2 Preconditions: A; Add Effects: D; Delete Effects: B
- Operator O3 Preconditions: B; Add Effects: C
- Operator O4 Preconditions: F; Add Effects: D, E, G

  (a) State-Space Search: Draw the full search tree with a depth limit=2 in a forward progression state-space search (assume no repeated states). For full credit, be sure to show the list of predicates (or the equivalent graphical representation of the blocks) for each state, and explicitly label the actions that get you from one state to another (as in Figure 10.5). State whether your search finds a plan which achieves the goal, and why?

  (b) Partially Ordered Planning: Show the final plan that would be output by a partial-order regression planner for this problem (as in Figure 10.13c). Give an example of one linearization of the partial-order plan.

  #### 2. Probability (15 pts)

  13.8 (Russell and Norvig, p. 507)

  #### 3. Probability (15 pts)

  Of the entire population, 2% has a certain disease X. A test Y, which indicates whether or not a person has the disease, is not 100% accurate. If a person has the disease, there is a 6% chance that it will go undetected by the test. However, there is also a 9% chance of "false alarm" (meaning that the person does not have the disease but the test indicates otherwise). A person Z takes a test which later comes out positive (meaning that the test says he has the disease). What is the probability of this person having the disease in reality?

  #### 4. Bayesian Networks (25 pts)

  14.8 a, b, c, d (Russell and Norvig, p. 561). Here is some relevant car knowledge: Icy weather is not caused by any car-related variables, but it directly affects the battery and the starter motor. The starter motor in turn directly impacts whether the car starts.

  In addition, answer the following questions using the original network topology (that is in Figure 14.21) rather than the extension used above.

- Give the expression for the full joint probability for: Battery=T, Radio=T, Ignition=T, Gas=F, Starts=T, Moves=F.
- Assume we want to compute the probability of the car not moving, that is P(Moves = False). Write down the expression for computing the probability from conditionals.

  #### 5. Diagnosis using Bayesian Networks (20 pts)

  Assume a Bayesian network with 5 boolean random variables, where the topology represents that Pneumonia causes Fever, Paleness, Cough, and HighWBCcount. The associated CPT are as follows:

- P(Pneumonia = True) = 0.02

- P(Fever = True|Pneumonia = True) = 0.9
- P(Fever = True|Pneumonia = False) = 0.6

- P(Paleness = True|Pneumonia = True) = 0.7
- P(Paleness = True|Pneumonia = False) = 0.5

- P(Cough = True|Pneumonia = True) = 0.9
- P(Cough = True|Pneumonia = False) = 0.1

- P(HighWBCcount = True|Pneumonia = True) = 0.8
- P(HighWBCcount = True|Pneumonia = False) = 0.5

  Assume that you have the following set of symptoms: Fever and Cough are true; Paleness and HighWBCcount are false. What is the probability P(Pneumonia = T|Fever = T, Paleness = F, Cough = T,HighWBCcount = F), that is, the probability that you suffer from Pneumonia, given the symptoms? Simplify the expression as much as possible before plugging in the values.