Mobile state monitoring method, device and computer equipment based on Manhattan distance
Through the mobile state monitoring method based on Manhattan distance, the problem in the artificial potential field method that the agent is easy to fall into a local minimum is solved, the efficiency of path planning is improved, the calculation occupation is reduced, and a faster deadlock state determination is achieved.
Patent Information
- Application Number
- CN202210269006.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-03-18
- Publication Date
- 2024-08-27
- Estimated Expiration
- 2042-03-18
AI Technical Summary
The artificial potential field method is prone to fall into the local minimum problem in path planning, resulting in the agent being unable to obtain the global optimal path, and the calculation efficiency of determining whether it falls into the local minimum is low.
The movement status monitoring method based on Manhattan distance is adopted. By obtaining the Manhattan distance between the agent's starting position and the target point position, the position information of the agent after each movement is recorded, and the current position and the previous position are calculated after the preset number of iterations. distance, if the distance is less than the threshold, the agent is determined to enter a deadlock state.
It improves the efficiency of determining whether the agent falls into a local minimum, reduces the calculation occupancy of full deadlock monitoring, and improves the efficiency of path planning.
Smart Images

Figure CN114722581B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of artificial potential field path planning, and in particular to a mobile state monitoring method, device, computer equipment and storage medium based on Manhattan distance. Background Art
[0002] The artificial potential field method has a strong ability to adapt to scenarios in actual planning applications and can display the topological model of the scene. At the same time, it can solve the defects of large amount of calculation and complex operation of global planning. The planning modeling is concise and the method is clear, which has attracted more and more attention and application.
[0003] However, there are defects and constraints in the actual application scenarios of the path planning of intelligent agents using the artificial potential field method. One of them is the local minimum problem, that is, for the problem of multiple obstacles, when the distribution of obstacles meets specific conditions, local extreme value problems will appear in the planning process, and the intelligent agent cannot obtain the global optimum, and thus always moves and wanders in the local area. When using the artificial potential field method for path planning, the judgment of whether the intelligent agent falls into the local minimum area usually runs through the entire path planning process, which requires considerable calculation. Therefore, the existing technology has the problem of low efficiency. Summary of the invention
[0004] Based on this, it is necessary to provide a mobile state monitoring method, device, computer equipment and storage medium based on Manhattan distance that can improve the efficiency of determining whether an intelligent agent in an artificial potential field is trapped in a local minimum in order to address the above technical problems.
[0005] A mobile state monitoring method based on Manhattan distance, the method comprising:
[0006] Obtaining a starting position and a target point position of the agent in the map, and further determining a Manhattan distance between the starting position and the target point position;
[0007] When the total step length of the agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point, and the agent has not reached the target point, the agent is monitored for a deadlock state, and the position information of the agent after each movement is recorded;
[0008] According to the pre-set agent movement rules, set the number of pre-iterations k test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle;
[0009] If the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
[0010] In one embodiment, the method further includes: obtaining the Manhattan distance as a+b; wherein a and b are the distances between the starting position and the target point position in the horizontal and vertical directions, respectively;
[0011] The step length of the agent is obtained as d;
[0012] According to the Manhattan distance and the step length, the number of steps required for the agent to advance to the target point according to the Manhattan distance is determined as:
[0013]
[0014] According to the number of steps required for the agent to advance to the target point according to the Manhattan distance, the start time of entering the agent deadlock state monitoring is determined as:
[0015]
[0016] in, The operator represents k Manhattan Round up.
[0017] In one of the embodiments, it further includes: setting a pre-iteration number T according to a preset intelligent agent movement rule;
[0018] When the number of moves of the agent from the beginning of monitoring reaches the pre-iteration number T, that is, at the current moment k>k test +T, obtain the current position and the position T moments before the current position after each movement of the agent, and further calculate the distance between the current position and the previous position as:
[0019] dis T =|X(k)-X(kT)|
[0020] Wherein, X(k) represents the position of the agent at the current time k, X(kT) represents the position of the agent before time T, and the || symbol indicates the straight-line distance between the two positions.
[0021] In one embodiment, the method further includes: if the distance between the current position and the previous position satisfies:
[0022] dis T ≤nd ·d
[0023] The current state is determined to be a suspected deadlock state; where n d is the step size influencing factor, which indicates the strictness of the deadlock state judgment.
[0024] A mobile state monitoring device based on Manhattan distance, the device comprising:
[0025] A Manhattan distance determination module, used to obtain the starting position and the target point position of the agent in the map, and further determine the Manhattan distance between the starting position and the target point position;
[0026] A monitoring start module, configured to monitor the deadlock state of the intelligent agent and record the position information of the intelligent agent after each movement when the total step length of the intelligent agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point and the intelligent agent has not reached the target point;
[0027] The monitoring module is used to set the number of pre-iterations k according to the pre-set agent movement rules test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle;
[0028] A state determination module is used to determine if the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
[0029] A computer device comprises a memory and a processor, wherein the memory stores a computer program, and when the processor executes the computer program, the following steps are implemented:
[0030] Obtaining a starting position and a target point position of the agent in the map, and further determining a Manhattan distance between the starting position and the target point position;
[0031] When the total step length of the agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point, and the agent has not reached the target point, the agent is monitored for a deadlock state, and the position information of the agent after each movement is recorded;
[0032] According to the pre-set agent movement rules, set the number of pre-iterations ktest , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle;
[0033] If the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
[0034] A computer-readable storage medium stores a computer program, which, when executed by a processor, implements the following steps:
[0035] Obtaining a starting position and a target point position of the agent in the map, and further determining a Manhattan distance between the starting position and the target point position;
[0036] When the total step length of the agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point, and the agent has not reached the target point, the agent is monitored for a deadlock state, and the position information of the agent after each movement is recorded;
[0037] According to the pre-set agent movement rules, set the number of pre-iterations k test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle;
[0038] If the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
[0039] The above-mentioned mobile state monitoring method, device, computer equipment and storage medium based on Manhattan distance determine the Manhattan distance between the starting position and the target point position of the intelligent agent in the artificial potential field; when the total number of steps moved by the intelligent agent from the starting position according to the preset step length exceeds the number of steps moved according to the Manhattan distance, and has not reached the target point, the intelligent agent is monitored for deadlock state, and the position information of the intelligent agent after each movement is recorded; after reaching the preset number of iterations, the Euclidean distance between the current position and the position before time T after each movement of the intelligent agent is obtained; if the distance between the current position and the previous position is less than the preset threshold, it is determined that the intelligent agent enters a deadlock state. The present invention determines the start time of triggering the start of deadlock state monitoring based on the Manhattan distance, does not require deadlock monitoring throughout the process, reduces computing occupancy, and can improve path planning efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 1 is a flow chart of a method for monitoring a mobile state based on Manhattan distance in one embodiment;
[0041] Figure 2 is a structural block diagram of a mobile state monitoring device based on Manhattan distance in one embodiment;
[0042] Figure 3 FIG. 4 is a diagram showing the internal structure of a computer device in one embodiment. DETAILED DESCRIPTION
[0043] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0044] The mobile state monitoring method based on Manhattan distance provided by the present application can be applied to the following application environments. In the artificial potential field method, due to the arbitrary dynamic distribution of obstacles, there is a certain situation. When the intelligent agent enters the area where the repulsive and gravitational influences are balanced, according to the concept of the potential field method, the intelligent agent cannot obtain the driving force, and thus always wanders in the area and cannot reach the terminal, that is, it falls into a deadlock state of the local minimum. The present invention is applied to the path planning problem based on the artificial potential field method, and provides a mobile state monitoring method based on Manhattan distance, which is used to efficiently determine whether the intelligent agent is in a deadlock state.
[0045] In one embodiment, Figure 1 As shown, a mobile state monitoring method based on Manhattan distance is provided, comprising the following steps:
[0046] Step 102, obtaining the starting position and the target point position of the agent in the map, and further determining the Manhattan distance between the starting position and the target point position.
[0047] In the artificial potential field, when the combined force of repulsion and gravity acting on the intelligent agent reaches a balance, the intelligent agent is confined to the local minimum area and cannot expand to other areas.
[0048] The present invention detects whether the intelligent agent falls into a local minimum based on the Manhattan distance. The Manhattan distance is the sum of the distances of the projections of the line segment formed by two points on the fixed rectangular coordinate system of the Euclidean space on the axis.
[0049] Step 104, when the total number of steps that the agent moves from the starting position according to the preset step length exceeds the number of steps moved according to the Manhattan distance and has not reached the target point, the agent is monitored for a deadlock state and the position information of the agent after each movement is recorded.
[0050] The Manhattan distance is actually used as the upper limit of the distance from the starting point to the target point. The number of steps corresponding to the Manhattan distance given to the agent is the waiting window. If the agent is not trapped in the local minimum state, it should reach the target point within the calculated number of steps. If not, it can be speculated that the agent may be deadlocked, but further verification is needed. Therefore, from this point on, the position information of the agent after each move is recorded, which is used to determine whether the agent is indeed deadlocked in the subsequent time period.
[0051] Step 106: set the number of pre-iterations k according to the preset agent movement rules test , when the number of moves of the agent from the beginning of monitoring reaches the pre-iteration number k test When the agent moves, the current position and the position of the previous T moments are obtained, and the straight-line distance between the current position and the previous position is further calculated.
[0052] The movement rules of the intelligent agent stipulate that the intelligent agent takes the current position as the center of the circle and can only reach one of the T points on the circumference of the circle with the movement step length as the radius at the next moment; the T points are evenly distributed on the circumference.
[0053] Setting the movement rules of the intelligent agent is equivalent to limiting the possibility of the intelligent agent reaching the point at the next moment, which can simplify the calculation model during the numerical simulation of path planning. Setting T points to be evenly distributed on the circumference can further simplify the calculation model.
[0054] The more points that the agent may reach, the longer the time interval is needed to determine whether the agent is in deadlock, so as to ensure the accuracy of state judgment. Therefore, the time interval set in the present invention is related to the number of points that the agent can reach at the next moment when the path is planned.
[0055] Step 108: If the distance between the current position and the previous position is TWhen it is less than the preset threshold, the agent is judged to be in a deadlock state.
[0056] In the above-mentioned mobile state monitoring method based on Manhattan distance, the Manhattan distance between the starting position and the target point position of the intelligent agent in the artificial potential field is determined; when the total number of steps that the intelligent agent moves from the starting position according to the preset step length exceeds the number of steps moved according to the Manhattan distance, and has not reached the target point, the intelligent agent is monitored for deadlock state, and the position information of the intelligent agent after each movement is recorded; after the preset number of iterations, the distance between the current position at the current moment and the position before the T moment is obtained after each movement of the intelligent agent; if the distance between the current position and the previous position is less than the preset threshold, it is determined that the intelligent agent enters a deadlock state. The present invention determines the start time of triggering the start of deadlock state monitoring based on the Manhattan distance, does not require deadlock monitoring throughout the process, reduces computing occupancy, and can improve path planning efficiency.
[0057] In one embodiment, the method further includes: obtaining a Manhattan distance of a+b, wherein a and b are the distances between the starting position and the target point in the horizontal and vertical directions, respectively; obtaining a step length of the agent of the intelligent agent of d; and determining, based on the Manhattan distance and the step length, the number of steps required for the intelligent agent to advance to the target point according to the Manhattan distance of the intelligent agent ...
[0058]
[0059] According to the number of steps required for the agent to advance to the target point according to the Manhattan distance, the starting time for entering the agent deadlock state monitoring is determined as:
[0060]
[0061] in, The operator represents k Manhattan Round up.
[0062] In one of the embodiments, it further includes: setting a pre-iteration number T according to a preset intelligent agent movement rule;
[0063] When the number of moves of the agent from the beginning of monitoring reaches the pre-iteration number T, that is, at the current moment k>k test +T, obtain the current position and the position T moments before the current moment after each movement of the agent, and further calculate the distance between the current position and the previous position as:
[0064] dis T =|X(k)-X(kT)|
[0065] Among them, X(k) represents the position of agent k at the current moment, X(kT) represents the position of the agent T moments ago, and the || symbol indicates the straight-line distance between the two positions.
[0066] In one embodiment, the method further includes: if the distance between the current position and the previous position satisfies:
[0067] dis T ≤n d ·d
[0068] The current state is determined to be a suspected deadlock state; where n d is the step size influencing factor, which indicates the strictness of the deadlock state judgment.
[0069] It should be understood that although Figure 1 The steps in the flowchart are shown in sequence as indicated by the arrows, but these steps are not necessarily executed in the order indicated by the arrows. Unless otherwise specified in this document, there is no strict order restriction for the execution of these steps, and these steps can be executed in other orders. Moreover, Figure 1 At least part of the steps may include multiple sub-steps or multiple stages. These sub-steps or stages are not necessarily executed at the same time, but can be executed at different times. The execution order of these sub-steps or stages is not necessarily sequential, but can be executed in turn or alternately with other steps or at least part of the sub-steps or stages of other steps.
[0070] In one embodiment, Figure 2 As shown, a mobile state monitoring device based on Manhattan distance is provided, comprising: a Manhattan distance determination module 202, a monitoring start module 204, a monitoring module 206 and a state determination module 208, wherein:
[0071] A Manhattan distance determination module 202 is used to obtain the starting position and the target point position of the agent in the map, and further determine the Manhattan distance corresponding to the starting position and the target point position;
[0072] A monitoring start module 204 is used to monitor the deadlock state of the intelligent agent and record the position information of the intelligent agent after each movement when the total number of steps moved by the intelligent agent from the starting position according to the preset step length exceeds the number of steps moved according to the Manhattan distance and the intelligent agent has not reached the target point;
[0073] The monitoring module 206 is used to set the pre-iteration number T according to the pre-set intelligent agent movement rule. When the number of movements of the intelligent agent from the beginning of the monitoring reaches the pre-iteration number T, the position of the intelligent agent at the current moment and the position before the T moment are obtained after each movement of the intelligent agent, and the distance between the current position and the previous position is further calculated; the intelligent agent movement rule stipulates that the intelligent agent takes the current position as the center of the circle and can only reach one of the T points on the circumference with the movement step length as the radius at the next moment; the T points are evenly distributed on the circumference;
[0074] The state determination module 208 is used to determine that the agent has entered a deadlock state if the distance between the current position and the previous position is less than a preset threshold.
[0075] The monitoring start module 204 is also used to obtain the Manhattan distance as a+b, wherein a and b are the distances between the starting position and the target point position in the horizontal and vertical directions, respectively; k Manhattan ;
[0076] Get the agent's step size as d;
[0077] According to the Manhattan distance and step size, the number of steps required for the agent to advance to the target point according to the Manhattan distance is determined as:
[0078]
[0079] According to the number of steps required for the agent to advance to the target point according to the Manhattan distance, the starting time for entering the agent deadlock state monitoring is determined as:
[0080]
[0081] in, The operator represents k Manhattan Round up.
[0082] The monitoring module 206 is also used to set the pre-iteration number T according to the preset agent movement rules;
[0083] When the number of moves of the agent from the beginning of monitoring reaches the pre-iteration number T, that is, at the current moment k>k test +T, obtain the current position and the position T moments before the current moment after each movement of the agent, and further calculate the distance between the current position and the previous position as:
[0084] dis T =|X(k)-X(kT)|
[0085] Among them, X(k) represents the position of agent k at the current moment, X(kT) represents the position of the agent T moments ago, and the || symbol indicates the straight-line distance between the two positions.
[0086] The state determination module 208 is also used to determine if the distance between the current position and the previous position satisfies:
[0087] dis T ≤n d ·d
[0088] The current state is determined to be a suspected deadlock state; where n d is the step size influencing factor, which indicates the strictness of the deadlock state judgment.
[0089] For the specific definition of the mobile state monitoring device based on Manhattan distance, please refer to the definition of the mobile state monitoring method based on Manhattan distance above, which will not be repeated here. Each module in the above-mentioned mobile state monitoring device based on Manhattan distance can be implemented in whole or in part by software, hardware and a combination thereof. The above-mentioned modules can be embedded in or independent of the processor in the computer device in the form of hardware, or can be stored in the memory of the computer device in the form of software, so that the processor can call and execute the operations corresponding to the above modules.
[0090] In one embodiment, a computer device is provided. The computer device may be a terminal, and its internal structure diagram may be as follows: Figure 3 As shown. The computer device includes a processor, a memory, a network interface, a display screen and an input device connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external terminal through a network connection. When the computer program is executed by the processor, a mobile state monitoring method based on Manhattan distance is implemented. The display screen of the computer device can be a liquid crystal display screen or an electronic ink display screen, and the input device of the computer device can be a touch layer covered on the display screen, or a key, trackball or touchpad set on the computer device housing, or an external keyboard, touchpad or mouse, etc.
[0091] Those skilled in the art will understand that Figure 3 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.
[0092] In one embodiment, a computer device is provided, including a memory and a processor, wherein the memory stores a computer program, and the processor implements the steps in the above method embodiment when executing the computer program.
[0093] In one embodiment, a computer-readable storage medium is provided, on which a computer program is stored. When the computer program is executed by a processor, the steps in the above method embodiment are implemented.
[0094] Those skilled in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Among them, any reference to memory, storage, database or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM) or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM is available in many forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), double data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link (Synchlink) DRAM (SLDRAM), memory bus (Rambus) direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and memory bus dynamic RAM (RDRAM).
[0095] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.
[0096] The above-mentioned embodiments only express several implementation methods of the present application, and the descriptions thereof are relatively specific and detailed, but they cannot be understood as limiting the scope of the invention patent. It should be pointed out that, for a person of ordinary skill in the art, several variations and improvements can be made without departing from the concept of the present application, and these all belong to the protection scope of the present application. Therefore, the protection scope of the patent of the present application shall be subject to the attached claims.
Claims
1. A mobile state monitoring method based on Manhattan distance, characterized in that: The method comprises: Obtaining a starting position and a target point position of the agent in the map, and further determining a Manhattan distance between the starting position and the target point position; When the total step length of the agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point, and the agent has not reached the target point, the agent is monitored for a deadlock state, and the position information of the agent after each movement is recorded; According to the pre-set agent movement rules, set the number of pre-iterations k test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle; If the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
2. The method according to claim 1, characterized in that: When the total distance moved by the agent from the starting position according to the preset step length exceeds the Manhattan distance and has not reached the target point, the agent is monitored for a deadlock state and the position information of the agent after each movement is recorded, including: The Manhattan distance is obtained as a+b, wherein a and b are the distances between the starting position and the target point position in the horizontal and vertical directions, respectively; Obtaining the step length of the agent as d; According to the Manhattan distance and the step length, the number of steps required for the agent to advance to the target point according to the Manhattan distance is determined as: According to the number of steps k required for the agent to advance to the target point according to the Manhattan distance Manhattan , determine the start time of entering the agent deadlock state monitoring as: in, The operator represents k Manhattan Round up.
3. The method according to claim 2, characterized in that According to the pre-set agent movement rules, set the number of pre-iterations k test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ,include: According to the pre-set agent movement rules, set the number of pre-iterations k test ; When the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , that is, at the current moment k>k test +T, obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance between the current position and the previous position as: dis T =|X(k)-X(k-T)| Wherein, X(k) represents the position of the agent at the current time k, X(kT) represents the position of the agent at the previous T time points, and the || symbol indicates the Euclidean distance between the two positions.
4. The method according to claim 3, characterized in that If the distance between the current position and the previous position is T When the value is less than a preset threshold, it is determined that the agent enters a deadlock state, including: If the distance between the current position and the previous position satisfies: say T ≤n d ·d The current state is determined to be a suspected deadlock state; where n d is the step size influencing factor, which indicates the strictness of the deadlock state judgment.
5. A mobile state monitoring device based on Manhattan distance, characterized in that: The device comprises: A Manhattan distance determination module, used to obtain the starting position and the target point position of the agent in the map, and further determine the Manhattan distance between the starting position and the target point position; A monitoring start module, configured to monitor the deadlock state of the intelligent agent and record the position information of the intelligent agent after each movement when the total step length of the intelligent agent moving from the starting position according to the preset step length exceeds the Manhattan distance between the original starting point and the target point and the intelligent agent has not reached the target point; The monitoring module is used to set the number of pre-iterations k according to the pre-set agent movement rules test , when the number of moves of the agent from the start of monitoring reaches the pre-iteration number k test , obtain the current position X(k) and the position X(kT) of the agent at the previous T time after each movement, and further calculate the distance dis between the current position and the previous position T ; The movement rule of the agent stipulates that the agent can only reach one of the T equally divided points on the circumference with the movement step length as the radius at the next moment with the current position as the center of the circle; A state determination module is used to determine if the distance between the current position and the previous position is T When it is less than a preset threshold, it is determined that the agent enters a deadlock state.
6. The device according to claim 5, characterized in that The monitoring startup module is also used for: Get the Manhattan distance as dis Manhattan =a+b; wherein a and b are the distances between the starting position and the target point position in the horizontal and vertical directions respectively; Obtaining the step length of the agent as d; According to the Manhattan distance and the step length, the number of steps required for the agent to advance to the target point according to the Manhattan distance is determined as: According to the number of steps required for the agent to advance to the target point according to the Manhattan distance, the start time of entering the agent deadlock state monitoring is determined as: in, The operator represents k Manhattan Round up.
7. A computer device comprising a memory and a processor, wherein the memory stores a computer program, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 4 are implemented.
8. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 4 are implemented.
