Extending Planning Domains with Fluents

This class covers usage of the PDDL 2.1 main feature — so called fluents. Student is expected to understand the new construct and use it to solve some popular logical puzzles.

1 Preliminaries

First attempts to model planning domains were based directly on the first order logic. One of the main disadvantages of this approach was that first order logic (as every monotonic logic) doesn't allow to change truth value of a sentence. In the same time planning domains are often very dynamic and conditions vary in time. You may have noticed that in both STRIPS and ADL some sentences change their truth values according to the taken actions. The predicate that can change it truth value is called a fluent.

PDDL 2.1 extends this basic notion and introduces fluents as something similar to the mutable variables known from classical programming languages. It became possible to introduce functions that return values, which may vary in time.

2 Tools

Please download source code of PDDL 2.1 solver. The package includes also some examples we will refer to during the class. Please run to terminal and switch to the root folder of the package and then try:

./ff -o ./examples/hanoi/problem.pddl -f ./examples/hanoi/instance.pddl

If command fails, try to recompile the solver (you can refer to the analogical section of the previous class).

3 Example: Hanoi

The new solver supports some new statements. Please check the files: ./examples/hanoi/problem.pddl i ./examples/hanoi/instance.pddl. The new things include:

  • (:requirements :fluents) — informs solver that we want to use fluents
  • :functions (…) — enumerates all fluents used in the model
  • arithmetical conditions — <, >, =, etc.
  • arithmetical expressions — (+ arg1 arg2), (- …), (* …) , (/ …)
  • expression that change fluents' values: (increase fluent newValue) (in C it would be fluent += wartość), and others, i.e.
    • (decrease …) — the same as -= in C
    • (assign …) — the same as = in C
  • (:metric minimize fluent) — informs solver what plans we find interesting / optimal. It should be provided, otherwise solver will complain. If you want to ignore it, run solver with -s 0 option, i.e.
./ff -o ./examples/hanoi/problem.pddl -f ./examples/hanoi/instance.pddl -s 0

Analyze the hanoi example and use it as a reference for further problems.

4 First Puzzle: Bruce Willis Has a Problem

Please watch fragment of the Die Hard 3 movie above. The puzzle depicted there belongs to a quite popular family of “water pouring'” puzzles. The ./examples/jugs folder contains a model of a very similar problem.


  1. Fill missing lines of the problem.pddl, so you can solve instance.pddl in 16 steps.
  2. Remodel the problem so it would use only one action
  3. Modify the problem to include the fountain and help Bruce Willis!

In PDDL 2.1 you can formulate conditional effect (the action will have this effect only if the additional condition is fulfilled):

(when (additional_condition)

5 Second Puzzle: Zombies on the Loose!

Watch two first minutes of the movie above. ./examples/zombie-escape folder contains file related to this puzzle. Then check the assignments and save yourself!


  1. Fill missing lines of the problem.pddl, so you can solve instance.pddl
  2. Remodel the problem so it would use only one action
en/dydaktyka/planning/pddl2.txt · Last modified: 2017/07/17 08:08 (external edit)
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0