Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
en:dydaktyka:planning:pddl2 [2017/04/23 15:24]
msl [Extending Planning Domains with Fluents]
en:dydaktyka:planning:pddl2 [2020/04/14 11:32] (current)
msl
Line 1: Line 1:
 ====== - Extending Planning Domains with Fluents ====== ====== - 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.+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. 
 + 
 +<WRAP center round important 60%> 
 +Due to the COVID-19 outbreak, all files related to this class are stored in the [[https://​gitlab.com/​agh-krr/​2019-2020/​labs-planning|Gitlab repository]]. This class uses files stored in the ''​02_fluents''​ folder. Please refer to the ''​Readme.md''​ on how to submit the solutions. 
 +</​WRAP>​
  
 ===== - Preliminaries ===== ===== - Preliminaries =====
Line 10: Line 14:
  
 ===== - Tools ===== ===== - Tools =====
- +Please clone [[https://​gitlab.com/​agh-krr/2019-2020/​labs-planning ​|repository with the PDDL 2.1 solver]]. The package includes also ''​pddl''​ files in the ''​02_fluents''​ directoryrelated to this classPlease run to terminal and switch to the root folder of the package and then try:
-Proszę ściągnąć {{:pl:​dydaktyka:​planning:​metric-ff-lab.zip|kod solvera wspierającego ​PDDL 2.1 wraz z problemamiktóre będziemy dzisiaj modelować}}Proszę w konsoli przejść do rozpakowanego katalogu i przetestować działanie solvera:+
  
 <code bash> <code bash>
-./ff -o ./examples/hanoi/problem.pddl -f ./examples/hanoi/instance.pddl+./ff -o ./02_fluents/01_hanoi/domain.pddl -f ./02_fluents/01_hanoi/problem.pddl
 </​code>​ </​code>​
  
-Jeżeli komenda nie działaproszę przekompilować solverInstrukcje nie różnią się od tych przedstawionych na [[pddl|poprzednim laboratorium w sekcji 5]].+Replace ''​ff''​ with appropriate onee.g. ''​ff-macos''​ on macOS. In case, none of the binaries works for you, you can build the planner according to the instruction in the repo's ''​README.md''​.
  
-===== - Przykład: Hanoi =====+===== - Example: Hanoi =====
  
-Nowy solver ​wspiera kilka nowych konstrukcjiProszę przyjrzeć się plikom: ''​./​examples/hanoi/problem.pddl''​ i ''​./​examples/hanoi/instance.pddl''​. ​Do nowości należy zaliczyć:+The new solver ​supports some new statementsPlease check the files: ''​./​lab2/hanoi/domain.pddl''​ i ''​./​lab2/hanoi/problem.pddl''​. ​The new things include:
  
-  * ''​(:​requirements :​fluents)''​ --- informuje ​solver, że nasz model zawiera fluenty +  * ''​(:​requirements :​fluents)''​ --- informs ​solver ​that we want to use fluents 
-  * '':​functions (...)''​ --- sekcja zawierająca wszystkie fluenty użyte w modelu +  * '':​functions (...)''​ --- enumerates all fluents used in the model 
-  * warunki arytmetyczne ​--- ''<'',​ ''>'',​ ''​='',​ etc. +  * arithmetical conditions ​--- ''<'',​ ''>'',​ ''​='',​ etc. 
-  * wyrażenia arytmetyczne ​--- ''​(+ arg1 arg2)'',​ ''​(- ...)'',​ ''​(* ...)''​ , ''​(/​ ...)''​ +  * arithmetical expressions ​--- ''​(+ arg1 arg2)'',​ ''​(- ...)'',​ ''​(* ...)''​ , ''​(/​ ...)''​ 
-  * zmiana wartości fluentów ​''​(increase fluent ​wartość)''​, czyli ''​fluent += wartość'', ​i innenp+  * expression that change fluents'​ values: ​''​(increase fluent ​newValue)'' ​(in C it would be ''​fluent += wartość''​)and othersi.e
-     * ''​(decrease ...''​, czyli ''​-=''​ +     * ''​(decrease ...)'' ​--- the same as ''​-='' ​in C 
-     * ''​(assign ...''​, czyli ''​=''​ +     * ''​(assign ...)'' ​--- the same as ''​='' ​in C 
-  * ''​(:​metric minimize fluent)''​ --- informuje ​solver, ​jakie plany są dla nas interesująceSolver 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.+  * ''​(:​metric minimize fluent)''​ --- informs ​solver ​what plans we find interesting / optimal. It should be providedotherwise solver will complainIf you want to ignore itrun solver ​with ''​-s 0'' ​optioni.e.
  
 <code bash> <code bash>
-./ff -o ./examples/hanoi/problem.pddl -f ./examples/hanoi/instance.pddl -s 0+./ff -o ./02_fluents/01_hanoi/domain.pddl -f ./02_fluents/01_hanoi/problem.pddl -s 0
 </​code>​ </​code>​
  
-Proszę przeanalizować przykład i wykorzystać jako referencję do rozwiązywania kolejnych problemów.+Analyze the hanoi example and use it as a reference for further problems.
  
-===== - Zagadka PierwszaProblem ​Bruce'Willisa ​=====+===== - First Puzzle: Bruce Willis Has Problem ​=====
  
-{{ :​pl:​dydaktyka:​planning:​die-hard-3.jpg?​200|}} +{{ youtube>BVtQNK_ZUJg ​}}
-Proszę obejrzeć fragment [[https://​www.youtube.com/​watch?​v=BVtQNK_ZUJg|Szklanej Pułapki 3]]. Przedstawiona tam zagadka należy do dość dużej rodziny problemów - katalog ''​./​examples/​jugs''​ zawiera model podobnego problemu [[http://​www.riddleministry.com/​riddles/​water-puzzle-19-13-7/​1246/​|przelewania wody]]. ​+
  
-==== Zadania obowiązkowe ====+\\ 
 +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 ''​./​02_fluents/​02_jugs''​ folder contains a model of a [[http://​www.riddleministry.com/​riddles/​water-puzzle-19-13-7/​1246/​|very similar problem]]. ​
  
-Proszę uzupełnić plik ''​problem.pddl'',​ tak, aby rozwiązać instancję ''​instance.pddl''​ (plan powinien składać się z 16 akcji).+==== Assignments ====
  
-==== Zadania na plus ====+  - Fill missing lines of the ''​domain.pddl'',​ so you can solve ''​problem.pddl''​ in 16 steps. 
 +  - Remodel the problem so it would use only one action 
 +  - Modify the problem to include the fountain and help Bruce Willis!
  
 <WRAP center round tip 60%> <WRAP center round tip 60%>
-PDDL 2.1 można formułować efekty warunkowe+In PDDL 2.1 you can formulate conditional effect (the action will have this effect only if the additional condition is fulfilled):
 <code lisp> <code lisp>
-(when (warunek+(when (additional_condition
-  (efekt)+  (effect)
 ) )
 </​code>​ </​code>​
-Oznacza to, że dana akcja będzie miała określony efekt jedynie, gdy spełniony jest zadany warunek. 
- 
 </​WRAP>​ </​WRAP>​
  
-  - Czy jesteś w stanie zamodelować problem używając tylko jednej akcji? +===== - Second PuzzleZombies on the Loose! ​=====
-  - Czy jesteś w stanie zmodyfikować problem tak, żeby uwzględniał on fontannę? Jeżeli tak, rozwiąż Problem Bruce'​a Willisa. +
-  - Czy jesteś w stanie zamodelować ten problem w MiniZincu?​ +
- +
-===== - Zagadka DrugaUcieczka Przed Zombie ​=====+
  
-Proszę obejrzeć pierwsze dwie minuty filmu ze [[http://​interestingengineering.com/​can-solve-impossible-bridge-riddle/​|strony o interesujących problemach]]. Katalog ''​./​examples/​zombie-escape''​ zawiera pliki związane z przedstawioną tam zagadką. ​  +{{ youtube>​7yDmGnA8Hw0 }}
  
-==== Zadania obowiązkowe ====+\\ 
 +Watch two first minutes of the movie above. ''​./​02_fluents/​03_zombie-escape''​ folder contains files related to this puzzle. Then check the assignments and save yourself! ​
  
-Proszę uzupełnić pliki ''​problem.pddl''​ i ''​instance.pddl''​ tak, aby solver rozwiązał zagadkę z filmiku. 
  
-==== Zadania na plus ==== 
  
-  - Czy jesteś w stanie zamodelować problem używając tylko jednej akcji? +==== Assignments ====
-  - Czy jesteś w stanie w podobny sposób zamodelować [[http://​www.learn4good.com/​games/​puzzle/​boat.htm|problem misjonarzy i kanibali]]?​ +
-  - Czy jesteś w stanie zamodelować ten problem w MiniZincu?+
  
 +  - Fill missing lines of the ''​domain.pddl'',​ so you can solve ''​problem.pddl''​
 +  - Remodel the problem so it would use only one action
 +  - Solve the similar [[http://​www.learn4good.com/​games/​puzzle/​boat.htm|problem of missionaries and cannibals]]
en/dydaktyka/planning/pddl2.1492953879.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