CMSC 471 - Homework #5

Out 11/6/01, due 11/20/01

1. Probability warm-up (15 pts.)

(R&N 14.5) Using only the basic laws of probability theory (the three axioms of probability, the definition of conditional probability, the product rule, and/or Bayes' rule), prove the following theorems:

(a) (8 pts.) Prove the conditionalized version of the general product rule:

P(A ^ B | E) = P(A | B ^ E) P(B | E)
(b) (7 pts.) Prove the conditionalized version of Bayes' rule:
P(A | B ^ C) = P(B | A ^ C) P(A | C) / P(B | C)

2. Bayesian networks (45 pts.)

(Adapted from R&N 15.2) In the local nuclear power station, there is an alarm that senses when a temperature gauge exceeds a given threshold. The gauge measures the core temperature. Consider the Boolean variables A (alarm sounds), FA (alarm is faulty), and FG (gauge is faulty), and the discrete-valued nodes G (gauge reading) and T (actual core temperature).

You should simplify your probability equations by using the following shorthand:
     t = temperature is high         ~t = temperature is not high (normal)
     g = gauge G reads high       ~g = gauge G reads normal
     a = alarm sounds                 ~a = alarm doesn't sound
     fg = gauge G is faulty         ~fg = gauge G is working
     fa = alarm is faulty              ~fa = alarm is working

(a) (5 pts.) Draw a belief net for this domain, given that the gauge is more likely to fail when the core temperature is high.

(b) (5 pts.) Suppose that the gauge gives the correct temperature 95% of the time when it is working (i.e., ~fg), but only 75% of the time when it is faulty. Give the conditional probability table associated with G. Please specify your CPT in the following form:
 
P (G | T, FG) t ~t
fg ~fg fg ~fg
g        
~g        

(c) (5 pts.) Suppose the alarm works unless it is faulty, in which case it never goes off. Give the conditional probability table associated with A. Use the same CPT table format, this time for P (A | G, FA).

(d) (15 pts.) Suppose that the alarm is known to be working (i.e., ~fa). If you had the full joint probability table, how could you use this table to directly compute the probability that the alarm will sound in this situation?  The answer to this question should be an expression in terms of elements of the joint probability distribution.  You can use SUM [sigma] to indicate a summation over all values of variable V. Do not actually compute the probability; just write the terms. For example, the probability that the temperature is high, given no additional information, can be written as
          SUMA SUMG SUMFG SUMFA p(t, A, G, FG, FA)

(e) (15 pts.) Suppose that both the alarm and the gauge are known to be working (i.e., ~fa ^ ~fg), and the prior probabilitty that the temperature is high is .9 (i.e., p(t) = .9). Also suppose that P (fg | t) = .5 and P (fg | ~t) = .2.  Apply the chain rule in the Bayesian network to calculate the actual probability that the core temperature is too high. Show all of the steps in your computation. Your final answer should be a numeric probability.
 

3. STRIPS planning operators (40 points)

(Adapted from Russell & Norvig 11.7) For this problem, you will need to refer to the description of the Shakey world on pp. 360-362 of the textbook.

Shakey has six actions: Go, Push, Climb, Down, TurnOn, and TurnOff. The predicates in the Shakey world are At, In, Pushable, On, Climbable, and TurnedOn (which isn't mentioned in the book, but which you can use to represent whether a light is on or off). The constants in this domain are Shakey, Room# (# = 1, 2, 3, 4), Corridor, Ls# (# = 1, 2, 3, 4), and Box# (# = 1, 2, 3, 4).

Notice that as described on page 360,the "Go" and "Push" operators can only be used to move from one location to another if the locations are in the same room. In order to move between rooms, doors are considered to be in both rooms.  For example, Door3 is in Room3 and also in the Corridor (i.e., In (Door3, Room3) ^ In (Door3, Corridor)). Also, you can consider each room to have a single location that is In that room (e.g., In (Room1, Room1)). Shakey's initial location is Room3 (At (Shakey, Room3, s0)).

(a) (20 pts.) Describe Shakey's environment using the situation calculus. Your situation calculus sentences should characterize how the situation changes as a result of Shakey's actions, in terms of the predicates in the Shakey world. Conceptually, there should be one (or possibly more) situation calculus sentence for each dynamic predicate in the Shakey world (i.e., each predicate whose truth value can change over time). Notationally, each sentence should look something like this:

Forall x,y,s Condition (Shakey, y, Result(a,s)) <=> Condition (Shakey, x, s) ^ a = Action(x,y)


(b) (15 pts.) Describe Shakey's six actions as STRIPS operators. Each operator should look something like this:

Op(Action: A(x,y), Precond: Condition (Shakey, x), Effect: Condition (Shakey, y))


(c) (5 pts.) Manually construct a plan (series of legal steps) for Shakey to turn the light switch on in Room2 from the starting configuration in Figure 11.15, when all of the lights are initially turned off.