This repository contains the code and dataset for the paper:
"Adaptive Iterative Feedback Prompting for Obstacle-Aware Path Planning via LLMs."
Planning is a critical component for intelligent agents, especially in Human-Robot Interaction (HRI). Large Language Models (LLMs) demonstrate potential in planning but struggle with spatial reasoning. This work introduces Adaptive Iterative Feedback Prompting (AIFP), a novel framework that improves LLM-based path planning by incorporating real-time environmental feedback. AIFP prompts an LLM iteratively to generate partial trajectories, evaluates them for collision detection, and refines them when necessary using a Receding Horizon Planning (RHP) approach.
β
LLM-based path planning with adaptive feedback
β
Collision-aware trajectory generation
β
Iterative re-planning mechanism using Receding Horizon Planning (RHP)
β
Handles static and dynamic obstacles
β
Improves success rate by 33.3% compared to naive prompting
β
Fully implemented with OpenAI's GPT-4 API
β A star and RRT planners in the same 2D domain
βββ src/ # Source code for AIFP framework
β βββ aifp_planner.ipynb # Core implementation of AIFP
β βββ naive_llm_planner.ipynb # A naive llm planner
β βββ astar_planner.py # A* Planner in the grid version of same 2D domain
β βββ rrt_planner.py # RRT Planner in the same 2D domain
βββ results/ # Outputs of path planning trials
βββ README.md # This README file
βββ requirements.txt # Required Python dependencies
git clone https://github.com/yourusername/AIFP-PathPlanning.git
cd AIFP-PathPlanning| Environment | AIFP Success Rate (%) | NaΓ―ve Prompting (%) |
|---|---|---|
| Single Obstacle | 55.6% | 22.3% |
| Double Obstacles | 36.7% | 14.0% |
| Random Obstacles | 31.5% | 12.5% |
| Moving Obstacle | 48.5% | N/A |
| Moving Goal | 51.5% | N/A |
βοΈ AIFP significantly outperforms naΓ―ve prompting, especially in static environments! π
If you use this work, please cite:
@article{AIFP2025,
title={Adaptive Iterative Feedback Prompting for Obstacle-Aware Path Planning via LLMs},
author={Masoud Jafaripour, Shadan Golestan, Shotaro Miwa, Yoshihiro Mitsuka, Osmar R. Zaiane},
year={2025},
Conference={AAAI LM4Planning Workshop}
}
- πΉ Extend AIFP to 3D navigation tasks
- πΉ Integrate Vision-Language Models (VLMs) for richer environmental perception
- πΉ Explore graph-based path representations for improved trajectory optimization
π Star β this repo if you find it useful!
π§ Feel free to submit issues, PRs, or suggestions.
this repo is being updating.