Planning for Linear Time Terminating
Specifications
Candidate: Riccardo Di Stefano, 1528140
Advisor: Giuseppe De Giacomo
19/01/2018Planning For Linear Time Terminating
Specification
2
https://github.com/gitRiky
https://www.linkedin.com/in/riccardo-di-stefano-439a11134/
Contacts and Links
distefanor3@gmail.com
19/01/2018Planning For Linear Time Terminating
Specification
Introduction
3
• Planning is the problem of synthesizing a sequence of
actions that leads the agent from its current state to a desired
state
• It is of interest to add trajectory constraints (typically
expressed in a fragment of LTL) while reaching the final
state. The standard PDDL3 supports these constraints, but
no planner implements them
• Recently Linear Temporal Logic over Finite Traces (LTLf)
has emerged as a formalism for expressing such constraints
• This thesis is about supporting trajectory constraints in real
planners
19/01/2018Planning For Linear Time Terminating
Specification
Thesis Goals
4
• Design and implement the automata construction starting from an
LTLf formula [DeGiacomoVardiIJCAI13,14,15]
– NFA
– DFA
• Formulate how to do planning for LTLf goals exploiting such
automata constructions
– Focus the attention on deterministic domains (classical planning)
– But also explore more advanced forms (FONDsp, FONDsc,PONDsp )
• Design and implement the state-of-the-art approach for planning for
LTLf goals [TorresBaierIJCAI15]
• Design and implement the automata based approach, using a new
planner [FrancesGeffnerIJCAI17] that exploits calls to code
(instead of actions) to progress
– In collaboration with Guillem Frances (UPF, Barcelona)
19/01/2018
Automata Construction Starting
from LTLf Formula
• Starting from an LTLf formula φ, we can build the related
automata:
• Put the formula in negative normal form (linear)
• Build the AFW (linear)
• Translate the AFW in NFA (exponential)
• Determinize the NFA (exponential)
• Given the NFA built from the LTLf formula φ, for every finite
trace π, π╞ φ iff π ∈ L (NFAφ)
• Satisfiability of an LTLf formula can be checked in PSPACE
by non-emptyness of the related NFA
Planning For Linear Time Terminating
Specification
5
19/01/2018
• NFA
Automata Construction Starting
from LTLf Formula
• DFA
Planning For Linear Time Terminating
Specification
6
19/01/2018
On-the-fly Automata
• On-the-fly automata do not build the whole automata in terms of
states and transition function
• Can be seen as a function that, given the current state s and a
propositional interpretation Π, returns the new automaton state sI
• Simply applies the delta
• Does not keep track of anything but current state
• DFA Example
Π = (a)
Planning For Linear Time Terminating
Specification
7
19/01/2018
Planning for LTLf Goals in Deterministic Domains
• Goal no more seen as propositional formula over fluents, but
expressed in LTLf formulas
• How to deal with LTLf goals? Using automata!
– We need to perform a step on the domain and then another step over
the goal automaton
– Transform the planning domain into automaton and compute the
intersection between this one and the automaton related to the LTLf
goal
– If we reach a final state in the obtained automaton, we have found a
plan
Planning For Linear Time Terminating
Specification
8
19/01/2018
• How to obtain the automata AD from the planning domain P?
• With this simple transformation
Planning for LTLf Goals in Deterministic Domains
9Planning For Linear Time Terminating
Specification
• Simple domain D
• Goal is defined as
19/01/2018
Example
Planning For Linear Time Terminating
Specification
10
19/01/2018
Torres-Baier Approach
• Compile away LTLf goal into classical goals
• Encode the automata in PDDL (not NFA, but AFW!)
• Add synchronization actions used for updating the state of
the automaton
– Two different modes: wold and sync
– The classical actions are executed in world mode;
– Synchronization actions are executed in sync mode.
• Plan of kind
where each represents a sequence of synchronization
actions
v
Planning For Linear Time Terminating
Specification
11
19/01/2018
Torres-Baier Approach
Planning For Linear Time Terminating
Specification
12
19/01/2018
Our Approach
• Possible with the usage of a simulation based planner: FS Planner
[FrancesGeffnerIJCAI17]
• It works in simulation mode using search algorithms based on
novelty
• Uses the definition of Factored State Model: a generalization w.r.t.
the declarative formalization of planning problems
– Defines action precondition, effects and cost as Black-Box procedures
– We are making no assumption about the description form.
• Simulator: factored state model
where are defined as black-box procedures
Planning For Linear Time Terminating
Specification
13
19/01/2018
Our Approach
• We use a procedure Pr (X, a), where X represents the state in
terms of domain state s and automaton state q and a represents the
action
– It applies the action a and changes the domain state s in sI
– Given the new state sI and the current automaton state q, computes the new
automaton state qI
• Can be seen as two sequential procedures
• We manage the second procedure externally, defining a completelly
procedural action update-automaton
– Execute the action over the domain
– Then execute update-automaton action
• When the external procedure returns a final state, we extract the
plan and we have done
Planning For Linear Time Terminating
Specification
14
19/01/2018
Discussion
Planning For Linear Time Terminating
Specification
15
• Our approach works!
• Validated over sokoban domain
• Perfomance not comparable with Torres-Baier
• Highly extendable : procedural calls to code (instead of
actions) to progress
• Possibility of defining problems procedurally
19/01/2018
Conclusions
• Thesis results
– Implementation of the NFA/DFA (and on the fly variants) construction
from an LTLf formula
– Formulation planning for LTLf goals, by exploiting such automata
constructions
– A working implementation of [TorresBaierIJCAI15] approach
– A working implementation of our new approach on the novel planner by
Guillem Frances (UPF, Barcelona) [FrancesGeffnerIJCAI17]
• Future work
– The automata approach can be really extended to more advanced
planning forms (differently from [TorresBaierIJCAI15])
– FONDsp, FONDsc PONDsp
Planning For Linear Time Terminating
Specification
16

