An improved A star algorithm for wheeled robots path planning with jump points search and pruning method

Wheeled robots enjoy popularity in extensive areas such as food delivery and room disinfection. They can lower labor costs, protect human health from infection, and so on. Given the need to avoid obstacles, the path planning of robots is an elementary module. The A* algorithm has been widely used thus far, but it suffers much memory overhead and provides a suboptimal path. Therefore, we propose an improved A* algorithm with the jump point search method and pruning idea. Specifically, the jump point search method reduces the occupancy rate of the open list. The shorter length of the path can be achieved by pruning. Simulation experiments proved that the improvement was effective and practical.

However, the classical algorithm has the disadvantages of much memory overhead and providing a suboptimal solution. Therefore, some researchers have proposed to improve the A* algorithm. For the purpose of stability and effectiveness, Wang et al. [27] presented the improved method from the view of expansion distance, bidirectional search, heuristic function optimization, and smoothing. Song et al. [28] considered the cost function with an additional parameter, with the result of fewer nodes and lower memory overhead. Specifically, the parameter is a cost from the previous point to the final one. Zhang et al. [29] achieved a high success rate and short length through applying an early-stop method, in which the local path is used directly if it is safe and collision-free. In addition, they also introduced a post-processing stage to shorten the resulting path by straightening the local path. Under the environmental model, grid map, this paper proposes an effective method of global path planning for wheeled robots. First, we analyze the shortcomings of the A* algorithm and find a corresponding measurement. To solve the problem of excessively high node occupancy rate of open list, a jump point search method is adopted [30,31] . Only the nodes with special properties are added to the open list during the process of node expansion. Considering the suboptimal solution of the path, a pruning method is proposed based on the axiom that the shortest path between two points is a straight line [32] . The polyline with an inflection point is replaced by a straight line. Lastly, a C++ simulation was designed and performed to verify that the improved A* algorithm can improve the traditional one.
The rest of this paper is structured as follows. In Section 2, we review the traditional A* algorithm for path planning. In Section 3, we propose the idea of combining jump search and pruning to improve the A* algorithm. Experimental results are shown in Section 4. Finally, this paper is summarized in Section 5.

Grid map
In this paper, the map used in path planning is the grid map [33] , which is a common map representation. The basic idea is to decompose the environment into local units, i.e., grid, and assign the state of occupancy to each grid. If there is an obstacle located in the grid, then it is a non-free grid, which is inaccessible to the robot. Otherwise, it is reachable, called a free grid. To simplify the path planning process of wheeled robots, we set up the following assumptions: Assumption 1: In the process of planning a feasible path, the size and position of the obstacles remain static.
Assumptions 2: In the process of planning a feasible path, the obstacle can occupy the grid completely.
In this work, we use the evenly spaced grids and assume 1 denotes the non-free grid and 0 denotes the free grid, as shown in Figure 1.

