SlideShare une entreprise Scribd logo
1  sur  48
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


       STRIPS! So why do we like this formalism?
STRIPS planning
4


       STRIPS! So why do we like this formalism?
         Simple formalism for representing planning problems
         Easy to compute applicable actions
           Check  whether the list of preconditions is a subset of the
            state description: PRECONDITIONS  S
         Easy   to compute the successor states
           Add  the list of positive effects to the state description and
            remove the list of negative effects:
            S’ = (S / NEGATIVE-EFFECTS)  POSITIVE-EFFECTS
         Easy   to check if the goal is satisfied
           Check   whether the goal is a subset of the state description:
            GS
STRIPS planning
5


       STRIPS! So why do we like this formalism?

         It can already describe difficult and complex problems
          (in more challenging domains than the example we saw)




         …let’s   see how we can solve this kind of problems
STRIPS planning: state-based search
6


       Finding a solution to the planning problem following
        a state-based search
            Init( On(Α,Table)  On(Β,Table)  … )
            Goal( On(Α,Β)  …)
            Action( Move(b,x,y),
                   PRECONDITIONS: On(b,x)  …
                   EFFECTS: On(b,y)  … )

           Action( MoveToTable(b,x),
                   PRECONDITIONS: On(b,x)  …
                   EFFECTS: On(b,Table)  …)
STRIPS planning: state-based search
7


       Finding a solution to the planning problem following
        a state-based search
            Init( where to start from )
            Goal( when to stop searching )
            Action( how to generate
                    the “graph” )



         Progression planning: forward state-based search
         Regression planning: backward state-based search
Progression planning
8


     Start from the initial state
     Check if the current state satisfies the
      goal
     Compute applicable actions to the
      current state
     Compute the successor states

     Pick one of the successor states as the
      current state
     Repeat until a solution is found or the
      state space is exhausted
Progression planning
9


       Start from the initial state




                                           On(Α,Table)
                                           On(Β,Table)
                               Α   Β   C   On(C,Table)
                                            Clear(Α)
                                            Clear(Β)
                                            Clear(C)
Progression planning
10


        Check if the current state satisfies the goal
          No




                                             On(Α,Table)
                                             On(Β,Table)   On(Α,Β)
                               Α   Β   C     On(C,Table)   On(Β,C)
                                              Clear(Α)
                                              Clear(Β)
                                              Clear(C)
Progression planning
11


        Compute applicable actions to the current state
            Action( Move(b,x,y),
               PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
               PRECONDITIONS: On(b,x)  Clear(b))

                                                     On(Α,Table)
                                                     On(Β,Table)
                                     Α   Β   C       On(C,Table)
                                                      Clear(Α)
                                                      Clear(Β)
                                                      Clear(C)
Progression planning
12


        Compute applicable actions to the current state
            Action( Move(b,x,y),
               PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
               PRECONDITIONS: On(b,x)  Clear(b))
              Move(Β,Table,C)
                                                     On(Α,Table)
               Preconditions:                        On(Β,Table)
                    On(Β,Table)        Α   Β   C    On(C,Table)
                    Clear(Β)                         Clear(Α)
                    Clear(C)                         Clear(Β)
                                                      Clear(C)

              Applicable     action!
Progression planning
13


        Compute applicable actions to the current state
            Action( Move(b,x,y),
                 PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
                 PRECONDITIONS: On(b,x)  Clear(b))
                Move(Α,Table,Β)
                                                       On(Α,Table)
                Move(Α,Table,C)                       On(Β,Table)
                Move(Β,Table,Α)     Α Β C             On(C,Table)
                Move(Β,Table,C)                        Clear(Α)
                                                        Clear(Β)
                Move(C,Table,Α)                        Clear(C)
                Move(C,Table,Β)

              All   these are applicable actions!
Progression planning
14


        Compute applicable actions to the current state
            Action( Move(b,x,y),
               PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
               PRECONDITIONS: On(b,x)  Clear(b))
              Move(Β,Table,Β)
                                                      On(Α,Table)
               Preconditions:                         On(Β,Table)
                     On(Β,Table)      Α   Β   C      On(C,Table)
                     Clear(Β)                         Clear(Α)
                                                       Clear(Β)
                                                       Clear(C)

              This   is also an applicable action!
Progression planning
15


        Compute applicable actions to the current state
            Action( Move(b,x,y),
               PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
               PRECONDITIONS: On(b,x)  Clear(b))
              MoveTT(Β,Table)
                                                      On(Α,Table)
               Preconditions:                         On(Β,Table)
                     On(Β,Table)      Α   Β   C      On(C,Table)
                     Clear(Β)                         Clear(Α)
                                                       Clear(Β)
                                                       Clear(C)

              This   is also an applicable action!
Progression planning
16


        Compute applicable actions to the current state
            Action( Move(b,x,y),
                 PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))
            Action( MoveToTable(b,x),
                 PRECONDITIONS: On(b,x)  Clear(b))
                Move(Α,Table,Α)
                                                       On(Α,Table)
                Move(Β,Table,Β)                       On(Β,Table)
                Move(C,Table,C)     Α Β C             On(C,Table)
                MoveTT(Α,Table)                        Clear(Α)
                                                        Clear(Β)
                MoveTT(Β,Table)                        Clear(C)
                MoveTT(C,Table)

              All   these are applicable also actions!
Progression planning
17


        Compute the successor states
            Action( Move(b,x,y),
               EFFECTS: On(b,y) 
                     Clear(x)                       Β
                    On(b,x)                    Α   C
                    Clear(y) )
              Move(Β,Table,C)                   On(Α,Table)
               Effects:                          On(Β,Table)
                                     Α   Β   C   On(C,Table)
                    On(Β,C)
                                                  Clear(Α)
                    Clear(Table)
                                                  Clear(Β)
                     On(Β,Table)                Clear(C)
                    Clear(C)
Progression planning
18


         Compute the successor states

     Move(Α,Table,C)       Α                   Β
                                                   Move(Β,Table,C)
                       Β   C               Α   C




     Move(Α,Table,Β)       Α                   Β   Move(Β,Table,Α)
                       C   Β   Α   Β   C   C   Α




                           C                   C   Move(C,Table,Α)
     Move(C,Table,Β)
                       Α   Β               Β   Α
Progression planning
19


        Pick one of the successor states as current..

                        Α                         Β
                    Β   C                     Α   C




                        Α                         Β
                   C    Β      Α   Β   C      C   Α




                        C                         C
                    Α   Β                     Β   Α
Progression planning
20


        ..and repeat!

                                                 Α
                         Α                   Β   Β
                   Β     C               Α   C   C




                         Α                   Β
                   C     Β   Α   Β   C   C   Α




                         C                   C
                   Α     Β               Β   Α
Progression planning
21


        Pick one of the successor states as current

                                                       Α
                       Α                         Β     Β
                   Β   C                     Α   C     C




                       Α                         Β
                   C   Β       Α   Β   C     C   Α




                       C                         C
                   Α   Β                     Β   Α
Progression planning
22


        Is it guaranteed that progressive planning will find
         a solution if one exists?
Progression planning
23


        Is it guaranteed that progressive planning will find
         a solution if one exists?

          Given  that the state-space is finite (ground atoms, no
           function symbols, finite number of constants)..

          ..Yes!   As long as we visit each state only once..
Progression planning
24


        Pick one of the not-visited successor states as current

                                                          Α
                       Α                         Β        Β
                   Β   C                     Α   C        C




                       Α                         Β
                   C   Β       Α   Β   C     C   Α




                       C                         C
                   Α   Β                     Β   Α
Progression planning
25


        Is it guaranteed that progressive planning will find
         a solution if one exists?

          Given  that the state-space is finite (ground atoms, no
           function symbols, finite number of constants)..

          ..Yes!   As long as we visit each state only once..


        But it may have to explore the whole state-space
