Intelligent agent path planning method and device, equipment and medium
By employing an adaptive window-based hierarchical cooperative A algorithm and a real-time repair mechanism, the problem of insufficient robustness of global path planning methods in dynamic environments is solved, enabling efficient collaborative work of multi-agent systems in complex environments.
Patent Information
- Application Number
- CN202510993098.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-12-05
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Existing global path planning methods cannot effectively handle path conflicts and obtain optimal solutions in complex and dynamically changing environments. They have poor robustness and are difficult to adapt to the needs of different starting and target positions.
We employ an adaptive window-based hierarchical cooperative A algorithm (RRA-WHCA) based on reserved redistribution, combined with a real-time repair (RRA) mechanism and reverse search. By using adaptive window technology and hierarchical cooperative A algorithm, we plan the path of multiple agents, enhancing the algorithm's adaptability and flexibility to dynamic environments.
It improves the collaborative working ability of multi-agent systems in complex environments, enhances the flexibility and adaptability of path planning, ensures the feasibility and accuracy of paths, and adapts to the needs of different starting and target locations.
Smart Images

Figure CN120489145B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent agent technology, and in particular to an intelligent agent path planning method, apparatus, device and medium. Background Technology
[0002] Multi-agent path planning in multi-service automated warehousing scenarios involves coordinating multiple agents to perform tasks within a warehousing environment to ensure efficient and conflict-free material transport and management. This includes planning the optimal path from the starting point to the destination for each agent while avoiding conflicts with other agents. Through mathematical abstraction, this problem can be categorized as the Multi-Agent Path Finding Problem (MAPF), the core of which is planning paths for multiple agents (such as mobile agents) in a shared environment so that they can reach their destination from their respective starting points while avoiding conflicts and collisions.
[0003] In the field of multi-agent path planning, a global path planning method is typically used to find an optimal path. This method involves acquiring the known environment, building an environment model, and then planning an optimal path for the agents based on the environment model.
[0004] However, while global path planning methods can find the optimal path, they require accurate information about the environment in advance. In complex and dynamically changing environments, this may lead to shortcomings in global path planning, especially in resolving path conflicts and obtaining the global optimal solution. Summary of the Invention
[0005] This invention provides an intelligent agent path planning method, apparatus, device, and medium to address the shortcomings of existing global path planning methods, such as their inability to cope with environmental changes and poor robustness. It adapts to the needs of different starting and target positions, enhances the flexibility of path planning and the algorithm's adaptability to dynamic environments, and enables multi-agent systems to work more effectively in complex environments.
[0006] This invention provides a path planning method for an intelligent agent, comprising: obtaining the starting position, target position, and environment map of the intelligent agent; and using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search based on the starting position, target position, and environment map of the intelligent agent, thereby obtaining the planned path of the intelligent agent.
[0007] According to the intelligent agent path planning method provided by the present invention, based on the agent's starting position, target position, and environmental map, a path search is performed using an adaptive window-based hierarchical cooperative A algorithm based on reservation and redistribution to obtain the planned path of the agent. The method includes: SA, based on a preset time window, extracting the node with the minimum cost from a preset open set for each agent and adding it to a previously created preset closed set; wherein, during initialization, the nodes in the preset open set are initial nodes determined based on the starting position of the corresponding agent and the preset cost of the initial nodes; SB, determining the corresponding neighbor nodes based on the node with the minimum cost and the environmental map, and removing neighbor nodes existing in the preset closed set; SC, for each neighbor node, using a search-based temporal A algorithm... The process involves determining the first cost from the initial node to its neighboring nodes via the node with the minimum cost, and using the real-time repair A algorithm for path planning to perform a reverse search from the target node to its neighboring nodes to obtain the second cost. The target node is determined based on the target position of the corresponding agent. SD: Based on the first and second costs, the total cost of the corresponding neighboring nodes is determined. SE: Based on the total cost of each neighboring node, the neighboring node with the minimum total cost is selected as the next path node in the planned path of the corresponding agent, and the next path node and its corresponding total cost are updated to the preset open set of the corresponding agent. SF: Based on a preset time step, a preset time window is adjusted, and steps SA-SE are iterated using the adjusted preset time window until a preset maximum number of iterations is reached to obtain the corresponding planned path.
[0008] According to the intelligent agent path planning method provided by the present invention, the corresponding neighbor node is determined based on the node with the lowest cost and the environmental map, including: determining the corresponding neighbor node based on the node with the lowest cost and the environmental map; removing the corresponding neighbor node if it is determined that there is an obstacle or it is occupied based on the state of each neighbor node in the environmental map; and / or removing the corresponding neighbor node if it is determined that the intelligent agent is a restricted type of the corresponding neighbor node based on the state of each neighbor node in the environmental map.
[0009] Using a search-based temporal A algorithm, the first cost from the initial node to its neighboring nodes via the node with the lowest cost is determined, including: determining the actual cost from the initial node to the node with the lowest cost based on the node with the lowest cost; using the search-based temporal A algorithm, searching from the node with the lowest cost to its neighboring nodes to obtain the estimated cost; and obtaining the corresponding first cost based on the actual cost and the estimated cost.
[0010] According to the agent path planning method provided by the present invention, after selecting the neighbor node corresponding to the minimum total cost as the next path node in the corresponding agent's planned path, the method includes: adding the next path nodes determined by all agents within the current preset time window to a previously created reservation table; detecting whether there are at least two agents occupying the same node simultaneously within the current preset time window in the reservation table; if so, combining the agent allocation priority, and re-based on the starting position, target position, and environmental map of the agents occupying the same node, using the adaptive window-based hierarchical cooperative A algorithm based on reservation redistribution to perform path search.
[0011] According to the intelligent agent path planning method provided by the present invention, the total cost of corresponding neighboring nodes is determined based on a first cost and a second cost, including: determining a first position cost based on the node with the lowest cost, its previous node, and its corresponding neighboring node; determining whether the road segment formed by the previous node of the node with the lowest cost, passing through the node with the lowest cost to the corresponding neighboring node, and combining with the environmental map, to obtain a corresponding second position cost; wherein the second position cost is set based on different types of intelligent agents and their respective maps; determining a corresponding third position cost based on the corresponding intelligent agent; wherein the third position cost is set based on the intelligent agent traveling in a straight line within a corresponding preset driving area; and obtaining the total cost of corresponding neighboring nodes based on the first position cost, the second position cost, the third position cost, the first cost, and the second cost.
[0012] According to the intelligent agent path planning method provided by the present invention, a first position cost is determined based on the node with the lowest cost, its predecessor node, and its corresponding adjacent node. The method includes: determining whether the road segment formed by the node with the lowest cost, its predecessor node, and its corresponding adjacent node is a turning section; if it is a turning section, determining the corresponding turning angle based on the node with the lowest cost, its predecessor node, and its corresponding adjacent node, and searching for preset position cost information based on the turning angle to determine the corresponding first position cost; wherein the preset position cost information is constructed based on different types of intelligent agents and their turning behaviors in corresponding driving map areas; otherwise, determining the corresponding adjacent node as a limit point and obtaining the preset position cost corresponding to the limit point to obtain the corresponding first position cost; wherein the preset position cost is set based on different types of intelligent agents and their corresponding driving map types.
[0013] According to the present invention, an agent path planning method includes, after obtaining the planned path of the agent, sending the planned path of the agent to a preset middleware, converting the format of the planned path of the agent according to the type of the agent to be sent, and sending the format-converted planned path to the corresponding agent to be sent.
[0014] The present invention also provides an intelligent agent path planning device, comprising: a data acquisition module for acquiring the starting position, target position, and environmental map of the intelligent agent; and a path planning module for performing path search based on the starting position, target position, and environmental map of the intelligent agent, using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution, to obtain the planned path of the intelligent agent.
[0015] The present invention also provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor executes the computer program to implement the intelligent agent path planning method as described above.
[0016] The present invention also provides a non-transitory computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements the intelligent agent path planning method as described above.
[0017] The present invention also provides a computer program product, including a computer program that, when executed by a processor, implements the intelligent agent path planning method as described above.
[0018] The intelligent agent path planning method, apparatus, device, and medium provided by this invention, by acquiring the intelligent agent's starting position, target position, and environmental map, ensure that the algorithm can fully understand the intelligent agent's operating environment, providing accurate basic data for subsequent path planning, adapting to the needs of different starting and target positions, supporting various scenarios, and further utilizing the adaptive window-based hierarchical cooperative A algorithm (RRA) based on reserved redistribution. -WHCA Window-based hierarchical cooperative A algorithm (WHCA) Using layered and windowing techniques, preliminary multi-agent paths are planned, combined with real-time repair (RRA). The mechanism and reverse search enhance the flexibility of path planning and the adaptability of the algorithm to dynamic environments, enabling multi-agent systems to work together more effectively in complex environments. Attached Figure Description
[0019] To more clearly illustrate the technical solutions in this invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this invention. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.
[0020] Figure 1 This is a flowchart illustrating the intelligent agent path planning method provided by the present invention;
[0021] Figure 2 This is a schematic diagram of the intelligent agent path planning device provided by the present invention;
[0022] Figure 3 This is a schematic diagram of the structure of the electronic device provided by the present invention. Detailed Implementation
[0023] To make the objectives, technical solutions, and advantages of this invention clearer, the technical solutions of this invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some, not all, of the embodiments of this invention. All other embodiments obtained by those skilled in the art based on the embodiments of this invention without creative effort are within the scope of protection of this invention.
[0024] Figure 1 This is a flowchart illustrating the intelligent agent path planning method provided by the present invention, as shown below. Figure 1 As shown, the method includes:
[0025] S11, Obtain the agent's starting position, target position, and environment map;
[0026] S12: Based on the agent's starting position, target position, and environmental map, the agent performs path search using the adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to obtain the agent's planned path.
[0027] It should be noted that the step number "S1N" in this specification does not represent the order of the agent path planning method. The agent path planning method of the present invention will be described in detail below.
[0028] Step S11: Obtain the agent's starting position, target position, and environment map.
[0029] It should be noted that at least one agent's starting position and target position are obtained. The specific number can be configured according to actual design requirements and is not further limited here. In addition, by obtaining the agents' starting positions, target positions, and the environment map, subsequent path planning can be performed based on the starting and target positions of each agent and the environment map, ensuring that all agents can find the optimal path.
[0030] It should be noted that in practical applications, especially in the context of multi-vendor heterogeneous systems, different types of agents often need to perform independent operations in specific areas. Therefore, it is also necessary to divide the environment map based on the agent's operating area to ensure that each agent can only operate within its designated area, thereby ensuring that the agent does not operate beyond its boundaries, avoiding regional conflicts and path overlap. Furthermore, the neighbor information of each node should be provided during the path planning process so that the corresponding neighbor nodes can be accessed during path search.
[0031] It should be added that before obtaining the agent's starting position and target position, the following should be included: initializing the basic parameters required for path planning, including the environment map, parameters of each agent, preset time window size, and preset maximum number of iterations.
[0032] Step S12: Based on the agent's starting position, target position, and environmental map, the agent uses an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to perform path search and obtain the agent's planned path.
[0033] In this embodiment, based on the agent's starting position, target position, and environmental map, the Reservation-based Reallocation Adaptive (WHCA) algorithm is used. RRA (abbreviated as RRA) -WHCA The algorithm performs path search to obtain the planned path for the agent, including: SA (Search-based Temporal A algorithm), which extracts the node with the minimum cost from the preset open set for each agent based on a preset time window and adds it to the preset closed set created earlier; during initialization, the nodes in the preset open set are the initial nodes determined based on the starting position of the corresponding agent and the preset cost of the initial nodes; SB (Site Shift algorithm), which determines the corresponding neighbor nodes based on the node with the minimum cost and the environment map, and removes neighbor nodes that exist in the preset closed set; and SC (Search-based Temporal A algorithm), which, for each neighbor node, uses the Search-based Temporal A algorithm (STA) to determine the first cost from the initial node to the neighbor node via the node with the minimum cost, and uses the Real-time Repair A algorithm (Site Shift algorithm). RRA The process involves: 1) performing a reverse search from the target node to its neighboring nodes to obtain the second cost; where the target node is determined based on the target position of the corresponding agent; 2) determining the total cost of the corresponding neighboring nodes based on the first and second costs; 3) selecting the neighboring node with the minimum total cost as the next path node in the agent's planned path based on the total cost of each neighboring node, and updating the next path node and its corresponding total cost to the agent's preset open set; and 4) adjusting the preset time window based on the preset time step, and iterating steps SA-SE using the adjusted preset time window until the preset maximum number of iterations is reached to obtain the corresponding planned path.
[0034] It should be noted that, through WHCA The hierarchical structure, using correspondence and windowing techniques to calculate for each agent, initially plans the multi-agent path and combines it with real-time repair (RRA). The mechanism and reverse search enhance the flexibility and adaptability of path planning. By using a hierarchical approach, the scale of the multi-agent path planning problem is simplified, improving the computation speed. The windowing technique focuses on local path optimization, reducing the computational burden of global search. Furthermore, the real-time repair mechanism dynamically detects and repairs path conflicts, enhancing the algorithm's adaptability to dynamic environments and ensuring path feasibility.
[0035] If the open set is empty and no path is found, a preset character representing the corresponding meaning is returned. The preset character can be set according to actual design requirements, such as None, etc., without further limitation here. Additionally, in the initial iteration, the nodes in the preset open set are the initial node and its corresponding preset cost. In subsequent iterations, the nodes in the preset open set can be determined based on the update from the previous iteration; refer to the above process for details, which will not be further described here. Furthermore, by using STA, priority queues (preset open sets) and preset closed sets are used to manage pending and processed nodes, and RRA is considered during the planning process. The object provides a reverse cost estimate to optimize the path, RRA Used to support STA in accurately assessing costs during path planning.
[0036] Specifically, based on the node with the lowest cost and the environment map, the corresponding neighbor node is determined, including: determining the corresponding neighbor node based on the node with the lowest cost and the environment map; removing the corresponding neighbor node if it is determined that there is an obstacle or it is occupied based on the state of each neighbor node in the environment map; and / or removing the corresponding neighbor node if it is determined that the agent is a restricted type of the corresponding neighbor node based on the state of each neighbor node in the environment map.
[0037] It should be noted that by determining whether neighboring nodes are obstructed or occupied by vehicles in the environmental map, or whether left and right passages restrict the passage of only certain types of agents, the obtained neighboring nodes are ensured to be valid nodes, thereby improving the accuracy of subsequent path planning.
[0038] In addition, the first cost from the initial node to its neighboring nodes via the node with the minimum cost is determined using the search-based temporal A algorithm, including: determining the actual cost from the initial node to the node with the minimum cost based on the node with the minimum cost; searching from the node with the minimum cost to its neighboring nodes using the search-based temporal A algorithm to obtain the estimated cost; and obtaining the corresponding first cost based on the actual cost and the estimated cost.
[0039] It should be added that the actual cost can be determined based on the previous actual search or obtained from the total cost of the node with the lowest cost stored in the preset open set. That is, when the neighbor node that is determined to be the next path node in the previous iteration is the node with the lowest cost taken from the preset open set, the actual cost is the first cost of the neighbor node that is determined to be the next path node in the previous iteration.
[0040] In addition, the estimated cost is obtained by using the search-based temporal A algorithm to search from the node with the lowest cost to its neighboring nodes. This includes: using the search-based temporal A algorithm to search from the node with the lowest cost to its neighboring nodes to obtain the path length; and obtaining the estimated cost based on the path length and a preset ratio coefficient.
[0041] In addition, the second cost can be obtained through functions such as Manhattan distance, and the specific cost can be determined according to the path planning (RRA) function of the real-time repair A algorithm actually used. No further restrictions are made here.
[0042] In an optional embodiment, determining the total cost of the corresponding neighbor node based on the first cost and the second cost includes: determining a first location cost based on the node with the lowest cost, its predecessor node, and its corresponding neighbor node; determining whether the road segment formed by the node with the lowest cost, passing through the node with the lowest cost to the corresponding neighbor node, and combining the environmental map to obtain a corresponding second location cost; wherein the second location cost is set based on different types of agents and their respective maps; determining a corresponding third location cost based on the corresponding agent; wherein the third location cost is set based on the agent traveling in a straight line within a corresponding preset driving area; and obtaining the total cost of the corresponding neighbor node based on the first location cost, the second location cost, the third location cost, the first cost, and the second cost.
[0043] Furthermore, determining the first position cost based on the node with the lowest cost, its preceding node, and its corresponding adjacent node includes: determining whether the road segment formed by the preceding node of the node with the lowest cost, passing through the node with the lowest cost to the corresponding adjacent node, is a turning section; if it is a turning section, determining the corresponding turning angle based on the node with the lowest cost, its preceding node, and its corresponding adjacent node, and searching for preset position cost information based on the turning angle to determine the corresponding first position cost; wherein, the preset position cost information is constructed based on different types of intelligent agents and their turning behavior in the corresponding driving map area; otherwise, determining the corresponding adjacent node as a limit point, and obtaining the preset position cost corresponding to the limit point to obtain the corresponding first position cost; wherein, the preset position cost is set based on different types of intelligent agents and their corresponding driving map types.
[0044] It should be added that the turning angle can be determined based on the coordinates of the node with the minimum cost, the node preceding the node with the minimum cost, and the corresponding adjacent nodes. For different turning angles, the corresponding position cost is determined by combining preset position cost information set based on actual experiments or prior experience. Furthermore, the first position cost at the extreme point is greater than the first position cost corresponding to the turning angle; this can be configured based on actual experimental results or prior experience, and is not further limited here.
[0045] It is worth noting that when considering the turning interval, by assuming that each heterogeneous vehicle has two turning times and speeds under the condition of average speed, namely empty and fully loaded, the actual average speed and average turning speed of the heterogeneous agent under these two conditions are measured and substituted into the experiment to determine the corresponding first position cost.
[0046] In one optional embodiment, after obtaining the planned path of the agent, the method includes: sending the planned path of the agent to a preset middleware to convert the format of the planned path of the agent according to the type of the agent to be sent, and sending the format-converted planned path to the corresponding agent to be sent.
[0047] In an optional embodiment, after selecting the neighbor node corresponding to the minimum total cost as the next path node in the corresponding agent's planned path, the process includes: adding the next path nodes determined by all agents within the current preset time window to a previously created reservation table; detecting in the reservation table whether there are at least two agents occupying the same node simultaneously within the current preset time window; if so, combining the agent allocation priority, and based on the starting position, target position, and environmental map of the agents occupying the same node, using the adaptive window-based hierarchical cooperation A algorithm based on reservation redistribution, to re-search the path.
[0048] It should be noted that by adding the next path node of the agent determined within the same preset time window to the reservation table, path resources are allocated to the agent in advance through a reservation mechanism to avoid conflicts. This facilitates the re-searching of paths based on the agent's allocation priority when path conflicts occur, ensuring the feasibility of the overall path planning. When the corresponding node is found again, it is assigned to the agent with higher priority, and the search continues for nodes of agents with lower priority. The specific steps are described above and will not be repeated here. In addition, based on the above method, it is convenient to manage the reservation status of each path node of the agent during the path planning process. By checking the status (is available) of the corresponding reservation table, it is determined whether any node is available at a specific time step. In this way, after the planned path is determined, the corresponding planned path can be reserved and the occupancy information of the nodes in the path can be recorded to ensure that the same time step is not occupied by multiple agents.
[0049] In addition, after the corresponding planned path is sent to the corresponding agent, the next path node is reserved in advance based on a reservation window of a preset length by looking up the reservation table, and the previous path node is released to avoid collisions caused by multiple agents arriving at the same location at the same time. Through the reserved redistribution mechanism, path resources are allocated to agents in advance, and the path allocation of agents is dynamically adjusted when path conflicts occur to ensure the feasibility of the overall path planning.
[0050] In summary, this embodiment of the invention, by acquiring the agent's starting position, target position, and environmental map, ensures that the algorithm fully understands the agent's operating environment, providing accurate basic data for subsequent path planning, adapting to the needs of different starting and target positions, supporting various scenarios, and further utilizing the adaptive window-based hierarchical cooperative A algorithm (RRA) based on reserved redistribution. -WHCA Window-based hierarchical cooperative A algorithm (WHCA) Using layered and windowing techniques, preliminary multi-agent paths are planned, combined with real-time repair (RRA). The mechanism and reverse search enhance the flexibility of path planning and the adaptability of the algorithm to dynamic environments, enabling multi-agent systems to work together more effectively in complex environments.
[0051] The intelligent agent path planning device provided by the present invention is described below. The intelligent agent path planning device described below and the intelligent agent path planning method described above can be referred to in correspondence.
[0052] Figure 2 A schematic diagram of an agent path planning device is shown. The device includes:
[0053] Data acquisition module 21 acquires the agent's starting position, target position, and environmental map;
[0054] The path planning module 22 uses the adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to search for paths based on the agent's starting position, target position, and environmental map, and obtains the agent's planned path.
[0055] In this embodiment, the path planning module 22 is used for: SA, based on a preset time window, extracting the node with the lowest cost from the preset open set of each agent and adding it to the previously created preset closed set; wherein, during initialization, the nodes in the preset open set are the initial nodes determined based on the starting position of the corresponding agent and the preset cost of the initial nodes; SB, determining the corresponding neighbor nodes based on the node with the lowest cost and the environment map, and removing neighbor nodes existing in the preset closed set; SC, for each neighbor node, using the search-based temporal A algorithm (STA), determining the first cost from the initial node to the neighbor node via the node with the lowest cost, and using the real-time repair A algorithm (STA). RRA The process involves: 1) performing a reverse search from the target node to its neighboring nodes to obtain the second cost; where the target node is determined based on the target position of the corresponding agent; 2) determining the total cost of the corresponding neighboring nodes based on the first and second costs; 3) selecting the neighboring node with the minimum total cost as the next path node in the agent's planned path based on the total cost of each neighboring node, and updating the next path node and its corresponding total cost to the agent's preset open set; and 4) adjusting the preset time window based on the preset time step, and iterating steps SA-SE using the adjusted preset time window until the preset maximum number of iterations is reached to obtain the corresponding planned path.
[0056] Specifically, the path planning module 22 includes: a neighbor node determination unit, which determines the corresponding neighbor node based on the node with the lowest cost and the environment map; an effective node filtering unit, which removes the corresponding neighbor node if it is found to have an obstacle or is occupied based on the state of each neighbor node in the environment map; and / or, removes the corresponding neighbor node if it is found that the agent is a restricted type of the corresponding neighbor node based on the state of each neighbor node in the environment map.
[0057] In addition, the path planning module 22 also includes: an actual cost determination unit, which determines the actual cost from the initial node to the node with the lowest cost based on the node with the lowest cost; a cost estimation unit, which uses a search-based temporal A algorithm to search from the node with the lowest cost to its neighboring nodes to obtain the estimated cost; and a first cost determination unit, which obtains the corresponding first cost based on the actual cost and the estimated cost.
[0058] Furthermore, the cost estimation unit includes: a path search subunit, which uses a search-based temporal A algorithm to search from the node with the lowest cost to its neighboring nodes to obtain the path length; and a cost estimation subunit, which obtains the estimated cost based on the path length and a preset ratio coefficient.
[0059] In an optional embodiment, the path planning module 22 further includes: a first location cost acquisition unit, which determines a first location cost based on the node with the lowest cost, its previous node, and its corresponding neighboring node; a second location cost acquisition unit, which determines whether a road segment formed by the previous node of the node with the lowest cost, passing through the node with the lowest cost, to the corresponding neighboring node, and in conjunction with an environmental map, whether the road segment belongs to a different map, and obtains a corresponding second location cost; wherein the second location cost is set based on different types of intelligent agents and their respective maps; a third location cost acquisition unit, which determines a corresponding third location cost based on the corresponding intelligent agent; wherein the third location cost is set based on the intelligent agent traveling in a straight line within a corresponding preset driving area; and a total cost determination unit, which obtains the total cost of the corresponding neighboring nodes based on the first location cost, the second location cost, the third location cost, the first cost, and the second cost.
[0060] Furthermore, the first position cost acquisition unit includes: a turning judgment subunit, which determines whether the road segment formed by the node with the lowest cost, the node preceding the node with the lowest cost, and the corresponding adjacent node is a turning interval based on the node with the lowest cost, the node preceding the node with the lowest cost, and the corresponding adjacent node; if it is a turning interval, the first position cost acquisition subunit determines the corresponding turning angle based on the node with the lowest cost, the node preceding the node with the lowest cost, and the corresponding adjacent node, and determines the corresponding first position cost based on the turning angle by searching for preset position cost information; wherein, the preset position cost information is constructed in advance based on different types of intelligent agents and their turning behavior in the corresponding driving map area; otherwise, the corresponding adjacent node is determined as a limit point, and the preset position cost corresponding to the limit point is obtained to obtain the corresponding first position cost; wherein, the preset position cost is set in advance based on different types of intelligent agents and their corresponding driving map types.
[0061] In an optional embodiment, the path planning module 22 further includes: a reservation unit, which, after selecting the neighbor node corresponding to the minimum total cost as the next path node in the planned path of the corresponding agent, adds the next path nodes determined by all agents within the current preset time window to a previously created reservation table; and a detection unit, which detects whether there are at least two agents occupying the same node simultaneously within the current preset time window in the reservation table. If so, a replanning unit, in conjunction with the agent allocation priority, re-searches the path based on the starting position, target position, and environment map of the agents occupying the same node, using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution.
[0062] In an optional embodiment, the device further includes: a path distribution module, which, after obtaining the planned path of the intelligent agent, sends the planned path of the intelligent agent to a preset middleware to convert the format of the planned path of the intelligent agent according to the type of the intelligent agent to be distributed, and distributes the format-converted planned path to the corresponding intelligent agent to be distributed.
[0063] In summary, this embodiment of the invention utilizes the starting position, target position, and environmental map of the agent obtained by the data acquisition module through the path planning module. This ensures that the algorithm fully understands the agent's operating environment, providing accurate basic data for subsequent path planning and adapting to the needs of different starting and target positions. It supports various scenarios and further leverages the adaptive window-based hierarchical cooperative A algorithm (RRA) based on reserved redistribution. -WHCA Window-based hierarchical cooperative A algorithm (WHCA) Using layered and windowing techniques, preliminary multi-agent paths are planned, combined with real-time repair (RRA). The mechanism and reverse search enhance the flexibility of path planning and the adaptability of the algorithm to dynamic environments, enabling multi-agent systems to work together more effectively in complex environments.
[0064] Figure 3 An example is a schematic diagram of the physical structure of an electronic device, such as... Figure 3As shown, the electronic device may include a processor 310, a communications interface 320, a memory 330, and a communication bus 340. The processor 310, communications interface 320, and memory 330 communicate with each other via the communication bus 340. The processor 310 can call logical instructions from the memory 330 to execute an agent path planning method. This method includes: acquiring the agent's starting position, target position, and environmental map; and, based on the agent's starting position, target position, and environmental map, performing path search using an adaptive window-based hierarchical cooperative A algorithm based on reserved reallocation to obtain the agent's planned path.
[0065] Furthermore, the logical instructions in the aforementioned memory 330 can be implemented as software functional units and, when sold or used as independent products, can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present invention, essentially, or the part that contributes to the prior art, or a part of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of the present invention. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0066] On the other hand, the present invention also provides a computer program product, which includes a computer program that can be stored on a non-transitory computer-readable storage medium. When the computer program is executed by a processor, the computer can execute the agent path planning method provided by the above methods. The method includes: obtaining the agent's starting position, target position, and environment map; and performing path search based on the agent's starting position, target position, and environment map using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to obtain the agent's planned path.
[0067] In another aspect, the present invention also provides a non-transitory computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements the agent path planning method provided by the above methods. The method includes: obtaining the agent's starting position, target position, and environmental map; and performing path search based on the agent's starting position, target position, and environmental map using an adaptive window-based hierarchical cooperative A algorithm based on reserved redistribution to obtain the agent's planned path.
[0068] The device embodiments described above are merely illustrative. The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the modules can be selected to achieve the purpose of this embodiment according to actual needs. Those skilled in the art can understand and implement this without any creative effort.
[0069] Through the above description of the embodiments, those skilled in the art can clearly understand that each embodiment can be implemented by means of software plus necessary general-purpose hardware platforms, and of course, it can also be implemented by hardware. Based on this understanding, the above technical solutions, in essence or the part that contributes to the prior art, can be embodied in the form of a software product. This computer software product can be stored in a computer-readable storage medium, such as ROM / RAM, magnetic disk, optical disk, etc., and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute the methods described in the various embodiments or some parts of the embodiments.
[0070] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention, and not to limit them; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that modifications can still be made to the technical solutions described in the foregoing embodiments, or equivalent substitutions can be made to some of the technical features; and these modifications or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of the present invention.
Claims
1. A method for path planning of an agent, the method comprising: The method comprises the following steps: obtaining the starting position, target position and environment map of an agent; performing path search by using an adaptive window-based hierarchical cooperative A algorithm based on reservation re-allocation according to the starting position, target position and environment map of the agent to obtain a planned path of the agent; performing path search by using an adaptive window-based hierarchical cooperative A algorithm based on reservation re-allocation according to the starting position, target position and environment map of the agent to obtain a planned path of the agent, comprising: SA, based on a preset time window, extracting a node with minimum cost from a preset open set of each agent and adding it to a preset closed set created in advance; wherein, at initialization, the node in the preset open set is an initial node determined based on the starting position of the corresponding agent and a preset cost of the initial node; SB, determining corresponding neighbor nodes according to the node with minimum cost and the environment map, and eliminating neighbor nodes existing in the preset closed set; SC, for each neighbor node, determining a first cost of the initial node to the neighbor node through the node with minimum cost by using a search-based time A algorithm, and performing reverse search from a target node to the neighbor node by using real-time repair A algorithm path planning to obtain a second cost; wherein, the target node is determined based on the target position of the corresponding agent; SD, determining the total cost of the corresponding neighbor node according to the first cost and the second cost; SE, selecting the neighbor node corresponding to the minimum total cost as the next path node in the planned path of the corresponding agent according to the total cost of each neighbor node, and updating the next path node and its corresponding total cost to the preset open set of the corresponding agent; SF, adjusting the preset time window based on a preset time step, and iterating steps SA-SE by using the adjusted preset time window until a preset maximum iteration number is reached to obtain the corresponding planned path; determining the first cost of the initial node to the neighbor node through the node with minimum cost by using a search-based time A algorithm, comprising: determining the actual cost of the initial node to the node with minimum cost according to the node with minimum cost; performing search from the node with minimum cost to the neighbor node by using a search-based time A algorithm to obtain an estimated cost; obtaining the corresponding first cost according to the actual cost and the estimated cost.
2. The method of claim 1, wherein, determining the corresponding neighbor nodes according to the node with minimum cost and the environment map, comprising: determining the corresponding neighbor nodes according to the node with minimum cost and the environment map; determining that the corresponding neighbor node exists obstacles or is occupied according to the state of each neighbor node in the environment map, and eliminating the corresponding neighbor node; and / or, determining that the agent is a restricted type of the corresponding neighbor node according to the state of each neighbor node in the environment map, and eliminating the corresponding neighbor node.
3. The method of claim 1, wherein, after selecting the neighbor node corresponding to the minimum total cost as the next path node in the planned path of the corresponding agent, comprising: adding all the next path nodes determined by the intelligent agents in the current preset time window to the reservation table created in advance; detecting whether there are at least two intelligent agents simultaneously occupying the same node in the current preset time window in the reservation table, and if so, re-searching a path according to the starting positions, target positions and environment map of the intelligent agents occupying the same node in combination with the intelligent agent allocation priority, and using the adaptive window-based hierarchical cooperative A algorithm based on reservation re-allocation.
4. The method of claim 1, wherein, determining a total cost of the corresponding neighbor node according to the first cost and the second cost, including: determining a first position cost according to the node with the minimum cost and the corresponding neighbor node of the node with the minimum cost; determining whether a road section from the last node of the node with the minimum cost to the corresponding neighbor node belongs to different maps in combination with the environment map, to obtain a corresponding second position cost; wherein the second position cost is set in advance based on different types of intelligent agents and their corresponding maps; determining a corresponding third position cost according to the intelligent agent; wherein the third position cost is set in advance based on the intelligent agent driving in a corresponding preset driving area; obtaining the total cost of the corresponding neighbor node according to the first position cost, the second position cost, the third position cost, the first cost and the second cost.
5. The method of claim 4, wherein, determining a first position cost according to the node with the minimum cost and the corresponding neighbor node of the node with the minimum cost, including: determining whether a road section from the last node of the node with the minimum cost to the corresponding neighbor node is a turning interval according to the node with the minimum cost and the corresponding neighbor node of the node with the minimum cost; if it is a turning interval, determining a corresponding turning angle according to the node with the minimum cost and the corresponding neighbor node of the node with the minimum cost, and searching preset position cost information according to the turning angle to determine a corresponding first position cost; wherein the preset position cost information is constructed in advance based on different types of intelligent agents and their turning behaviors on corresponding driving map areas; otherwise, determining that the corresponding neighbor node is a limit point, and obtaining a preset position cost corresponding to the limit point to obtain a corresponding first position cost; wherein the preset position cost is set in advance based on different types of intelligent agents and their corresponding driving map types.
6. The method of claim 1, wherein, after obtaining the planning path of the intelligent agent, including: sending the planning path of the intelligent agent to a preset middleware to format-convert the planning path of the intelligent agent according to the type of the intelligent agent to be dispatched, and dispatching the format-converted planning path to the corresponding intelligent agent to be dispatched.
7. An agent path planning apparatus characterized by comprising: including: a data acquisition module that acquires the starting position, target position and environment map of the intelligent agent; a path planning module that uses the adaptive window-based hierarchical cooperative A algorithm based on reservation re-allocation to search a path according to the starting position, target position and environment map of the intelligent agent, to obtain the planning path of the intelligent agent; The path planning module is configured to: SA, based on a preset time window, extracting a node with a minimum cost from a preset open set of a corresponding agent for each agent, and adding the node to a preset closed set created in advance; wherein, at initialization, the node in the preset open set is an initial node determined based on a starting position of the corresponding agent and a preset cost of the initial node; SB, determining a corresponding neighbor node according to the node with the minimum cost and the environment map, and eliminating the neighbor node existing in the preset closed set; SC, for each neighbor node, determining a first cost of the initial node to the neighbor node via the node with the minimum cost by using a search-based time A algorithm, and performing reverse search from a target node to the neighbor node by using real-time repair A algorithm path planning to obtain a second cost; wherein, the target node is determined based on a target position of the corresponding agent; SD, determining a total cost of the corresponding neighbor node according to the first cost and the second cost; SE, selecting a neighbor node corresponding to a minimum total cost as a next path node in a path planned for the corresponding agent according to the total cost of each neighbor node, and updating the next path node and the corresponding total cost to the preset open set of the corresponding agent; SF, adjusting the preset time window based on a preset time step, and iteratively performing steps SA-SE by using the adjusted preset time window until a preset maximum iteration number is reached, to obtain a corresponding planned path; The path planning module comprises: An actual cost determination unit configured to determine an actual cost of the initial node to the node with the minimum cost according to the node with the minimum cost; A cost estimation unit configured to perform search from the node with the minimum cost to the neighbor node by using a search-based time A algorithm to obtain an estimated cost; A first cost determination unit configured to obtain a corresponding first cost according to the actual cost and the estimated cost.
8. An electronic device comprising a memory, a processor, and a computer program stored on the memory and running on the processor, characterized in that, The processor implements the agent path planning method according to any one of claims 1 to 6 when executing the computer program. 9.A non-transitory computer-readable storage medium having stored thereon a computer program, characterized in that, The computer program implements the agent path planning method according to any one of claims 1 to 6 when executed by the processor.