Skip to content

Implement A* search, reaching 10-thousand-times faster than simple breadth-first search

Notifications You must be signed in to change notification settings

lywangj/Optimal_path_with_AI_search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Optimal_path_with_AI_search

Implement an efficient search system with Artificial Intelligent search algorithms (greedy best-first search and A* search) for path search engine in C++, consuming only 0.01% of searching time and memory usage as compared with another approach with breadth-first search.

Searching by bfs ...
Minimum steps: 5, Total steps: 1118480
Time taken by breadth first search: 15530117 microseconds

Searching by A* search ...
Minimum steps: 5, Total steps: 96
Time taken by A* search: 1668 microseconds

Optimal path:

Array 0 :
0 0 0 0
0 0 0 1
0 1 0 1
0 1 0 0

Array 1 :
0 1 0 0
0 0 0 1
0 0 0 1
0 1 0 0

Array 2 :
0 1 0 1
0 0 0 1
0 0 0 0
0 1 0 0

Array 3 :
1 0 1 0
0 0 0 1
0 0 0 0
0 1 0 0

Array 4 :
1 1 1 0
0 0 0 1
0 0 0 0
0 0 0 0

Array 5 :
1 1 1 1
0 0 0 0
0 0 0 0
0 0 0 0

About

Implement A* search, reaching 10-thousand-times faster than simple breadth-first search

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages