SlideShare une entreprise Scribd logo
1  sur  63
Télécharger pour lire hors ligne
Stavros Vassos, University of Athens, Greece   stavrosv@di.uoa.gr   May 2012




INTRODUCTION TO AI
STRIPS PLANNING
.. and Applications to Video-games!
Course overview
2


       Lecture 1: Game-inspired competitions for AI research,
        AI decision making for non-player characters in games
       Lecture 2: STRIPS planning, state-space search
       Lecture 3: Planning Domain Definition Language (PDDL),
        using an award winning planner to solve Sokoban
       Lecture 4: Planning graphs, domain independent
        heuristics for STRIPS planning
       Lecture 5: Employing STRIPS planning in games:
        SimpleFPS, iThinkUnity3D, SmartWorkersRTS
       Lecture 6: Planning beyond STRIPS
STRIPS planning
3


       Given:
         Initial   state
STRIPS planning
4


       Given:
         Initial   state

         Goal
STRIPS planning
5


       Given:
         Initial   state

         Goal


         Available     actions
STRIPS planning
6


       Given:
         Initial   state

         Goal


         Available     actions


       Find:
        A  sequence of actions that achieves the goal
         E.g.: [Left, Down, Left, Up, …]
Planning Domain Description Language
7


       Planning Domain Definition Language (PDDL)
         Formal  language for specifying planning problems
         Formal syntax similar to a programming language

         Includes STRIPS and ADL, and many more features



         Provides  the ground for performing a direct comparison
          between planning techniques and evaluating against
          classes of problems
Planning Domain Description Language
8


       Blocks world domain

         Initial   state: s0                                  Α
                                                               Β
                                        Α   Β     C            C
         Goal:     g
                                            s0                 g

         Available     actions: moving a block
           from the table to the top of another block
           from the top of another block to the table
           from the top of one block to the top of another block
Planning Domain Description Language
9


       Init( On(Α,Table)  On(Β,Table)  On(C,Table)
               Clear(Α)  Clear(Β)  Clear(C) )
       Goal( On(Α,Β)  On(Β,C) )
       Action( Move(b,x,y),
            PRECONDITIONS: On(b,x)  Clear(b)  Clear(y)
            EFFECTS: On(b,y)  Clear(x)  On(b,x)
              Clear(y) )
       Action( MoveToTable(b,x),
            PRECONDITIONS: On(b,x)  Clear(b)
            EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
Planning Domain Description Language
10


        Init( On(Α,Table)  On(Β,Table)  On(C,Table) …)
                                                (:init
                Clear(Α)  Clear(Β)  Clear(C) )
                                                (:goal …)
        Goal( On(Α,Β)  On(Β,C) )
                                                (:action …)
        Action( Move(b,x,y),
             PRECONDITIONS: On(b,x)  Clear(b)(:action …)
                                               Clear(y)
             EFFECTS: On(b,y)  Clear(x)  On(b,x)
               Clear(y) )
        Action( MoveToTable(b,x),
             PRECONDITIONS: On(b,x)  Clear(b)
             EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
Planning Domain Description Language
11


        Init( On(Α,Table)  On(Β,Table)  On(C,Table) …)
                                                (:init
                Clear(Α)  Clear(Β)  Clear(C) )
                                                (:goal …)
        Goal( On(Α,Β)  On(Β,C) )
                                                (:action …)
        Action( Move(b,x,y),
             PRECONDITIONS: On(b,x)  Clear(b)(:action …)
                                               Clear(y)
             EFFECTS: On(b,y)  Clear(x)  On(b,x)
               Clear(y) )
                                             (:objects …)
        Action( MoveToTable(b,x),
             PRECONDITIONS: On(b,x)  Clear(b)(:predicates …)
                                           
             EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
Planning Domain Description Language
12


      (:init …)
      (:goal …)

      (:action …)          DOMAIN
      (:action …)

                            PROBLEM
      (:objects …)
      (:predicates …)
Planning Domain Description Language
13


      (:init …)
      (:goal …)

      (:action …)          DOMAIN
      (:action …)

                            PROBLEM
      (:objects …)
      (:predicates …)
Planning Domain Description Language
14


      (:init …)
      (:goal …)

      (:action …)          DOMAIN
      (:action …)

                            PROBLEM
      (:objects …)
      (:predicates …)
Planning Domain Description Language
15


      (:predicates …)
      (:action …)         DOMAIN
      (:action …)




      (:objects …)
      (:init …)         PROBLEM
      (:goal …)
Planning Domain Description Language
16


        On(A,B)              (on a b)

        On(A,B)             (not (on a b))

        On(A,B)  On(B,C)    (and (on a b) (on b c))

        On(x,y)              (on ?x ?y)
The blocks world example in PDDL
17


        Blocks world domain


          Available   predicates   (:predicates …)

          Available   actions      (:action …)
The blocks world example in PDDL
18


        Blocks world domain


          Available   predicates   (:predicates
                                        (on ?x ?y) (clear ?x)
                                    )
The blocks world example in PDDL
19


        Blocks world domain


          Available   action   (:action move
                                     :parameters (?b ?x ?y)
                                     :precondition (and
                                             (on ?b ?x) (clear ?b)
                                             (clear ?y))
                                     :effect (…)
                                )
The blocks world example in PDDL
20


        Blocks world domain


          Available   action   (:action move-to-table
                                     :parameters (?b ?x)
                                     :precondition (…)
                                     :effect (…)
                                )
The blocks world example in PDDL
21


        Blocks world problem


          Available     objects   (:objects …)

          Initial   state         (:init …)

          Goal                    (:goal …)
The blocks world example in PDDL
22


        Blocks world domain


          Available   objects   (:objects
                                     a b c table
                                 )
The blocks world example in PDDL
23


        Blocks world domain


          Initial   state       (:init
                                          (on a table) (clear a)
                                          (on b table) (clear b)
                     Α   Β   Γ
                                          (on c table) (clear c)
                                 )
The blocks world example in PDDL
24


        Blocks world domain


          Goal                (:goal
                  Α
                                   (and (on a b) (on b c) )
                  Β
                  Γ
                               )
The blocks world example in PDDL
25


     blocks-domain.txt:                                     blocks-problem1.txt:
     (define (domain gripper)                               (define (problem gripper1)
     (:requirements :strips)                                (:domain gripper)
     (:predicates (on ?x ?y) (clear ?x))                    (:objects a b c table)


     (:action move                                          (:init
     :parameters (?b ?x ?y)                                     (on a table) (on b table) (on c table)
     :precondition (and (on ?b ?x) (clear ?b) (clear ?y))       (clear a) (clear b) (clear c)
     :effect (and (not (on ?b ?x))                          )
             (not (clear ?y))
             (on ?b ?y)                                     (:goal (and (on a b) (on b c)))
             (clear ?x)))                                   )
     …
Using PDDL planners
26


        Planning Domain Definition Language (PDDL)
          International   Planning Competition 1998 – today

          SAT  Plan
          TL Plan             Planning problems in
                                 PDDL, e.g., Blocks
          FF                 world, Storage, Trucks,
                                        …
          BlackBox

          SHOP2

          TALPlanner
                             Direct comparison between
         …                  planning techniques! E.g.,
                             evaluation of heuristics, …
Using PDDL planners: Blocks world
27


        blackbox –o blocks-domain.txt –f blocks-problem1.txt

         ----------------------------------------------------
         Begin plan
                                                                Α   Β   C
         1 (move b table c)
         2 (move a table b)
         End plan
         ----------------------------------------------------       Α
                                                                    Β
                                                                    C
Using PDDL planners: Blocks world
28


        blackbox –o blocks-domain.txt –f blocks-problem2.txt
         ----------------------------------------------------
         Begin plan                                                     G
         1 (move e b d)                                         D   E   F
         2 (move b table e)                                     Α   Β   C
         3 (move g f table)
         4 (move f c g)
         5 (move b e c)                                             Α
         6 (move e d f)                                             Β
         7 (move d a e)                                             C
         8 (move b c a)                                             D
                                                                    E
         9 (move c table d)
                                                                    F
         10 (move b a c)
                                                                    G
         11 (move a table b)
         End plan
Using PDDL planners
29


        We can use blackbox (or any other off-the-self PDDL
         planner) for any problem we can write in PDDL!
Using PDDL planners: Sokoban
30


        We can use blackbox (or any other off-the-self PDDL
         planner) for any problem we can write in PDDL!




        Let’s do this for Sokoban
Using PDDL planners: Sokoban
31




      Available predicates
      Available actions



      Available   objects
      Initial state

      Goal
Using PDDL planners: Sokoban
32




      Available   predicates
Using PDDL planners: Sokoban
33




      Available     predicates
        (robot-at ?loc)
        (object-at ?b ?loc)
Using PDDL planners: Sokoban
34




      Available     predicates
        (robot-at ?loc)
        (object-at ?b ?loc)                     c4-4 c5-4 c6-4

                                  c1-3 c2-3 c3-3 c4-3 c5-3 c6-3
      Available     objects      c1-2 c2-2 c3-2 c4-2 c5-2
        c1-1,c1-2, c2-1, …
                                  c1-1 c2-1
        box1, box2
Using PDDL planners: Sokoban
35




      Initial   state
        (robot-at c5-4)
        (object-at box1 c3-3)                  c4-4        c6-4

        (object-at box2 c4-3)   c1-3 c2-3             c5-3 c6-3

                                 c1-2 c2-2 c3-2 c4-2 c5-2

                                 c1-1 c2-1
Using PDDL planners: Sokoban
36




      Available   actions
        move(?from   ?to ?dir)

       :precondition (




       )
Using PDDL planners: Sokoban
37




      Available   actions
        move(?from   ?to ?dir)

       :precondition (and
         (robot-at ?from)
         (adjacent ?from ?to ?dir)
         (empty ?to)
       )
Using PDDL planners: Sokoban
38




      Available   actions
        move(?from   ?to ?dir)

       :effect (and




       )
Using PDDL planners: Sokoban
39




      Available   actions
        move(?from   ?to ?dir)

       :effect (and
         (empty ?from)
         (robot-at ?to)
         (not (empty ?to))
         (not (robot-at ?from))
       )
Using PDDL planners: Sokoban
40




      Available     predicates
        (robot-at ?loc)
        (object-at ?b ?loc)
        (adjacent ?from ?to ?dir)
        (empty ?to)
Using PDDL planners: Sokoban
41




      Initial   state
        (robot-at c5-4)
        (object-at box1 c3-3)
        (object-at box2 c4-3)        c2-3

                                 c1-2 c2-2 c3-2
        (empty c1-1)
                                      c2-1
        (empty c2-1)
        (empty c1-2)
        (empty c2-2)
       …
Using PDDL planners: Sokoban
42




      Initial   state
        (robot-at c5-4)
        (object-at box1 c3-3)
        (object-at box2 c4-3)             c2-3

                                      c1-2 c2-2 c3-2
        (adjacent c2-2 c3-2 right)
                                           c2-1
        (adjacent c2-2 c1-2 left)
        (adjacent c2-2 c2-3 up)
        (adjacent c2-2 c2-1 down)
       …
Using PDDL planners: Sokoban
43




      Available   actions
        push(?rloc   ?bloc ?floc ?dir ?b)
Using PDDL planners: Sokoban
44




      Available   actions
        push(?rloc   ?bloc ?floc ?dir ?b)

       :precondition (and
         (robot-at ?rloc)
         (object-at ?b ?bloc)
         (adjacent ?rloc ?bloc ?dir)
         (adjacent ?bloc ?floc ?dir)
         (empty ?floc)
       )
Using PDDL planners: Sokoban
45




      Available   actions
        push(?rloc   ?bloc ?floc ?dir ?b)

       :effect (and
         (robot-at ?bloc)
         (object-at ?b ?floc)
         (empty ?rloc)
         (not (robot-at ?rloc))
         (not (object-at ?b ?bloc))
         (not (empty ?floc))
       )
Using PDDL planners: Sokoban
46




      Goal
        (object-at box1 c4-3)
        (object-at box2 c5-3)                  c4-4        c6-4

                                 c1-3 c2-3                  c6-3

                                 c1-2 c2-2 c3-2 c4-2 c5-2

                                 c1-1 c2-1
Using PDDL planners: Sokoban
47


        blackbox –o sokoban-domain.txt –f sokoban-problem.txt
         ----------------------------------------------------
         Begin plan
         1 (push c4-4 c4-3 c4-2 down box1)
         2 (push c4-3 c3-3 c2-3 left box2)
         3 (move c3-3 c3-2 down)
         4 (move c3-2 c2-2 left)
         5 (move c2-2 c1-2 left)
         …
         27 (move c2-2 c1-2 left)
         28 (move c1-2 c1-3 up)
         29 (push c1-3 c2-3 c3-3 right box1)
         30 (push c2-3 c3-3 c4-3 right box1)
         End plan
         ----------------------------------------------------
Using PDDL planners: SimpleGame
48


        SimpleGame domain

                                turn(?fromd ?tod)
                                move(?froml ?tol
                                 ?dir)
                                pickup(?o ?l)
                                stab(?l ?knife)
                                shoot(?locn ?locp
                                 ?dir ?gun )
Building your own PDDL planner
49


       Pyperplan
         Lightweight STRIPS planner written in Python. Developed during
          the planning course at Albert-Ludwigs-Universität Freiburg
          2010/2011, GNU General Public License 3
         https://bitbucket.org/malte/pyperplan
       Source   code of academic planners
         BlackBox:
          http://www.cs.rochester.edu/u/kautz/satplan/blackbox/
         FastForward: http://www.loria.fr/~hoffmanj/ff.html
         FastDownward: http://www.fast-downward.org/
       ANTLR    Parser Generator
         http://www.antlr.org/
         http://www.antlr.org/grammar/1222962012944/Pddl.g
Building your own PDDL planner
50


        Quick overview of the provided PROLOG code
        Good for quick prototyping ;-)
Building your own PDDL planner
51


        Quick overview of the provided PROLOG code
        Works with SWI Prolog 6.x (tested with 6.0.2)
        Predicates provided
          parsePDDL(+DomainFile,        +ProblemFile)
          get_init(-InitialState)

          get_goal(-Goal)

          satisfies_goal(+State)

          progress(+State,      -Action, -NextState)
          h(+State,   -Value)
        {dfs,astar}planner(+DomainFile, +ProblemFile)
Planning Domain Description Language
52


        Planning Domain Definition Language (PDDL)
          International   Planning Competition 1998 – today

          SAT  Plan
          TL Plan

          FF                    Sokoban
          BlackBox

          SHOP2

          TALPlanner
                             Direct comparison between
         …                  planning techniques! E.g.,
                             evaluation of heuristics, …
Using PDDL planners
53


        FastDownward [Helmert 2006]
          Introduced  a new type of heuristic that is not based on
           an empty list of negative actions
          Efficient implementation of all notable forward search
           methods and heuristics (including the more recent ones)
          Requires a number of preprocessing steps that
           transforms the STRIPS planning problem…
Using PDDL planners
54


        FastDownward [Helmert 2006]
          Introduced  a new type of heuristic that is not based on
           an empty list of negative actions
          Efficient implementation of all notable forward search
           methods and heuristics (including the more recent ones)
          Requires a number of preprocessing steps that
           transforms the STRIPS planning problem…

          Can be used as a framework to evaluate forward
           search planning methods
Using PDDL planners
55


        FastDownward [Helmert 2006]
          translate/translate.py   sokoban-domain.txt 
           sokoban.problem.txt
          preprocess/preprocess < output.sas

          search/downward --search SearchConfiguration < output



        http://www.fast-downward.org
Using PDDL planners: Sokoban
56


        search/downward --search "astar(blind())" <output
Using PDDL planners: Sokoban
57


        search/downward --search "astar(goalcount())"
Using PDDL planners: Sokoban
58


        search/downward --search "astar(hmax())" <output
Using PDDL planners: Sokoban
59


        search/downward --search "astar(add())" <output
Using PDDL planners: Sokoban
60


        search/downward --search "lazy_greedy(ff())" <output
Using PDDL planners: Sokoban
61


        Notice that the planner does not know anything
         about the planning problem we are solving
        The heuristics we tried are domain independent
          goal   count
          hmax

          hadd

          FF

        We will see how each one works in Lecture 4 (after
         we first go over planning graphs that are needed)
Next lecture
62


        Lecture 1: Game-inspired competitions for AI research,
         AI decision making for non-player characters in games
        Lecture 2: STRIPS planning, state-space search
        Lecture 3: Planning Domain Definition Language (PDDL),
         using an award winning planner to solve Sokoban
        Lecture 4: Planning graphs, domain independent
         heuristics for STRIPS planning
        Lecture 5: Employing STRIPS planning in games:
         SimpleFPS, iThinkUnity3D, SmartWorkersRTS
        Lecture 6: Planning beyond STRIPS
Bibliography
63


        Material
            Artificial Intelligence: A Modern Approach 2nd Ed. Stuart Russell, Peter
             Norvig. Prentice Hall, 2003 Section 11.4


        References
          PDDL - The Planning Domain Definition Language. Drew McDermott,
           Malik Ghallab, Adele Howe, Craig Knoblock, Ashwin Ram, Manuela
           Veloso, Daniel Weld, David Wilkins. Technical report, Yale Center for
           Computational Vision and Control, TR-98-003, 1998.
          Unifying SAT-Based and Graph-Based Planning. Henry Kautz, Bart
           Selman. In Proceedings of the International Joint Conference on
           Artificial Intelligence (IJCAI), 1999
          The Fast Downward Planning System. Malte Helmert. Artificial
           Intelligence Research (JAIR), Vol. 26, 2006

Contenu connexe

Tendances

Longest common subsequence(dynamic programming).
Longest common subsequence(dynamic programming).Longest common subsequence(dynamic programming).
Longest common subsequence(dynamic programming).munawerzareef
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Farwa Ansari
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic ProgrammingSahil Kumar
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processingasodariyabhavesh
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and boundAbhishek Singh
 
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theoryBCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theoryRai University
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp) Archana432045
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & ReasoningSajid Marwat
 
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...Bang Xiang Yong
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...Hemantha Kulathilake
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge RepresentationHarmony Kwawu
 
Alpha beta pruning in ai
Alpha beta pruning in aiAlpha beta pruning in ai
Alpha beta pruning in aiSavyasachi14
 

Tendances (20)

Longest common subsequence(dynamic programming).
Longest common subsequence(dynamic programming).Longest common subsequence(dynamic programming).
Longest common subsequence(dynamic programming).
 
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
Introduction to Computer theory (Automata Theory) 2nd Edition By Denial I.A. ...
 
Lecture 7
Lecture 7Lecture 7
Lecture 7
 
04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks04 Multi-layer Feedforward Networks
04 Multi-layer Feedforward Networks
 
Graph Based Pattern Recognition
Graph Based Pattern RecognitionGraph Based Pattern Recognition
Graph Based Pattern Recognition
 
Logic agent
Logic agentLogic agent
Logic agent
 
Dynamic Programming
Dynamic ProgrammingDynamic Programming
Dynamic Programming
 
Chapter 9 morphological image processing
Chapter 9 morphological image processingChapter 9 morphological image processing
Chapter 9 morphological image processing
 
0 1 knapsack using branch and bound
0 1 knapsack using branch and bound0 1 knapsack using branch and bound
0 1 knapsack using branch and bound
 
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theoryBCA_Semester-II-Discrete Mathematics_unit-i Group theory
BCA_Semester-II-Discrete Mathematics_unit-i Group theory
 
Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)   Constraint satisfaction problems (csp)
Constraint satisfaction problems (csp)
 
Propositional Logic and Pridicate logic
Propositional Logic and Pridicate logicPropositional Logic and Pridicate logic
Propositional Logic and Pridicate logic
 
Markov Random Field (MRF)
Markov Random Field (MRF)Markov Random Field (MRF)
Markov Random Field (MRF)
 
Alpha beta pruning
Alpha beta pruningAlpha beta pruning
Alpha beta pruning
 
Knowledge Representation & Reasoning
Knowledge Representation & ReasoningKnowledge Representation & Reasoning
Knowledge Representation & Reasoning
 
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...
Uncertainty Quantification with Unsupervised Deep learning and Multi Agent Sy...
 
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
COM2304: Intensity Transformation and Spatial Filtering – I (Intensity Transf...
 
Expert System Knoweldge Representation
Expert System Knoweldge RepresentationExpert System Knoweldge Representation
Expert System Knoweldge Representation
 
Alpha beta pruning in ai
Alpha beta pruning in aiAlpha beta pruning in ai
Alpha beta pruning in ai
 
Parallel Algorithms
Parallel AlgorithmsParallel Algorithms
Parallel Algorithms
 

Similaire à Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1

Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1Stavros Vassos
 
Query Rewriting and Optimization for Ontological Databases
Query Rewriting and Optimization for Ontological DatabasesQuery Rewriting and Optimization for Ontological Databases
Query Rewriting and Optimization for Ontological DatabasesGiorgio Orsi
 
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCsThe SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCsStavros Vassos
 
Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Fulvio Corno
 
Scala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsScala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsFrançois Garillot
 
21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligenceANTOARA2211003040050
 
Classical And Htn Planning
Classical And Htn PlanningClassical And Htn Planning
Classical And Htn Planningahmad bassiouny
 
TR tabling presentation_2010_09
TR tabling presentation_2010_09TR tabling presentation_2010_09
TR tabling presentation_2010_09Paul Fodor
 
09 logic programming
09 logic programming09 logic programming
09 logic programmingsaru40
 
Parametric surface visualization in Directx 11 and C++
Parametric surface visualization in Directx 11 and C++Parametric surface visualization in Directx 11 and C++
Parametric surface visualization in Directx 11 and C++Alejandro Cosin Ayerbe
 
Mathematical sciences-paper-ii
Mathematical sciences-paper-iiMathematical sciences-paper-ii
Mathematical sciences-paper-iiknowledgesociety
 
스코프와 실행문맥
스코프와 실행문맥스코프와 실행문맥
스코프와 실행문맥우영 주
 
Good functional programming is good programming
Good functional programming is good programmingGood functional programming is good programming
Good functional programming is good programmingkenbot
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1Stavros Vassos
 

Similaire à Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1 (20)

Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2
 
Planning
PlanningPlanning
Planning
 
Planning
PlanningPlanning
Planning
 
Orsi Vldb11
Orsi Vldb11Orsi Vldb11
Orsi Vldb11
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part1
 
Query Rewriting and Optimization for Ontological Databases
Query Rewriting and Optimization for Ontological DatabasesQuery Rewriting and Optimization for Ontological Databases
Query Rewriting and Optimization for Ontological Databases
 
Gottlob ICDE 2011
Gottlob ICDE 2011Gottlob ICDE 2011
Gottlob ICDE 2011
 
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCsThe SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs
The SimpleFPS Planning Domain: A PDDL Benchmark for Proactive NPCs
 
Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)Sets, maps and hash tables (Java Collections)
Sets, maps and hash tables (Java Collections)
 
Scala Collections : Java 8 on Steroids
Scala Collections : Java 8 on SteroidsScala Collections : Java 8 on Steroids
Scala Collections : Java 8 on Steroids
 
Classical Planning
Classical PlanningClassical Planning
Classical Planning
 
21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence
 
Classical And Htn Planning
Classical And Htn PlanningClassical And Htn Planning
Classical And Htn Planning
 
TR tabling presentation_2010_09
TR tabling presentation_2010_09TR tabling presentation_2010_09
TR tabling presentation_2010_09
 
09 logic programming
09 logic programming09 logic programming
09 logic programming
 
Parametric surface visualization in Directx 11 and C++
Parametric surface visualization in Directx 11 and C++Parametric surface visualization in Directx 11 and C++
Parametric surface visualization in Directx 11 and C++
 
Mathematical sciences-paper-ii
Mathematical sciences-paper-iiMathematical sciences-paper-ii
Mathematical sciences-paper-ii
 
스코프와 실행문맥
스코프와 실행문맥스코프와 실행문맥
스코프와 실행문맥
 
Good functional programming is good programming
Good functional programming is good programmingGood functional programming is good programming
Good functional programming is good programming
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture5-Part1
 

Plus de Stavros Vassos

Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsStavros Vassos
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityStavros Vassos
 
Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchStavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Stavros Vassos
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Stavros Vassos
 

Plus de Stavros Vassos (7)

Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basics
 
Pathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in UnityPathfinding - Part 2: Examples in Unity
Pathfinding - Part 2: Examples in Unity
 
Pathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic searchPathfinding - Part 1: Α* heuristic search
Pathfinding - Part 1: Α* heuristic search
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part1
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture4-Part2
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture1-Part2
 
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part2
 

Dernier

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)Gabriella Davis
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsRoshan Dwivedi
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyKhushali Kathiriya
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 

