Skip to main content

Convert a Numeric PDDL domain into an Gymnasium environment

Project description

Numeric PDDLGym

Python Version Code style: black

A framework for automatically translating Numeric PDDL domains with the Gymnasium API. This allows Numeric PDDL planning problems to be solved using standard RL algorithms (e.g., PPO via RLlib).

The environment converts states, actions, and goals from Numeric PDDL into fixed-size numeric vectors, enabling direct integration with deep RL libraries.

✨ Features

  • Supports Numeric PDDL domains and problems
  • Automatic grounding and vectorization of:
    • Predicates
    • Numeric fluents
    • Goal conditions
  • Compatible with the Gymnasium API
  • Designed for RLlib (Ray) integration
  • Works with standard deep RL algorithms (e.g., PPO)

⚙️ Configuration

The environment is configured via a dictionary (env_config).

Parameter Type Description
domain_path Path Path to the PDDL domain file
problems_list List[Path] List of problem files
max_steps int Max steps per episode
executing_algorithm str Name of RL algorithm (e.g., "PPO")
masking_strategy "pre" or "post" "pre": Filters invalid actions before execution using PDDL checks.
"post": Learns invalid actions after execution from feedback.
map_size int (MinecraftEnv only) Grid size, e.g., 6, 10, 15.

🚀 Installation

pip install numeric_pddl_gym

With RL (RLlib + Torch):

pip install numeric_pddl_gym[rl_agents]

▶️ Run Example

python rl_agents/ppo_pddl_rllib_agent.py

⚠️ Limitations

  1. Can't encode complex goal conditions.
  2. Agents must be retrained if the problem has a different number of fluents, predicates, or goal conditions.
  3. Currently does not support manual interaction with the environment.
  4. Designed for fixed-structure problems (no variable-sized domains).
  5. Enabling action applicability checking leads to slow runtime in large-scale problems.

📚 Citations

Coming soon

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

numeric_pddl_gym-1.1.1.tar.gz (109.7 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

numeric_pddl_gym-1.1.1-py3-none-any.whl (18.6 kB view details)

Uploaded Python 3

File details

Details for the file numeric_pddl_gym-1.1.1.tar.gz.

File metadata

  • Download URL: numeric_pddl_gym-1.1.1.tar.gz
  • Upload date:
  • Size: 109.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for numeric_pddl_gym-1.1.1.tar.gz
Algorithm Hash digest
SHA256 ae10544364351fca84f41299172fe80545e6b6b50b1cbc7b06aabf47eaa44a1b
MD5 1db1d52cf5e24c92a23103a3e4283955
BLAKE2b-256 3812330a68b307ab930bb50f1ed51a233de9de81ba9eb6ee3eac78f3c9f1fb3b

See more details on using hashes here.

File details

Details for the file numeric_pddl_gym-1.1.1-py3-none-any.whl.

File metadata

File hashes

Hashes for numeric_pddl_gym-1.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 2cabfd8d4ee13e899e45c4b4febea302d26b400d80df84c94e4f57f54340cb46
MD5 d620955c23ca19f2e650a43fc1e87afb
BLAKE2b-256 ba47ad32ea0c3edadc2013b0cdf635c65fe59fecd285f148b51dc002b8867df8

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page