Progression planning
26




      Β                                  Α
      Α          Α                   Β   Β
      C      Β   C               Α   C   C


      C                                  C
      Α          Α                   Β   Β
      Β     C    Β   Α   Β   C   C   Α   Α



      Α                                  Β
      C          C                   C   C
      Β      Α   Β               Β   Α   Α
Progression planning
27


        Unlike this simple example, in many problems the state
         space is actually huge.
        Even this simple example becomes challenging if we
         consider 100 boxes and 1000s of applicable actions
         of the form Move(b,x,y) in each state.

        Similar to search problems we can make use of
         heuristics that help progression planning pick the most
         promising states to investigate first.
Heuristics for progression planning
28


        A* search
        Evaluation function f(s) = g(s) + h(s)
          g(s):  the number of actions needed to reach state s from
           the initial state (accurate)
          h(s): the number of actions needed to reach a goal state
           from state s (estimated)


        Use f(s) to order the successor states and pick the
         most promising one.
Heuristics for progression planning
29


         Consider a heuristic h(s) with the following behavior

     Move(Α,Table,C)                                  Move(Β,Table,C)
       g(s)=1              Α                      Β   g(s)=1
                       Β   C                  Α   C   h(s)=1
        h(s)=2


     Move(Α,Table,Β)                                  Move(Β,Table,Α)
       g(s)=1              Α                      Β   g(s)=1
                       C   Β    Α   Β   C     C   Α   h(s)=2
       h(s)=1


     Move(C,Table,Β)                                  Move(C,Table,Α)
       g(s)=1              C                      C   g(s)=1
                       Α   Β                  Β   Α   h(s)=2
        h(s)=2
Heuristics for progression planning
30


        So why is it different than the usual search problems?
            E.g.,in grid-based problems we could define h(s) using a
             “relaxed” distance metric such as Manhattan distance.
Heuristics for progression planning
31


        So why is it different than the usual search problems?
            E.g.,in grid-based problems we could define h(s) using a
             “relaxed” distance metric such as Manhattan distance.

        The action schemas provide valuable information that
         can be used to specify domain independent heuristic
         functions!

            Moreover they provide a logical specification of
             the problem that allows approaches for finding a
             solution that are different than search
Heuristics for progression planning
32


        Empty list of preconditions
          h(s)
              = number of actions needed to achieve the goal if
           we assume that all actions are always applicable
        Empty list of negative effects
          h(s)
              = number of actions needed to achieve the goal if
           we disregard the negative effects of actions
        Planning graphs
        Simple example: h(s) = number of literals in the
         goal that are missing from s
Heuristics for progression planning
33


      Start from the initial state
      Check if the current state satisfies the
       goal
      Compute applicable actions to the
       current state
      Compute the successor states

      Pick one the most promising of the
       successor states as the current state
      Repeat until a solution is found or the
       state space is exhausted
Heuristics for progression planning
34


          Compute the successor states

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
        h(s)=2


     Move(Α,Table,Β)                                        Move(Β,Table,Α)
        g(s)=1                  Α                       Β   g(s)=1
                          C     Β       Α   Β   C   C   Α   h(s)=2
        h(s)=1


                  Move(C,Table,Β)                           Move(C,Table,Α)
                    g(s)=1              C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
35


          Compute the successor states

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
        h(s)=2


     Move(Α,Table,Β)                                        Move(Β,Table,Α)
        g(s)=1                  Α                       Β   g(s)=1
                          C     Β       Α   Β   C   C   Α   h(s)=2
        h(s)=1


                  Move(C,Table,Β)                           Move(C,Table,Α)
                    g(s)=1              C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
36


          Pick the most promising successor state wrt f(s)

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
        h(s)=2


     Move(Α,Table,Β)                                        Move(Β,Table,Α)
        g(s)=1                  Α                       Β   g(s)=1
                          C     Β       Α   Β   C   C   Α   h(s)=2
        h(s)=1


                  Move(C,Table,Β)                           Move(C,Table,Α)
                    g(s)=1              C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
