PDDL
Julia parser, interpreter and compiler interface for the Planning Domain Definition Language (PDDL). Planners not included.
Science Score: 44.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
✓CITATION.cff file
Found CITATION.cff file -
✓codemeta.json file
Found codemeta.json file -
✓.zenodo.json file
Found .zenodo.json file -
○DOI references
-
○Academic publication links
-
○Committers with academic emails
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (13.5%) to scientific vocabulary
Keywords
Keywords from Contributors
Repository
Julia parser, interpreter and compiler interface for the Planning Domain Definition Language (PDDL). Planners not included.
Basic Info
- Host: GitHub
- Owner: JuliaPlanners
- License: apache-2.0
- Language: Julia
- Default Branch: master
- Homepage: https://juliaplanners.github.io/PDDL.jl/dev
- Size: 1.73 MB
Statistics
- Stars: 85
- Watchers: 4
- Forks: 9
- Open Issues: 4
- Releases: 23
Topics
Metadata Files
README.md
PDDL.jl
A Julia parser, interpreter, and compiler interface for the Planning Domain Definition Language (PDDL).
Planners not included, but see SymbolicPlanners.jl.
If you use this software, please cite:
T. Zhi-Xuan, PDDL.jl: An Extensible Interpreter and Compiler Interface for Fast and Flexible AI Planning, MS Thesis, Massachusetts Institute of Technology, 2022.
Installation
Press ] at the Julia REPL to enter the package manager, then run:
add PDDL
For the latest development version, run:
add https://github.com/JuliaPlanners/PDDL.jl.git
Features
- Parsing and writing of PDDL domain and problem files
- A high-level symbolic planning API
- Execution of PDDL actions and plans
- Abstract interpretation of PDDL semantics
- Domain grounding and/or compilation for increased performance
- Support for the following PDDL requirements:
:strips- the most restricted functionality:typing- (hierarchically) typed objects:equality- comparing equality=of objects:quantified-preconditions-forallandexists:disjunctive-preconditions-orpredicates:conditional-effects-whenandforalleffects:adl- shorthand for the above 6 requirements:constants- domain constants:fluents- numeric fluents:derived-predicates- a.k.a. domain axioms
PDDL.jl does not include any planning algorithms. Rather, it aims to provide an
interface so that planners for PDDL domains can easily be written in Julia, as
in SymbolicPlanners.jl.
Example
PDDL.jl can be used to parse domains and planning problems written in PDDL.
For example, the following file describes a world of square tiles which are either
white or black, arranged in a grid. To change the color of the tiles one can flip
either a row of tiles or a column of tiles.
clojure
;; Grid flipping domain with conditional effects and universal quantifiers
(define (domain flip)
(:requirements :adl :typing)
(:types row column)
(:predicates (white ?r - row ?c - column))
(:action flip_row
:parameters (?r - row)
:effect (forall (?c - column)
(and (when (white ?r ?c) (not (white ?r ?c)))
(when (not (white ?r ?c)) (white ?r ?c))))
)
(:action flip_column
:parameters (?c - column)
:effect (forall (?r - row)
(and (when (white ?r ?c) (not (white ?r ?c)))
(when (not (white ?r ?c)) (white ?r ?c))))
)
)
A corresponding problem in this domain might be to make all the tiles white,
when the initial state is an alternating pattern of black and white tiles in a 3x3 grid:
clojure
;; Grid flipping problem
(define (problem flip-problem)
(:domain flip)
(:objects r1 r2 r3 - row c1 c2 c3 - column)
(:init (white r1 c2)
(white r2 c1)
(white r2 c3)
(white r3 c2))
(:goal (forall (?r - row ?c - column) (white ?r ?c)))
)
With PDDL.jl, we can parse each of these files into Julia constructs:
julia
domain = load_domain("flip-domain.pddl")
problem = load_problem("flip-problem.pddl")
Actions defined by the domain can be executed to solve the problem:
julia
state = initstate(domain, problem)
state = execute(domain, state, pddl"(flip_column c1)")
state = execute(domain, state, pddl"(flip_column c3)")
state = execute(domain, state, pddl"(flip_row r2)")
We can then check that the problem is successfully solved in the final state:
julia
@assert satisfy(domain, state, problem.goal) == true
More examples can be found in the test directory. Documentation can be found here.
Interface
PDDL.jl exposes a high-level interface for interacting with planning domains and problems, which can be used to implement planning algorithms and other downstream applications. Full documentation of interface methods can be found here. A summary is provided below:
satisfychecks whether a logical formula is satisfied (or satisfiable) in a PDDL state.satisfiersreturns all satisfying substitutions to free variables in a logical formula.evaluatereturns the value of a functional or logical expression within the context of a state.initstateconstructs an initial state from a PDDL domain and problem.goalstateconstructs a (partial) goal state from a PDDL domain and problemtransitionreturns the successor to a state after applying an action or set of actions.executeapplies an action to a state, returning the resulting state.regresscomputes the pre-image of an action with respect to a state.availablechecks whether an action can be executed in a state.- If no action is specified, it returns the list of available actions.
relevantchecks whether an action can lead to a state.- If no action is specified, it returns the list of relevant actions.
Owner
- Name: Julia Planners
- Login: JuliaPlanners
- Kind: organization
- Repositories: 4
- Profile: https://github.com/JuliaPlanners
Automated planning for robotics and AI with Julia.
Citation (CITATION.cff)
cff-version: 1.2.0
title: PDDL.jl
message: "If you use this software, please cite it as below."
type: software
authors:
- given-names: Tan
family-names: Zhi-Xuan
orcid: "https://orcid.org/0000-0002-1549-8492"
url: "https://github.com/JuliaPlanners/PDDL.jl"
preferred-citation:
type: mastersthesis
title: "PDDL.jl: An Extensible Interpreter and Compiler Interface for Fast and Flexible AI Planning"
authors:
- given-names: Tan
family-names: Zhi-Xuan
orcid: "https://orcid.org/0000-0002-1549-8492"
url: "https://hdl.handle.net/1721.1/143179"
year: 2022
department: "Department of Electrical Engineering and Computer Science"
institution:
- name: "Massachusetts Institute of Technology"
GitHub Events
Total
- Issues event: 1
- Watch event: 6
Last Year
- Issues event: 1
- Watch event: 6
Committers
Last synced: 5 months ago
Top Committers
| Name | Commits | |
|---|---|---|
| Xuan | t****x@g****m | 386 |
| github-actions[bot] | 4****] | 4 |
| Reuben Gardos Reid | 5****J | 1 |
| Matthew LeMay | m****y | 1 |
Issues and Pull Requests
Last synced: 5 months ago
All Time
- Total issues: 16
- Total pull requests: 8
- Average time to close issues: 15 days
- Average time to close pull requests: 3 months
- Total issue authors: 9
- Total pull request authors: 5
- Average comments per issue: 3.13
- Average comments per pull request: 0.63
- Merged pull requests: 6
- Bot issues: 0
- Bot pull requests: 4
Past Year
- Issues: 0
- Pull requests: 0
- Average time to close issues: N/A
- Average time to close pull requests: N/A
- Issue authors: 0
- Pull request authors: 0
- Average comments per issue: 0
- Average comments per pull request: 0
- Merged pull requests: 0
- Bot issues: 0
- Bot pull requests: 0
Top Authors
Issue Authors
- MFaisalZaki (4)
- wmanning-cra (4)
- pevnak (2)
- jw3126 (1)
- ztangent (1)
- guilyx (1)
- urbanm30 (1)
- IfrahIdrees (1)
- SamButers (1)
Pull Request Authors
- github-actions[bot] (4)
- ReubenJ (1)
- fplk (1)
- RealZiangLiu (1)
- mplemay (1)
Top Labels
Issue Labels
Pull Request Labels
Packages
- Total packages: 1
-
Total downloads:
- julia 15 total
- Total dependent packages: 3
- Total dependent repositories: 0
- Total versions: 23
juliahub.com: PDDL
Julia parser, interpreter and compiler interface for the Planning Domain Definition Language (PDDL). Planners not included.
- Homepage: https://juliaplanners.github.io/PDDL.jl/dev
- Documentation: https://docs.juliahub.com/General/PDDL/stable/
- License: Apache-2.0
-
Latest release: 0.2.18
published over 1 year ago
Rankings
Dependencies
- actions/cache v1 composite
- actions/checkout v2 composite
- julia-actions/julia-buildpkg latest composite
- julia-actions/julia-runtest latest composite
- julia-actions/setup-julia v1 composite
- actions/checkout v2 composite
- julia-actions/setup-julia latest composite