简体   繁体   中英

Breadth-First Search vs A * Algorithm - Real World Example

I'm looking for a real-world example (by which I mean a software solution for a real-world problem), where the A* search algorithm is used because it radically outperforms Breadth-First Search for the same task.

Suggestions please?

A route planner.

When calculating a route from San Francisco to New York, a plain BFS algorithm will extend routes in all directions. It will thus memorize intermediate routes going to Vancouver as well as to Mexico City.

An A* algorithm, using a simple as-the-crow-flies heuristic, will favour routes that go eastwards, and so will inspect much fewer alternatives before finding the route of choice to New York.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM