Skip to content

Latest commit

 

History

History
34 lines (31 loc) · 776 Bytes

File metadata and controls

34 lines (31 loc) · 776 Bytes

Planning LaTeX

Latex listing for planning formalisms

Add PDDL, JSHOP and HDDL snippets to your Tex files by making a copy of each listing configuration file to your LaTeX project. An example is available on Overleaf.

\usepackage{listings}
\input{PDDL}
\input{JSHOP}
\input{HDDL}

\begin{lstlisting}[
  float=!htb,
  caption={PDDL move operator.},
  label={lst:pddl},
  language=PDDL]
(:action move
  :parameters (
    ?agent - agent
    ?from ?to - hallway ; Both ?from and ?to are hallways
  )
  :precondition (and
    (at ?agent ?from)
    (not (at ?agent ?to))
    (adjacent ?from ?to)
  )
  :effect (and
    (not (at ?agent ?from)) ; This line is usually forgotten
    (at ?agent ?to)
  )
)
\end{lstlisting}