Giter Club home page Giter Club logo

llm-pddl's Introduction

之前的想法:自动机+冯诺依曼架构+封装语言-尽快复现

LLM+P: Empowering Large Language Models with Optimal Planning Proficiency

This repo contains the source code for making plans based on problems decribed by natural language.

Dependency

  1. Install OpenAI GPT API. Remember to put openai_keys under the keys folder.

  2. Install fast-downward

Running Code

To run a for a specific task in a specific domain using a specific method:

python main.py --domain DOMAIN --method METHOD --task TASK_ID

DOMAIN is selected from [barman, blocksworld, floortile, grippers, storage, termes, tyreworld]

METHOD is selected from [llm_ic_pddl_planner, llm_pddl_planner, llm_planner, llm_ic_planner]

Alternatively, you can just use:

bash run.sh DOMAIN METHOD TASK_ID

The File Hierarchy:

llm-pddl
 └─main.py                         (the main python script)
 └─keys
    └─ openai_keys.txt             (you should place your openai keys here, one line each)
 └─domains                         (the generated domain files)
    └─ barman
        └─ description_geneator.py (generating natural language description)
        └─ p_example.nl            (example natural language)
        └─ p_example.pddl          (example problem pddl file)
        └─ domain.pddl             (the shared domain.pddl file for all problems)
        └─ xxx.nl                  (task natural language description)
        └─ xxx.pddl                (ground-truth problem pddl, might not be used)
    └─ blocksworld
    └─ floortile
    └─ grippers
    └─ storage
    └─ termes
    └─ tyreworld
 └─problems                        (the generated problem pddl files)
    └─ llm                         (empty, since llm -> plan does not generate pddl)
    └─ llm_ic                      (empty, since llm + context -> plan does not generate pddl)    
    └─ llm_pddl                    (baseline 2: llm -> p.pddl)
    └─ llm_ic_pddl                 (ours: llm + context -> p.pddl)
        └─ barman
        └─ ...
 └─plans                           (the tmp folder for storing raw solutions found by fast-downward)
    └─ llm                         (empty, since llm -> plan does not generate raw plans)
    └─ llm_ic                      (empty, since llm + context -> plan does not generate raw plans)
    └─ llm_pddl                    (baseline 2: llm -> p.pddl)
    └─ llm_ic_pddl                 (ours: llm + context -> p.pddl)
        └─ barman
        └─ ...
 └─results                         (the final plan in natural language)
    └─ llm                         (baseline 1: llm -> plan)
    └─ llm_ic                      (baseline 3: llm + context -> plan)
    └─ llm_pddl                    (baseline 2: llm -> p.pddl)
    └─ llm_ic_pddl                 (ours: llm + context -> p.pddl)
        └─ barman
        └─ ...

llm-pddl's People

Contributors

bpshaver avatar cranial-xix avatar ckqqqq 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.