Learning-and-Intelligent-Systems / predicators

Learning for effective and efficient bilevel planning
MIT License
84 stars 14 forks source link

predicators

Repository Description

This codebase implements a framework for bilevel planning with learned neuro-symbolic relational abstractions, as described in the following papers:

  1. Learning Symbolic Operators for Task and Motion Planning. Silver, Chitnis, Tenenbaum, Kaelbling, Lozano-Perez. IROS 2021.
  2. Learning Neuro-Symbolic Relational Transition Models for Bilevel Planning. Chitnis, Silver, Tenenbaum, Lozano-Perez, Kaelbling. IROS 2022.
  3. Learning Neuro-Symbolic Skills for Bilevel Planning. Silver, Athalye, Tenenbaum, Lozano-Perez, Kaelbling. CoRL 2022.
  4. Predicate Invention for Bilevel Planning. Silver, Chitnis, Kumar, McClinton, Lozano-Perez, Kaelbling, Tenenbaum. AAAI 2023.
  5. Embodied Active Learning of Relational State Abstractions for Bilevel Planning. Li, Silver. CoLLAs 2023.
  6. Learning Efficient Abstract Planning Models that Choose What to Predict. Kumar, McClinton, Chitnis, Silver, Lozano-Perez, Kaelbling. CoRL 2023.

The codebase is still under active development. Please contact tslvr@mit.edu or njk@mit.edu before attempting to use it for your own research.

Code Structure

In predicators/, the environments are defined in the envs/ directory, and the approaches (both learning-based and not) are defined in the approaches/ directory. The core NSRT learning algorithm happens in predicators/nsrt_learning/nsrt_learning_main.py, which has the following steps:

Methods for predicate learning are implemented as Approaches (e.g., predicators/approaches/grammar_search_invention_approach.py), and may interface with the core structure of predicators/nsrt_learning/nsrt_learning_main.py in various ways.

A simple implementation of search-then-sample bilevel planning is provided in predicators/planning.py. This implementation uses the "SeSamE" strategy: SEarch-and-SAMple planning, then Execution.

Installation

Instructions For Running Code

PYTHONHASHSEED

Our code assumes that python hashing is deterministic between processes, which is not true by default. Please make sure to export PYTHONHASHSEED=0 when running the code. You can add this line to your bash profile, or prepend export PYTHONHASHSEED=0 to any command line call, e.g., export PYTHONHASHSEED=0 python predicators/main.py --env ....

Locally

Running Experiments on Supercloud

See these instructions.

Instructions For Contributing