Improved A* algorithm and improvement method thereof
By optimizing the evaluation function, child node selection method and path smoothness of the A* algorithm, the problems of low efficiency, poor safety and poor smoothness of the classic A* algorithm in the path planning of spraying robots are solved, and more efficient, safer and smoother path planning is achieved.
Patent Information
- Application Number
- CN202510150329.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-11
- Publication Date
- 2025-05-30
AI Technical Summary
The classic A* algorithm has problems such as many search nodes, low security and poor path smoothness in the path planning of spraying robots, which affects the efficiency and safety of the robot.
By optimizing the evaluation function, optimizing the selection method of child nodes and path smoothing, the path smoothing process is performed using 16 adjacency method, security judgment and Bezier curve.
It significantly reduces the search time and path length, improves the safety and smoothness of path planning, and improves the working efficiency and stability of the spraying robot.
Smart Images

Figure CN120063306A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of path planning, and particularly to an improved A* algorithm and an improvement method thereof. Background Art
[0002] Based on the background of the current construction of national intelligent mines, the research and application of shotcreting robots have made great progress. As a complex system integrating multiple disciplines such as electronics, machinery, and artificial intelligence, the ability of autonomous walking is an important performance standard for shotcreting robots in mine environment applications. Due to the complex environmental conditions in underground roadways, shotcreting robots need to have the ability of autonomous movement, as well as the ability to perceive the roadway environment and plan paths, so as to complete the shotcreting operation efficiently and reliably.
[0003] In the path planning of shotcreting robots, the path planning algorithm is one of the key technologies. Common path planning algorithms include Dijkstra algorithm, A algorithm, D algorithm, and DLite algorithm. Among them, the A* algorithm is widely used due to its high search efficiency, fast planning speed, etc. However, the classic A* algorithm has the following defects and deficiencies in practical applications:
[0004] (1) Many search nodes: The A* algorithm generates a large number of nodes during the search process, resulting in a long search time and low efficiency.
[0005] (2) Low safety: The planned path may pass through the vertex of an obstacle or be too close to the obstacle, posing a collision risk and affecting the safety of the robot.
[0006] Large turning angle of the path: There are many inflection points in the planned path, and the smoothness is poor, which affects the working efficiency and stability of the shotcreting robot. Summary of the Invention
[0007] To solve the technical problems proposed in the background art, the present invention provides an improved A* algorithm and an improvement method thereof.
[0008] The present invention is implemented by the following technical solutions: An improvement method for the A* algorithm includes the following steps:
[0009] Optimizing the evaluation function;
[0010] Optimizing the selection method of child nodes;
[0011] Optimizing the path smoothness;
[0012] Wherein:
[0013] The formula of the optimized evaluation function is as follows:
[0014] f(n) = g(n) + (1 + r / R) * h(n)
[0015] Among them, g(n) is the movement cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, and α is the weight coefficient. By adjusting the value of (1 + r / R), the path cost and search time can be balanced.
[0016] Specifically, the method for optimizing the selection of child nodes is as follows:
[0017] Select the 16 - adjacency method instead of the traditional 4 - adjacency and 8 - adjacency methods to reduce the path inflection points and shorten the path length;
[0018] Safety judgment: When generating child nodes, judge the positional relationship between the child nodes and the obstacles to prevent the robot from passing through the vertex of the obstacle obliquely or being too close to the obstacle. The specific rules are as follows:
[0019] S1. If child node 1 or 5 is an obstacle, then child nodes 2, 4, 6, 8, 9, 10, 13, 14 are not used as pre - selected nodes.
[0020] S2. If child node 3 or 7 is an obstacle, then child nodes 2, 4, 6, 8, 11, 12, 15, 16 are not used as pre - selected nodes.
[0021] S3. If the child node has no obstacle, no processing is required.
[0022] Specifically, the operation of optimizing the path smoothness is as follows:
[0023] Use the Bezier curve to smooth the path and reduce the turning angle of the path; the specific method is as follows:
[0024] Select three points A, B, and C on the path and connect the three points in sequence to form a straight line.
[0025] Select points D and E on line segments AB and BC respectively, such that AD / AB = BE / BC.
[0026] Connect DE and determine a point F on DE such that DF / DE = AD / AB = BE / BC.
[0027] Let point D move from point A to point B on the first line segment, determine all points F, and connect the trajectories of point F to obtain the Bezier curve.
[0028] An improved A* algorithm is obtained by improving with the above - mentioned improvement method.
[0029] An electronic device, the electronic device includes a memory and a processor. Program instructions are stored in the memory, and when the processor runs the program instructions, it executes the improved A* algorithm.
[0030] A readable storage medium stores computer program instructions, which, when run by a processor, execute an improved A* algorithm.
[0031] Through the above technical solution, the functions and effects corresponding to the above claim are pointed out.
[0032] Compared with the prior art, the beneficial effects of the present invention are as follows:
[0033] 1. Reduced search time: By optimizing the evaluation function, the number of search nodes is reduced, significantly improving the efficiency of path planning. Experimental results show that the search time of the improved A algorithm is reduced by about 50% compared with the traditional A algorithm.
[0034] 2. Shortened path length: By adopting the 16-adjacency method and safety judgment, the inflection points of the path are reduced, shortening the path length. Experimental results show that the path length of the improved A algorithm is shortened by about 20% compared with the traditional A algorithm.
[0035] 3. Improved safety: By optimizing the selection method of child nodes, the robot is prevented from passing obliquely through the vertices of obstacles or being too close to obstacles, improving the safety of path planning.
[0036] 4. Enhanced path smoothness: Using Bezier curves to smooth the path, reducing the turning angle of the path, making the path smoother, and improving the working efficiency and stability of the shotcrete robot. Brief Description of the Drawings
[0037] Figure 1 It is a 20×20 grid map;
[0038] Figure 2 It is a schematic diagram of different adjacency methods;
[0039] Figure 3 It is a risk path map;
[0040] Figure 4 It is a distribution diagram of 16 child nodes;
[0041] Figure 5 It is an optimized path map;
[0042] Figure 6 It is a schematic diagram of the principle of Bezier curve;
[0043] Figure 7 It is a comparison diagram of the simulation results of the improved A* algorithm and the existing A* algorithm. Detailed Embodiment
[0044] Next, in combination with the accompanying drawings and specific embodiments, the present invention will be further described. It should be noted that, on the premise of no conflict, any combination of the following-described embodiments or technical features can form a new embodiment.
[0045] Embodiment:
[0046] Refer to Figure 1 - Figure 7 , the improved steps of the A* algorithm proposed in this solution are as follows:
[0047] Environmental modeling
[0048] Before path planning, the shotcreting robot converts the real physical environment into an abstract environment that can be recognized by a computer through vision or laser sensors. The grid method is used to divide the environmental space into several grid cells, and each grid has the same size. The size of the grid cell has a great impact on the accuracy and efficiency of path planning. Therefore, it is necessary to determine a suitable grid size according to the sparsity of obstacles in the actual environment and the requirements of path planning. Figure 1 Figure 18 shows a 20×20 grid map, where the white grids are free areas and the black grids are obstacle areas.
[0049] Optimization of the evaluation function
[0050] The core of the A* algorithm is the evaluation function f(n) = g(n) + h(n), where g(n) is the movement cost from the starting point to the current node, and h(n) is the estimated cost from the current node to the target node.
[0051] To optimize the evaluation function, a weight coefficient (1 + r / R) is introduced, and the formula is as follows:
[0052] f(n) = g(n) + (1 + r / R) * h(n)
[0053] Among them, (1 + r / R) can be adjusted to balance the path cost and search time. The specific implementation steps are as follows:
[0054] 1. Initialize the starting point and the target point.
[0055] 2. Calculate g(n) and h(n) for each node.
[0056] 3. Calculate the evaluation function value for each node according to the formula f(n) = g(n) + (1 + r / R) · h(n).
[0057] 4. Select the node with the smallest evaluation function value as the next search node until the target point is reached.
[0058] Optimization of the selection method of child nodes
[0059] Select the 16 - adjacency method to replace the traditional 4 - adjacency and 8 - adjacency methods, reducing the path inflection points and shortening the path length. The specific implementation steps are as follows:
[0060] 1. Generate 16 child nodes of the current node.
[0061] 2. Perform a security check on each child node:
[0062] If child node 1 or 5 is an obstacle, then child nodes 2, 4, 6, 8, 9, 10, 13, 14 are not used as pre - selected nodes.
[0063] If child node 3 or 7 is an obstacle, then child nodes 2, 4, 6, 8, 11, 12, 15, 16 are not used as pre - selected nodes.
[0064] If the child node has no obstacle, no processing is required.
[0065] 3. Select the child node with the minimum evaluation function value as the path node and continue the search until the target point is reached.
[0066] Path smoothness optimization;
[0067] Use the Bezier curve to smooth the path and reduce the turning angle of the path. The specific implementation steps are as follows:
[0068] Select three points A, B, C on the path and connect the three points in sequence to form a straight line.
[0069] Select points D and E on line segments AB and BC respectively, such that AD / AB = BE / BC.
[0070] Connect DE and determine a point F on DE such that DF / DE = AD / AB = BE / BC.
[0071] Let point D move from point A to point B on the first line segment, determine all points F, and connect the trajectories of point F to obtain the Bezier curve.
[0072] Replace the line segments in the original path with the Bezier curve to complete the path smoothing process.
[0073] The above - mentioned implementation manners are only the preferred implementation manners of the present invention, and cannot be used to limit the scope of protection of the present invention. Any non - substantial changes and substitutions made by those skilled in the art based on the present invention fall within the scope of protection required by the present invention.
Claims
1. A method for improving the A* algorithm, characterized in that: The steps include: Optimizing the evaluation function; Optimize the selection method of child nodes; Optimize path smoothness; in: The optimized evaluation function formula is as follows: f(n)=g(n)+(1+rR)*h(n) Among them, g(n) is the moving cost from the starting point to the current node, h(n) is the estimated cost from the current node to the target node, and α is the weight coefficient. By adjusting the value of (1+rR), the path cost and search time can be balanced.
2. The improved method of the A* algorithm as claimed in claim 1, characterized in that: The optimization child nodes are selected as follows: Choose 16-adjacency mode instead of traditional 4-adjacency and 8-adjacency modes to reduce path turning points and shorten path length; Safety judgment: When generating a child node, the positional relationship between the child node and the obstacle is judged to prevent the robot from obliquely passing through the obstacle vertex or being too close to the obstacle. The specific rules are as follows: S1. If subnode 1 or 5 is an obstacle, then subnodes 2, 4, 6, 8, 9, 10, 13, and 14 are not pre-selected nodes; S2. If subnode 3 or 7 is an obstacle, then subnodes 2, 4, 6, 8, 11, 12, 15, and 16 are not pre-selected nodes; S3. If there is no obstacle in the child node, no processing is performed.
3. The improved method of the A* algorithm as claimed in claim 1, characterized in that: The operation of optimizing path smoothness is as follows: Use Bezier curves to smooth the path and reduce the turning angle of the path; the specific method is: Select three points A, B, and C on the path and connect them into a straight line; Select points D and E on line segments AB and BC respectively, so that AD / AB = BE / BC; Connect DE and determine a point F on DE such that DF / DE=AD / AB=BE / BC; Let point D move from point A to point B on the first line segment, determine all points F, and connect the trajectories of point F to obtain the Bezier curve.
4. An improved A* algorithm, characterized in that: The method is improved by any of the methods described in claims 1 to 3.
5. An electronic device, characterized in that: The electronic device comprises a memory and a processor, wherein program instructions are stored in the memory, and when the processor runs the program instructions, the algorithm described in claim 4 is executed.
6. A readable storage medium, characterized in that: The readable storage medium stores computer program instructions, and when the computer program instructions are executed by a processor, the algorithm of claim 4 is executed.