37


         Compute the successor states

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
38


         Compute the successor states

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
39


         Pick the most promising successor state wrt f(s)

     Move(Α,Table,C)                                        Move(Β,Table,C)
       g(s)=1                   Α                       Β   g(s)=1
                          Β     C                   Α   C   h(s)=1
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
40

                                                             Move(Α,Table,Β)
         Compute the successor states                        g(s)=2
                                                              h(s)=0
     Move(Α,Table,C)                                               Α
       g(s)=1                   Α                       Β          Β
                          Β     C                   Α   C          C
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
41

                                                             Move(Α,Table,Β)
         Compute the successor states                        g(s)=2
                                                              h(s)=0
     Move(Α,Table,C)                                               Α
       g(s)=1                   Α                       Β          Β
                          Β     C                   Α   C          C
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Heuristics for progression planning
42


         Pick the most promising successor state wrt f(s)

     Move(Α,Table,C)                                               Α
       g(s)=1                   Α                       Β          Β
                          Β     C                   Α   C          C
       h(s)=2


          C                                                 Move(Β,Table,Α)
          Α                     Α                       Β   g(s)=1
          Β               C     Β       Α   Β   C   C   Α   h(s)=2
Move(C,Table,Α)
 g(s)=2         Move(C,Table,Β)                             Move(C,Table,Α)
 h(s)=1           g(s)=1                C               C   g(s)=1
                                    Α   Β           Β   Α   h(s)=2
                       h(s)=2
Regression planning
43


      Start from the goal as current goal
      Check if the initial state satisfies the
       current goal
      Compute the relevant and consistent
       actions for the current goal
      Compute the predecessor states

      Pick one of the predecessor states as
       the current goal
      Repeat until a solution is found or the
       state space is exhausted
Research in STRIPS planning
44


        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
Research in STRIPS planning
45


        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, …
Research in STRIPS planning
46


        Planning Domain Definition Language (PDDL)
          We   will see more of PDDL and off-the-shelve planners
           in Lecture 3
Next lecture
47


        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
48


      Material
        Artificial
                 Intelligence: A Modern Approach 2nd Ed. Stuart Russell,
         Peter Norvig. Prentice Hall, 2003 Section 11.2
      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.

Contenu connexe

Tendances

Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Stavros Vassos
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphicssabbirantor
 
My lectures circular queue
My lectures circular queueMy lectures circular queue
My lectures circular queueSenthil Kumar
 
Computer Graphic - Projections
Computer Graphic - ProjectionsComputer Graphic - Projections
Computer Graphic - Projections2013901097
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceBharat Bhushan
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agentShiwani Gupta
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transformPatel Punit
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphicsSHIVANI SONI
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unitaravindangc
 
Windows to viewport transformation
Windows to viewport transformationWindows to viewport transformation
Windows to viewport transformationPrashant Singh
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algoMohd Arif
 
Knapsack problem using dynamic programming
Knapsack problem using dynamic programmingKnapsack problem using dynamic programming
Knapsack problem using dynamic programmingkhush_boo31
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinatesTarun Gehlot
 
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm Aparna Joshi
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniquesKirti Verma
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformationsMohd Arif
 
Statistical learning
Statistical learningStatistical learning
Statistical learningSlideshare
 
Bezier and Spline Curves and Surfaces
Bezier and Spline Curves and SurfacesBezier and Spline Curves and Surfaces
Bezier and Spline Curves and SurfacesSyed Zaid Irshad
 
Hillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionHillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionMohamed Gad
 

Tendances (20)

Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture6-Part1
 
3D Transformation in Computer Graphics
3D Transformation in Computer Graphics3D Transformation in Computer Graphics
3D Transformation in Computer Graphics
 
My lectures circular queue
My lectures circular queueMy lectures circular queue
My lectures circular queue
 
2d/3D transformations in computer graphics(Computer graphics Tutorials)
2d/3D transformations in computer graphics(Computer graphics Tutorials)2d/3D transformations in computer graphics(Computer graphics Tutorials)
2d/3D transformations in computer graphics(Computer graphics Tutorials)
 
Computer Graphic - Projections
Computer Graphic - ProjectionsComputer Graphic - Projections
Computer Graphic - Projections
 
