Assignment 3
Written Assignment - Planning, Probabilty and Decision Trees
Max points:
- CSE 4308: 150 (+10 Pts EC)
- CSE 5360: 150 (+10 Pts EC)
The
assignment should be submitted via Canvas.
Instructions
- The answers can be typed as a document or handwritten and
scanned.
- Name files as
assignment3_<net-id>.<format>
- Accepted document format is .pdf.
- If you are using Word, OpenOffice or LibreOffice, make
sure
to
save as .pdf.
- If you are using LaTEX, compile into a .pdf file.
- Please do not submit
.txt files.
- If
you are scanning handwritten documents make sure to scan it at a
minimum of 600dpi and save as a .pdf or .png file. Do not
insert images in word document and submit.
- If there are multiple files in your submission, zip them
together as assignment6_<net-id>.zip and submit the .zip
file.
Task
1
20 points (+ 10 Points EC)
Consider the following scenario:
Figure 1: Initial State of a Planning Problem.
Your task is to get all the blue marbles in P1 and red marbles in P2
The actions available are as follows:
- You can move 2 marbles from P1 to P2 if they are of the same
color (either you can move 2 red or you can move 2 blue)
- You can move 2 marbles from P2 to P1 if they are each of
different colors (one blue or one red)
Give the PDDL description to represent the above as a Planning Problem.
Do not forget to also define and describe the predicates and constants
that your are going to use.
Extra Credit (10 pts): Also,
give a complete plan (using the actions described) for getting
from the start to the goal state
Task
2
20 points
Suppose that we are using PDDL to describe facts and actions in a
certain world called JUNGLE. In the JUNGLE world there are 3
predicates, each predicate takes at most 4 arguments, and there are 5
constants. Give a reasonably tight bound on the number of unique states
in the JUNGLE world. Justify your answer.
Task
3
10 points
Consider the problem in Task 1. Let us say that, when you move the
marbles, it is possible to sometimes end up moving only one of them
(You try to move 2 Red marbles from P1 to P2 but only end up moving
one). How would you modify the actions
you described in Task 5 to account for this if you were going to try
and handle this scenario by
- Execution Monitoring/Online Replanning
- Conditional Planning
In both cases, show what the modifications are (If no modification is
necessary, Justify).
Task
4
20 points
You
are a meteorologist that places temperature sensors all of the world,
and you set them up so that they automatically e-mail you, each day,
the high temperature for that day. Unfortunately, you have forgotten
whether you placed a certain sensor S in Maine or in the Sahara desert
(but you are sure you placed it in one of those two places) . The
probability that you placed sensor S in Maine is 5%. The probability of
getting a daily high temperature of 80 degrees or more is 20% in Maine
and 90% in Sahara. Assume that probability of a daily high for any day
is conditionally independent of the daily high for the previous day,
given the location of the sensor.
Part
a: If
the first e-mail you got from sensor S indicates a daily high over 80
degrees, what is the probability that the sensor is placed in Maine?
Part
b: If
the first e-mail you got from sensor S indicates a daily high over 80
degrees, what is the probability that the second e-mail also indicates
a daily high over 80 degrees?
Part
c: What
is the probability that the first three e-mails all indicate daily
highs over 80 degrees?
Task 5
10
points.
In
a certain probability problem, we have 11 variables: A, B1,
B2,
..., B10.
- Variable A has 6 values.
- Each of variables B1, ..., B10 have 5
possible values. Each Bi is
conditionally indepedent of all other 9 Bjvariables
(with j != i) given A.
Based
on these facts:
Part
a: How
many numbers do you need to store in the joint distribution table of
these 11 variables?
Part
b: What
is the most space-efficient way (in terms of how many numbers you need
to store) representation for the joint probability distribution of
these 11 variables? How many numbers do you need to store in your
solution? Your answer should work with any variables satisfying the
assumptions stated above.
Task 6
15 points
Figure 2: A Bayesian Network of 5 Variables.
For the given Bayesian Network
Calculate the value of P(A | B = True, E = False) using Inference by Enumeration
Task 7
25 points
Figure 3: A decision tree for
estimating
whether the patron will be willing to wait for a table at a restaurant.
Part a: Suppose that,
on the
entire set of training samples available for constructing the decision
tree of Figure 3, 80 people decided to wait, and 20 people decided not
to wait. What is the initial entropy at node A (before the test is
applied)?
Part b:
As mentioned in the
previous part, at node A 80 people decided to wait, and 20 people
decided not to wait.
- Out of the cases where people decided to wait, in 20 cases
it was weekend and in 60 cases it was not weekend.
- Out of the cases where people decided not to wait, in 15
cases it was weekend and in 5 cases it was not weekend.
What is the information gain for the weekend test at node A?
Part c:
In the decision tree of
Figure 3, node E uses the exact same test (whether it is weekend or
not) as node A. What is the information gain, at node E, of using the
weekend test?
Part d:
We have a test case of a
hungry patron who came in on a rainy Tuesday. Which leaf node does this
test case end up in? What does the decision tree output for that case?
Part e:
We have a test case of a
not hungry patron who came in on a sunny Saturday. Which leaf node does
this test case end up in? What does the decision tree output for that
case?
Task 8
20 points
Class |
A |
B |
C |
X |
1 |
2 |
1 |
X |
2 |
1 |
2 |
X |
3 |
2 |
2 |
X |
1 |
3 |
3 |
X |
1 |
2 |
2 |
Y |
2 |
1 |
1 |
Y |
3 |
1 |
1 |
Y |
2 |
2 |
2 |
Y |
3 |
3 |
1 |
Y |
2 |
1 |
1 |
We want to build a decision tree that determines whether a certain
pattern is of type X or type Y. The decision tree can only use tests
that are based on attributes A, B, and C. Each attribute has 3 possible
values: 1, 2, 3 (we do not apply any thresholding). We have the 10
training examples, shown on the table (each row corresponds to a
training example).
What is the information gain of each attribute at the root?
Which attribute achieves the highest information gain at the root?
Task 9
10 points
Suppose that, at a node N of a decision tree, we have 1000 training
examples. There are four possible class labels (A, B, C, D) for each of
these training examples.
Part a: What is the highest
possible and lowest possible entropy value at node N?
Part b: Suppose that, at node N,
we choose an attribute K. What is the highest possible and lowest
possible information gain for that attribute?