Skip to main content

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

Metadata

Release files for pddl-utils 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pddl-utils 0.0.1
File Size Uploaded
pddl_utils-0.0.1.tar.gz 3.9 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pddl-utils 0.0.1
File Interpreter ABI Platform
pddl_utils-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 8.4 kB

Release files / pddl_utils-0.0.1.tar.gz

Download URL pddl_utils-0.0.1.tar.gz
Size 3.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6dd57f5fa0acd6a0a70a08e760a47057099b31f837261e4a5542166f479c1478
BLAKE2b-256 checksum
How to use checksums
84d70d2308f30fe0939c2a7d4c61e2610a4c5abadb97300a4e616f4cbdbfbb22
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.

Transparency log

Release files / pddl_utils-0.0.1-py3-none-any.whl

Download URL pddl_utils-0.0.1-py3-none-any.whl
Size 4.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
97ef963c4e4d40e360382a9b0f13f27e8ef528336bc25108dba2561bca959eec
BLAKE2b-256 checksum
How to use checksums
75e8ec1dd2b8f48a4a503d90e8768cb506287b3609da07c9f803e71607874a4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.0.1 CPython/3.12.8

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Jan 3, 2025.

Transparency log

Release history Release notifications | RSS feed

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page