This is an old revision of the document!


Extending Planning Domains with Fluents

This class covers usage of the PDDL 2.1 main feature — so called fluents. Student is expected to understand it's notion 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. 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.

Zadania obowiązkowe

Proszę uzupełnić plik problem.pddl, tak, aby rozwiązać instancję instance.pddl (plan powinien składać się z 16 akcji).

Zadania na plus

W PDDL 2.1 można formułować efekty warunkowe:

(when (warunek)
  (efekt)
)

Oznacza to, że dana akcja będzie miała określony efekt jedynie, gdy spełniony jest zadany warunek.

  1. Czy jesteś w stanie zamodelować problem używając tylko jednej akcji?
  2. Czy jesteś w stanie zmodyfikować problem tak, żeby uwzględniał on fontannę? Jeżeli tak, rozwiąż Problem Bruce'a Willisa.
  3. Czy jesteś w stanie zamodelować ten problem w MiniZincu?

5 Zagadka Druga: Ucieczka Przed Zombie

Proszę obejrzeć pierwsze dwie minuty filmu ze strony o interesujących problemach. Katalog ./examples/zombie-escape zawiera pliki związane z przedstawioną tam zagadką.

Zadania obowiązkowe

Proszę uzupełnić pliki problem.pddl i instance.pddl tak, aby solver rozwiązał zagadkę z filmiku.

Zadania na plus

  1. Czy jesteś w stanie zamodelować problem używając tylko jednej akcji?
  2. Czy jesteś w stanie w podobny sposób zamodelować problem misjonarzy i kanibali?
  3. Czy jesteś w stanie zamodelować ten problem w MiniZincu?
en/dydaktyka/planning/pddl2.1492955058.txt.gz · Last modified: 2019/06/27 16:00 (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