Overview
Add Greedy Best-First Search to the Pathfinding Arena. Unlike A* which balances path cost g(n) + heuristic h(n), Greedy BFS relies solely on the Manhattan distance heuristic h(n), providing a fast but non-optimal search for educational contrast.
Implementation Details & File Reference
- Algorithm Model: Create
backend/src/main/java/com/algorithmrace/visualizer/algorithms/pathfinding/GreedyBFSModel.java extending PathfindingModel.
- Use priority queue ordered strictly by heuristic distance
h(cell, end).
- Factory Registration: Add
"Greedy Best-First" in PathfindingFactory.java.
- Complexity Catalog: Add entry in
ComplexityCatalog.java highlighting non-optimality.
- Frontend Metadata: Add entry in
frontend/src/data/algorithmMetadata.ts (complete: false, optimal: false).
Definition of Done
- Greedy Best-First Search appears in the Pathfinding Arena selector.
- Visually demonstrates aggressive target-seeking movement that can get trapped by obstacles.
- Metadata indicates
optimal: false.
Skill Level
Good first issue — straightforward heuristic priority queue implementation.
Overview
Add Greedy Best-First Search to the Pathfinding Arena. Unlike A* which balances path cost g(n) + heuristic h(n), Greedy BFS relies solely on the Manhattan distance heuristic h(n), providing a fast but non-optimal search for educational contrast.
Implementation Details & File Reference
backend/src/main/java/com/algorithmrace/visualizer/algorithms/pathfinding/GreedyBFSModel.javaextendingPathfindingModel.h(cell, end)."Greedy Best-First"inPathfindingFactory.java.ComplexityCatalog.javahighlighting non-optimality.frontend/src/data/algorithmMetadata.ts(complete: false,optimal: false).Definition of Done
optimal: false.Skill Level
Good first issue — straightforward heuristic priority queue implementation.