# Research on the A* Algorithm for Automatic Guided Vehicles in Large-Scale Maps
## 2 A* Algorithm and Analysis of Its Problems
### Problems with the A* Algorithm
Due to this shortcoming of the heuristic function, the algorithm may not be able to effectively avoid dense obstacle regions when planning paths, thus increasing the complexity of the search and unnecessary computational overheads. (3)  
Wandering and redundancy in decision making. When comparing and selecting the optimal extension nodes, the A* algorithm may fall into a state of decision-making wandering if it encounters multiple nodes with similar costs. In this case, the algorithm may repeatedly compare and evaluate among different nodes, resulting in convoluted and redundant search paths, as well as consuming a lot of valuable time resources. The traditional A* algorithm lacks an effective mechanism to guide the directionality of path search, thus making it difficult to quickly and accurately target optimal paths in complex environments. Based on the deep understanding of the impact of weights on the performance of the A* algorithm, we innovatively introduce the concept of local obstacle rate, aiming to incorporate the complexity of the current node's surrounding environment directly into the heuristic function. By doing so, we dynamically adjust the proportion of weights of the f-value and g-value in the total evaluation, so that the algorithm can achieve a fine-grained evaluation of path quality while pursuing efficient paths. For specific implementation, we flexibly adjust the contribution of g- and h-values in the f-value according to the local obstacle rate. When the local obstacle rate is high, the weight of the h-value is reduced so that the algorithm focuses more on the accuracy  
Figure 3: Results of different obstacle scales running in a 30 \(\times\) 30 map. of the actual walking and avoids falling into the traps caused by the prediction bias; on the contrary, the weight of the h-value is moderately increased in the more open area to enhance the orientation and speed of the search. In addition, we optimise the neighbourhood selection mechanism by updating the set of candidate nodes based on the changes in the local obstacle rate to ensure that the algorithm can select the solution with fewer steps and shorter paths in a variety of complex environment maps. This strategy not only improves the environmental adaptability of the algorithm but also significantly reduces unnecessary search steps. To further enhance the navigational intelligence of the algorithm, we incorporate a direction-guiding factor into the heuristic function, which enables the algorithm to consider the consistency of the target direction when selecting paths and reduces meandering and steering. Meanwhile, inspired by the simulated annealing algorithm, we introduce a probabilistic jumping mechanism in the node selection process, which allows the algorithm to accept suboptimal solutions under certain conditions to avoid falling into local optimums and to explore potentially better paths. In summary, by integrating the above strategies, our improved A* algorithm is able to achieve a reduction in the number of search nodes and an improvement in the quality of paths on the basis of dynamic assessment of the environment and intelligent neighbourhood selection, thus finding a more harmonious balance between search speed and path optimisation.