GithubHelp home page GithubHelp logo

hurricahjz / goose Goto Github PK

View Code? Open in Web Editor NEW

This project forked from dillonzchen/goose

0.0 0.0 0.0 250.66 MB

Learning for planning architecture using both classical and deep learning methods.

License: GNU General Public License v3.0

Shell 0.17% C++ 57.13% Python 28.85% C 0.06% Cuda 0.01% Smarty 0.20% CMake 1.62% PDDL 11.97%

goose's Introduction

GOOSE: Graphs Optimised fOr Search Evaluation

GOOSE is a learning for planning framework. It contains various methods for learning representations for planning tasks, and algorithms for using such representations for solving planning tasks.

See references for the corresponding publications.

Table of contents

Setup

Use the commands below to make a virtual environment, activate it, install packages, and build cpp components. The setup has been tested with python versions 3.10 and higher, but should probably work for lower python3 versions as well.

python3 -m venv venv
source venv/bin/activate
pip install -r requirements.txt
sh setup.sh

In case a virtual environment does not work, you can also try anaconda:

conda create --name goose python=3.10.4
conda activate goose
pip install -r requirements.txt
sh setup.sh

Training

  • see python3 train.py -h for help, you will need the --save-file argument if you want to save the model
  • to train with your own dataset, you will need to construct an experiment configuration toml file such as in here
    • the tasks_dir and plans_dir paths must contain the same files, differentiating only in the file suffix (.pddl and .plan, respectively)

Example for WL models

python3 train.py experiments/models/wl_ilg_gpr.toml experiments/ipc23-learning/blocksworld.toml --save-file blocksworld_wl.model

Example for GNN models

python3 train.py experiments/models/gnn_mean_ilg.toml experiments/ipc23-learning/blocksworld.toml --save-file blocksworld_gnn.model

Heuristic Search

  • see run_wl.py for WL models and run_gnn.py for GNN models
  • GNN models automatically try to use GPU where possible and CPU otherwise

Example for WL models

python3 run_wl.py benchmarks/ipc23-learning/blocksworld/domain.pddl benchmarks/ipc23-learning/blocksworld/testing/medium/p01.pddl blocksworld_wl.model

Example for GNN models

python3 run_gnn.py benchmarks/ipc23-learning/blocksworld/domain.pddl benchmarks/ipc23-learning/blocksworld/testing/medium/p01.pddl blocksworld_gnn.model

References

The relevant publications for this repository are:

  • Dillon Ze Chen and Felipe Trevizan and Sylvie Thiébaux. Return to Tradition: Learning Reliable Heuristics with Classical Machine Learning. ICAPS 2024.
  • Dillon Ze Chen and Sylvie Thiébaux and Felipe Trevizan. Learning Domain-Independent Heuristics for Grounded and Lifted Planning. AAAI 2024. [pdf]
  • Dillon Ze Chen and Sylvie Thiébaux and Felipe Trevizan. GOOSE: Learning Domain-Independent Heuristics. Genplan 2023. [pdf]
  • Dillon Ze Chen and Felipe Trevizan and Sylvie Thiébaux. Graph Neural Networks and Graph Kernels For Learning Heuristics: Is there a difference?. Genplan 2023. [pdf]

AAAI-24 Experiments

For source code corresponding to experiments from our AAAI-24 publication, please refer to this release.

Bibtex files

For the bibtex file for GNN architectures using the slg, flg and llg graph representations:

@inproceedings{chen:thiebaux:trevizan:aaai2024,
  author       = {Dillon Ze Chen and
                  Sylvie Thi{\'{e}}baux and
                  Felipe W. Trevizan},
  title        = {Learning Domain-Independent Heuristics for Grounded and Lifted Planning},
  booktitle    = {AAAI},
  year         = {2024},
}

For the bibtex file for WL and GNN architectures using the ilg graph representations:

@inproceedings{chen:trevizan:thiebaux:icaps2024,
  author       = {Dillon Ze Chen and
                  Felipe W. Trevizan and 
                  Sylvie Thi{\'{e}}baux},
  title        = {Return to Tradition: Learning Reliable Heuristics with Classical Machine Learning},
  booktitle    = {ICAPS},
  year         = {2024},
}

Code acknowledgements

  • Fast Downward by Malte Helmert and various contributors for the planning parser, grounder and grounded search algorithm.
  • scorpion by Jendrik Seipp for a powerful optimal planner for generating planning instances.
  • Powerlifted by Augusto B. Corrêa and various contributors for their lifted planner.
  • All the other various packages listed in the requirements

TODOs

  • Keep static facts when training and evaluating on Fast Downward states. This could be done by initial state set minus FD preprocessed facts.
  • Reimplement evaluation using Powerlifted.

goose's People

Contributors

dillonzchen avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.