Master thesis presentation

  • 1.
    Planning for LinearTime Terminating Specifications Candidate: Riccardo Di Stefano, 1528140 Advisor: Giuseppe De Giacomo
  • 2.
    19/01/2018Planning For LinearTime Terminating Specification 2 https://github.com/gitRiky https://www.linkedin.com/in/riccardo-di-stefano-439a11134/ Contacts and Links distefanor3@gmail.com
  • 3.
    19/01/2018Planning For LinearTime Terminating Specification Introduction 3 • Planning is the problem of synthesizing a sequence of actions that leads the agent from its current state to a desired state • It is of interest to add trajectory constraints (typically expressed in a fragment of LTL) while reaching the final state. The standard PDDL3 supports these constraints, but no planner implements them • Recently Linear Temporal Logic over Finite Traces (LTLf) has emerged as a formalism for expressing such constraints • This thesis is about supporting trajectory constraints in real planners
  • 4.
    19/01/2018Planning For LinearTime Terminating Specification Thesis Goals 4 • Design and implement the automata construction starting from an LTLf formula [DeGiacomoVardiIJCAI13,14,15] – NFA – DFA • Formulate how to do planning for LTLf goals exploiting such automata constructions – Focus the attention on deterministic domains (classical planning) – But also explore more advanced forms (FONDsp, FONDsc,PONDsp ) • Design and implement the state-of-the-art approach for planning for LTLf goals [TorresBaierIJCAI15] • Design and implement the automata based approach, using a new planner [FrancesGeffnerIJCAI17] that exploits calls to code (instead of actions) to progress – In collaboration with Guillem Frances (UPF, Barcelona)
  • 5.
    19/01/2018 Automata Construction Starting fromLTLf Formula • Starting from an LTLf formula φ, we can build the related automata: • Put the formula in negative normal form (linear) • Build the AFW (linear) • Translate the AFW in NFA (exponential) • Determinize the NFA (exponential) • Given the NFA built from the LTLf formula φ, for every finite trace π, π╞ φ iff π ∈ L (NFAφ) • Satisfiability of an LTLf formula can be checked in PSPACE by non-emptyness of the related NFA Planning For Linear Time Terminating Specification 5
  • 6.
    19/01/2018 • NFA Automata ConstructionStarting from LTLf Formula • DFA Planning For Linear Time Terminating Specification 6
  • 7.
    19/01/2018 On-the-fly Automata • On-the-flyautomata do not build the whole automata in terms of states and transition function • Can be seen as a function that, given the current state s and a propositional interpretation Π, returns the new automaton state sI • Simply applies the delta • Does not keep track of anything but current state • DFA Example Π = (a) Planning For Linear Time Terminating Specification 7
  • 8.
    19/01/2018 Planning for LTLfGoals in Deterministic Domains • Goal no more seen as propositional formula over fluents, but expressed in LTLf formulas • How to deal with LTLf goals? Using automata! – We need to perform a step on the domain and then another step over the goal automaton – Transform the planning domain into automaton and compute the intersection between this one and the automaton related to the LTLf goal – If we reach a final state in the obtained automaton, we have found a plan Planning For Linear Time Terminating Specification 8
  • 9.
    19/01/2018 • How toobtain the automata AD from the planning domain P? • With this simple transformation Planning for LTLf Goals in Deterministic Domains 9Planning For Linear Time Terminating Specification
  • 10.
    • Simple domainD • Goal is defined as 19/01/2018 Example Planning For Linear Time Terminating Specification 10
  • 11.
    19/01/2018 Torres-Baier Approach • Compileaway LTLf goal into classical goals • Encode the automata in PDDL (not NFA, but AFW!) • Add synchronization actions used for updating the state of the automaton – Two different modes: wold and sync – The classical actions are executed in world mode; – Synchronization actions are executed in sync mode. • Plan of kind where each represents a sequence of synchronization actions v Planning For Linear Time Terminating Specification 11
  • 12.
    19/01/2018 Torres-Baier Approach Planning ForLinear Time Terminating Specification 12
  • 13.
    19/01/2018 Our Approach • Possiblewith the usage of a simulation based planner: FS Planner [FrancesGeffnerIJCAI17] • It works in simulation mode using search algorithms based on novelty • Uses the definition of Factored State Model: a generalization w.r.t. the declarative formalization of planning problems – Defines action precondition, effects and cost as Black-Box procedures – We are making no assumption about the description form. • Simulator: factored state model where are defined as black-box procedures Planning For Linear Time Terminating Specification 13
  • 14.
    19/01/2018 Our Approach • Weuse a procedure Pr (X, a), where X represents the state in terms of domain state s and automaton state q and a represents the action – It applies the action a and changes the domain state s in sI – Given the new state sI and the current automaton state q, computes the new automaton state qI • Can be seen as two sequential procedures • We manage the second procedure externally, defining a completelly procedural action update-automaton – Execute the action over the domain – Then execute update-automaton action • When the external procedure returns a final state, we extract the plan and we have done Planning For Linear Time Terminating Specification 14
  • 15.
    19/01/2018 Discussion Planning For LinearTime Terminating Specification 15 • Our approach works! • Validated over sokoban domain • Perfomance not comparable with Torres-Baier • Highly extendable : procedural calls to code (instead of actions) to progress • Possibility of defining problems procedurally
  • 16.
    19/01/2018 Conclusions • Thesis results –Implementation of the NFA/DFA (and on the fly variants) construction from an LTLf formula – Formulation planning for LTLf goals, by exploiting such automata constructions – A working implementation of [TorresBaierIJCAI15] approach – A working implementation of our new approach on the novel planner by Guillem Frances (UPF, Barcelona) [FrancesGeffnerIJCAI17] • Future work – The automata approach can be really extended to more advanced planning forms (differently from [TorresBaierIJCAI15]) – FONDsp, FONDsc PONDsp Planning For Linear Time Terminating Specification 16