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.

Sets of variables #

Variables have type Fin n. Sets of variables are represented by a bitvector of length n.

@[reducible, inline]
abbrev Validator.VarSet (n : ) :
Equations
Instances For
    @[implicit_reducible]
    Equations
    def Validator.VarSet.insert {n : } (i : Fin n) (V : VarSet n) :
    Equations
    Instances For
      @[implicit_reducible]
      Equations

      States and sets of states #

      @[reducible, inline]
      abbrev Validator.State (n : ) :

      A state is a set of variables, containing all variables that are true.

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

          Actions and sets of actions #

          structure Validator.Action (n : ) :

          Actions in the STRIPS formalism

          • name : String

            The name of the action.

          • pre : VarSet n

            The preconditions of the action.

          • add : VarSet n

            The adding effects of the action.

          • del : VarSet n

            The deleting effects of the action.

          • cost :

            The cost of the action.

          Instances For
            Equations
            • One or more equations did not get rendered due to their size.
            Instances For
              @[implicit_reducible]
              instance Validator.instReprAction {n✝ : } :
              Repr (Action n✝)
              Equations
              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
                @[reducible, inline]
                abbrev Validator.Actions (n : ) :
                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. Note that most fields have two version:

                      • an primed version which uses a representation that is efficient at run-time, and
                      • an unprimed version which is more suited for theoretical results
                      Instances For
                        Equations
                        • One or more equations did not get rendered due to their size.
                        Instances For
                          @[implicit_reducible]
                          instance Validator.instReprSTRIPS {n✝ : } :
                          Repr (STRIPS n✝)
                          Equations
                          Equations
                          Instances For
                            @[simp]
                            theorem Validator.STRIPS.mem_action' {n : } {pt : STRIPS n} {a : Action n} :
                            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