llm-mcts  by 1989Ryan

Research paper code for LLM-guided Monte Carlo Tree Search

created 2 years ago
281 stars

Top 93.7% on sourcepulse

GitHubView on GitHub
Project Summary

This repository provides code for using Large Language Models (LLMs) as a commonsense world model and heuristic policy within Monte-Carlo Tree Search (MCTS) for complex daily task planning. It targets researchers and engineers working on AI planning, decision-making, and embodied AI, offering a novel approach to improve reasoning and reduce search complexity in task execution.

How It Works

The core innovation lies in leveraging LLMs to imbue MCTS with commonsense knowledge. The LLM acts as a world model, providing prior beliefs about states, and as a heuristic policy, guiding the search towards more promising branches of the decision tree. This dual role significantly enhances the efficiency and effectiveness of MCTS for large-scale task planning problems.

Quick Start & Requirements

  • Install: git clone --recurse-submodules https://github.com/1989Ryan/llm-mcts.git followed by pip install -r requirement.txt.
  • Prerequisites: Requires installation of the virtual-home environment (links provided in README). OpenAI API key is mandatory and must be added to ./mcts/virtualhome/llm_model.py and ./mcts/virtualhome/llm_policy.py.
  • Data Generation: Involves multiple steps using provided Python scripts for generating goals, expert data, and pre-processing.
  • Running: python mcts/virtualhome/mcts_agent.py with various configurable parameters.
  • Links: Virtual Home, OpenReview.

Highlighted Details

  • Utilizes LLMs (e.g., gpt-3.5-turbo-0125) for world modeling and heuristic policy guidance in MCTS.
  • Addresses large-scale task planning problems with commonsense reasoning.
  • Code adapted from multiple prior open-source works for data generation, baselines, and MCTS implementation.

Maintenance & Community

The project is associated with a NeurIPS 2023 paper. No specific community channels (Discord/Slack) or active maintenance signals are explicitly mentioned in the README.

Licensing & Compatibility

The README does not explicitly state a license. Given the reliance on multiple open-source projects, users should verify licensing compatibility, especially for commercial use.

Limitations & Caveats

The setup requires the installation of a separate virtual-home environment, which may add complexity. The reliance on OpenAI API necessitates an API key and incurs associated costs. The project is presented as code for a research paper, and its readiness for production environments is not specified.

Health Check
Last commit

8 months ago

Responsiveness

1 day

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

Explore Similar Projects

Feedback? Help us improve.