Improved A*path planning method and system based on dynamic weighting
By using a dynamically weighted improved A-path planning method, combined with multi-neighborhood search, reinforcement learning, and safety threshold optimization, the efficiency and smoothness issues of the traditional A algorithm in complex environments are solved, achieving more efficient and smoother path planning.
Patent Information
- Application Number
- CN202610062138.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-01-17
- Publication Date
- 2026-04-10
AI Technical Summary
Traditional A algorithm suffers from poor environmental adaptability, insufficient path smoothness, and low search efficiency, especially in complex environments.
An improved A-path planning method with dynamic weighting is adopted. Through dynamic multi-neighborhood search and reinforcement learning mechanism, combined with multi-objective reward function and safety threshold optimization strategy, the heuristic function weight is dynamically adjusted, and the improved Floyd algorithm is used to optimize the path, remove redundant nodes and improve path smoothness.
It significantly improves the search efficiency of the algorithm in complex environments, reduces the number of expansion nodes by 25%~35%, increases path smoothness by 50%~70%, reduces path turning points by 30%~45%, and achieves experience accumulation across search cycles through the Q-learning algorithm.
Smart Images

Figure CN121829557A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of path planning technology, and more specifically to an improved A method based on dynamic weighting. Path planning methods and systems. Background Technology
[0002] Path planning, a core technology in autonomous mobile robots, autonomous driving, unmanned surface vessels, and drones, aims to find the optimal trajectory from an initial position to a target position for a moving subject within a given environmental map, while avoiding all static obstacles. An efficient path planning algorithm not only needs to ensure path reachability and safety but also needs to comprehensively consider multiple key performance indicators such as path length, smoothness, and inflection points. From early methods like the visual map method and artificial potential field method, to Dijkstra's algorithm based on graph search, and then to the heuristic-based A* algorithm… Algorithms, the technology in this field, are constantly evolving, aiming to balance the optimality, completeness, and efficiency of search.
[0003] A The algorithm, combining the completeness of Dijkstra's algorithm with the efficiency of greedy best-first search, is widely considered one of the most classic and effective methods in global path planning. Its core lies in the use of an evaluation function. : ; This represents the actual distance from the starting node to the current node. This provides a heuristic distance estimate from the current node to the target node.
[0004] Despite A The algorithm performs well in many scenarios, but its performance is highly dependent on the heuristic function. In practical applications, the design and weight allocation of traditional A The algorithm still has some drawbacks: (1) The static heuristic function has poor adaptability, a large number of search nodes, and slow convergence speed; (2) The path planned by the algorithm has frequent turns and many redundant nodes, which does not conform to the kinematic constraints of the robot; (3) It lacks environmental interaction and learning capabilities and does not have the ability to learn from historical search experience.
[0005] Therefore, how can we provide an improved A algorithm based on dynamic weighting that can effectively solve the problems of poor environmental adaptability, insufficient path smoothness, and low search efficiency of traditional algorithms? Path planning methods and systems are problems that urgently need to be solved by those skilled in the art. Summary of the Invention
[0006] In view of this, the present invention provides an improved A based on dynamic weighting. Path planning method and system.
[0007] To achieve the above object, the present application adopts the following technical solutions: An improved A Path planning method, comprising: Step 1: starting from the starting point of the planned path, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to be unreachable, the complete eight-neighborhood search is switched back; Step 2: using a multi-objective reward function to drive the Q-learning algorithm to update the action value online, dynamically adjusting the weight of the heuristic function, and calculating the improved heuristic function value after dynamic weighting, updating the evaluation function of the neighbor node, to complete the initial path optimization; Step 3: extracting all turning points of the initial path, and using the improved Floyd algorithm to optimize the initial path based on the safety threshold, and outputting the optimal path.
[0008] Optionally, in step 1, the preset node index table divides the direction angle into 8 intervals of 45°, each interval corresponds to a set of reserved node combination , a set of discarded nodes and a set of recovery nodes ; wherein, the reserved node combination contains five elements corresponding to the five priority expansion directions, and , .
[0009] Optionally, in step 1, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to be unreachable, the complete eight-neighborhood search is switched back, specifically: determine the relative azimuth angle between the current node and the target node in the corresponding division interval in the preset node index table, and select five priority expansion directions according to the reserved node combination corresponding to the division interval; safety collision detection is performed on each priority expansion direction, and the priority expansion direction whose distance to the nearest obstacle is greater than the safety distance threshold is selected; if all priority expansion directions encounter obstacles and are less than or equal to the safety distance threshold , the expansion direction corresponding to the recovery node is called for safety collision detection.
[0010] Optionally, in step 2, the multi-objective reward function is as follows:
[0011]
[0012]
[0013]
[0014]
[0015] wherein, , , , are the respective reward components of the base movement cost, the progress towards target reward, the smoothness penalty, and the potential field adjustment term, respectively; , , , are the weight coefficients of the respective reward components, ; is the Euclidean distance of movement; is the progress coefficient; is the reduction of distance to the target point; is the smoothness coefficient; is the diagonal indicator function; is the potential field function; is the potential field change amount.
[0016] Optionally, in step 2, the improved heuristic function is as follows: ; wherein, is the enhanced heuristic function value; is the base heuristic function; is the potential field weight coefficient; is the potential field function value; is the Q-value weight coefficient; is the action value function learned by Q-learning.
[0017] Optionally, the potential field function is as follows:
[0018]
[0019]
[0020]
[0021] wherein, is the attractive field component generated by the target point; is the repulsive field component generated by the obstacle; is the attractive gain coefficient; is the current node to the target point; is the repulsive gain coefficient; is the current node to the ith obstacle; is the obstacle influence distance threshold.
[0022] Optionally, the action value function is as follows:
[0023] wherein, represents the updated Q value after taking action at time step t+1, state ; is the multi-objective reward function; is the discount factor; represents the maximum Q value of all possible actions in the next state ; represents action belongs to the legal action set of the action space .
[0024] Optionally, in step 2, the initial path optimization is completed based on the updated evaluation function of the neighbor nodes, specifically: Based on the updated evaluation function of the neighbor nodes, the exploration priority of the neighbor nodes is determined, the current node is moved to the closed list, and the qualified neighbor nodes are added to the open list; it is judged whether the target node is successfully found or not, if the target is not reached and the open list is not empty, step 1 is returned to continue searching.
[0025] Optionally, in step 3, the initial path is optimized based on the safety threshold by using the improved Floyd algorithm, specifically: Based on the improved Floyd algorithm, the initial path is optimized by removing redundant nodes and improving smoothness, as follows: Node connectivity detection and redundancy determination: let the initial path node sequence be , wherein is the starting point, is the end point; non-continuous node pairs and are selected in turn (wherein ), it is judged whether the connection line segment intersects with the obstacle; if any point on the line segment Distance to the nearest obstacle All satisfy:
[0026] Wherein, is a preset safety distance threshold value; Then determine And Can be safely reached, and the path segment Is a redundant path, and the intermediate nodes Are removed; Path optimization under the constraint of the safety threshold: in the process of removing the redundant nodes, a dynamic safety distance verification mechanism is introduced: for each path to be optimized, the minimum Euclidean distance between each grid cell traversed by the node connection and the obstacle is calculated in real time :
[0027] Wherein, Indicates the coordinates of the center point of the obstacle; Indicates the coordinates of the sampling point taken from the path line segment to be optimized; If the minimum distance of any cell is , the optimization of this segment is abandoned, and it is ensured that the optimized path meets the safety threshold constraint throughout the path; Iterative optimization: repeat the above node connectivity detection and redundancy determination and path optimization under the constraint of the safety threshold, traverse all possible non-continuous node pairs in the path, until no node pair meeting the safety reachable condition can be found, or the path node sequence no longer changes, that is:
[0028] Wherein, Indicates the path sequence after the nth optimization; Optimized path sequence after the nth optimization; Finally output the optimal path .
[0029] The application also provides a dynamic weighting-based improved A path planning method and a dynamic weighting-based improved A path planning system, comprising: A dynamic multi-neighborhood search screening module: for starting from the starting point of the planned path, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to a preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to make the path unreachable, the complete eight-neighborhood search is switched back; The initial path optimization module is used for driving a Q-learning algorithm to update action values on line by using a multi-objective reward function, dynamically adjusting a heuristic function weight, calculating an improved heuristic function value after dynamic weighting, updating an evaluation function of a neighbor node, and completing initial path optimization. The optimal path output module is used for extracting all turning points of the initial path, performing safety threshold-based optimization processing on the initial path by using an improved Floyd algorithm, and outputting an optimal path.
[0030] Compared with the prior art, the improved A The path planning method and system have the following beneficial effects: (1) The search efficiency of the algorithm in a complex environment is significantly improved by the dynamic multi-neighborhood search and the reinforcement learning weighting mechanism, and the number of expanded nodes is reduced by 25%-35%; (2) The multi-objective reward function and the safety threshold cooperative optimization strategy are used to improve the path smoothness by 50%-70% while ensuring the path safety; (3) The multi-objective balance model of path length and turning number is established to reduce the path turning points by 30%-45% while ensuring the optimality; (4) The online learning mechanism of the Q-learning algorithm is combined to realize experience accumulation across search cycles, so that the algorithm has continuous optimization capability. BRIEF DESCRIPTION OF DRAWINGS
[0031] In order to more clearly illustrate the technical solutions in the embodiments of the present application or the prior art, the drawings needed to be used in the embodiments or the prior art description will be briefly introduced. Obviously, the drawings in the following description are only embodiments of the present application, and other drawings can be obtained by those skilled in the art without creative labor on the basis of the provided drawings.
[0032] Figure 1 The method flowchart provided by the present application is provided.
[0033] Fig. 2(a) is a five-neighborhood search path diagram provided by the present application.
[0034] Fig. 2(b) is a five-neighborhood search path unreachable condition diagram provided by the present application.
[0035] Fig. 3(a) is an improved A algorithm in a 25x25 map corresponding node search convergence process diagram provided by the present application.
[0036] Fig. 3(b) is an improved A Convergence process of the algorithm in the node search corresponding to the 50x50 map.
[0037] Figure 3(c) is the improved A Convergence process of the algorithm in the node search corresponding to the 75x75 map.
[0038] Figure 3(d) is the improved A Convergence process of the algorithm in the node search corresponding to the 100x100 map.
[0039] Figure 4 The improved A Convergence process of the algorithm in the node search corresponding to the 100x100 map.
[0040] Figure 5(a) is the traditional A and the improved A of the algorithm under the condition of Seed=1 in the 25x25 map provided by the present application.
[0041] Figure 5(b) is the traditional A and the improved A of the algorithm under the condition of Seed=1 in the 50x50 map provided by the present application.
[0042] Figure 5(c) is the traditional A and the improved A of the algorithm under the condition of Seed=1 in the 75x75 map provided by the present application.
[0043] Figure 5(d) is the traditional A and the improved A of the algorithm under the condition of Seed=100 in the 100x100 map provided by the present application.
[0044] Figure 6(a) is the traditional A and the improved A of the algorithm under the condition of Seed=100 in the 25x25 map provided by the present application.
[0045] Figure 6(b) is the traditional A and the improved A of the algorithm under the condition of Seed=100 in the 50x50 map provided by the present application.
[0046] Figure 6(c) is the traditional A and the improved A of the algorithm under the condition of Seed=100 in the 75x75 map provided by the present application.
[0047] Figure 6(d) is a traditional A algorithm provided by the present application under Seed = 1000 in a 100x100 map. Comparison results of the algorithms.
[0048] Figure 7(a) is a traditional A algorithm provided by the present application under Seed = 1000 in a 25x25 map. Comparison results of the algorithms.
[0049] Figure 7(b) is a traditional A algorithm provided by the present application under Seed = 1000 in a 50x50 map. Comparison results of the algorithms.
[0050] Figure 7(c) is a traditional A algorithm provided by the present application under Seed = 1000 in a 75x75 map. Comparison results of the algorithms.
[0051] Figure 7(d) is a traditional A algorithm provided by the present application under Seed = 1000 in a 100x100 map. Comparison results of the algorithms.
[0052] Figure 8(a) is a traditional A algorithm in the planning results of a rasterized map based on elevation data.
[0053] Figure 8(b) is an improved A algorithm in the planning results of a rasterized map based on elevation data. DETAILED DESCRIPTION
[0054] The technical solutions in the embodiments of the present application will be clearly and completely described below with reference to the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative labor fall within the scope of protection of the present application.
[0055] Embodiment 1 Embodiment 1 of the present application discloses an improved A path planning method based on dynamic weighting, as shown in the following formula: Figure 1 The method comprises the following steps. First, initialize the map environment, determine the starting point and the end point of the planned path, initialize the obstacle list, open list, closed list, initialize the Q table used for Q learning and the potential field used for guiding the path, and put the starting point into the open list.
[0056] Step 1: starting from the starting point of the planned path, based on the relative azimuth angle of the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to be unreachable, the complete eight-neighborhood search is switched back.
[0057] The preset node index table divides the direction angle into 8 45° intervals, each interval corresponds to a set of reserved node combinations , a set of discarded nodes and a set of recovery nodes ; wherein , the reserved node combination contains five elements corresponding to the five priority expansion directions, and , .
[0058] The preset node index table of the embodiment of the application is shown in Table 1.
[0059] Table 1 preset node index table
[0060] Based on the relative azimuth angle of the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to be unreachable, the complete eight-neighborhood search is switched back, which is specifically: determine the relative azimuth angle of the current node and the target node in the corresponding division interval in the preset node index table, and select five priority expansion directions according to the reserved node combination corresponding to the division interval; perform safety collision detection on each priority expansion direction to select the priority expansion direction with a distance greater than the safety distance threshold from the nearest obstacle; if all priority expansion directions encounter obstacles and are all less than or equal to the safety distance threshold , the expansion direction corresponding to the recovery node is called for safety collision detection.
[0061] In the embodiment of the application, as shown in Figure 2 (a), the process of 5-neighborhood search path is recorded: first, calculate the direction angle of the starting point A pointing to the end point G , the reserved node , and so on, making its path according to A B C D E F G When all the priority directions (A, B, C, D, E, F, G) are blocked and all are ≤ safety distance threshold , call the recovery node , and finally A point selects 4 target point to move forward.
[0062] Step 2: Use multi-objective reward function to drive Q-learning algorithm to update action value online, dynamically adjust heuristic function weight, and calculate the improved heuristic function value after dynamic weighting, update the evaluation function of neighbor nodes to complete the initial path optimization.
[0063] Multi-objective reward function is as follows:
[0064]
[0065]
[0066]
[0067]
[0068] Wherein, , , , are respectively the reward components of the basic movement cost, the progress reward towards the target, the smoothness penalty, and the potential field adjustment term; , , , are respectively the weight coefficients of each reward component, and each weight coefficient satisfies the normalization condition ; is the Euclidean distance of movement; is the progress coefficient; is the distance reduction between the target point; is the smoothness coefficient; is the diagonal indicator function; is the potential field function; is the potential field change amount.
[0069] The description of each reward function component is shown in Table 2.
[0070] Table 2. Reward function component description table
[0071] The improved heuristic function is as follows: ; wherein, is the enhanced heuristic function value, which integrates the traditional heuristic, potential field guidance and learning experience; is the basic heuristic function; is the potential field weight coefficient, which controls the strength of the potential field guidance; is the potential field function value, which is based on the gravity field generated by the target point to guide the path to converge towards the target direction; is the Q value weight coefficient, which adjusts the influence degree of learning experience; is the action value function learned by Q-learning, which accumulates historical decision-making experience.
[0072] The potential field function is as follows:
[0073]
[0074]
[0075]
[0076] wherein, is the gravity field component generated by the target point; is the repulsive field component generated by the obstacle; is the gravity gain coefficient; is the Euclidean distance from the current node to the target point; is the repulsive gain coefficient; is the closest distance from the current node to the i-th obstacle; is the obstacle influence distance threshold.
[0077] The action value function is as follows:
[0078] wherein, represents the updated Q value after taking action in state at time step t+1; is the multi-objective reward function; is the discount factor, which is used to balance the importance of current reward and future income; represents the next state the maximum Q value of all possible actions; representing actions the legal action set belonging to the action space .
[0079] Based on the updated evaluation function of the neighbor nodes, the initial path optimization is completed, specifically: Based on the updated evaluation function of the neighbor nodes, the exploration priority of the neighbor nodes is determined, the current node is moved into the closed list, and the qualified neighbor nodes are added to the open list; whether the target node is successfully found is judged, if the target is not reached and the open list is not empty, step 1 is returned to continue searching.
[0080] As shown in Table 3, the expanded nodes of the traditional A algorithm and the improved A algorithm under four different size maps are compared. As can be seen, in the embodiment of the application, the improved heuristic function significantly improves the comprehensive performance of path planning by dynamically fusing potential field guidance and learning experience. Table 3 records the comparison of key performance parameters of the two algorithms under four different size maps (25 25, 50 50, 75 75, 100 100). As shown in FIG. 3 (a)-(d), the node search convergence process of the improved algorithm under the 25x25, 50x50, 75x75 and 100x100 maps is recorded respectively: in the 25x25 map, the expanded nodes are reduced by 25.7%; in the 50x50 medium-sized map, the expanded nodes are reduced by 35.9%; in the 75x75 complex map, the expanded nodes are reduced by 31.9%; in the 100x100 complex map, the expanded nodes are reduced by 25.1%; the results verify that the potential field guidance mechanism of the control effectively enhances the target orientation, and the adjusted Q-learning experience reuse strategy significantly reduces the invalid search.
[0081] Step 3: Extract all turning points of the initial path, and use the improved Floyd algorithm to optimize the initial path based on the safety threshold. The path is updated by removing redundant nodes to ensure that the optimized path maintains a safe distance from obstacles, and the optimal path is output.
[0082] The improved Floyd algorithm is used to optimize the initial path based on the safety threshold, specifically: Based on the improved Floyd algorithm, the initial path is removed from the redundant nodes and the smoothness is improved, as follows: Node connectivity detection and redundancy determination: let the initial path node sequence be , wherein Starting from, As the endpoint; sequentially select non-contiguous node pairs. and (in ), determine the connecting line segments Does it intersect with obstacles? If any point on the line segment... Distance to the nearest obstacle All satisfy:
[0083] in, To preset a safe distance threshold; Then determine and Safe direct route available, route segment For redundant paths, remove the intermediate nodes. Remove; Path optimization based on safety threshold constraints: During the process of eliminating redundant nodes, a dynamic safety distance verification mechanism is introduced: For each path to be optimized, the minimum Euclidean distance between each grid cell traversed by the node connection and the obstacle is calculated in real time. :
[0084] in, Indicates the coordinates of the obstacle's center point; This indicates the coordinates of the sampling points taken from the path segment to be optimized; If there exists a minimum distance for any unit If not, then abandon the optimization of that segment to ensure that the optimized path meets the safety threshold constraint throughout. Iterative optimization: Repeat the above steps of node connectivity detection and redundancy determination and path optimization based on safety threshold constraints, traversing all possible non-contiguous node pairs in the path until no node pair satisfying the safety reachability condition can be found, or the path node sequence no longer changes, i.e.:
[0085] in, Indicates the first The optimized path sequence; The final output is the optimal path. .
[0086] In embodiments of the present invention, such as Figure 4 As shown, improvement A of the present invention is illustrated. The complete processing flow of the algorithm from the initial path to the final optimized path: The algorithm first generates an initial planned path A. B C D E F G H I, after processing by the built-in path optimization algorithm, assesses the connectivity and safety between nodes (actively discarding unsafe shortcuts F). I) A systematic evaluation was conducted, resulting in the final planned path A. D F H I.
[0087] Figures 5(a)-(d), 6(a)-(d), and 7(a)-(d) show the simulation environments generated under three different random seeds: Seed=1, Seed=100, and Seed=1000. Figures 5(a)-(d) show traditional A-type maps in four sizes (25×25, 50×50, 75×75, and 100×100) under Seed=1, respectively. Improvement A of the present invention Comparison results of the algorithms. Figures 6(a)-(d) show the traditional A algorithm in four map sizes (25×25, 50×50, 75×75, and 100×100) with Seed=100, respectively. Improvement A of the present invention Comparison results of the algorithms. Figures 7(a)-(d) show the traditional A algorithm in four map sizes (25×25, 50×50, 75×75, and 100×100) with Seed=1000, respectively. Improvement A of the present invention The algorithm comparison results effectively ensured the statistical significance and broad applicability of the test results.
[0088] Traditional A map formats under four different map sizes: Seed=1, Seed=100, and Seed=1000. Improvement A of the present invention The performance comparison of the key parameters of the algorithm is shown in Tables 4, 5, and 6, respectively.
[0089] Table 4: Performance Comparison of Key Parameters for Four Map Algorithms with Seed=1
[0090] Table 5. Performance Comparison of Key Parameters for Four Map Algorithms with Seed=100: Seed=100
[0091] Table 6. Performance Comparison of Key Parameters for Four Map Algorithms with Seed=1000: Seed=1000
[0092] The systematic experimental data of the above Table 4, Table 5 and Table 6 show that, in different random maps and various specification environments, the improved A algorithm realizes stable improvement in four key performance indicators, and the improvement results are shown in Table 7.
[0093] Table 7 Improved A algorithm in four key performance indicators
[0094] As shown in FIGS. 8(a)-8(b), the algorithm comparison experiment based on the rasterized map of elevation data is shown, and the result clearly shows that the improved A algorithm has a significant advantage in path synthesis performance: as shown in FIG. 8(a), the path planned by the traditional A algorithm has a high degree of tortuosity, and there is unnecessary detour; in contrast, as shown in FIG. 8(b), the path planned by the improved A algorithm is more direct, smooth and has significantly reduced turning points, the path length is shortened, and the overall fluency is greatly improved.
[0095] The simulation experiment results show that the improved algorithm proposed in the present application has stable optimization effect in different spatial scales, random map environments and rasterized maps based on elevation data, among which the algorithm has more significant improvement in three key indicators of fluency, inflection point number and expansion node, and the optimization increment is generally more than 30%, which effectively verifies the effectiveness of the dynamic weighting mechanism of reinforcement learning in improving path quality and planning efficiency; at the same time, as the map scale expands (from 25x25 to 100x100), the indicators of the algorithm still ensure steady improvement, and there is no performance degradation, which verifies the scalability and environmental adaptability of the algorithm.
[0096] Embodiment 2 The embodiment 2 of the present application discloses a dynamic weighting-based improved A path planning method path planning system, comprising: a dynamic multi-neighborhood search screening module: for starting from the starting point of the planned path, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are caused by obstacles to make the path unreachable, the complete eight-neighborhood search is switched back. The initial path optimization module is configured to drive a Q-learning algorithm to update action values online by using a multi-objective reward function, dynamically adjust the weights of the heuristic function, calculate the improved heuristic function value after dynamic weighting, update the evaluation function of the neighbor node, and complete initial path optimization. The optimal path output module is configured to extract all turning points of the initial path, perform optimization processing on the initial path based on a safety threshold by using an improved Floyd algorithm, and output an optimal path.
[0097] The embodiments are described in a progressive manner in the specification, and each embodiment focuses on the differences from other embodiments. The same or similar parts of each embodiment can be understood by referring to each other. For the device disclosed in the embodiments, the description is relatively simple because it corresponds to the method disclosed in the embodiments. The relevant parts can be understood by referring to the description of the method.
[0098] The above description of the disclosed embodiments enables a person skilled in the art to implement or use the present application. Various modifications to the embodiments will be apparent to those skilled in the art, and the general principles defined herein can be implemented in other embodiments without departing from the spirit or scope of the present application. Therefore, the present application will not be limited to the embodiments shown herein, but will conform to the widest scope consistent with the principles and novel features disclosed herein.
Claims
1. An improved A* path planning method based on dynamic weighting A path planning method characterized by, Comprising: Step 1: starting from the starting point of the planned path, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are not reachable due to obstacles, switch back to complete eight-neighborhood search; Step 2: using a multi-objective reward function to drive the Q-learning algorithm to update the action value online, dynamically adjusting the weight of the heuristic function, and calculating the improved heuristic function value after dynamic weighting, updating the evaluation function of the neighbor node to complete the initial path optimization; Step 3: extracting all turning points of the initial path, and using an improved Floyd algorithm to optimize the initial path based on a safety threshold to output an optimal path.
2. The improved A A path planning method, characterized in that, In step 1, the preset node index table divides the direction angle into 8 45° intervals, each interval corresponding to a set of reserved node combinations , a set of discarded nodes , and a set of recovery nodes ; wherein the reserved node combinations contain five elements, corresponding to five priority expansion directions, and , .
3. The improved A* based on dynamic weighting of claim 2. A path planning method, characterized in that, In step 1, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are not reachable due to obstacles, switch back to complete eight-neighborhood search, specifically: determining a corresponding partition interval of the preset node index table to which a relative azimuth angle between the current node and the target node belongs, and determining a reserved node combination corresponding to the partition interval , and 5 priority expansion directions are screened out safety collision detection is performed on each of the priority expansion directions to screen out the priority expansion directions with a distance greater than a safety distance threshold value from the nearest obstacle; if all the priority expansion directions encounter obstacles and are all less than or equal to the safety distance threshold value , a recovery node is called safety collision detection is performed on the corresponding expansion direction.
4. The improved A A path planning method, characterized in that, In step 2, the multi-objective reward function is as follows: wherein, , , , are the respective reward components of the base movement cost, the progress towards goal reward, the smoothness penalty, the potential field adjustment term, respectively; , , , are the weight coefficients of the respective reward components, ; is the Euclidean distance of movement; is the progress coefficient; is the amount of shortening of the distance to the goal point; is the smoothness coefficient; is the diagonal indicator function; is the potential field function; is the potential field change amount.
5. The improved A* based on dynamic weighting of claim 1. A path planning method, characterized in that, In step 2, the improved heuristic function is as follows: ; wherein, is the enhanced heuristic function value; is the base heuristic function; is the potential field weight coefficient; is the potential field function value; is the Q-value weight coefficient; is the action value function learned by Q-learning.
6. An improved A* based on dynamic weighting according to claim 5. A path planning method, characterized in that, The potential field function is as follows: wherein, is the attractive field component generated for the goal point; is the repulsive field component generated for the obstacle; is the attractive gain coefficient; is the current node is the Euclidean distance to the goal point; is the repulsive gain coefficient; is the current node is the closest distance to the i-th obstacle; is the obstacle influence distance threshold.
7. An improved A* based on dynamic weighting according to claim 5. A path planning method, characterized in that, The action value function is as follows: wherein, represents the state takes an action Q-values are updated; is a multi-objective reward function; is a discount factor; represents the next state the maximum Q-value for all possible actions in the next state represents the action belongs to the set of legal actions of the action space 8. The improved A A path planning method, characterized in that, In step 2, based on the updated evaluation function of the neighbor node, the initial path optimization is completed, specifically: Based on the updated evaluation function of the neighbor node, the exploration priority of the neighbor node is determined, the current node is moved to the closed list, and the qualified neighbor node is added to the open list; whether the target node is successfully found is judged, if the target is not reached and the open list is not empty, step 1 is returned to continue searching.
9. The improved A A path planning method, characterized in that, In step 3, the improved Floyd algorithm is used to optimize the initial path based on the safety threshold, specifically: Based on the improved Floyd algorithm, the initial path is optimized by removing redundant nodes and improving smoothness, as follows: Node connectivity detection and redundancy determination: Let the initial path node sequence be wherein is the starting point, is the end point; select non-continuous node pairs in turn and (wherein ), determine whether the connecting line segment intersects with the obstacle; If the distance from any point on the line segment to the nearest obstacle satisfies: : wherein, is a preset safety distance threshold value; Then determine With Can be safe direct, path segment For redundant path, the intermediate node Eliminate; Path optimization based on safety threshold constraint: In the process of eliminating redundant nodes, a dynamic safety distance verification mechanism is introduced: for each path to be optimized, the minimum Euclidean distance between each grid cell traversed by the node connection and the obstacle is calculated in real time : wherein, represents the coordinates of the center point of the obstacle; represents the coordinates of a sample point taken from the path segment to be optimized; If the minimum distance of any cell exists then discard this segment optimization, ensuring that the optimized path meets the safety threshold constraint throughout. Iterative optimization: repeat the above node connectivity detection and redundancy determination and path optimization steps based on the safety threshold constraint, traverse all possible non-continuous node pairs in the path, until no node pair satisfying the safety reachable condition can be found, or the path node sequence no longer changes, that is: wherein, represents the path sequence after the first optimization. Final output optimal path .
10. A dynamic weighting based improved A path planning method of claim 1-9 path planning system, characterized in that Comprising: Dynamic multi-neighborhood search screening module: used to start from the starting point of the planned path, based on the relative azimuth angle between the current node and the target node, five priority expansion directions are selected from eight neighborhood directions according to the preset node index table for concentrated search, and when all priority expansion directions are not reachable due to obstacles, switch back to complete eight-neighborhood search; Initial path optimization module: used to use a multi-objective reward function to drive the Q-learning algorithm to update the action value online, dynamically adjust the weight of the heuristic function, and calculate the improved heuristic function value after dynamic weighting, update the evaluation function of the neighbor node to complete the initial path optimization; Optimal path output module: used to extract all turning points of the initial path, and use an improved Floyd algorithm to optimize the initial path based on a safety threshold to output an optimal path.
