Hot Search : Source embeded web remote control p2p game More...
Location : Home Search - search shortest path
Search - search shortest path - List
DL : 0
在C++下进行地图的最短路径搜索的A*算法这个算法被广泛应用在即时游戏的路径寻找过程上。-In the C++ under the map of the A* shortest path search algorithm for this algorithm is widely used in real-time search process on the path of the game.
Date : 2026-01-10 Size : 1kb User : 冬暖夏凉

We use breadth-first search to find the shortest path. We additionally expect the path to be as straight as possible so there will be less scattered empty points on the map, which will improve the AI's success rate. The image below illustrates how this algorithm works on an 18*18 map. The green area is scanned when searching and the red area is the shortest path. Each number on the point denotes its minimum distance to the starting point.
Date : 2026-01-10 Size : 1.01mb User : 深思
CodeBus is one of the largest source code repositories on the Internet!
Contact us :
1999-2046 CodeBus All Rights Reserved.