Which is better for pathfinding: greedy search vs BFS? Pros and cons? or Greedy search vs BFS—when wo

14 Replies, 1648 Views

Greedy search vs BFS—which one’s actually better?

Honestly, it depends on what you're doing. BFS is like the reliable but slow friend—it’ll *always* find the shortest path, but it’s gonna check every single node on the way.

Greedy search? Fast af, but it’s a gambler. It’ll chase the closest-looking goal without thinking ahead, so you might get stuck in loops or miss the optimal path.

If you *need* the shortest path, BFS wins. If speed matters more and you’ve got a good heuristic, greedy can be a lifesaver.

But greedy search vs BFS isn’t a clear “one’s better” thing—it’s about tradeoffs. What’s your priority: accuracy or speed?

(Also, greedy search can look *real* dumb if your heuristic sucks. Just sayin’.)

Messages In This Thread
Which is better for pathfinding: greedy search vs BFS? Pros and cons? or Greedy search vs BFS—when wo - by - 10-01-2025, 05:23 AM



Users browsing this thread: 1 Guest(s)