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.0.tar.gz (109.3 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.0-py3-none-any.whl (18.5 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: numeric_pddl_gym-1.1.0.tar.gz
  • Upload date:
  • Size: 109.3 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.0.tar.gz
Algorithm Hash digest
SHA256 46bd3148beb0f5203433565cf332e8be200240cba79d4eb2042c9819cc79a0f8
MD5 ddc20fd815967169087e46eac9c8a2d9
BLAKE2b-256 8739616c1900779c3146c0d96df1a9267ab3dd9e60b5c219442f3f129bd148bf

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for numeric_pddl_gym-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 5dba444bd62cb5afb1b13241dfe0cf0fd25e79abc93584354f8fdf3280e20875
MD5 97aab7beb7083bc5b772df68d9b65f23
BLAKE2b-256 0d8ff6a2291478916f60e16342d29ea9dc00a37be558a3e4f1a87271fdf0ddc0

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