VC game to solve the shortest path algorithm in the source code, this example is the auto path-finding demonstration, the basket point is the starting point, the red dot is the end, press the OK key to start. Source enthusiasts note: After compiling, please copy the exe file from the debug directory to the project root directory, if it will be wrong.
authoring, Programming: Tong Ming
Program Order:
Initialize the queue, the pending node into the queue, rely on the destination valuation distance into the sorting, the estimated nearest scenario from the destination out of the queue, release the top node, free all the requested nodes, the evaluation function, the value of x, y to the destination distance, the estimate must be less than the actual value, try to move to X, y feasible no, If there ever was a better way to move to (x, Y) failure, record this time to (x, y) distance as the best distance in history ...
Game Source: Click to download
"141029" VC game to solve the shortest path algorithm in the code source