Homework 5: Planning

out Wednesday April 13, due Friday April 22

Introduction

This exercise asks you to extend a simple blocks world model to add the ability to paint blocks using either a sprayer or a paint brush and paint. After defining the domain in PDDL, you will use the blackbox planner to solve a set of problems expressed in PDDL.

PDDL

The Planning Domain Definition Language (PDDL) is a language for defining planning domains and problems. It was initially developed to support the 1998 and 2000 International Planning Competitions (IPC). It was first developed by a group of researchers lead by Drew McDermott and has evolved with each IPC. Read the description of PDDL 1.2 and a subsequent paper by Mcdermott on the 1998 IPC. You can read more about PDDL here and find examples for various domains in the directory. You might also find this tutorial on writing PDDL helpful, as well as these slides.

The Blackbox Planner

Blackbox is a planning system that works by converting problems specified in PDDL into Boolean satisfiability problems, and then solving the problems with a variety of satisfiability engines. The front-end employs the graphplan system. You can download a version of Blackbox here for Windows, Linux or OS X or use one we've installed on gl at ~finin/pub/blackbox.

Extending the domain

The hw5 github repository contains initial PDDL files for an extension to the classic blocks world domain in which objects can have a color and there are new action for painting objects using using paint sprayers, paint brushes and cans of paint. domain.pddl is a stub for the domain file and the p?.pddl files (e.g., p0.pddl) are stubs for problems.

Here's a description of the domain and constraints. We've provided a standard, simple representation for the blocks world (on, ontable, clear, etc.) and its actions (pickup, putdown, stack and unstack). Additional types of objects you need to add include the following:

  • Paint sprayers. Each sprayer can only paint in one color (e.g., red, green, blue, yellow).
  • Paint cans. A paint can holds only only color of paint.
  • Brushes. A brush can either be clean or loaded with paint of a particular color.
  • Water buckets. A water bucket is used to wash brushes.

These three objects are like blocks in that they can be picked up, put down, stacked and unstacked. They can also be painted, although painting them only alters their surface (e.g., a red sprayer will continue to spray red paint even after the sprayer is painted blue).

Additional actions include:

  • painting an object with a sprayer
  • painting an object with a brush and can
  • loading a paint with paint of a given color
  • washing a brush, making it clean

Here are some constraints that your actions should enforce.

  • All of the usual actions and constraints of the blocks world
  • There is a fixed set of colors: red, green, blue and yellow
  • In order to paint an object, that object must be on the table and clear
  • Painting with a sprayer is easy -- just pick it up and spray.
  • To paint something a color with a brush, it has to be loaded with paint of that color.
  • To load a paint bush with a particular color, you have to be holding the brush, the brush must be initially clean and there has to be a paint can holding that color of paint which is clear. When a brush is loaded with a color it is not clean.
  • To wash a brush, making it clean, you have to have a water bucket that has nothing on it (i.e., is clear) and you have to be holding the brush.

Your job is to complete domain.pddl by replacing the always false (< 1 0) precondition with one or more appropriate preconditions. Note that the initial domain file as is will support planning problems that do not involve painting, such as the problem p00.pddl. See this session as an example.

The shell files test and solveall might be useful in running blackbox over all of the problem files. See test.output for key parts of the output for our model solution. You are free to define and name the actions as you see fit, but might find our choices as reflected in the output helpful.

What to hand in

Submit your domain file and problem files to the hw5 project via the submit system on gl.