|
Written
Homework #5
Solutions
1. [30 points] Planning Graph
Construction
Shakey, the overworked robot,
is faced with a planning problem. The task he must perform is to move
n boxes from room A to room B. He can only perform two actions, MoveBoxA2B
and MoveB2A. In MoveBoxA2B, Shakey moves himself and a box from A to
B. In MoveB2A, Shakey moves from B to A, without moving any boxes. The
world will be represented as follows:
- Constants: box1, box2,..., boxn, Shakey, A (room A), and B (room
B)
- Predicates: At(object, location)
- Actions:
MoveBoxA2B(boxi)
PRECOND: At(boxi,A), At(Shakey,A)
ADD: At(boxi,B), At(Shakey,B)
DELETE: At(boxi,A), At(Shakey, A)
MoveB2A()
PRECOND: At(Shakey,B)
ADD: At(Shakey,A)
DELETE: At(Shakey, B)
(a) [5 points] For the moment, assume that we have only the two boxes
box1 and box2,both
in room A, and that Shakey also starts out in room A. Write down the
first three levels of the planning graph for this problem, i.e., S0,
A1, and S1. Show all propositions and all edges, include the maintainance/persistence
actions. Write all mutex constraints underneath each level in the
graph (you can number the actions/literals to make the constraints
shorter to write)

