Skip to main content

LLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planning.

Project description

Abstract

Path planning is a fundamental scientific problem in robotics and autonomous navigation, requiring the derivation of efficient routes from starting to destination points while avoiding obstacles. Traditional algorithms like A* and its variants are capable of ensuring path validity but suffer from significant computational and memory inefficiencies as the state space grows. Conversely, large language models (LLMs) excel in broader environmental analysis through contextual understanding, providing global insights into environments. However, they fall short in detailed spatial and temporal reasoning, often leading to invalid or inefficient routes. In this work, we propose LLM-A*, an new LLM based route planning method that synergistically combines the precise pathfinding capabilities of A* with the global reasoning capability of LLMs. This hybrid approach aims to enhance pathfinding efficiency in terms of time and space complexity while maintaining the integrity of path validity, especially in large-scale scenarios. By integrating the strengths of both methodologies, LLM-A* addresses the computational and memory limitations of conventional algorithms without compromising on the validity required for effective pathfinding.

Directory Structure

.
└── dataset
└── env
    └── search
└── model
    ├── chatgpt
    └── llama3
└── pather
    ├── astar
    └── llm_astar
└── utils

⏬ Installation

pip install llm-astar

🚀 Quick Start

import openai
openai.api_key = "YOUR API KEY"

from llmastar.pather import AStar, LLMAStar
query = {"start": [5, 5], "goal": [27, 15], "size": [51, 31],
        "horizontal_barriers": [[10, 0, 25], [15, 30, 50]],
        "vertical_barriers": [[25, 10, 22]],
        "range_x": [0, 51], "range_y": [0, 31]}
astar = AStar().searching(query=query, filepath='astar.png')
llm = LLMAStar(llm='gpt', prompt='standard').searching(query=query, filepath='llm.png')

📝 Citation

If you found this work helpful, please consider citing it using the following:

LLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planning
Silin Meng, Yiwei Wang, Cheng-Fu Yang, Nanyun Peng, Kai-Wei Chang

💫 Showcase


🪪 License

MIT. Check LICENSE.

Downloads PyPI - Version

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

llm_astar-0.1.4.tar.gz (16.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

llm_astar-0.1.4-py3-none-any.whl (20.3 kB view details)

Uploaded Python 3

File details

Details for the file llm_astar-0.1.4.tar.gz.

File metadata

  • Download URL: llm_astar-0.1.4.tar.gz
  • Upload date:
  • Size: 16.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for llm_astar-0.1.4.tar.gz
Algorithm Hash digest
SHA256 12cd596527542841a6389f502e32b6a8859744f04f6d7a9c79a65b55a65bd371
MD5 411528c5b04ad89386650c6690f12411
BLAKE2b-256 022683ca94354c5092980f7b4b3fd364fa4eca03953a34eb6107157ec9a93e65

See more details on using hashes here.

File details

Details for the file llm_astar-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: llm_astar-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 20.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for llm_astar-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 d387d14d4592f6db8c4c1b88fc2c39850aaf9d1438f13735f3edec20b21f2e8b
MD5 84a890add50a82f997c0e94941c5f653
BLAKE2b-256 a624ba0f4122ab352468d11ebb777668284097b2c49a1315a9aa14562c0a9497

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page