pddlgym  by tomsilver

PDDL to Gym environments for AI planning

Created 5 years ago
252 stars

Top 99.6% on SourcePulse

GitHubView on GitHub
Project Summary

PDDLGym bridges the gap between AI planning and reinforcement learning by converting Planning Domain Definition Language (PDDL) problems into OpenAI Gym environments. This library is designed for AI researchers and practitioners seeking to leverage RL algorithms on classical planning tasks, offering a standardized interface for experimentation and development. It allows users to seamlessly integrate complex planning scenarios into familiar RL workflows, accelerating research in areas like automated planning and intelligent agents.

How It Works

PDDLGym parses a supported subset of PDDL 1.2, including STRIPS, typing, quantifiers, disjunctions, equality, constants, and derived predicates, to construct executable Gym environments. It handles both standard PDDL and PPDDL (for probabilistic effects). The core approach involves mapping PDDL states to Gym observations (literals, objects, goal) and PDDL actions to Gym actions. Users can configure how actions and operators are handled, with options for simplifying integration using off-the-shelf PDDL or enabling a more nuanced distinction between agent actions and environment consequences for advanced research.

Quick Start & Requirements

  • Primary Install: pip install pddlgym
  • Python Version: 3.6+
  • Prerequisites: Optional planner dependencies (pddlgym_planners for FastForward/FastDownward) and Prolog dependencies (SWI-Prolog) are available for enhanced functionality. Matplotlib is used for rendering, which may require backend configuration (e.g., matplotlib.use('agg')).
  • Links:
    • Demo scripts: pddlgym/demo.py, pddlgym/demo_planning.py
    • Planner interface: pddlgym_planners repository.

Highlighted Details

  • Supports a substantial PDDL 1.2 feature set, excluding conditional effects and action costs.
  • Includes a diverse range of pre-packaged PDDL environments (e.g., Sokoban, Blocks, Keys and Doors, TSP) and PPDDL environments (e.g., River, Triangle Tireworld).
  • Offers operators_as_actions=True for simplified use with standard PDDL and dynamic_action_space=True to dynamically update the action space with valid actions per state.
  • Provides a clear observation representation (literals, objects, goal) and a structured method for adding new custom domains.

Maintenance & Community

Developed by Tom Silver and Rohan Chitnis, the project encourages contributions. Sister packages include pyperplan and rddlgym. The README does not provide links to community channels like Discord/Slack, a roadmap, or specific maintainer contact beyond email correspondence.

Licensing & Compatibility

The license type is not specified in the provided README. This omission requires further investigation for compatibility assessments, especially concerning commercial use or integration into closed-source projects.

Limitations & Caveats

The library does not support conditional effects or action costs within PDDL. Integration of complex domains may require modifications to PDDL files to distinguish between actions and operators. Rendering functionality might necessitate specific Matplotlib backend configurations to avoid errors.

Health Check
Last Commit

3 months ago

Responsiveness

Inactive

Pull Requests (30d)
0
Issues (30d)
2
Star History
2 stars in the last 30 days

Explore Similar Projects

Feedback? Help us improve.