Question 1: Planning in STRIPS 
Adapted from R&N 3rd edition.
The monkey-and-bananas problem is faced by a monkey in a laboratory with some bananas hanging out of
reach from the ceiling. A box is available that will enable the monkey to reach the bananas if he climbs on
it. Initially, the monkey is at A, the bananas at B, and the box at C. The monkey and box have height Low,
but if the monkey climbs onto the box he will have height High, the same as the bananas. The actions
available to the monkey include Go from one place to another, Push an object from one place to another,
ClimbUp onto or ClimbDown from an object, and Grasp or Ungrasp an object. The result of a Grasp is that
the monkey holds the object if the monkey and object are in the same place at the same height.
a. Write down the initial state description.
b. Write the six action schemas.
c. The monkey wants to fool the scientists, who are off to tea, by grabbing the bananas, but leaving the
box in its original location. Write down this goal.
Question 2: Designing a Bayesian Network 
Marv the cat is having a bad day. His brother Harry ate all the food set out by their owner, Shannon, so
Marv has to find a way to feed himself. He can try to catch a bird outside, and if he succeeds, he’ll eat it.
But sometimes, Shannon makes Marv wear a collar with a bell, so that he’s less likely to catch a bird. Marv
can also try to steal Shannon’s sandwich, which does not depend on whether he’s wearing a bell. However,
even if he succeeds in stealing the sandwich, he might not get to eat it (for example, Shannon may notice
and snatch it back). Finally, if Marv manages to eat at least something, he might feel content, in spite of
everything. Though if he’s wearing the collar, he is less likely to feel content in general (it’s rather itchy and
Consider the Boolean variables: B (Marv wears a bell), C (Marv is content), E (Marv eats at least one item),
R (Marv catches a bird), S (Marv steals the sandwich).
a. Draw a Bayesian network for this domain. Only include the Boolean variables listed above, so your
network should have 5 nodes.
b. Suppose the probability that Marv catches the bird is x when he wears a bell, and y when it is not. Give
the conditional probability table associated with R.
c. Suppose that if Marv catches a bird, he will eat it with probability 1, and if he successfully steals the
sandwich, he will eat it with probability 0.5. If he fails at both hunting and stealing, then he will not eat
anything. Give the conditional probability table associated with E.
d. Suppose Marv is content. Write down the expression for the probability he caught a bird, in terms of the
various conditional probabilities in the network.
Question 3: Inference in Bayesian Networks 
Consider the following Bayesian Network
R: rush hour
B: bad weather
T: traffic jam
We denote random variables with capital letters (e.g., R for “rush hour”), and the binary outcomes with
lowercase letters (e.g., r and ¬r for “it is rush hour” and “it is not rush hour,” respectively).
The network has the following parameters:
P(t|r, b,a) = 0.95
P(t|r, ¬b,a) = 0.9
P(t|r,b,¬a) = 0.8
P(t|r,¬b,¬a) = 0.7
P(t|¬r,b,a) = 0.6
P(t|¬r,b,¬a) = 0.3
P(t|¬r,¬b,a) = 0.65
P(t|¬r,¬b,¬a) = 0.05
P(s|a) = 0.75
P(s|¬a) = 0.05
P(a|b) = 0.15
P(a|¬b) = 0.05
Compute the following terms using basic axioms of probability and the conditional independence properties
encoded in the above graph.
a. P(a, ¬r)
b. P(b, a)
c. P(t | b)
d. P(r | ¬t, ¬s)