Written Assignment 4

The assignment should be submitted via Blackboard.

Problem 1

10 points.

Consider this first-order logic knowledge base:

taller(John, Bill)
for-every x, taller(x, Bill) => tall(x)
In this first-order logic knowledge base, taller and tall are predicates, x is a variable, and John, Bill are constants. Convert this first-order logic knowledge base into a propositional logic knowledge base, by performing the following two steps:
  1. Define symbols for the propositional-logic version of the knowledge base, and specify what their equivalents are in the original first-order logic knowledge base.
  2. Define the statements that should be stored in the propositional-logic version of the knowledge base.
The symbols you define should be comprehensive enough to allow us to translate any well-defined inference problem in the original knowledge base to an equivalent problem for the propositional knowledge base. Anything that we can infer from the original first-order logic knowledge base we should also be able to infer from the propositionalized knowledge base, and vice versa.


Problem 2

10 points.

A certain domain, represented in first-order logic, has:

How many possible worlds are there for this domain? Justify your answer.


Problem 3

15 points.

1a: (7 points) Consider a first-order logic knowledge base that contains the following statements (and no other statements) about the block world:

on(a,b)
on(b,c)
clear(a)
Suppose that we know that c is not on the table. Does the knowledge base already contain this information, or do we need to add a statement? If so, what statement do we need to add?

1b: (7 points) Suppose that the knowledge base contains the exact same statements as above:

on(a,b)
on(b,c)
clear(a)
However, suppose that (in contrast to question 1a), this knowledge base is a PDDL knowledge base, i.e., it follows the rules and assumptions of the PDDL language. As in 1a, suppose that we know that c is not on the table. Does the knowledge base already contain this information, or do we need to add a statement? If so, what statement do we need to add?

1c: (1 point) If you gave a different answer for question 1b than in question 1a, what aspect of PDDL caused the difference? If not, why?



Problem 4

30 points.

In some planning domain, at every state we can perform a number X of different actions (no more than X, no fewer than X). Given an initial state S1 and a goal G, the shortest plan (i.e., the plan with the smallest number of actions) contains Y actions (Y is obviously a non-zero positive integer). In the following questions, remember that time complexity and space complexity for an algorithm are always worst-case estimates. Also, remember that, in big-O notation, constant factors do not matter: if a certain algorithm A is 10 times slower than another algorithm B, regardless of the values for X and Y, then algorithms A and B are considered to have equal big-O time complexity. Finally, remember that basic search algorithms like breadth-first search and depth-first search can be used to solve planning problems.

3a: (10 points) Name an algorithm that gives us the best time complexity (in terms of big-O notation) for finding the shortest plan?. What is that best time complexity? Time complexity should be expressed in terms of X and Y. Use big-O notation.

3b: (10 points) Name an algorithm that (in terms of big-O notation) gives us the best space complexity for finding the shortest plan? What is that best space complexity? Space complexity should be expressed in terms of X and Y. Use big-O notation.

3c: (10 points) Is there a single algorithm that, in terms of big-O notation, gives us both the best time complexity and the best space complexity?


Problem 5

20 points.

Two adults and two children are on the left side of the river. Each adult weighs 150 pounds. Each child has half the weight of an adult, so each child weighs 75 pounds. They all want to cross to the right side of the river. However, the only means of transportation they can use is a boat, and the boat can carry a maximum of 150 pounds. Thus, the boat can carry one adult without children, or one child, or two children. Any adult or child can operate the boat, but the boat cannot be operated without having at least one person on the boat. The goal is to come up with a plan for moving everyone from the left side to the right side using multiple boat trips.

Define appropriate actions for this planning problem, in the PDDL language. For each action, provide a name, arguments, preconditions, and effects. Also, describe the initial state and the goal, using PDDL.


Problem 6

15 points.

We have state descriptions and action definitions written following the conventions used in the graphplan software of programming assignment 4. One of the actions is defined as follows:

(operator
aaa
(params
(<b> ttt1) (<c> ttt1))
(preconds
(ppp1 <b> <c>) (ppp2 <b>) (ppp3 <c>))
(effects
(eee1 <b> <c>) (eee2 <b>) (del eee2 <c>) (del eee3 <c>)))

Suppose we are at a state S1 described as follows (again, using graphplan syntax):
(A ttt1)
(B ttt1)
(C ttt1)
(ppp1 B C)
(ppp2 A)
(ppp2 B)
(ppp3 C)
(eee1 A C)
(eee2 C)
(eee3 C)
(eee3 A)
What is the state resulting from applying action aaa(B,C) to S1? Give a complete specification.

Problem 7 (Extra Credit)

15 points.

Consider a smaller version of the book ordering problem, where Amazon only sells three book titles, and our goal is to own these three books. More formally:
Draw the planning graph for this problem, from level S0 up to and including level S2.

Other Instructions