# Research on the A* Algorithm for Automatic Guided Vehicles in Large-Scale Maps
## 3 Improved A* Algorithm Based on Local Obstacle Rate and Dynamic Neighbourhood
### Modifications to the Evaluation Function
#### 3.4.3 Adding Direction Change Penalty
The minimum energy path consumption \(g(n)\) described in this paper covers the cost from the starting point to the current point as well as the energy consumption induced by \"directional guidance\", as shown in Equation (5). Dynamic path span: Dynamic path span can be understood as the number of nodes (or edges) from the origin to the current node. In the A* algorithm, this is usually achieved by tracking the nodes on the path. However, the A* algorithm focuses more on the total elapsed time of the path (i.e., \(f(n)=g(n)+h(n)\)) than on the path span alone. The dynamic path span discussed in this paper contains not only the straight-line distance from the start point to the end point but also incorporates considerations such as steering cost and weight assignment. 3. Shortest path distance:

The minimum path span refers to the path with the minimum number of nodes (or edges) that passes from the start point to the end point. In the A* algorithm, once the target node is found, this minimum path can be determined by backtracking to the parent node and calculating its span. However, it is also worth noting that the core objective of the A* algorithm is to find the path that consumes the least amount of time, not the path with the shortest span. Therefore, in the decision-making process, one should not focus only on the closest distance to the current node but should consider the shortest distance of the subsequent steps from a long-term perspective. 4. Computational consumption:

The A* algorithm combines the essence of breadth-first search and heuristic search, and it utilises the heuristic function \(h(n)\) to predict the dissipation from the current position to the target position. Compared to other path planning algorithms (e.g., [PERSON]'s algorithm), the A* algorithm demonstrates significant advantages when dealing with environments containing obstacles or complex terrains. [PERSON]'s algorithm determines the shortest paths but may result in a large number of unwanted paths to be explored because it does not take into account the location of the goal node. The A* algorithm, on the other hand, guides the search direction by means of a heuristic function \(h(n)\), which effectively reduces the search range. The computational consumption \(h(n)\) described in this paper contains the straight-line distance from the current point to the end point and the cost of turning, and it is multiplied by the corresponding weight. In summary, the A* algorithm shows excellent efficiency and accuracy in dynamic path consumption and minimum path solving. Compared with other algorithms, the A* algorithm is more advantageous when dealing with environments containing obstacles or complex terrain and can find the least costly path more quickly. However, it should be emphasised that the performance of the A* algorithm depends heavily on the choice and design of the heuristic function \(h(n)\). Therefore, in practical applications, the appropriate heuristic function should be selected according to the characteristics and requirements of the specific problem. The indicators of the algorithm results obtained using different costing methods (as shown in Table 4) are shown in Table 5. In contrast, the algorithm improved in this paper uses diagonal distances to estimate costs, combines actual costs with directional guidance, adds turn costs, and applies a weighting factor, resulting in medium total cost of the path, while the length of the path is close to the shortest. Especially important is that the algorithm shows optimal performance in terms of both running time and number of expansion nodes. This is a good indication that the costing approach used in this paper is not only effective but also accurate. ### Improved A\({}^{\star}\) Algorithm Based on Simulated Annealing

In the traditional A\({}^{\star}\) algorithmic framework, the core lies in balancing two key costs, \(h(n)\) and \(g(n)\).