University of Lincoln School of Computer Science CMP2020M Artificial Intelligence
Classic AI Planning
Open the Planning Web Service at http://lcas.lincoln.ac.uk/fast-downward. For all the following tasks discuss your main findings and observations with your neighbours and the demonstrators. A planning problem is described by a ¡°domain¡± specification (defining all the actions and their preconditions and effects) and a ¡°problem¡± (describing initial and goal states). These are given in the language PDDL, a language inspired by logic languages like LISP and Prolog.
This week we will be working towards the PDDL-part of the assignment, by working through some more PDDL examples.
Q1.Look at ¡°depot¡± domain and the ¡°depot-01¡± and ¡°depot-02¡± problems. This domain comprises of trucks, which can transport crates around and then the crates must be stacked onto pallets at their destinations. The stacking is achieved using hoists, so the stacking problem is like a blocks-world problem with hands. Trucks can behave like “tables”, since the pallets on which crates are stacked are limited.
a. Draw a figure that represents the initial state of depot-01.
b. Draw how a valid goal state would look like.
c. Looking at action ¡°lift¡± (below), what do ?x, ?y, ?z, and ?p represent?
(:action lift
:parameters ( ?x ?y ?z ?p) :precondition
(and (hoist ?x) (crate ?y) (surface ?z) (place ?p) (at ?x ?p) (available ?x) (at ?y ?p) (on ?y ?z) (clear ?y))
:effect
(and (lifting ?x ?y) (clear ?z) (not (at ?y ?p)) (not (clear
?y)) (not (available ?x)) (not (on ?y ?z))))
d. Change the problem definition, to only contain one truck. How does it affect the plan?
Q2.Read the assignment brief carefully and make sure you ask the delivery team any questions you might have. Then, play the game at http://www.mathcats.com/explore/river/crossing.html to understand the PDDL problem. Hint: Start working towards your assignment by writing down the state in PDDL while playing the game and see how it changes when you apply an action. Think carefully how you solve the puzzle at the website and compare how it is modelled in PDDL (¡°wolf-goat-cabbage-problem-01¡°). Discuss your understanding with the demonstrators.