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.
Metadata
Release files for llm-astar 0.1.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| llm_astar-0.1.4.tar.gz | 16.3 kB | Without provenance | Details for llm_astar-0.1.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| llm_astar-0.1.4-py3-none-any.whl | Python 3 | none | any | Details for llm_astar-0.1.4-py3-none-any.whl |
Total release size: 36.6 kB
Release files / llm_astar-0.1.4.tar.gz
| Download URL | llm_astar-0.1.4.tar.gz |
|---|---|
| Size | 16.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
12cd596527542841a6389f502e32b6a8859744f04f6d7a9c79a65b55a65bd371
|
|
BLAKE2b-256 checksum How to use checksums |
022683ca94354c5092980f7b4b3fd364fa4eca03953a34eb6107157ec9a93e65
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Release files / llm_astar-0.1.4-py3-none-any.whl
| Download URL | llm_astar-0.1.4-py3-none-any.whl |
|---|---|
| Size | 20.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d387d14d4592f6db8c4c1b88fc2c39850aaf9d1438f13735f3edec20b21f2e8b
|
|
BLAKE2b-256 checksum How to use checksums |
a624ba0f4122ab352468d11ebb777668284097b2c49a1315a9aa14562c0a9497
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.0 CPython/3.12.3
|
Security for llm-astar 0.1.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.