(b) [4 points] In terms of n, how
many levels in the planning graph will be expanded before a working
plan for the n box problem can be found? No explanation is required.
When you count the number of levels, count both action and proposition
levels. For example, the number of levels in the graph you expanded
in part (a) is 3..
The shortest working
plan requires 4n - 1 steps: for each box except the last, Shakey has
to move from A to B (pushing the box) and back; for the last box,
only a move to B is required.
(c) [5 points] In the general
n-box problem, what mutex relations will there be between the propositions
at proposition level S1? No explanation required.
i. At(boxi,B), At(boxj
,B), i /= j.
ii. At(boxi,B), At(Shakey,A), for all i.
iii. At(Shakey,A), At(Shakey,B).
iv. At(boxi,A), At(boxi,B), for all i.
Reasons (not required!):
i. Each action pair MoveBoxA2B(boxi) and MoveBoxA2B(boxj ) is mutex.
ii. The persist/maintain(At(Shakey,A)) "action" is mutex
with MoveBoxA2B(boxi), as the latter deletes At(Shakey,A).
iii. Same reason as (ii).
iv. MoveBoxA2B(boxi) is mutex with persist/maintain(At,(boxi,A)).
(d) [6 points] Let n >
2. What mutex relations will there be between propositions at proposition
level Sk for k >= 3? Briefly
justify your response.
i. At(Shakey,A),
At(Shakey,B).
ii. At(boxi,A),
At(boxi,B), for all i.
Reasons are given above in (iii) and (iv). There are no additional
mutex relations, because after two actions any pair of boxes can be
in room B; hence, the propositions can co-exist, and therefore cannot
be mutex. Of course, any triple of propositions cannot exist, but
the planning graph formalism only considers binary mutex relations.
(e) [5 points] For n >
2 and k > 3, what mutex relations will there be between actions
in an action level Ak
of the planning graph? Briefly justify your response.
i. Maintain(At(Shakey,A)),
Maintain(At(Shakey,B))
Maintain(At(boxi,A)), Maintain(At(boxi,B)), for all i.
MoveBoxA2B(boxi), Maintain(At(boxi,B)), for all i.
MoveBoxA2B(boxi), Maintain(At(Shakey,B)), for all i.
MoveB2A(), Maintain(At(Shakey,A)).
ii. MoveBoxA2B(boxi), MoveBoxA2B(boxj ), i /= j.
MoveBoxA2B(boxi), MoveB2A(), for all i.
iii. MoveBoxA2B(boxi), Maintain(At(boxi,A)), for all i.
MoveBoxA2B(boxi), Maintain(At(Shakey,A)),
for all i.
MoveB2A(), Maintain(At(Shakey,B)).
Reasons:
i. The two actions have competing needs.
ii. Only one "real" action per level.
iii. A Maintain(p) action is mutex with a "real" action
that deletes p.
(f) [5 points] How many
levels in the planning graph will be expanded before a planning algorithm
first considers it worthwhile to search for a working plan in the
n-box problem? (Use the same way of counting levels as in (b).) Provide
a one-sentence explanation.
Level 7: the algorithm
first considers searching for a k-step plan when all of the goal propositions
appear in Pk and none of them are mutex with each other. In this example,
this situation will first occur at the seventh level (P3), so the
algorithm will first start searching for a 3-step plan regardless
of the number of boxes.
2. [11] It is often said informally
that Graphplan will produce step-optimal solutions (meaning that a literal
appears at the earliest time step possible considering maximum parallel
actions), as opposed to length-optimal solutions (fewest steps in serial
execution).Explore if this is actually the case. Consider the following
example:
We have empty init state,
and Goal state is {P,Q}. We just have two actions in the domain
- A1 Prec: none Effects: P,W
- A2 Prec: none Effects: Q,~W
(a) [3 pts] What is the
optimal parallel plan for this problem? (note that W has nothing to
do with the goal--so we really don't care if it is true or false.)
Do both A1 and A2
in parallel.
(b)[3 pts] What is the plan
that Graphplan will produce for this problem? Is it optimal?
A1 then A2. Not
step optimal.
(c) [5 pts]Is there an obvious
way of changing the action interference definition such that we could
find the optimal parallel plan with Graphplan? Why is the obvious
way of doing it not an easy way to implement?
We can change the
action interference definition such that two actions A1 and A2 are
not interfering if their interacting effects are not relevant, in
other words, if they do not belong to the list of propositions that
need to be supported. Following our example, A1 and A2 would not be
interfering since their interacting effects W and ~W do not need to
be supported. We only need to support P and Q. This change would not
be easy because we have to check such a condition with each action introduced
at each level, and more important we also have to identify which subgoals
are relevant with respect to the top level goals at each level of
the graph.
3. [10] Question 11.14 in the book.
GRAPHPLAN is a propositional
algorithm, so, just as we can solve certain FOL problems by translating
them into propositional logic (especially when there are a finite number
of variable instantiations), we can solve certain situation calculus
type problems by translating them into propositional form. The trick
is exactly how to do that.
The finish
action in POP planning has as its preconditions the goal state. We can
create a finish action for GRAPHPLAN, and give it the effect
DONE. In this case there would be a finite number of propositional
instantiations of the finish action, and we could then reason
about them in GRAPHPLAN. [e.g. finish1, pre: At(P1,L1) and At(P2,L1), effects: DONE. etc.]
4.[10] (From D. Kahneman &
A. Tversky (1982) "Evidential Impact of Base Rates" in D.
Kahneman, P. Slovic & A. Tversky (eds) Judgement Under Uncertainty
, Cambridge.)
You are a witness of a night-time hit-and-run accident involving a taxi
in Athens. All taxis in Athens are blue or green. You swear, under oath,
that the taxi was blue. Extensive testing shows that under the dim lighting
conditions, discrimination between blue and green is 75% reliable. Is
it possible to calculate the most likely colour for the taxi? (Hint:
distinguish between the proposition that the taxi blue and the proposition
that it appears blue.) What now, given that 9 out of 10 Athenian taxis
are green?

5. [18] Two astronomers, in
different parts of the world, make measurements M1 and M2 of the true
number of stars N in some small region of the sky using thier two telescopes.
Each telescope can also be out of focus (events F1 and F2 with probability
f.) If a telescope is OUT of focus, then the scientist will undercount
by three or more stars (that means that if the true number of stars
N is less than or equal to 3, then the astronomer will count 0 stars).
- [6] Draw a belief network to represent this information.

- [6] Give a conditional probability table for the belief node M1.
For simplicity, only consider N = 1, 2, or 3 and probabilities that
M1 = 0,1,2 or 3 here.
| F1 |
N |
Pr(M1=0) |
Pr(M1=1) |
Pr(M1=2) |
Pr(M1=3) |
T |
1 |
0 |
1 |
0 |
0 |
T |
2 |
0 |
0 |
1 |
0 |
T |
3 |
0 |
0 |
0 |
1 |
F |
1 |
1 |
0 |
0 |
0 |
F |
2 |
1 |
0 |
0 |
0 |
F |
3 |
1 |
0 |
0 |
0 |
- [6] Suppose M1 = 1 and M2 = 3. What are the possible true numbers
of stars (possible values of N)?.Hint: you can either reason forward,
trying each possible value of N and seeing if the measurements M1
= 1 and M2 = 3 are possible (this is sort of a mental simulation of
the physical process); or you can enumerate the possible focus states
and work backward the possible values of N for each.
N=6,7,8,....
6.[21, 3 each] Consider the Bayesian
network below. The domain of each variable is {true, false}. For convenience,
each variable has a one letter abbreviation. Instead of showing the
conditional probability tables, we have indicated the qualitative nature
of the causal influences in the network. A plus indicates a positive
influence, and a minus indicates a negative influence. If there is a
positive influence from X to Y, then P(y|x) > P(y| ~x), and visa
versa for a negative influence. (Note: P(y| ~x) is shorthand for P(Y=true|X=false),
etc.) This relationship holds for all values of the other parents
of Y.

For example, in the given
network we can infer, amongst other things:
- P(t|n) < P(t|~n)
- P(v|n,r) > P(v|n, ~r)
- P(v|~n,r) > P(v|~n, ~r)
You should also assume that "explaining away" occurs whenever
there are two edges labeled + going into a node, e,g,
P(r|v,n) < P(r|v) because the presence of Night "explains
away" the Poor Visibility.
Your goal is to determine, for each of the pairs of conditional probability
values below whether one is larger than the other, they are equal, or
they are incomparable with the information we have given you.
- (a) P(s|v) < P(s)
- (b) P(v|t) < P(v)
- (c) P(s|v,~n) < P(s|v) ["explaining away"]
- (d) P(w|v) > P(w)
- (e) P(w|a,v) ?? P(w|a)
[here V influences via both R and A; you can't tell
effect without the CPTs. Adding V could increase the likelihood of
W by making R more likely, but it could also lower the liklihood of
W by "explaining away" the evidence A which supports W.]
- (f) P(w|r,v) = P(w|r) [The very definition of a BN
and conditional independence!]
- (g) P(w|a,r,v) < P(w|a,r)
Note that in the last
case (g), V is "explaining away" A, thus reducing liklihood
of W. Unlike case (e), where the addition of V has an uncertain effect,
here we know the value of R, and this blocks the effect of V on W through
R (i.e. see (f), where P(w|r,v) = P(w|r) by definition and construction.
============
EXTRA CREDIT
============
Imagine that we want to do
planning in a multiagent situation. Since the agents can work at the
same time, actions are allowed to occur in parallel. Assume that we
have an unbounded number of agents, so we can put as many actions in
parallel as we want. Thus, at each phase i, we will now choose not a
single action, but a set of actions Si all of which will take place
in parallel. For any Si, we have no guarantees about which action in
Si will get completed first. We can only guarantee that all actions
in Si get completed within the time phase of the plan, i.e., before
any of the time i + 1 actions are started. In other words, all we know
is that the actions in Si start and end at some point during phase i.
[10 points] Come up with a good definition
of the notion of a parallel plan. In other words, we want to provide
a constraint on the sets Si that guarantees that no matter how actions
are executed within a phase, the result of the execution is the same.
More precisely, let S be a set of actions and let w be a state in which
all of the preconditions of all of the actions in S hold. State the
assumptions on S that guarantee that, no matter the order in which the
actions in S are executed, the result of applying S in w is the same.
We want to guarantee
that, no matter which order we execute the actions
in S, the effect is the same. In order to guarantee that, we need to
ensure that the
preconditions of every action hold when it is executed, and that its
effects cannot change.
To do that, we require the following conditions for each action a and
a' in S:
No action deletes another's preconditions: Pre(a) intersect Del(a')
= {}.
No action deletes the effects of another: Add(a) intersect Del(a') =
{}.
|
|