CS 660: Programming Projects

For each of these projects, you will learn about a new family of classical planning algorithms by implementing them in a common framework.

Contents

Planning Framework

The planning framework you will be using for this project is written in Java. The tools needed to compile and run Java programs are distributed with the pre-configured IDE discussed below, but if you want to use these tools outside of that context, you may want to install the latest Java Development Kit.

These files are included in the pre-configured IDE but can be downloaded separately if you wish:

Extract planners.zip into the same directory as planning.jar. It contains implementations of various important planning algorithms.

Extract benchmarks.zip into the same directory as planning.jar. It contains a collection of example planning domains and problems written in a file format very similar to the Planning Domain Definition Language (or PDDL).

Each planner is a plugin that runs with the common planning.jar library. To run a planner, use the following command. This example runs the simple breadth first search planner and assumes you are in the same directory as planning.jar:

java -jar planning.jar -a planners/bfs.jar -d benchmarks/blocks.pddl -p benchmarks/sussman.pddl

This tells the planning program to attempt to solve the Sussman anomaly, which is one of the test problems.

The results of the search are printed to the console including:

If you want to limit the number of nodes the planner can visit before giving up, use the -nl argument. If you want to limit the amount of time the planner can spend searching, use the -tl argument.

java -jar planning.jar -a planners/bfs.jar -d benchmarks/blocks.pddl -p benchmarks/sussman.pddl -nl 100 -tl 1000

This limits the planner to 100 nodes visited and 1000 milliseconds (1 second). If the planner visits more than the allowed number of nodes or takes more than the allowed amount of time, it will fail.

The documentation for the all parts of the planning library can be found here. You should review it before starting the projects.

Pre-Configured IDE

Your instructor is providing a pre-configured version of the Eclipse IDE that already includes the planning library and example code. It is recommended, but not required, that you use this IDE. Your instructor will not provide support for other IDEs.

Windows

Mac OS

sudo xattr -cr /Applications/Eclipse\ -\ Planning\ Algorithms.app

Basic Planners

Simple implementations of several planning algorithms that we will discuss in this course can be found in planners.zip.

Benchmarking Planning Algorithms

The planning.jar library can also be used to compare multiple planning algorithms on a list of sample problems. It is used like so:

java -jar planning.jar -a planners/bfs.jar planners/pop.jar -d benchmarks/blocks.pddl -p benchmarks/easy_stack.pddl benchmarks/easy_unstack.pddl benchmarks/sussman.pddl -o results.html

This will load two planners, bfs.jar and pop.jar. Each planner will be tested on three problems, easy_stack, easy_unstack, and sussman from the blocks domain. The results will be printed to results.html.

Planners are ranked according to the following criteria:

You can see the benchmark results for the example planners to get an idea of which algorithms have the best performance overall and on each individual problem.

Writing Your Own Planner

To allow everyone in the course to have a similar development experience, please download and install the Eclipse IDE (or download the pre-configured Eclipse IDE described above).

If you choose not to use the pre-configured IDE, follow these steps:

After installing Eclipse, you should download this compressed archive of several projects. It contains:

Open Eclipse and follow these steps to import the projects:

Notice the project titled Breadth First Search Planner. It contains the source code for bfs.jar. You can start with this planner and modify it to create your project submissions. Make sure to do the following:

Under the Test Planners project, you can run Test.java to see the performance of all planners. You can comment out specific planners or problem at the top of that file to run only a subset of tests.

Please note that this method of running the benchmark tests is unofficial and provided only for your convenience. This is not how your project will be graded!

Project Grading

You will complete three planning programming projects. For each project, you will implement a different kind of algorithm. Your goal is to write a planner which meets or exceeds the performance of the basic planner from each family.

When grading your projects, all planners will be given a node limit of 10,000 and a time limit of 5 minutes.

Your planner will be evaluated based on how it does relative to the other algorithms we have discussed so far in the course. See the section on benchmarking to read about how planners are compared and how ties are broken.

Every student's submission will also be entered into a class-wide competition. The top performing planner will be awarded bonus points for each project.

Project 1: Plan-Space Algorithms

Submit a plan-space search algorithm. Your planner must extend edu.uky.ai.planning.ps.PlanSpacePlanner. The Example Plan Space Planner provides an example implementation. You will be competing against:

Your grade for this project will be determined by which section you are in and how well your planner does relative to other algorithms:

CriteriaGrade
Your planner solves more problems than POP100% (A)
Your planner solves the same number of problems as POP80% (B)
Your planner beats BFS70% (C)
Your planner compiles and runs50% (E)

This script (for Windows or Mac/Linux) will be used to benchmark your submission (where your.jar is replaced by the JAR file you submit).

Project 2: Plan Graph Algorithms

Submit an algorithm which constructs a plan by finding a valid subgraph of a plan graph. Your planner must extend edu.uky.ai.planning.pg.PlanGraphPlanner. The Example Subgraph Planner provides an example implementation. You will be competing against:

Your grade for this project will be as follows:

CriteriaGrade
Your planner solves more problems than GP100% (A)
Your planner solves the same number of problems as GP80% (B)
Your planner beats POP70% (C)
Your planner beats BFS60% (D)
Your planner beats BB50% (E)
Otherwise0% (E)

This script (for Windows or Mac/Linux) will be used to benchmark your submission (where your.jar is replaced by the JAR file you submit).

Project 3: Heuristic Search Algorithms

Submit a state-space heuristic-driven search algorithm. Your planner must extend edu.uky.ai.planning.ss.StateSpacePlanner, which comes in two varieties: ForwardPlanner, which starts the initial state and searches forward to the goal, and BackwardPlanner, which starts the goal and searches backward to the initial state. The Breadth First Search Planner provides an example implementation. You will be competing against:

Your grade for this project will be as follows:

CriteriaGrade
Your planner solves more problems than HSP100% (A)
Your planner solves the same number of problems as HSP80% (B)
Your planner beats GP70% (C)
Your planner beats POP50% (D)
Otherwise0% (E)

This script (for Windows or Mac/Linux) will be used to benchmark your submission (where your.jar is replaced by the JAR file you submit).

Submissions

For every project your should submit 2 files. Both should be named using your UK LinkBlue ID. For example, my LinkBlue ID email is swa378@uky.edu. The two files you should submit are:

The JAR file will be used in the benchmark tests to determine how many points your planner scores. Your source code will be spot-checked to ensure you have correctly implemented the right kind of algorithm.

Your submission must obey the following constraints to receive credit for a project:

Exporting Your Planner

Using the Eclipse IDE, follow these steps to export your planner project as a JAR file:

Exporting Your Source Code

Follow these steps to export your project as a ZIP file:

All submissions are due on Canvas at midnight the day they are due. You must submit both your planner and your source code to receive credit for a project. If you do not submit any of the required files, or if you export them incorrectly such that they cannot be graded, you may receive no credit for the project. If you choose to use an IDE other than Eclipse, it will not be an excuse for incorrectly exporting your planner or source code.