Efficient path planning method based on A-STAR

Path planning is a crucial aspect of agent (robot) automation, as its efficacy directly affects the quality of tasks performed. This paper proposes an innovative and efficient path planning method by merging the advantages of the A-STAR and the artificial potential field (APF) technique. The proposed method of calculation aims to enhance the traditional A-STAR approach by incorporating an artificial potential field system. Specifically, the estimated cost in the conventional A-STAR approach is ameliorated through the integration of a precisely designed estimated cost gain. The gain is determined by the direction of the force in the artificial potential field., thus enabling the algorithm to focus more accurately on the direction of the target location while avoiding obstacles during path exploration. Through simulation results, the improved algorithm proves its feasibility by maintaining the same path length while reducing the running time by decreasing multiple exploration directions. The improved algorithm, which is more efficient, surpasses the conventional A-STAR and can be utilized for agent trajectory planning in static and complex environments, showcasing its superior performance.


Introduction
As technology continues to advance, intelligent robots are becoming increasingly vital in the production and daily life.One notable example is the emergence of autonomous mobile robots, designed to decrease the need for human labour while simultaneously enhancing efficiency.These robots can perform tasks such as automatic goods sorting and delivery, which ultimately leads to a smoother and more efficient production process.
Path planning is a crucial aspect in the autonomous mobile robotics field, as it allows robots to reach their intended destination in a safe and efficient manner while avoiding obstacles in their surroundings.Due to the availability of environmental information, there are primarily two sorts of path planning techniques: global motion planning and local motion planning.Global motion algorithms, including the Ant Colony algorithm , the A-STAR algorithm , and the RRT algorithm , usually, these algorithms necessitate prior knowledge of the environment to determine the most efficient routine.Conversely, local motion planning algorithms such as the Dynamic Window Approach (DWA) and the Artificial Potential Field Approach (APF) are utilized in environments that are either unknown or partially known, where the system receives real-time data from sensors regarding obstacles in the environment and plans its path accordingly [1][2][3][4][5].These local algorithms allow for more flexibility, adaptability, and responsiveness when navigating complex environments.
The A-STAR algorithm is a straightforward and easily interpretable model, but it can be computationally demanding and slow when dealing with intricate environments.Various studies have proposed enhancements to the A-STAR algorithm to overcome these limitations.One such improvement, described in the literature,involves expanding the search neighborhood to remove the constraint on node movement direction, resulting in the A-STAR algorithm [6].Additionally, combining the DWA algorithm with the improved A-STAR algorithm yields smoother paths with fewer nodes.Another study, detailed in the literature , presents an enhanced A-STAR algorithm suitable for certain path planning circumstances, resulting in shorter paths [7].In the literature , an adapted path planning algorithm was proposed that fused the ant colony algorithm combined with the A-STAR method [8].This improvement was found to increase convergence speed and improve global search capability.
Although the APF is well-liked and somewhat quick, it frequently gets stuck in local minima.Fortunately, several scholars have suggested enhancing the artificial potential field approach.In this research, for instance, the time-domain difference (TD) learning method is applied to the APF to address the issue of local minimum value that occurs with traditional APF [9].Another detailed study, to get over the issues with local stability points, the revised black hole potential field approach is combined with reinforcement learning [10].A visualization demonstrates how an intelligent body can dodge obstacles and reach its target.In this literature, the problem of unreachable target points is tackled by introducing virtual target points and altering the repulsive field function [11].
This article proposes an improved algorithm based on A-STAR that combines the strengths of both approaches, reducing the number of explorations required through artificial potential field force direction.The experimental results verify that this approach reduces operation time and improves efficiency.

A-STAR principle
The A-STAR is a popular choice for robot path planning due to its simplistic model and clear explanations.This algorithm determines the minimum cost of passage for paths with multiple nodes on a graph plane.It is classified as a best-first search algorithm that traverses graphs and is often applied as a heuristic search algorithm for path planning problems.To identify the lowest cost point for each node, the A-STAR algorithm employs an evaluation function (Equation 2-1), and multiple nodes form the lowest cost path.

Evaluation functions.
The evaluation function f(n) in a closed map M is used to estimate the cost from the starting point S to the target point T, while passing through intermediate state N.It is calculated by adding the actual cost g(n) of going from S to intermediate state N and the estimated cost h(n) of the optimal path from N to T. This function is denoted by equation (1).
In the problem of trajectory planning, the state is the location node it is now at and the cost is the distance to move to a point.Distances in trajectory planning are often calculated using the Manhattan distance equation ( 2) and the Euclidean distance equation (3) This paper uses the Euclidean distance.
Note: The positive values of Δx and Δy represent the displacement between the current point and the end point.The shortest circuit in a static road network can be resolved most effectively using the A-STAR technique.Although it is a straightforward concept, it requires a lot of work and is slow in larger or more complicated contexts.