A* algorithm
Based on the known grid, the A* algorithm mainly plans the path and applies an evaluation function to determine its expansion direction. The function represents the distance between the initial node and target node by the expansion one. The equation of the evaluation function is defined as follows: where g(n) represents the actual distance from the initial node to the current node in the grid map, and h(n) represents the Manhattan distance of the optimal path from the current node to the target node. The closer the Manhattan distance is, the more optimal the feasible path is. A* algorithm starts the searching from the initial node to eight neighbor nodes and expands successively with equal probability, as shown in Figure 2 Then, a node expansion or searching process based on the minimum value continues. First, the values of each node of the surrounding eight neighbor points are estimated. Second, the node with free grid with the lowest estimated value is selected, which is set as the starting node in the next expansion process. Third, the chosen node is added to the open list and the node with the minimum value in the open list is chosen for the closed list. The expansion terminates when the target node is visited. During the process above, the distance between two nodes is obtained by the Manhattan distance: where (x 1 , y 1 ) and (x 2 , y 2 ) represent the coordinates of the two nodes n 1 and n 2 , respectively, and d represents the estimated distance between the two nodes.
If g(n) is equal to zero, the A* algorithm becomes the best optimal search with a greedy strategy for the expansion of nodes. The search time is shortened but at the cost of a suboptimal solution. If h(n) is equal to zero, the A* algorithm becomes Dijkstra' s algorithm with the requirements of exploring all directions. Although it results in the optimal solution, it uses a lot of computation resources. When terms of g(n) and h(n) are non-zero, relatively optimal solution and real-time performance are both guaranteed.
Besides, we note that two node containers, named open list and closed list, respectively, are built. The generated nodes in the expansion are stored in the open list and the nodes with minimum value in the open list are stored in the closed list. After the planning process, a suboptimal path is generated. The flow chart of A* is shown in Figure 3.
The specific steps of the A* algorithm are as follows.
Step 1: Initialize the grid map and define the search method of nodes to expand neighbor nodes in sequence with equal probability.
Step 2: Add the initial node to the open list.
Step 3: Determine whether the open list is empty. If it is true, the pathfinding fails. Otherwise, continue to Step 4.
Step 4: Find the node with the smallest value in the open list and move it to the closed list.  Step 5: Determine whether the current node is the target node. If it is true, the pathfinding is successful. Otherwise, continue to Step 6.
Step 6: Consider the current node as the parent node and starting point of the search for neighbor nodes and add the minimum node of the free grid to the open list. Continue to Step 4.
In the next section, we discuss how to improve the A* algorithm.

IMPROVED A* ALGORITHM
Given the high node occupancy rate and suboptimal solution, the jump points search and pruning methods are used to improve the A* algorithm.

Selective strategy
In this section, a selective node search strategy is developed. Only the node with specific properties can be chosen. An example of selective strategy is shown in Figure 4. Specifically, there is a neighbor node of the node par(x) with the direction from left to right. It is valueless to further search along the direction for the least cost of the distance between par(x) and x. In other words, there is no need to add these corresponding nodes to the open list. This operation does not traverse all the neighbors, which is the difference from the classical A* algorithm. When an expansion meets the y node, whose neighbor is accessible, e.g., the z node, we regard the y node as a special one. Meanwhile, it is the destination of expansion from node x along the straight-line direction. Then, its heuristic distance value h, namely the cost of reaching y from x, can be formulated as follows: where (x 1 , y 1 ) and (x 2 , y 2 ), respectively, represent the coordinates of two nodes x and y and h(x) represents the distance between child node and parent node.

Rules for improvement
In this section, we introduce some rules to reduce the number of nodes in the open list.

Rules of node expansion
The expansion direction is shown in Figure 5. For example, the direction from A to B is the right one. The directions of front, rear, left, and right are collectively referred to as the straight-line direction and others are  the diagonal direction. It is noted that the expansion along the diagonal direction contains the expansion in the straight one.

Rules of forced neighbor
Assume X is the current node, A is the neighbor node of X in the diagonal direction, B is the parent node of X, and C is the non-free neighbor node.

Rules of jump points
The nodes selectively chosen to expand are termed jump points. The rules are as follows. First, a node is regarded as a jump point when the node is surrounded by the forced neighbor in the diagonal direction. Second, if a node has a parent node in the diagonal direction and a reachable path in the straight direction to a jump point, then it is a jump point. Third, the starting node and the target node are stipulated as jump points. An example of finding a jump point during node expansion is shown in Figure 7.
It is obvious that F node, G node, and the start node are jump points because they satisfy the first, second, and third rules, respectively.

Rules of path
Inspired by the theorem that any side of a triangle must be shorter than the other two sides added together, a pruning method can be applied. In Figure 8, there are three consecutive nodes, i.e., A, B, and C, from the global path, and they constitute a triangle. When D is a free grid, the path from A to C by B is improved by the path from A directly to C.