Hill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial IntelligenceHill Climbing Algorithm in Artificial Intelligence
Hill Climbing Algorithm in Artificial Intelligence
 
Knowledge based agent
Knowledge based agentKnowledge based agent
Knowledge based agent
 
Two dimentional transform
Two dimentional transformTwo dimentional transform
Two dimentional transform
 
3D transformation in computer graphics
3D transformation in computer graphics3D transformation in computer graphics
3D transformation in computer graphics
 
Computer graphics iv unit
Computer graphics iv unitComputer graphics iv unit
Computer graphics iv unit
 
Windows to viewport transformation
Windows to viewport transformationWindows to viewport transformation
Windows to viewport transformation
 
Midpoint circle algo
Midpoint circle algoMidpoint circle algo
Midpoint circle algo
 
Knapsack problem using dynamic programming
Knapsack problem using dynamic programmingKnapsack problem using dynamic programming
Knapsack problem using dynamic programming
 
2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates2 d transformations and homogeneous coordinates
2 d transformations and homogeneous coordinates
 
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
Raster Scan Graphics, Line Drawing Algorithm and Circle Drawing Algorithm
 
State space search and Problem Solving techniques
State space search and Problem Solving techniquesState space search and Problem Solving techniques
State space search and Problem Solving techniques
 
2 d geometric transformations
2 d geometric transformations2 d geometric transformations
2 d geometric transformations
 
Statistical learning
Statistical learningStatistical learning
Statistical learning
 
Bezier and Spline Curves and Surfaces
Bezier and Spline Curves and SurfacesBezier and Spline Curves and Surfaces
Bezier and Spline Curves and Surfaces
 
Hillclimbing search algorthim #introduction
Hillclimbing search algorthim #introductionHillclimbing search algorthim #introduction
Hillclimbing search algorthim #introduction
 

En vedette

Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Stavros Vassos
 
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
 
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
 
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
 
Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsStavros 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 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
 
Plannning and Types of planning
Plannning and Types of planningPlannning and Types of planning
Plannning and Types of planningEr Garima Patil
 

En vedette (10)

Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
Intro to AI STRIPS Planning & Applications in Video-games Lecture3-Part1
 
Scheduling And Htn
Scheduling And HtnScheduling And Htn
Scheduling And Htn
 
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
 
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
 
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
 
Pathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basicsPathfinding - Part 3: Beyond the basics
Pathfinding - Part 3: Beyond the basics
 
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 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
 
Plannning and Types of planning
Plannning and Types of planningPlannning and Types of planning
Plannning and Types of planning
 
Ppt of planning
Ppt of planningPpt of planning
Ppt of planning
 

Similaire à Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2

Similaire à Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2 (10)

Planning
PlanningPlanning
Planning
 
Planning
PlanningPlanning
Planning
 
Lesson 23
Lesson 23Lesson 23
Lesson 23
 
AI Lesson 23
AI Lesson 23AI Lesson 23
AI Lesson 23
 
Goal stack planning.ppt
Goal stack planning.pptGoal stack planning.ppt
Goal stack planning.ppt
 
21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence21CSC206T_UNIT 5.pptx artificial intelligence
21CSC206T_UNIT 5.pptx artificial intelligence
 
lecture12.pdf
lecture12.pdflecture12.pdf
lecture12.pdf
 
AI.ppt
AI.pptAI.ppt
AI.ppt
 
Cs221 logic-planning
Cs221 logic-planningCs221 logic-planning
Cs221 logic-planning
 
Cs221 lecture7-fall11
Cs221 lecture7-fall11Cs221 lecture7-fall11
Cs221 lecture7-fall11
 

Dernier

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024Scott Keck-Warren
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024Results
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreternaman860154
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking MenDelhi Call girls
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitecturePixlogix Infotech
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
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
 
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
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking MenDelhi Call girls
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 

Dernier (20)

How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024SQL Database Design For Developers at php[tek] 2024
SQL Database Design For Developers at php[tek] 2024
 
