llm-astar


Namellm-astar JSON
Version 0.1.4 PyPI version JSON
download
home_pagehttps://github.com/SilinMeng0510/llm-astar
SummaryLLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planning.
upload_time2024-06-18 06:47:31
maintainerNone
docs_urlNone
authorSilin Meng
requires_pythonNone
licenseNone
keywords llms route planning deep learning neural networks research llms agent
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            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
```bash
pip install llm-astar
```

## 🚀 Quick Start
```python
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
<br/>
<p align="center"> <img width="1000" src="https://github.com/SilinMeng0510/llm-astar/assets/89226819/36ff049f-4e4e-453b-9454-2d6441ad79c0">

## 🪪 License
MIT. Check `LICENSE`.

[![Downloads](https://static.pepy.tech/badge/llm-astar)](https://pepy.tech/project/llm-astar) ![PyPI - Version](https://img.shields.io/pypi/v/llm-astar)



            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/SilinMeng0510/llm-astar",
    "name": "llm-astar",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "LLMs, route planning, deep learning, neural networks, research, LLMs agent",
    "author": "Silin Meng",
    "author_email": "silinmeng@gmail.com",
    "download_url": "https://files.pythonhosted.org/packages/02/26/83ca94354c5092980f7b4b3fd364fa4eca03953a34eb6107157ec9a93e65/llm_astar-0.1.4.tar.gz",
    "platform": null,
    "description": "Abstract\n------\nPath 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.\n\nDirectory Structure\n------\n    .\n    \u2514\u2500\u2500 dataset\n    \u2514\u2500\u2500 env\n        \u2514\u2500\u2500 search\n    \u2514\u2500\u2500 model\n        \u251c\u2500\u2500 chatgpt\n        \u2514\u2500\u2500 llama3\n    \u2514\u2500\u2500 pather\n        \u251c\u2500\u2500 astar\n        \u2514\u2500\u2500 llm_astar\n    \u2514\u2500\u2500 utils\n\n## \u23ec Installation\n```bash\npip install llm-astar\n```\n\n## \ud83d\ude80 Quick Start\n```python\nimport openai\nopenai.api_key = \"YOUR API KEY\"\n\nfrom llmastar.pather import AStar, LLMAStar\nquery = {\"start\": [5, 5], \"goal\": [27, 15], \"size\": [51, 31],\n        \"horizontal_barriers\": [[10, 0, 25], [15, 30, 50]],\n        \"vertical_barriers\": [[25, 10, 22]],\n        \"range_x\": [0, 51], \"range_y\": [0, 31]}\nastar = AStar().searching(query=query, filepath='astar.png')\nllm = LLMAStar(llm='gpt', prompt='standard').searching(query=query, filepath='llm.png')\n```\n\n## \ud83d\udcdd Citation\nIf you found this work helpful, please consider citing it using the following:\n```\nLLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planning\nSilin Meng, Yiwei Wang, Cheng-Fu Yang, Nanyun Peng, Kai-Wei Chang\n```\n\n## \ud83d\udcab Showcase\n<br/>\n<p align=\"center\"> <img width=\"1000\" src=\"https://github.com/SilinMeng0510/llm-astar/assets/89226819/36ff049f-4e4e-453b-9454-2d6441ad79c0\">\n\n## \ud83e\udeaa License\nMIT. Check `LICENSE`.\n\n[![Downloads](https://static.pepy.tech/badge/llm-astar)](https://pepy.tech/project/llm-astar) ![PyPI - Version](https://img.shields.io/pypi/v/llm-astar)\n\n\n",
    "bugtrack_url": null,
    "license": null,
    "summary": "LLM-A*: Large Language Model Enhanced Incremental Heuristic Search on Path Planning.",
    "version": "0.1.4",
    "project_urls": {
        "Download": "https://github.com/SilinMeng0510/llm-astar/archive/refs/heads/main.zip",
        "Homepage": "https://github.com/SilinMeng0510/llm-astar"
    },
    "split_keywords": [
        "llms",
        " route planning",
        " deep learning",
        " neural networks",
        " research",
        " llms agent"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a624ba0f4122ab352468d11ebb777668284097b2c49a1315a9aa14562c0a9497",
                "md5": "84a890add50a82f997c0e94941c5f653",
                "sha256": "d387d14d4592f6db8c4c1b88fc2c39850aaf9d1438f13735f3edec20b21f2e8b"
            },
            "downloads": -1,
            "filename": "llm_astar-0.1.4-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "84a890add50a82f997c0e94941c5f653",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 20265,
            "upload_time": "2024-06-18T06:47:25",
            "upload_time_iso_8601": "2024-06-18T06:47:25.959116Z",
            "url": "https://files.pythonhosted.org/packages/a6/24/ba0f4122ab352468d11ebb777668284097b2c49a1315a9aa14562c0a9497/llm_astar-0.1.4-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "022683ca94354c5092980f7b4b3fd364fa4eca03953a34eb6107157ec9a93e65",
                "md5": "411528c5b04ad89386650c6690f12411",
                "sha256": "12cd596527542841a6389f502e32b6a8859744f04f6d7a9c79a65b55a65bd371"
            },
            "downloads": -1,
            "filename": "llm_astar-0.1.4.tar.gz",
            "has_sig": false,
            "md5_digest": "411528c5b04ad89386650c6690f12411",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 16305,
            "upload_time": "2024-06-18T06:47:31",
            "upload_time_iso_8601": "2024-06-18T06:47:31.491164Z",
            "url": "https://files.pythonhosted.org/packages/02/26/83ca94354c5092980f7b4b3fd364fa4eca03953a34eb6107157ec9a93e65/llm_astar-0.1.4.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-06-18 06:47:31",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "SilinMeng0510",
    "github_project": "llm-astar",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": true,
    "requirements": [],
    "lcname": "llm-astar"
}
        
Elapsed time: 4.62167s