Improved algorithm
Based on the strategy above, the improved A* algorithm is shown in Algorithm 1. The algorithm takes the grid map and initial node as inputs and outputs a feasible global path. First, the grid map is initialized and the search method of nodes is defined to expand neighbor nodes in sequence with equal probability. Then, the initial node is added to the open list (Line 3). Second, it is determined whether the open list is empty or not.
If it is true, the pathfinding fails. Otherwise, the pathfinding continues (Line 5). Thirdly, the node with the smallest value in the open list will be moved to the closed list (Lines 7-9). Then, it is discovered whether the current node is the target node or not. If it is the target, the pathfinding is successful and the solution of the path is returned (Line 11). Otherwise, the jump points are found and added to the open list. Specifically, the jump points are searched along the straight direction from the parent node. When no free grid is found, the diagonal direction is considered (Lines 13-15).
In summary, the differences between the traditional A* and improved A* depend on the rules of constraint.
The constraint successfully provides traditional A* various ways of node expansion and reduces the time of planning in the pathfinding process. Besides, the occupancy rate drops due to the decreasing nodes in the open list. In the end, the path length is trimmed because the polyline is replaced by the straight line at the inflection point of the path.

EXPERIMENT
To prove the effectiveness of the improved A* algorithm, simulation experiments in C++ were carried out. At first, four grid maps with obstacles were constructed, and a simulation of the traditional A* algorithm was designed and performed. In detail, 1% of grid points were randomly regarded as the center points of the obstacle and the size of the obstacle was 5 × 5.
We noticed that many expansion nodes were stored in the open list, causing a high occupancy rate and consuming too many memory resources. Moreover, the feasible planning path was relatively optimal and the inflection point of the path could be pruned.
The grid map required for the experiment is shown in Figure 9, where the sizes of the grid maps are, respectively, 50 × 50 and 100 × 100 and the resolution is 0.5 m per pixel. The black grid represents the occupancy of the grid which is inaccessible. We set the starting point of the navigation task at the bottom left of the grid map and the target at the upper right.
The simulation on 50 × 50 grid maps is shown in Figure 10, where the blue polyline represents the path Algorithm 1 Improved A* algorithm. node ← FindSmallestValue(openlist) 8: openlist.erase(node) 9: closelist.push_back(node) 10: end if 11: if isTarget(node) then return GetGlobalPath(node) 12: else 13: jump_point ← FindJumpPoint() 14: openlist.push_back(jump_point) 15: end if 16: end while (a) 50 × 50 grid maps (b) 100 × 100 grid maps  planned by the traditional A* algorithm. The green one represents the path planned by our method. The simulation on 100 × 100 grid maps is shown in Figure 11, (a) (b) Figure 11. Path planning on 100 × 100 grid maps.  The experimental data are shown in Tables 1 and 2. The occupancy rate is the ratio of the number of openlist nodes to the number of nodes on the grid map. In Table 1, based on the 50 × 50 map, the number of generated open-list nodes is 372 and the occupancy rate is 14.88% before improvement. Through the improved algorithm, the number of nodes is decreased to 89 and the rate is 3.56%. In addition, the planning path is shortened from 3.41 to 3.31.
In Table 2, based on the 100 × 100 map, the count of generated open list nodes is 1508 and the occupancy rate is 15.08% before improvement. By the improved algorithm, the number of nodes is decreased to 272 and the rate is 2.72%. In addition, the planning path is shortened from 7.01 to 6.83.
Comprehensive experimental results show that the improved A* algorithm can improve the node occupancy rate and shorten the path length. In other words, it provides the traditional A* method with the capabilities of higher efficiency and lower consumption of memory.

CONCLUSION
Although the solution of the traditional A* algorithm is relatively optimal, it can be further improved in two aspects. On the one hand, too much memory resource is consumed by the large number of nodes stored in 2. Merge the pruning idea with the classical A* algorithm. A straight path is used to replace the polyline path, and the length of the path is shortened.
The simulation experiments verified the practical effect of our improved A* algorithm. In the future, we will study how to reduce the time of node traversal to improve the real-time performance of path planning.