Skip to content

DillonZChen/lmplan

Repository files navigation

LMPlan

LMPlan is a language model (LM) powered agentic planner.

The LMPlan framework is simple. It requires no prompt engineering, iteration process, or manual guidance for generating generalised policies and value functions that automatically solve task planning problems.

Pipeline

Experiments in our paper demonstrate that LMPlan achieves state-of-the-art PDDL planning performance. LMPlan can solve planning tasks exhibiting hundreds of objects and billions of states that classical PDDL planners struggle on.

Results

Reference

@inproceedings{chen.etal.prl2025rlc,
  author    = {Dillon Z. Chen and Johannes Zenn and Tristan Cinquin and Sheila A. McIlraith},
  booktitle = {Proceedings of the RLC 2025 Workshop on Programmatic Reinforcement Learning},
  title     = {Language Models For Generalised PDDL Planning: Synthesising Sound and Programmatic Policies},
  year      = {2025},
}

The paper has also appeared in the 18th European Workshop on Reinforcement Learning (EWRL) and Workshop on Planning in the Era of LLMs (LM4Plan@ICAPS 2025).

Setup

LMPlan can be installed manually using a Python environment or as an Apptainer container. Before doing either, so unzip the benchmarks

unzip benchmarks.zip

Python environment

python3 -m venv .venv
source .venv/bin/activate
sh install.sh

Apptainer

git submodule update --init --recursive
apptainer build lmplan.sif Apptainer

Generate LM programs

Don't forget to unzip benchmarks.zip first.

  1. To skip the LM generation process, you can use the already generated LM files.
    • Run unzip results/llms_lt_ipc_23.zip in the root directory.
    • You should have files in the root directory of the form out/python/lt_ipc_2023/<DOMAIN>/<PROGRAM_TYPE>/<LM>_seed<SEED>.py
    • See results/validated_llms_lt_ipc_23.csv for best LMs to use per domain based on the validation criterion
  2. To reproduce the experiments, you can also generate them from scratch
    • Add API keys to your environment, e.g. for DEEPSEEK_API_KEY and GEMINI_API_KEY
    • Run python3 generate_programs.py
    • You may update the code in generate_programs.py to make use of more up-to-date frontier models.

Plan with LM generated programs

Don't forget to unzip benchmarks.zip first.

Call ./lmplan.sif -h or python3 plan.py -h for usage instructions, depending on installation method. Example commands are as follows.

Plan with an LM generated policy

python3 plan.py benchmarks/lt-ipc-2023/ferry/domain.pddl benchmarks/lt-ipc-2023/ferry/testing/p0_30.pddl \
    -p out/python/lt_ipc_2023/ferry/policy/gemini_2_5_flash_preview_04_17_seed9.py

Plan with an LM generated heuristic

python3 plan.py benchmarks/lt-ipc-2023/ferry/domain.pddl benchmarks/lt-ipc-2023/ferry/testing/p0_30.pddl \
    -e out/python/lt_ipc_2023/ferry/heuristic/deepseek_reasoner_seed4.py

Plan with both a heuristic and policy

python3 plan.py benchmarks/lt-ipc-2023/ferry/domain.pddl benchmarks/lt-ipc-2023/ferry/testing/p0_30.pddl \
    -p out/python/lt_ipc_2023/ferry/policy/gemini_2_5_flash_preview_04_17_seed9.py \
    -e out/python/lt_ipc_2023/ferry/heuristic/deepseek_reasoner_seed4.py

About

LLM-powered Planner

Topics

Resources

Stars

Watchers

Forks