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 Przykład: Hanoi

Nowy solver wspiera kilka nowych konstrukcji. Proszę przyjrzeć się plikom: ./examples/hanoi/problem.pddl i ./examples/hanoi/instance.pddl. Do nowości należy zaliczyć:

  • (:requirements :fluents) — informuje solver, że nasz model zawiera fluenty
  • :functions (…) — sekcja zawierająca wszystkie fluenty użyte w modelu
  • warunki arytmetyczne — <, >, =, etc.
  • wyrażenia arytmetyczne — (+ arg1 arg2), (- …), (* …) , (/ …)
  • zmiana wartości fluentów (increase fluent wartość), czyli fluent += wartość, i inne, np.
    • (decrease …, czyli -=
    • (assign …, czyli =
  • (:metric minimize fluent) — informuje solver, jakie plany są dla nas interesujące. Solver domyślnie zakłada istnienie tej linijki. Jeżeli jej nie ma (lub chcemy ją zignorować), powinniśmy uruchomić solver z flagą -s 0, np.
./ff -o ./examples/hanoi/problem.pddl -f ./examples/hanoi/instance.pddl -s 0

Proszę przeanalizować przykład i wykorzystać jako referencję do rozwiązywania kolejnych problemów.

4 Zagadka Pierwsza: Problem Bruce'a Willisa

Proszę obejrzeć fragment Szklanej Pułapki 3. Przedstawiona tam zagadka należy do dość dużej rodziny problemów - katalog ./examples/jugs zawiera model podobnego problemu przelewania wody.

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.1492954318.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