CSCI 335 - Artificial Intelligence
Programming Project #2: Planning
You will develop a series of search heuristics for solving planning problems.
These heuristics will be demonstrated using the Blocks World domain, in addition to two domains of your own making.
The Java source files are provided in planner.zip.
To set up the files in Eclipse, do the following:
- Place planner.zip inside your project directory
from Project 1, and unzip the file.
- Click on your project in the package explorer, and press F5 to refresh.
- The files should now be there.
The files are placed in six packages. Classes you will modify are in
Implement the following heuristics. Each one will be a class
that implements the
BreadthFirst.java will implement breadth-first search.
- You will place additional heuristics here as you create them.
- Every heuristic in this package will be visible to
Action.java: Describes a plan operator.
BasicPlanner.java: Wraps a
BestFirstSearcher for generating a plan. It is
abstract in order to enable variants to handle different
BestFirstObject classes. Implements the
BasicPlanStep.java: Useful basis for creating
BasicPlanner. When provided with a
BestFirstHeuristic, the result is a functioning planner.
BreadthFirstTest.java: Should pass all tests upon downloading.
Conjunction.java: Represents the effects of an
Domain.java: Represents a planning domain.
Plan.java: Represents a plan.
PlanGraph.java: Represents a plan graph, a data structure that can be useful to assist in creating plans. You will complete the
PlanGraphTest.java: Unit test for
PlanGraph. It will fail initially. It should pass once your solution to
PlanGraph.java is complete.
PlanStep.java: Represents a plan step, for use in the search process.
Planner.java: Interface for planners. Implemented by
Predicate.java: Represents a parameterizable true/false statement.
Problem.java: Represents a specific planning problem in a given
State.java: Collection of
Predicate objects representing the state of the world.
planner.lisp: The files in this package you may safely ignore.
BestFirstHeuristic interface. Each one
should be placed in
- A heuristic that counts the number of goals that have not yet been
- For each domain:
- Develop at least one heuristic that uses properties of the domain.
For example, in the blocks world, a heuristic could count the number
of blocks stacked atop a block that needs to be moved as part of
- Create a heuristic that creates a relaxed plan that solves the problem. This relaxed plan will ignore the delete effects of each Action. To find a relaxed plan, complete the
extractNoDeletePlan() method in the
PlanGraph class. Then use the length of the relaxed plan as the estimate.
- Devise at least one additional heuristic. It may be domain-independent, or it may be specialized to one of the three domains you are employing.
The Blocks World domain has been
provided for you. You are to construct two additional domains, encoded in
PDDL. Create three problem files for each domain. Place each domain in
a subdirectory of
- The first domain should represent a robot delivering packages in an
- The second domain can represent any environment you would like to encode.
- When creating your three problems, try to create at least one problem
that you believe will be difficult for the planners to solve.
For each heuristic, determine
experimentally the "hardest" Blocks World problem that it can solve in one minute or less
using the Linux machines in the lab. If you would rather use your own
computer, be sure to specify its clock speed. Note that the planner may
well crash from inadequate memory before it reaches the one-minute mark.
Note: If your planner can solve all of the regular Blocks World problems, some extra-hard problems are available in the
For each experiment you run, record:
- Nodes expanded
- Maximum depth
- Effective branching factor
- Solution length
- Time (milliseconds)
- ms/node expansion
When you are finished with your experiments, you will write a short paper
summarizing your findings. Include the following details in your paper:
- A description of each heuristic
- The data you collected from each of your experiments
- An analysis of the data, including:
- A discussion of the relative merits of the heuristics relative to
breadth-first search and each other
- An analysis of how the heuristics are affected in different ways by
- The degree to which the results matched your expectations
- Copies of the code for your heuristics
- On Tuesday, September 5, come to class with a two-slide PowerPoint
presentation. On the first slide, describe one domain you have created.
On the second slide, briefly describe the heuristics you have already
implemented, in addition to other possibilities you are considering.
- Submit your paper and code by
1:15 pm on Thursday, September 7.
|A||Program is working with all heuristics|
Paper is complete
Analysis properly characterizes the basis of each claim
Both additional domains created
|B||One or two heuristics have small bugs|
The analysis is somewhat flawed
One domain is missing or incomplete
|C||Problematic bugs and/or somewhat incomplete or moderately flawed paper|
Both domains are incomplete
|D||Severe bugs and/or multiple parts missing from paper|
Domains are missing
|F||Program does not work at all and/or paper is not seriously attempted|