A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024A Call to Action for Generative AI in 2024
A Call to Action for Generative AI in 2024
 
Presentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreterPresentation on how to chat with PDF using ChatGPT code interpreter
Presentation on how to chat with PDF using ChatGPT code interpreter
 
08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men08448380779 Call Girls In Civil Lines Women Seeking Men
08448380779 Call Girls In Civil Lines Women Seeking Men
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
Understanding the Laravel MVC Architecture
Understanding the Laravel MVC ArchitectureUnderstanding the Laravel MVC Architecture
Understanding the Laravel MVC Architecture
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)A Domino Admins Adventures (Engage 2024)
A Domino Admins Adventures (Engage 2024)
 
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...
 
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
Neo4j - How KGs are shaping the future of Generative AI at AWS Summit London ...
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men08448380779 Call Girls In Friends Colony Women Seeking Men
08448380779 Call Girls In Friends Colony Women Seeking Men
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 

Intro to AI STRIPS Planning & Applications in Video-games Lecture2-Part2

  • 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  STRIPS! So why do we like this formalism?
  • 4. STRIPS planning 4  STRIPS! So why do we like this formalism?  Simple formalism for representing planning problems  Easy to compute applicable actions  Check whether the list of preconditions is a subset of the state description: PRECONDITIONS  S  Easy to compute the successor states  Add the list of positive effects to the state description and remove the list of negative effects: S’ = (S / NEGATIVE-EFFECTS)  POSITIVE-EFFECTS  Easy to check if the goal is satisfied  Check whether the goal is a subset of the state description: GS
  • 5. STRIPS planning 5  STRIPS! So why do we like this formalism?  It can already describe difficult and complex problems (in more challenging domains than the example we saw)  …let’s see how we can solve this kind of problems
  • 6. STRIPS planning: state-based search 6  Finding a solution to the planning problem following a state-based search  Init( On(Α,Table)  On(Β,Table)  … )  Goal( On(Α,Β)  …)  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  … EFFECTS: On(b,y)  … )  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  … EFFECTS: On(b,Table)  …)
  • 7. STRIPS planning: state-based search 7  Finding a solution to the planning problem following a state-based search  Init( where to start from )  Goal( when to stop searching )  Action( how to generate the “graph” )  Progression planning: forward state-based search  Regression planning: backward state-based search
  • 8. Progression planning 8  Start from the initial state  Check if the current state satisfies the goal  Compute applicable actions to the current state  Compute the successor states  Pick one of the successor states as the current state  Repeat until a solution is found or the state space is exhausted
  • 9. Progression planning 9  Start from the initial state On(Α,Table) On(Β,Table) Α Β C On(C,Table) Clear(Α) Clear(Β) Clear(C)
  • 10. Progression planning 10  Check if the current state satisfies the goal  No On(Α,Table) On(Β,Table) On(Α,Β) Α Β C On(C,Table) On(Β,C) Clear(Α) Clear(Β) Clear(C)
  • 11. Progression planning 11  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b)) On(Α,Table) On(Β,Table) Α Β C On(C,Table) Clear(Α) Clear(Β) Clear(C)
  • 12. Progression planning 12  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b))  Move(Β,Table,C) On(Α,Table) Preconditions: On(Β,Table)  On(Β,Table) Α Β C On(C,Table)  Clear(Β) Clear(Α)  Clear(C) Clear(Β) Clear(C)  Applicable action!
  • 13. Progression planning 13  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b))  Move(Α,Table,Β) On(Α,Table)  Move(Α,Table,C) On(Β,Table)  Move(Β,Table,Α) Α Β C On(C,Table)  Move(Β,Table,C) Clear(Α) Clear(Β)  Move(C,Table,Α) Clear(C)  Move(C,Table,Β)  All these are applicable actions!
  • 14. Progression planning 14  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b))  Move(Β,Table,Β) On(Α,Table) Preconditions: On(Β,Table)  On(Β,Table) Α Β C On(C,Table)  Clear(Β) Clear(Α) Clear(Β) Clear(C)  This is also an applicable action!
  • 15. Progression planning 15  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b))  MoveTT(Β,Table) On(Α,Table) Preconditions: On(Β,Table)  On(Β,Table) Α Β C On(C,Table)  Clear(Β) Clear(Α) Clear(Β) Clear(C)  This is also an applicable action!
  • 16. Progression planning 16  Compute applicable actions to the current state  Action( Move(b,x,y), PRECONDITIONS: On(b,x)  Clear(b)  Clear(y))  Action( MoveToTable(b,x), PRECONDITIONS: On(b,x)  Clear(b))  Move(Α,Table,Α) On(Α,Table)  Move(Β,Table,Β) On(Β,Table)  Move(C,Table,C) Α Β C On(C,Table)  MoveTT(Α,Table) Clear(Α) Clear(Β)  MoveTT(Β,Table) Clear(C)  MoveTT(C,Table)  All these are applicable also actions!
  • 17. Progression planning 17  Compute the successor states  Action( Move(b,x,y), EFFECTS: On(b,y)  Clear(x)  Β On(b,x)  Α C Clear(y) )  Move(Β,Table,C) On(Α,Table) Effects: On(Β,Table) Α Β C On(C,Table)  On(Β,C) Clear(Α)  Clear(Table) Clear(Β)   On(Β,Table) Clear(C)  Clear(C)
  • 18. Progression planning 18  Compute the successor states Move(Α,Table,C) Α Β Move(Β,Table,C) Β C Α C Move(Α,Table,Β) Α Β Move(Β,Table,Α) C Β Α Β C C Α C C Move(C,Table,Α) Move(C,Table,Β) Α Β Β Α
  • 19. Progression planning 19  Pick one of the successor states as current.. Α Β Β C Α C Α Β C Β Α Β C C Α C C Α Β Β Α
  • 20. Progression planning 20  ..and repeat! Α Α Β Β Β C Α C C Α Β C Β Α Β C C Α C C Α Β Β Α
  • 21. Progression planning 21  Pick one of the successor states as current Α Α Β Β Β C Α C C Α Β C Β Α Β C C Α C C Α Β Β Α
  • 22. Progression planning 22  Is it guaranteed that progressive planning will find a solution if one exists?
  • 23. Progression planning 23  Is it guaranteed that progressive planning will find a solution if one exists?  Given that the state-space is finite (ground atoms, no function symbols, finite number of constants)..  ..Yes! As long as we visit each state only once..
  • 24. Progression planning 24  Pick one of the not-visited successor states as current Α Α Β Β Β C Α C C Α Β C Β Α Β C C Α C C Α Β Β Α
  • 25. Progression planning 25  Is it guaranteed that progressive planning will find a solution if one exists?  Given that the state-space is finite (ground atoms, no function symbols, finite number of constants)..  ..Yes! As long as we visit each state only once..  But it may have to explore the whole state-space
  • 26. Progression planning 26 Β Α Α Α Β Β C Β C Α C C C C Α Α Β Β Β C Β Α Β C C Α Α Α Β C C C C Β Α Β Β Α Α
  • 27. Progression planning 27  Unlike this simple example, in many problems the state space is actually huge.  Even this simple example becomes challenging if we consider 100 boxes and 1000s of applicable actions of the form Move(b,x,y) in each state.  Similar to search problems we can make use of heuristics that help progression planning pick the most promising states to investigate first.
  • 28. Heuristics for progression planning 28  A* search  Evaluation function f(s) = g(s) + h(s)  g(s): the number of actions needed to reach state s from the initial state (accurate)  h(s): the number of actions needed to reach a goal state from state s (estimated)  Use f(s) to order the successor states and pick the most promising one.
  • 29. Heuristics for progression planning 29  Consider a heuristic h(s) with the following behavior Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 Move(Α,Table,Β) Move(Β,Table,Α) g(s)=1 Α Β g(s)=1 C Β Α Β C C Α h(s)=2 h(s)=1 Move(C,Table,Β) Move(C,Table,Α) g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 30. Heuristics for progression planning 30  So why is it different than the usual search problems?  E.g.,in grid-based problems we could define h(s) using a “relaxed” distance metric such as Manhattan distance.
  • 31. Heuristics for progression planning 31  So why is it different than the usual search problems?  E.g.,in grid-based problems we could define h(s) using a “relaxed” distance metric such as Manhattan distance.  The action schemas provide valuable information that can be used to specify domain independent heuristic functions!  Moreover they provide a logical specification of the problem that allows approaches for finding a solution that are different than search
  • 32. Heuristics for progression planning 32  Empty list of preconditions  h(s) = number of actions needed to achieve the goal if we assume that all actions are always applicable  Empty list of negative effects  h(s) = number of actions needed to achieve the goal if we disregard the negative effects of actions  Planning graphs  Simple example: h(s) = number of literals in the goal that are missing from s
  • 33. Heuristics for progression planning 33  Start from the initial state  Check if the current state satisfies the goal  Compute applicable actions to the current state  Compute the successor states  Pick one the most promising of the successor states as the current state  Repeat until a solution is found or the state space is exhausted
  • 34. Heuristics for progression planning 34  Compute the successor states Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 Move(Α,Table,Β) Move(Β,Table,Α) g(s)=1 Α Β g(s)=1 C Β Α Β C C Α h(s)=2 h(s)=1 Move(C,Table,Β) Move(C,Table,Α) g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 35. Heuristics for progression planning 35  Compute the successor states Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 Move(Α,Table,Β) Move(Β,Table,Α) g(s)=1 Α Β g(s)=1 C Β Α Β C C Α h(s)=2 h(s)=1 Move(C,Table,Β) Move(C,Table,Α) g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 36. Heuristics for progression planning 36  Pick the most promising successor state wrt f(s) Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 Move(Α,Table,Β) Move(Β,Table,Α) g(s)=1 Α Β g(s)=1 C Β Α Β C C Α h(s)=2 h(s)=1 Move(C,Table,Β) Move(C,Table,Α) g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 37. Heuristics for progression planning 37  Compute the successor states Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 38. Heuristics for progression planning 38  Compute the successor states Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 39. Heuristics for progression planning 39  Pick the most promising successor state wrt f(s) Move(Α,Table,C) Move(Β,Table,C) g(s)=1 Α Β g(s)=1 Β C Α C h(s)=1 h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 40. Heuristics for progression planning 40 Move(Α,Table,Β)  Compute the successor states g(s)=2 h(s)=0 Move(Α,Table,C) Α g(s)=1 Α Β Β Β C Α C C h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 41. Heuristics for progression planning 41 Move(Α,Table,Β)  Compute the successor states g(s)=2 h(s)=0 Move(Α,Table,C) Α g(s)=1 Α Β Β Β C Α C C h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 42. Heuristics for progression planning 42  Pick the most promising successor state wrt f(s) Move(Α,Table,C) Α g(s)=1 Α Β Β Β C Α C C h(s)=2 C Move(Β,Table,Α) Α Α Β g(s)=1 Β C Β Α Β C C Α h(s)=2 Move(C,Table,Α) g(s)=2 Move(C,Table,Β) Move(C,Table,Α) h(s)=1 g(s)=1 C C g(s)=1 Α Β Β Α h(s)=2 h(s)=2
  • 43. Regression planning 43  Start from the goal as current goal  Check if the initial state satisfies the current goal  Compute the relevant and consistent actions for the current goal  Compute the predecessor states  Pick one of the predecessor states as the current goal  Repeat until a solution is found or the state space is exhausted
  • 44. Research in STRIPS planning 44  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
  • 45. Research in STRIPS planning 45  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, …
  • 46. Research in STRIPS planning 46  Planning Domain Definition Language (PDDL)  We will see more of PDDL and off-the-shelve planners in Lecture 3
  • 47. Next lecture 47  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
  • 48. Bibliography 48  Material  Artificial Intelligence: A Modern Approach 2nd Ed. Stuart Russell, Peter Norvig. Prentice Hall, 2003 Section 11.2  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.