Dernier (20)

presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live StreamsTop 5 Benefits OF Using Muvi Live Paywall For Live Streams
Top 5 Benefits OF Using Muvi Live Paywall For Live Streams
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Artificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : UncertaintyArtificial Intelligence Chap.5 : Uncertainty
Artificial Intelligence Chap.5 : Uncertainty
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 

Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1

  • 1. Stavros Vassos, University of Athens, Greece stavrosv@di.uoa.gr May 2012 INTRODUCTION TO AI STRIPS PLANNING .. and Applications to Video-games!
  • 2. Course overview 2  Lecture 1: Game-inspired competitions for AI research, AI decision making for non-player characters in games  Lecture 2: STRIPS planning, state-space search  Lecture 3: Planning Domain Definition Language (PDDL), using an award winning planner to solve Sokoban  Lecture 4: Planning graphs, domain independent heuristics for STRIPS planning  Lecture 5: Employing STRIPS planning in games: SimpleFPS, iThinkUnity3D, SmartWorkersRTS  Lecture 6: Planning beyond STRIPS
  • 3. STRIPS planning 3  Given:  Initial state
  • 4. STRIPS planning 4  Given:  Initial state  Goal
  • 5. STRIPS planning 5  Given:  Initial state  Goal  Available actions
  • 6. STRIPS planning 6  Given:  Initial state  Goal  Available actions  Find: A sequence of actions that achieves the goal  E.g.: [Left, Down, Left, Up, …]
  • 7. Planning Domain Description Language 7  Planning Domain Definition Language (PDDL)  Formal language for specifying planning problems  Formal syntax similar to a programming language  Includes STRIPS and ADL, and many more features  Provides the ground for performing a direct comparison between planning techniques and evaluating against classes of problems
  • 8. Planning Domain Description Language 8  Blocks world domain  Initial state: s0 Α Β Α Β C C  Goal: g s0 g  Available actions: moving a block  from the table to the top of another block  from the top of another block to the table  from the top of one block to the top of another block
  • 9. Planning Domain Description Language 9  Init( On(Α,Table)  On(Β,Table)  On(C,Table)  Clear(Α)  Clear(Β)  Clear(C) )  Goal( On(Α,Β)  On(Β,C) )  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y) EFFECTS: On(b,y)  Clear(x)  On(b,x)  Clear(y) )  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b) EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
  • 10. Planning Domain Description Language 10  Init( On(Α,Table)  On(Β,Table)  On(C,Table) …)  (:init  Clear(Α)  Clear(Β)  Clear(C) )  (:goal …)  Goal( On(Α,Β)  On(Β,C) )  (:action …)  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)(:action …)   Clear(y) EFFECTS: On(b,y)  Clear(x)  On(b,x)  Clear(y) )  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b) EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
  • 11. Planning Domain Description Language 11  Init( On(Α,Table)  On(Β,Table)  On(C,Table) …)  (:init  Clear(Α)  Clear(Β)  Clear(C) )  (:goal …)  Goal( On(Α,Β)  On(Β,C) )  (:action …)  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)(:action …)   Clear(y) EFFECTS: On(b,y)  Clear(x)  On(b,x)  Clear(y) ) (:objects …)  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b)(:predicates …)  EFFECTS: On(b,Table)  Clear(x)  On(b,x) )
  • 12. Planning Domain Description Language 12  (:init …)  (:goal …)  (:action …) DOMAIN  (:action …) PROBLEM  (:objects …)  (:predicates …)
  • 13. Planning Domain Description Language 13  (:init …)  (:goal …)  (:action …) DOMAIN  (:action …) PROBLEM  (:objects …)  (:predicates …)
  • 14. Planning Domain Description Language 14  (:init …)  (:goal …)  (:action …) DOMAIN  (:action …) PROBLEM  (:objects …)  (:predicates …)
  • 15. Planning Domain Description Language 15  (:predicates …)  (:action …) DOMAIN  (:action …)  (:objects …)  (:init …) PROBLEM  (:goal …)
  • 16. Planning Domain Description Language 16  On(A,B)  (on a b)  On(A,B)  (not (on a b))  On(A,B)  On(B,C)  (and (on a b) (on b c))  On(x,y)  (on ?x ?y)
  • 17. The blocks world example in PDDL 17  Blocks world domain  Available predicates (:predicates …)  Available actions (:action …)
  • 18. The blocks world example in PDDL 18  Blocks world domain  Available predicates (:predicates (on ?x ?y) (clear ?x) )
  • 19. The blocks world example in PDDL 19  Blocks world domain  Available action (:action move :parameters (?b ?x ?y) :precondition (and (on ?b ?x) (clear ?b) (clear ?y)) :effect (…) )
  • 20. The blocks world example in PDDL 20  Blocks world domain  Available action (:action move-to-table :parameters (?b ?x) :precondition (…) :effect (…) )
  • 21. The blocks world example in PDDL 21  Blocks world problem  Available objects (:objects …)  Initial state (:init …)  Goal (:goal …)
  • 22. The blocks world example in PDDL 22  Blocks world domain  Available objects (:objects a b c table )
  • 23. The blocks world example in PDDL 23  Blocks world domain  Initial state (:init (on a table) (clear a) (on b table) (clear b) Α Β Γ (on c table) (clear c) )
  • 24. The blocks world example in PDDL 24  Blocks world domain  Goal (:goal Α (and (on a b) (on b c) ) Β Γ )
  • 25. The blocks world example in PDDL 25 blocks-domain.txt: blocks-problem1.txt: (define (domain gripper) (define (problem gripper1) (:requirements :strips) (:domain gripper) (:predicates (on ?x ?y) (clear ?x)) (:objects a b c table) (:action move (:init :parameters (?b ?x ?y) (on a table) (on b table) (on c table) :precondition (and (on ?b ?x) (clear ?b) (clear ?y)) (clear a) (clear b) (clear c) :effect (and (not (on ?b ?x)) ) (not (clear ?y)) (on ?b ?y) (:goal (and (on a b) (on b c))) (clear ?x))) ) …
  • 26. Using PDDL planners 26  Planning Domain Definition Language (PDDL)  International Planning Competition 1998 – today  SAT Plan  TL Plan Planning problems in PDDL, e.g., Blocks  FF world, Storage, Trucks, …  BlackBox  SHOP2  TALPlanner Direct comparison between … planning techniques! E.g., evaluation of heuristics, …
  • 27. Using PDDL planners: Blocks world 27  blackbox –o blocks-domain.txt –f blocks-problem1.txt ---------------------------------------------------- Begin plan Α Β C 1 (move b table c) 2 (move a table b) End plan ---------------------------------------------------- Α Β C
  • 28. Using PDDL planners: Blocks world 28  blackbox –o blocks-domain.txt –f blocks-problem2.txt ---------------------------------------------------- Begin plan G 1 (move e b d) D E F 2 (move b table e) Α Β C 3 (move g f table) 4 (move f c g) 5 (move b e c) Α 6 (move e d f) Β 7 (move d a e) C 8 (move b c a) D E 9 (move c table d) F 10 (move b a c) G 11 (move a table b) End plan
  • 29. Using PDDL planners 29  We can use blackbox (or any other off-the-self PDDL planner) for any problem we can write in PDDL!
  • 30. Using PDDL planners: Sokoban 30  We can use blackbox (or any other off-the-self PDDL planner) for any problem we can write in PDDL!  Let’s do this for Sokoban
  • 31. Using PDDL planners: Sokoban 31  Available predicates  Available actions  Available objects  Initial state  Goal
  • 32. Using PDDL planners: Sokoban 32  Available predicates
  • 33. Using PDDL planners: Sokoban 33  Available predicates  (robot-at ?loc)  (object-at ?b ?loc)
  • 34. Using PDDL planners: Sokoban 34  Available predicates  (robot-at ?loc)  (object-at ?b ?loc) c4-4 c5-4 c6-4 c1-3 c2-3 c3-3 c4-3 c5-3 c6-3  Available objects c1-2 c2-2 c3-2 c4-2 c5-2  c1-1,c1-2, c2-1, … c1-1 c2-1  box1, box2
  • 35. Using PDDL planners: Sokoban 35  Initial state  (robot-at c5-4)  (object-at box1 c3-3) c4-4 c6-4  (object-at box2 c4-3) c1-3 c2-3 c5-3 c6-3 c1-2 c2-2 c3-2 c4-2 c5-2 c1-1 c2-1
  • 36. Using PDDL planners: Sokoban 36  Available actions  move(?from ?to ?dir) :precondition ( )
  • 37. Using PDDL planners: Sokoban 37  Available actions  move(?from ?to ?dir) :precondition (and (robot-at ?from) (adjacent ?from ?to ?dir) (empty ?to) )
  • 38. Using PDDL planners: Sokoban 38  Available actions  move(?from ?to ?dir) :effect (and )
  • 39. Using PDDL planners: Sokoban 39  Available actions  move(?from ?to ?dir) :effect (and (empty ?from) (robot-at ?to) (not (empty ?to)) (not (robot-at ?from)) )
  • 40. Using PDDL planners: Sokoban 40  Available predicates  (robot-at ?loc)  (object-at ?b ?loc)  (adjacent ?from ?to ?dir)  (empty ?to)
  • 41. Using PDDL planners: Sokoban 41  Initial state  (robot-at c5-4)  (object-at box1 c3-3)  (object-at box2 c4-3) c2-3 c1-2 c2-2 c3-2  (empty c1-1) c2-1  (empty c2-1)  (empty c1-2)  (empty c2-2) …
  • 42. Using PDDL planners: Sokoban 42  Initial state  (robot-at c5-4)  (object-at box1 c3-3)  (object-at box2 c4-3) c2-3 c1-2 c2-2 c3-2  (adjacent c2-2 c3-2 right) c2-1  (adjacent c2-2 c1-2 left)  (adjacent c2-2 c2-3 up)  (adjacent c2-2 c2-1 down) …
  • 43. Using PDDL planners: Sokoban 43  Available actions  push(?rloc ?bloc ?floc ?dir ?b)
  • 44. Using PDDL planners: Sokoban 44  Available actions  push(?rloc ?bloc ?floc ?dir ?b) :precondition (and (robot-at ?rloc) (object-at ?b ?bloc) (adjacent ?rloc ?bloc ?dir) (adjacent ?bloc ?floc ?dir) (empty ?floc) )
  • 45. Using PDDL planners: Sokoban 45  Available actions  push(?rloc ?bloc ?floc ?dir ?b) :effect (and (robot-at ?bloc) (object-at ?b ?floc) (empty ?rloc) (not (robot-at ?rloc)) (not (object-at ?b ?bloc)) (not (empty ?floc)) )
  • 46. Using PDDL planners: Sokoban 46  Goal  (object-at box1 c4-3)  (object-at box2 c5-3) c4-4 c6-4 c1-3 c2-3 c6-3 c1-2 c2-2 c3-2 c4-2 c5-2 c1-1 c2-1
  • 47. Using PDDL planners: Sokoban 47  blackbox –o sokoban-domain.txt –f sokoban-problem.txt ---------------------------------------------------- Begin plan 1 (push c4-4 c4-3 c4-2 down box1) 2 (push c4-3 c3-3 c2-3 left box2) 3 (move c3-3 c3-2 down) 4 (move c3-2 c2-2 left) 5 (move c2-2 c1-2 left) … 27 (move c2-2 c1-2 left) 28 (move c1-2 c1-3 up) 29 (push c1-3 c2-3 c3-3 right box1) 30 (push c2-3 c3-3 c4-3 right box1) End plan ----------------------------------------------------
  • 48. Using PDDL planners: SimpleGame 48  SimpleGame domain  turn(?fromd ?tod)  move(?froml ?tol ?dir)  pickup(?o ?l)  stab(?l ?knife)  shoot(?locn ?locp ?dir ?gun )
  • 49. Building your own PDDL planner 49  Pyperplan  Lightweight STRIPS planner written in Python. Developed during the planning course at Albert-Ludwigs-Universität Freiburg 2010/2011, GNU General Public License 3  https://bitbucket.org/malte/pyperplan  Source code of academic planners  BlackBox: http://www.cs.rochester.edu/u/kautz/satplan/blackbox/  FastForward: http://www.loria.fr/~hoffmanj/ff.html  FastDownward: http://www.fast-downward.org/  ANTLR Parser Generator  http://www.antlr.org/  http://www.antlr.org/grammar/1222962012944/Pddl.g
  • 50. Building your own PDDL planner 50  Quick overview of the provided PROLOG code  Good for quick prototyping ;-)
  • 51. Building your own PDDL planner 51  Quick overview of the provided PROLOG code  Works with SWI Prolog 6.x (tested with 6.0.2)  Predicates provided  parsePDDL(+DomainFile, +ProblemFile)  get_init(-InitialState)  get_goal(-Goal)  satisfies_goal(+State)  progress(+State, -Action, -NextState)  h(+State, -Value)  {dfs,astar}planner(+DomainFile, +ProblemFile)
  • 52. Planning Domain Description Language 52  Planning Domain Definition Language (PDDL)  International Planning Competition 1998 – today  SAT Plan  TL Plan  FF Sokoban  BlackBox  SHOP2  TALPlanner Direct comparison between … planning techniques! E.g., evaluation of heuristics, …
  • 53. Using PDDL planners 53  FastDownward [Helmert 2006]  Introduced a new type of heuristic that is not based on an empty list of negative actions  Efficient implementation of all notable forward search methods and heuristics (including the more recent ones)  Requires a number of preprocessing steps that transforms the STRIPS planning problem…
  • 54. Using PDDL planners 54  FastDownward [Helmert 2006]  Introduced a new type of heuristic that is not based on an empty list of negative actions  Efficient implementation of all notable forward search methods and heuristics (including the more recent ones)  Requires a number of preprocessing steps that transforms the STRIPS planning problem…  Can be used as a framework to evaluate forward search planning methods
  • 55. Using PDDL planners 55  FastDownward [Helmert 2006]  translate/translate.py sokoban-domain.txt sokoban.problem.txt  preprocess/preprocess < output.sas  search/downward --search SearchConfiguration < output  http://www.fast-downward.org
  • 56. Using PDDL planners: Sokoban 56  search/downward --search "astar(blind())" <output
  • 57. Using PDDL planners: Sokoban 57  search/downward --search "astar(goalcount())"
  • 58. Using PDDL planners: Sokoban 58  search/downward --search "astar(hmax())" <output
  • 59. Using PDDL planners: Sokoban 59  search/downward --search "astar(add())" <output
  • 60. Using PDDL planners: Sokoban 60  search/downward --search "lazy_greedy(ff())" <output
  • 61. Using PDDL planners: Sokoban 61  Notice that the planner does not know anything about the planning problem we are solving  The heuristics we tried are domain independent  goal count  hmax  hadd  FF  We will see how each one works in Lecture 4 (after we first go over planning graphs that are needed)
  • 62. Next lecture 62  Lecture 1: Game-inspired competitions for AI research, AI decision making for non-player characters in games  Lecture 2: STRIPS planning, state-space search  Lecture 3: Planning Domain Definition Language (PDDL), using an award winning planner to solve Sokoban  Lecture 4: Planning graphs, domain independent heuristics for STRIPS planning  Lecture 5: Employing STRIPS planning in games: SimpleFPS, iThinkUnity3D, SmartWorkersRTS  Lecture 6: Planning beyond STRIPS
  • 63. Bibliography 63  Material  Artificial Intelligence: A Modern Approach 2nd Ed. Stuart Russell, Peter Norvig. Prentice Hall, 2003 Section 11.4  References  PDDL - The Planning Domain Definition Language. Drew McDermott, Malik Ghallab, Adele Howe, Craig Knoblock, Ashwin Ram, Manuela Veloso, Daniel Weld, David Wilkins. Technical report, Yale Center for Computational Vision and Control, TR-98-003, 1998.  Unifying SAT-Based and Graph-Based Planning. Henry Kautz, Bart Selman. In Proceedings of the International Joint Conference on Artificial Intelligence (IJCAI), 1999  The Fast Downward Planning System. Malte Helmert. Artificial Intelligence Research (JAIR), Vol. 26, 2006