-
-
Notifications
You must be signed in to change notification settings - Fork 6.9k
added new algorithm fringe search #1301
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
|
@AtsushiSakai please do have a look at this new algorithm and please do let me know if you need something from my side |
|
also i have raised the pr on animation gif repository |
|
Hi @AtsushiSakai any updates? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new path planning algorithm called Fringe Search, which is a memory-efficient alternative to A* search that combines iterative deepening with heuristic-guided search. The implementation provides optimal path finding on grid maps while using significantly less memory than traditional A*.
Key changes:
- Implementation of Fringe Search algorithm with visualization support
- Comprehensive documentation including mathematical foundations and comparisons with A*
- Integration into the existing path planning module structure
Reviewed Changes
Copilot reviewed 5 out of 6 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| PathPlanning/FringeSearch/fringe_search.py | Core implementation of the Fringe Search algorithm with grid-based pathfinding |
| tests/test_fringe_search.py | Basic test case for the Fringe Search implementation |
| docs/modules/5_path_planning/fringeSearch/fringeSearch_main.rst | Detailed documentation covering algorithm overview, mathematical foundations, and use cases |
| docs/modules/5_path_planning/path_planning_main.rst | Added reference to Fringe Search documentation in the path planning index |
| README.md | Added Fringe Search section with description and references |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
@codex review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💡 Codex Review
Here are some automated review suggestions for this pull request.
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| for node in fringe_copy: | ||
| node_index = self.calc_index(node) | ||
|
|
||
| if node_index not in cache: | ||
| continue | ||
|
|
||
| _, f_cost, in_fringe = cache[node_index] | ||
|
|
||
| if not in_fringe: | ||
| continue | ||
|
|
||
| # If f-cost exceeds threshold, defer to next iteration | ||
| if f_cost > flimit: | ||
| fmin = min(f_cost, fmin) | ||
| fringe.append(node) | ||
| continue | ||
|
|
||
| # Goal test | ||
| if node.x == goal_node.x and node.y == goal_node.y: | ||
| goal_node.parent_index = node.parent_index | ||
| goal_node.cost = node.cost | ||
| found = True | ||
| break | ||
|
|
||
| # Mark as visited (remove from fringe) | ||
| cache[node_index] = (node, f_cost, False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid closing nodes with stale costs
When a cheaper path to a grid cell is discovered, the cache entry is updated but the older Node object already in fringe_copy is still processed later. The loop then overwrites the cache with that stale node and marks it closed (cache[node_index] = (node, f_cost, False)), discarding the improved parent and g‑cost that had been recorded earlier. This can produce suboptimal paths or even miss the goal whenever the better path is found before the stale entry is expanded. The node fetched from the fringe should be replaced with the cached version or skipped if its cost no longer matches the cached best cost.
Useful? React with 👍 / 👎.

This is a memory-efficient grid-based path planning implementation using Fringe Search.
Fringe Search is an informed search algorithm that combines iterative deepening with A*-style heuristics. It maintains a "fringe" of nodes at the search frontier and iteratively explores paths with increasing f-cost thresholds, providing memory efficiency comparable to iterative deepening while maintaining near-optimal performance.