Pathfinding generally refers to find an optimal path between any two locations. In the context of video game, an optimal path between any two locations is the least cost path rather than the shortest path. That means an path along the road may be better than a shorter path through a hill in terms of time as the cost of climbing a hill is obviously higher than the cost of walking along a road. However, the actual game world as shown in Figure 1a doesn’t contain such information. The general solution is to overlay another map with cost information on the actual game world as shown in Figure 1b and adopt a search algorithm on it to find the least cost path.