Artificial potential field method
A widely used and developed algorithm for local path planning in robots is the APF approach.This approach is not only simple and fast, but it also satisfies the real-time demands of local trajectory.The originator of this approach is Khatib, who proposed it in 1986.The technique relies on constructing a virtual potential field that applies repulsive force from obstacles and attractive force from an end point onto the robot.Figure 1   In Figure 1, There are three forces acting on the robot.The force from the target is represented by Ft and the force from the obstacle by   .The direction of the total force is indicated in Figure 2.This combined force determines where robot move to during path planning.4) represents the attractive potential field function, which takes the distance between the agent and the end point as a parameter.The magnitude of the attractive potential field is mainly determined by this distance.

Traditional attractive potential field functions. Equation (
In equation ( 5),   represents the attractive potential field, while    represent the coordinates of the target point and the robot's current position, respectively.The distance between the robot and the destination is denoted by .The gravitational potential field coefficient is represented by   .The negative gradient of the attractive potential field function is given by the attractive function.
The magnitude of the force is directly proportional to the distance between the agent and the endpoint.As the distance increases, the attractive force also increases, until the agent finally reaches the endpoint with an attractive force of 0.

Traditional repulsive potential field functions.
The repulsive potential field function is equation( 6) The meaning of the symbol in equation ( 6) can be interpreted in three ways: the distance between the agent (robot) and the obstacle, the sphere of influence of the repulsive potential field, and the coefficient connected to the potential field.To determine the force exerted on the robot by the obstacle, one can utilize the negative gradient of the repulsive potential field function.
In this context, equation ( 7) serves as a representation of the repulsive force exerted by an obstacle on a robot.It is evident that the magnitude of this force increases as the agent approaches the obstruction, and when the length between the two entities reaches 0, the repulsive force received by the robot diverges to infinity.

Combined force potential field.
The agent is subjected to both the attractive potential field at the end point and the repelling potential field of all obstacles, and the combined potential field function is calculated, depending on the definition of the artificial potential field method equation (8).
The total potential field received by the agent, which is superimposed by the attractive and repulsive potential fields, is represented by equation (8).The variable N denotes the number of obstacles present in the environment, and to obtain the overall repulsive potential field, one needs to add up the potential fields produced by each individual obstruction.
Where Equation( 9) denotes the cooperate on the robot, indicates the repelling force that the first obstacle has on the robot, and the robot is guided to stay away from the obstacle and arrive the end point by using the direction of the combined forces as its motion.

Improved method
This paper suggests a novel approach that utilizes both the benefits of A-STAR and APF algorithms.By integrating the APF, the proposed technique reduces the exploration direction in A-STAR algorithm, leading to increased exploration efficiency and reduced computation time.This strategy utilizes an exploration approach similar to that of A-STAR algorithm, and estimates the optimal cost of the path from state n to the target state.The cost is measured in units of Euclidean distance.The estimated cost gain K is introduced to change the direction of the target point exploration according to the combined direction of the repulsive and attractive forces of the APF.The efficiency of the A star method is improved by reducing some of the exploration directions of the A-STAR method during the operation.The focal point of this paper is the fusion algorithm, where Equation (10) has been proposed as the evaluation function.

Estimated cost gain K
According to the evaluation function f(n) = g(n) + h(n) of the A-STAR algorithm, it is known that h(n) directly affects the exploration direction of the parent node to the sub-nodes.Therefore, according to the ensemble force algorithm of the artificial potential field, the estimated cost gain K is introduced to change h(n).the magnitude of K depends on the angle θ between the ensemble force direction of the obstacle and the end point and the traditional A star direction (as shown in the Figure 3).In the illustration, the moving point is represented by the rectangle, the end point by the triangle, and the obstruction by the circle.The classic A-STAR algorithm's exploration direction is indicated by the blue arrow, while the APF combined force on the moving point is indicated by the red arrow.The conventional direction for exploring A stars is a line drawn from the parent node's centre to the child node's centre (blue arrows in the diagram).To calculate the cost gain K, first determine the angle θ between the direction of the APF force and the conventional A-STAR exploration direction.If the angle θ between any exploration direction and the APF force exceeds 1/2, that direction will not be explored.On the other hand, if the angle θ between any exploration direction and the APF force is less than or equal to 1/2, the research uses the following equation to calculate K.In (11), to judge the consistency of the exploration direction with the APF force direction, this paper introduces a new variable to evaluate, using it can be a good measure of how close the exploration direction is to the APF force direction, the smaller and larger the exploration direction is, the more closely the exploration direction resembles the direction of the combined force.To avoid the artificial potential field direction misleading the exploration direction of A star and having too much influence, the logarithmic form is used to limit the gain cost K.To avoid the exploration direction influenced by the artificial potential field falling into a local trap or being influenced too much at a distance, the coefficient is introduced to reduce the influence.

Algorithm workflow
The detailed workflow is as follows: 1. Calculate the artificial potential force direction of the parent node at its current location 2. Find the angle between each exploration direction and the combined force direction; if the angle is more than 1/2, stop investigating that node; if it is less than 1/2, decide that that node in that exploration direction needs to be explored; In this context, t1 represents path planning time using the traditional A-STAR algorithm, whereas t2 refers to path planning time using the improved algorithm.It is important to note that both algorithms start and end at the same point.By analysing the path from Figures 6-9, it becomes evident that the fusion algorithm is as capable as the traditional algorithm when it comes to path planning.Both approaches can effectively navigate obstacles and reach the destinations without elongating the path planning process due to a reduced exploration direction.These findings demonstrate the feasibility of the fusion algorithm.Furthermore, experimental data confirms that the fusion algorithm outperforms the traditional algorithm in terms of running time, thus enhancing its overall efficiency in path planning.This improvement is constantly seen in various initial and final positions, demonstrating the fusion algorithm's superiority in terms of execution speed.

Conclusion
An improved algorithm has been proposed by leveraging the strengths of the APF.Based on the A-STAR algorithm, this approach effectively addresses the issue of slow exploration in complex environments.By reducing the exploration direction within the A-STAR algorithm, it also reduces the exploration time required to cover the same path length when compared to the conventional A-STAR method.Simulation results derived from numerous maps with diverse initial and ultimate locations illustrate this principle.

Figure 1 .
Figure 1.Schematic diagram of the principle of the APF.In Figure1, There are three forces acting on the robot.The force from the target is represented by Ft and the force from the obstacle by   .The direction of the total force is indicated in Figure2.This combined force determines where robot move to during path planning.

Figure 2 .
Figure 2. Schematic of the improved algorithm.To calculate the cost gain K, first determine the angle θ between the direction of the APF force and the conventional A-STAR exploration direction.If the angle θ between any exploration direction and the APF force exceeds 1/2, that direction will not be explored.On the other hand, if the angle θ between any exploration direction and the APF force is less than or equal to 1/2, the research uses the following equation to calculate K. In(11), to judge the consistency of the exploration direction with the APF force direction, this paper introduces a new variable to evaluate, using it can be a good measure of how close the exploration direction is to the APF force direction, the smaller and larger the exploration direction is, the more closely the exploration direction resembles the direction of the combined force.To avoid the artificial potential field direction misleading the exploration direction of A star and having too much influence, the logarithmic form is used to limit the gain cost K.To avoid the exploration direction influenced by the artificial potential field falling into a local trap or being influenced too much at a distance, the coefficient is introduced to reduce the influence. =

Figure 6 -
11 and Table 1-4 shows the results of simulation experiments.

Figure 6 .
Figure 6.Improved algorithms in Set Map I.Figure 7. A-STAR in Set Map I.

Figure 7 .
Figure 6.Improved algorithms in Set Map I.Figure 7. A-STAR in Set Map I.

Figure 8 .
Figure 8. Improved algorithms in Set Map II.Figure 9. A-STAR in Set Map II.

Figure 9 .
Figure 8. Improved algorithms in Set Map II.Figure 9. A-STAR in Set Map II.
Determine if the adjacent child node is already in the open list, update the information for the node if it is already on the open table and has a lower cost estimate; 3. Determine whether the new route has a lower cost estimate for the remaining nearby children in the closed list; if so, transfer the node to the open list; if not, ignore it.4. Continue performing the operation until the node is explored and reaches the end point.The starting point has no conceivable path to the final point if the open list is empty during the node exploration.
. The A-STAR algorithm employs two state tables: the Open table and the Closed table.The former is comprised of nodes yet to be explored, while the latter includes nodes that have already been explored.Initially,only the initial node is present in the Open table, while there is no node in the Closed table.The method chooses the Open table node that will cost the least to examine throughout each iteration.The method considers all eight adjacent nodes if this node is not the target node.For every neighbouring node, specific rules are applied.1.Determine if an adjacent node is explored, and if it is not explored, add the node to the open table; 2.
3. Check if any adjacent nodes have already been explored.If not, add them to the open table for consideration; 4. If the adjacent child node is already in the open table.If it is, update its information with a lower cost estimate if possible;