Library of miscellaneous utilies to work with PDDL (both in Python and on the command line).
Project description
pddl-utils
Library of miscellaneous utilies to work with PDDL (both in Python and on the command line).
Installation
pip install pddl-utils
Usage
Python
import pddlutils as pu
# Extended wrapper of the pddl library.
domain, problem = pu.load('domain.pddl', 'problem.pddl')
# Alternatively, if you have a pddl dom,prob pair, you can wrap it using...
# domain, problem = pu.load(dom, prob)
# Set of (lifted) fluents and actions
domain.predicates
domain.actions
# Access a particular action or fluent or constant/object
a = domain.action['move']
f = domain.predicate['connected']
p1 = domain.constant['person1']
l1 = problem.object['loc1']
l2 = problem.object['loc2']
# Ground a predicate
f = pu.ground(f, l1, l2)
# Ground an action
ag = pu.ground(a, p1, l1, l2)
Planned Usage
Python
import pddlutils as pu
# Extended wrapper of the pddl library.
domain, problem = pu.load('domain.pddl', 'problem.pddl')
# Alternatively, if you have a pddl dom,prob pair, you can wrap it using...
# domain, problem = pu.load(dom, prob)
# Set of (lifted) fluents and actions
domain.predicates
domain.actions
# Access a particular action or fluent or constant/object
a = domain.action['move']
f = domain.predicate['connected']
p1 = domain.constant['person1']
l1 = problem.object['loc1']
l2 = problem.object['loc2']
# Ground a predicate
f = pu.ground(f, l1, l2)
# Ground an action
ag = pu.ground(a, p1, l1, l2)
# Ground an entire domain (actions and fluents replaced with type-specific ground versions)
gdom, gprob = pu.ground(domain, problem)
# Easy progression
s0 = problem.init
act = list(problem.actions)[0]
s1 = tl.progress(s0, act)
# Easy action/fluent lookup
act = problem.action('move loc1 loc2')
fluent = problem.fluent('connected loc1 loc2')
assert fluent == problem.fluent('(connected loc1 loc2)')
# parses plans from file, string, or list
plan = problem.parse_plan('plan.ipc')
plan = problem.parse_plan('(move loc1 loc2)\n(move loc2 loc3)')
plan = problem.parse_plan(['move loc1 loc2', 'move loc2 loc3'])
CLI
Progress the initial state through a plan, and create a new problem file with the final state reached.
$ planutils progress --domain domain.pddl --problem problem.pddl --plan plan.ipc --output new-problem.pddl
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pddl_utils-0.0.1.tar.gz.
File metadata
- Download URL: pddl_utils-0.0.1.tar.gz
- Upload date:
- Size: 3.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6dd57f5fa0acd6a0a70a08e760a47057099b31f837261e4a5542166f479c1478
|
|
| MD5 |
2df777acc10b69c97b442932339bc7bf
|
|
| BLAKE2b-256 |
84d70d2308f30fe0939c2a7d4c61e2610a4c5abadb97300a4e616f4cbdbfbb22
|
Provenance
The following attestation bundles were made for pddl_utils-0.0.1.tar.gz:
Publisher:
python-publish.yml on AI-Planning/pddl-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pddl_utils-0.0.1.tar.gz -
Subject digest:
6dd57f5fa0acd6a0a70a08e760a47057099b31f837261e4a5542166f479c1478 - Sigstore transparency entry: 159186976
- Sigstore integration time:
-
Permalink:
AI-Planning/pddl-utils@f1bbc7660b958d5348c3efcca6fbb158d90c61c0 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/AI-Planning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f1bbc7660b958d5348c3efcca6fbb158d90c61c0 -
Trigger Event:
release
-
Statement type:
File details
Details for the file pddl_utils-0.0.1-py3-none-any.whl.
File metadata
- Download URL: pddl_utils-0.0.1-py3-none-any.whl
- Upload date:
- Size: 4.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97ef963c4e4d40e360382a9b0f13f27e8ef528336bc25108dba2561bca959eec
|
|
| MD5 |
04878bb4b7d32e3b65bdd57c0c9fb75c
|
|
| BLAKE2b-256 |
75e8ec1dd2b8f48a4a503d90e8768cb506287b3609da07c9f803e71607874a4b
|
Provenance
The following attestation bundles were made for pddl_utils-0.0.1-py3-none-any.whl:
Publisher:
python-publish.yml on AI-Planning/pddl-utils
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pddl_utils-0.0.1-py3-none-any.whl -
Subject digest:
97ef963c4e4d40e360382a9b0f13f27e8ef528336bc25108dba2561bca959eec - Sigstore transparency entry: 159186977
- Sigstore integration time:
-
Permalink:
AI-Planning/pddl-utils@f1bbc7660b958d5348c3efcca6fbb158d90c61c0 -
Branch / Tag:
refs/tags/v0.0.1 - Owner: https://github.com/AI-Planning
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@f1bbc7660b958d5348c3efcca6fbb158d90c61c0 -
Trigger Event:
release
-
Statement type: