Your answers.xxx file should be submitted together with your solution to the programming part of the assignment. See detailed instructions on the programming part.
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:
A certain domain, represented in first-order logic, has:
A certain domain, represented in first-order logic, has:
Part a: 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) on(c,table) clear(a)Suppose that we know that block a is not on the table. Does the knowledge base already enough information to infer that fact? If your answer is "no", provide a statement that, when added to the knowledge base, will make the knowledge base entail that block a is not on the table.
Part b: Suppose that the knowledge base contains the exact same statements as above:
on(a,b) on(b,c) on(c,table) 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 part a, suppose that we know that block a is not on the table. Does the knowledge base already enough information to infer that fact? If your answer is "no", provide a statement that, when added to the knowledge base, will make the knowledge base entail that block a is not on the table.
If you gave a different answer than in part a, what aspect of PDDL caused the difference?
We have state descriptions and action definitions written following the conventions used in the graphplan software. Under these conventions:
params
specifies the parameters (arguments) of the action, as variables.
params
has a type. The action can only be applied to objects of the specified type.
preconds
specifies the preconditions of the action.
effects
specifies the effects of the action.
del
, used in the effects, specifies that the statement that follows must be deleted from the knowledge base (as a result of this action).
(predicate argument_1 ... argument_n)
, corresponding to first-order logic statement predicate(argument_1, ..., argument_n)
.
(object type)
, specifying that some object is of some specific type.
(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.
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.
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.
For any of the following questions, if you mention an informed search algorithm, make sure that you also specify what heuristic should be used to make your answer correct.
Part a: 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.
Part b: 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.
Part c: Is there a single algorithm that, in terms of big-O notation, gives us both the best time complexity and the best space complexity?
Part a: Suppose that we have implemented a planning system where states, goals, action preconditions and action effects are expressed using the PDDL language. Given a state S1 and an action A1, and given specific parameters for A1 (as opposed to variables), is there a polynomial-time algorithm (in terms of the size of the knowledge base and the size of the preconditions for A1) that can compute whether the preconditions of A1 are all true in state S1? If so, what is that algorithm? If not, why not?
Part b: Suppose that we have implemented a planning system where states, goals, action preconditions and action effects are expressed using unrestricted first order logic. Given a state S1 and an action A1, and given specific parameters for A1 (as opposed to variables), is there a polynomial-time algorithm (in terms of the size of the knowledge base and the size of the preconditions for A1) that can compute whether the preconditions of A1 are all true in state S1? If so, what is that algorithm? If not, why not?