Documentation

Validator.PlanningTask.Core

Core definitions for the STRIPS formalism #

We define some basic definitions of the STRIPS formalism for automated planning (TODO : cite). This file only contains the definitions that belong to the trusted core of the project, i.e. definitions that are needed to define planning problems themselves and unsolvability of planning problems. Additional definitions can be found in Validator.PlanningTask.Basic.

Implementation Notes #

Some definitions in this file have two version:

Exceptions are Action and STRIPS which can be used for both purposes.

Sets of variables #

Variables have type Fin n, and sets of variables therefore have type Finset(Fin n). At runtime we use an Array instead of Finset.

@[reducible, inline]
abbrev Validator.VarSet (n : ) :
Equations
Instances For
    @[reducible, inline]
    abbrev Validator.VarSet' (n : ) :
    Equations
    Instances For
      Equations
      Instances For

        States and sets of states #

        From a theoretical perspective states are just set of variables, but at runtime they are represented by a vector with boolean values to indicate which variables are in the set.

        TODO : sets of states at runtime

        @[reducible, inline]
        abbrev Validator.State (n : ) :
        Equations
        Instances For
          @[reducible, inline]
          abbrev Validator.State' (n : ) :
          Equations
          Instances For
            @[reducible, inline]
            abbrev Validator.States (n : ) :
            Equations
            Instances For
              def Validator.convertState {n : } (s' : State' n) :
              Equations
              Instances For

                Actions and sets of actions #

                structure Validator.Action (n : ) :

                Actions in the STRIPS formalism

                Instances For
                  Equations
                  • One or more equations did not get rendered due to their size.
                  Instances For
                    def Validator.instDecidableEqAction.decEq {n✝ : } (x✝ x✝¹ : Action n✝) :
                    Decidable (x✝ = x✝¹)
                    Equations
                    • One or more equations did not get rendered due to their size.
                    Instances For
                      def Validator.Action.pre {n : } (a : Action n) :
                      Equations
                      Instances For
                        def Validator.Action.add {n : } (a : Action n) :
                        Equations
                        Instances For
                          def Validator.Action.del {n : } (a : Action n) :
                          Equations
                          Instances For
                            @[reducible, inline]
                            abbrev Validator.Actions (n : ) :
                            Equations
                            Instances For
                              @[reducible, inline]
                              Equations
                              Instances For

                                Applicability and successor states #

                                @[reducible, inline]
                                abbrev Validator.Applicable {n : } (s : State n) (a : Action n) :

                                An action is applicable in a state if all its preconditions are true in the state.

                                Equations
                                Instances For
                                  @[reducible, inline]
                                  abbrev Validator.Successor {n : } (a : Action n) (s s' : State n) :

                                  If an action a is applicable in a state s, then s[a] := (s \ a.del) ∪ a.add is the successor of s.

                                  Equations
                                  Instances For

                                    STRIPS planning problems #

                                    structure Validator.STRIPS (n : ) :

                                    A planning problem in the STRIPS formalism. The variables of the planning task are all elements of Fin n.

                                    • varNames : Vector String n

                                      The names of the variables.

                                    • actions' : Actions' n

                                      The actions of the planning problem. See STRIPS.actions for the version using Actions.

                                    • init' : State' n

                                      The initial state of the planning problem. See STRIPS.init for the version using State.

                                    • goal' : VarSet' n

                                      The goal of the planning problem, indicating which variables need to be true in a goal state. See also GoalState and STRIPS.goal_states in Validator.PlanningTask.Basic.

                                    Instances For
                                      Equations
                                      • One or more equations did not get rendered due to their size.
                                      Instances For
                                        Equations
                                        Instances For
                                          def Validator.STRIPS.init {n : } (pt : STRIPS n) :
                                          Equations
                                          Instances For
                                            def Validator.STRIPS.GoalState {n : } (pt : STRIPS n) (s : State n) :
                                            Equations
                                            Instances For

                                              Paths in state space and plans #

                                              inductive Validator.Path {n : } (pt : STRIPS n) :
                                              State nState nType

                                              Given a STRIPS planning task pt, Path s1 s2 is a path form the state s1 to the state s2 in the state space of pt.

                                              Instances For
                                                structure Validator.Plan {n : } (pt : STRIPS n) (s : State n) :

                                                A plan for a state s for a planning task pt is a path from s to a goal state of pt.

                                                • last : State n

                                                  The goal state in pt.

                                                • path : Path pt s self.last

                                                  The path from s to the goal state.

                                                • goal : pt.GoalState self.last

                                                  The proof that last is a goal state.

                                                Instances For

                                                  Unsolvability #

                                                  @[reducible, inline]
                                                  abbrev Validator.UnsolvableState {n : } (pt : STRIPS n) (s : State n) :

                                                  A state is unsolvable if there is no plan for that state.

                                                  Equations
                                                  Instances For
                                                    @[reducible, inline]
                                                    abbrev Validator.Unsolvable {n : } (pt : STRIPS n) :

                                                    A planning task is unsolvable if the initial state is unsolvable.

                                                    Equations
                                                    Instances For