PlanningDomains.jl

A repository of PDDL domains and problems.
Author JuliaPlanners
Popularity
7 Stars
Updated Last
1 Year Ago
Started In
February 2022

PlanningDomains.jl

A (meta)-repository of PDDL domains and problems. The following repositories are supported:

Usage

Listing

To list the domains provided by a repository, run list_domains:

list_domains(JuliaPlannersRepo)
6-element Vector{String}:
 "blocksworld"
 "blocksworld-axioms"
 "doors-keys-gems"
 "gridworld"
 "wolf-goat-cabbage"
 "zeno-travel"

To list the problems in a domain, run list_problems:

julia> list_problems(JuliaPlannersRepo, "blocksworld")
9-element Vector{String}:
 "problem-1"
 
 "problem-9"

Some repositories also organize domains into collections. We can list collections via list_collections, and list domains in a particular collection via list_domains:

julia> list_collections(IPCInstancesRepo)
8-element Vector{String}:
 "ipc-1998"
 
 "ipc-2014"

julia> list_domains(IPCInstancesRepo, "ipc-2000")
12-element Vector{String}:
 "blocks-strips-typed"
 
 "schedule-adl-untyped"

Loading

To load a domain, specify the repository and domain name as arguments to load_domain. To load a problem, specify either the problem name or its index:

domain = load_domain(JuliaPlannersRepo, "blocksworld")
problem_1 = load_problem(JuliaPlannersRepo, "blocksworld", "problem-1")
problem_2 = load_problem(JuliaPlannersRepo, "blocksworld", 2)

Searching

Collections, domains and problems can also be searched for using find_collections, find_domains, and find_problems, by providing a (sub)string or regular expression as a query:

julia> find_collections(PlanningDomainsRepo, "Fast")
2-element Vector{String}:
 "9-Fast Downward All Problem Suite"
 "10-Fast Downward LM-Cut Problem Suite"

julia> find_domains(PlanningDomainsRepo, "blocks")
3-element Vector{String}:
 "112-blocks"
 "127-blocks-3op"
 "128-blocks-reduced"

julia> find_problems(PlanningDomainsRepo, "112-blocks", r"BLOCKS-4-\d.pddl")
3-element Vector{String}:
 "3967-probBLOCKS-4-1.pddl"
 "3968-probBLOCKS-4-2.pddl"
 "3966-probBLOCKS-4-0.pddl"

Default Repository

All of the above functions can also be called with the first argument omitted, and with the domain name specified as a Symbol, in which case the default repository (JuliaPlannersRepo) will be assumed. Note that underscores in symbols will automatically be converted to hyphens:

# The following two functions load the same domain
load_domain(:doors_keys_gems)
load_domain(JuliaPlannersRepo, "doors-keys-gems")

# The following two functions load the same problem
load_problem(:zeno_travel, 1)
load_problem(JuliaPlannersRepo, "zeno-travel", 1)

Cache Management

For repositories hosted online, PlanningDomains.jl maintains a local cache to reduce load times. However, this cache is not automatically updated if the remote repositories change. To manually clear the cache for a particular repository use PlanningDomains.clear_cache!. To clear all caches, use PlanningDomains.clear_all_caches!.

Used By Packages

No packages found.