Skip to main content

Module bfs

Module bfs 

Source
Expand description

Unweighted BFS baseline for unit-cost grids. Static-grid [Pathfinder]: unweighted 4-connected BFS.

Each search is independent and returns the standard invalid/found/no-path outcome. Cost is one hop per cardinal edge; Grid::traversal_cost is ignored, so BFS is optimal only when hop count is the intended metric. Prefer [super::astar::AStar] or [super::dijkstra::Dijkstra] when cell costs vary.

Structsยง

Bfs
Online Pathfinder: unweighted 4-connected BFS.