A pursuit and escape game control method, device and medium for unmanned boat swarm

By calculating the speed and obstacle area of ​​the unmanned boat cluster, a reward function is constructed to obtain the final strategy, which solves the problem of poor control stability in the pursuit and escape game of the unmanned boat cluster, improves the robustness and adaptability of the control, and adapts to complex environments.

CN118363386BActive Publication Date: 2024-09-17CENT SOUTH UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410780722.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-06-18
Publication Date
2024-09-17
Estimated Expiration
2044-06-18

AI Technical Summary

Technical Problem

Unmanned boat swarms have problems with poor control stability and robustness in pursuit and escape game control. Existing methods mostly rely on centralized control strategies, which easily introduce single points of failure and fail to effectively consider sensing range limitations and environmental interference.

Method used

By obtaining the current speed of the pursuing unmanned boat and the distance between the avoiding unmanned boat, calculating the moving speed and orbiting speed, generating a speed obstacle area, constructing a reward function to evaluate the pursuit effect, and finally obtaining and applying the final pursuit strategy for control, considering Single and collective information reflects obstacle information within the sensing range and improves the rationality of the strategy.

Benefits of technology

It improves the control stability and robustness of the unmanned boat swarm pursuit and escape game, enhances the accuracy and adaptability of the pursuit strategy, avoids single points of failure, and adapts to the perception range and obstacle interference in complex environments.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118363386B
    Figure CN118363386B
Patent Text Reader

Abstract

The present application relates to the field of unmanned boat control technology, and provides a method, device and medium for controlling the pursuit and escape game of an unmanned boat cluster, the method comprising: obtaining the current speed of the pursuit unmanned boat and the current distance between the pursuit unmanned boat and the evading unmanned boat; obtaining the moving speed and the circling speed of the pursuit unmanned boat; obtaining the expected speed based on the moving speed and the circling speed; generating the speed obstacle area between the pursuit unmanned boat and each obstacle based on the current speed and the current speed of each obstacle; obtaining the current local observation results based on all speed obstacle areas; constructing a reward function based on the current speed, the expected speed and all corresponding speed obstacle areas; adding the current local observation results to the global state, and obtaining the final pursuit strategy based on the reward function and the global state; and controlling the pursuit unmanned boat according to the final pursuit strategy. The method of the present application can improve the control stability and robustness of the pursuit and escape game of the unmanned boat cluster.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of unmanned boat control technology, and in particular to a pursuit-escape game control method, device and medium for an unmanned boat cluster. Background Art

[0002] With the rapid advancement of science and technology, swarms of unmanned surface vessels have become a revolutionary tool in the marine field, greatly arousing the interest of researchers in its wide application prospects. Swarms of unmanned surface vessels have remarkable versatility. With the exploration of the ocean and the development of unmanned systems, unmanned surface vessels (USVs) have become an important carrier for tasks such as water exploration, collaborative operations, and maritime rescue. Therefore, the chase-escape problem of unmanned surface vessels, as a typical case of collaborative capture tasks, has become a hot topic in USV technology research. Multiagent chase-escape (MPE) is a competitive model involving two groups of participants: chasing unmanned vessels and avoiding unmanned vessels. This model is often used to describe a dynamic situation. The goal of the chasing unmanned vessel is to find and capture the evading unmanned vessel as soon as possible, while the evading unmanned vessel tries to keep a sufficient distance to avoid being captured by the chasing unmanned vessel.

[0003] When multiple unmanned boats are simultaneously performing the task of chasing moving targets in the water, it is necessary to ensure that they can effectively distribute the pursuit tasks, which means that an efficient collaborative pursuit strategy is needed. With the development of USV cluster technology, many control methods have been born for the USV cluster pursuit game control problem, including rule-based methods: rule-based methods use a set of predefined rules and strategies to guide the behavior of the pursuit unmanned boat. For example, the pursuit rules can be defined to require the pursuit unmanned boat to change its course or speed accordingly when encountering the target to achieve pursuit. Model Predictive Control (MPC): A control method based on a mathematical model that can be used for the pursuit behavior of unmanned boat clusters. By predicting the trajectory of the pursuit unmanned boat in the future, the MPC algorithm can select the optimal control strategy to achieve pursuit. This method performs well in complex environments, but has high requirements for system dynamic modeling. Deep Reinforcement Learning (DRL): A control method that relies on the actual system model, can adaptively learn control strategies from dynamic environments, and has strong adaptability.

[0004] Most of the above methods adopt centralized control strategies, which usually show a high dependence on the central control unit, thus introducing a single point of failure (SPoF) vulnerability. In addition, centralized control algorithms also face high computational and communication overheads. In some studies, distributed capture control algorithms were introduced to address this vulnerability, such as a distributed capture algorithm based on the distance between adjacent unmanned boats, which was trained using a double-delayed deep deterministic policy gradient and successfully applied to virtual reality scenarios. However, most of the above methods are based on particle systems and do not consider the limitations of the real world, such as the limitations of the perception range, the dynamic characteristics under under-actuation, and the random obstacles and interference in the environment. It can be seen that there are problems with the poor control stability and robustness of the pursuit-escape game of unmanned boat clusters. Summary of the invention

[0005] The present application provides a pursuit-and-escape game control method, device and medium for an unmanned boat swarm, which can solve the problem of poor control stability and robustness of the pursuit-and-escape game of an unmanned boat swarm.

[0006] In a first aspect, an embodiment of the present application provides a pursuit-escape game control method for an unmanned boat cluster, the pursuit-escape game control method comprising:

[0007] For each unmanned boat in the pursuit game, perform the following steps:

[0008] Obtain the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the avoiding unmanned boat;

[0009] According to the current distance between the evading unmanned boat and the pursuing unmanned boat, the moving speed of the pursuing unmanned boat toward the evading unmanned boat is obtained, and according to the normal speed of the pursuing unmanned boat from the pursuing unmanned boat to the evading unmanned boat, the circumferential speed of the pursuing unmanned boat is obtained;

[0010] Obtaining the expected speed of the pursuit unmanned boat based on the moving speed and the circling speed;

[0011] According to the current speed of the pursuit unmanned boat and the current speed of each obstacle, a speed obstacle area between the pursuit unmanned boat and each obstacle is generated; the obstacle is located within the current perception range of the pursuit unmanned boat, and the obstacle is other pursuit unmanned boats or static obstacles in the pursuit and escape game project;

[0012] Based on all speed obstacle areas corresponding to the pursuit unmanned boat, the current local observation results of the pursuit unmanned boat are obtained; the current local observation results are used to describe the information of all obstacles within the current perception range of the pursuit unmanned boat;

[0013] Based on the current speed, expected speed, and all corresponding speed obstacle areas of the unmanned boat being pursued, a reward function for evaluating the pursuit effect of the unmanned boat being pursued is constructed;

[0014] The current local observation result is added to the global state, and the final pursuit strategy for the pursuit unmanned boat is obtained according to the reward function and the global state; the global state is used to describe the current environmental information of the environment in which the pursuit unmanned boat is located, the pursuit action in the final pursuit strategy is used to describe the speed change of the pursuit unmanned boat, and the pursuit state in the final pursuit strategy is used to describe the current speed of the pursuit unmanned boat;

[0015] Control the pursuit unmanned boat according to the final pursuit strategy.

[0016] In a second aspect, an embodiment of the present application provides a pursuit-escape game control device for an unmanned boat cluster, comprising:

[0017] The first acquisition module acquires the current speed of the pursuing unmanned boat and the current distance between the unmanned boat and the evading unmanned boat;

[0018] The second acquisition module acquires the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat, and acquires the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat;

[0019] An expected speed acquisition module is used to acquire the expected speed of the pursuit unmanned boat based on the moving speed and the circling speed;

[0020] A generation module generates a speed obstacle area between the pursuit unmanned boat and each obstacle according to the current speed of the pursuit unmanned boat and the current speed of each obstacle; the obstacle is located within the current perception range of the pursuit unmanned boat, and the obstacle is other pursuit unmanned boats or static obstacles in the pursuit and escape game project;

[0021] The third acquisition module acquires the current local observation results of the pursuit unmanned boat based on all speed obstacle areas corresponding to the pursuit unmanned boat; the current local observation results are used to describe the information of all obstacles within the current perception range of the pursuit unmanned boat;

[0022] A construction module is used to construct a reward function for evaluating the pursuit effect of the unmanned boat based on the current speed, expected speed, and all corresponding speed obstacle areas of the unmanned boat;

[0023] Add a module to add the current local observation result to the global state, and obtain the final pursuit strategy for the pursuit of the unmanned boat according to the reward function and the global state; the global state is used to describe the current environmental information of the environment in which the pursuit of the unmanned boat is located, the pursuit action in the final pursuit strategy is used to describe the speed change of the pursuit of the unmanned boat, and the pursuit state in the final pursuit strategy is used to describe the current speed of the pursuit of the unmanned boat;

[0024] A control module controls the pursuit unmanned boat according to the final pursuit strategy.

[0025] In a third aspect, an embodiment of the present application provides a terminal device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the above-mentioned pursuit and escape game control method of the unmanned boat cluster when executing the above-mentioned computer program.

[0026] In a fourth aspect, an embodiment of the present application provides a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the above-mentioned pursuit and escape game control method of the unmanned boat cluster.

[0027] The above solution of the present application has the following beneficial effects:

[0028] In an embodiment of the present application, by obtaining the current speed of the pursuit unmanned boat and the current distance between the pursuit unmanned boat and the evading unmanned boat, then according to the current distance between the evading unmanned boat and the pursuit unmanned boat, the moving speed of the pursuit unmanned boat toward the evading unmanned boat is obtained, and according to the normal speed of the pursuit unmanned boat in the direction from the pursuit unmanned boat to the evading unmanned boat, the circumferential speed of the pursuit unmanned boat is obtained, and then based on the moving speed and the circumferential speed, the expected speed of the pursuit unmanned boat is obtained, and then according to the current speed of the pursuit unmanned boat and the current speed of each obstacle, the speed obstacle area between the pursuit unmanned boat and each obstacle is generated, and then based on all speed obstacle areas corresponding to the pursuit unmanned boat, the current local observation result of the pursuit unmanned boat is obtained, and then based on the current speed of the pursuit unmanned boat, the expected speed, and all corresponding speed obstacle areas, a reward function for evaluating the pursuit effect of the pursuit unmanned boat is constructed, and then the current local observation result is added to the global state, and the final pursuit strategy of the pursuit unmanned boat is obtained according to the reward function and the global state, and finally the pursuit unmanned boat is controlled according to the final pursuit strategy. Among them, the expected speed is obtained based on the moving speed and the circling speed, and the individual information and collective information of the pursuing unmanned boat are taken into account, so that the accuracy of the expected speed is improved. At the same time, the current local observation results obtained according to the speed obstacle area can well reflect the information of obstacles within the perception range of the pursuing unmanned boat, considering the limitations of the perception range and the interference of obstacles, which is practical. The reward function constructed based on the current speed, the highly accurate expected speed, and all the corresponding speed obstacle areas can more comprehensively and accurately evaluate the pursuit effect of the pursuing unmanned boat. The rationality of the final pursuit strategy obtained based on the practical current local observation results and the comprehensive and accurate reward function is improved, thereby improving the control stability and robustness of the pursuit and escape game of the unmanned boat cluster.

[0029] Other beneficial effects of the present application will be described in detail in the subsequent specific implementation section. BRIEF DESCRIPTION OF THE DRAWINGS

[0030] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.

[0031] Figure 1 A flowchart of a pursuit-escape game control method for a swarm of unmanned boats provided in one embodiment of the present application;

[0032] Figure 2 A schematic diagram of an unmanned boat provided in an embodiment of the present application;

[0033] Figure 3A schematic diagram of an expected capture scenario provided by an embodiment of the present application;

[0034] Figure 4 A schematic diagram of a curve showing the position change of an unmanned boat provided in an embodiment of the present application;

[0035] Figure 5 A schematic diagram of a curve showing the speed change of an unmanned boat provided in an embodiment of the present application;

[0036] Figure 6 A schematic diagram of a cumulative reward comparison curve provided in an embodiment of the present application;

[0037] Figure 7 A schematic diagram of a capture success rate comparison curve provided in an embodiment of the present application;

[0038] Figure 8 A schematic diagram of the structure of a pursuit-escape game control device for an unmanned boat swarm provided in one embodiment of the present application;

[0039] Fig. 9 A schematic diagram of the structure of a terminal device provided in one embodiment of the present application. DETAILED DESCRIPTION

[0040] In the following description, specific details such as specific system structures, technologies, etc. are provided for the purpose of illustration rather than limitation, so as to provide a thorough understanding of the embodiments of the present application. However, it should be clear to those skilled in the art that the present application may also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to prevent unnecessary details from obstructing the description of the present application.

[0041] It should be understood that when used in the present specification and the appended claims, the term "comprising" indicates the presence of described features, wholes, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, wholes, steps, operations, elements, components and / or combinations thereof.

[0042] It should also be understood that the term “and / or” used in the specification and appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes these combinations.

[0043] In addition, in the description of the present application specification and the appended claims, the terms "first", "second", "third", etc. are only used to distinguish the descriptions and cannot be understood as indicating or implying relative importance.

[0044] References to "one embodiment" or "some embodiments" etc. described in the specification of this application mean that one or more embodiments of the present application include specific features, structures or characteristics described in conjunction with the embodiment. Therefore, the statements "in one embodiment", "in some embodiments", "in some other embodiments", "in some other embodiments", etc. that appear in different places in this specification do not necessarily refer to the same embodiment, but mean "one or more but not all embodiments", unless otherwise specifically emphasized in other ways. The terms "including", "comprising", "having" and their variations all mean "including but not limited to", unless otherwise specifically emphasized in other ways.

[0045] In response to the problems of poor control stability and robustness of the existing pursuit-escape game of unmanned boat clusters, an embodiment of the present application provides a pursuit-escape game control method for an unmanned boat cluster. The pursuit-escape game control method obtains the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the evading unmanned boat, and then obtains the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat, and obtains the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat, and then obtains the expected speed of the pursuing unmanned boat based on the moving speed and the circumferential speed. The desired speed is calculated, and then the speed obstacle area between the pursuit unmanned boat and each obstacle is generated according to the current speed of the pursuit unmanned boat and the current speed of each obstacle. Then, based on all the speed obstacle areas corresponding to the pursuit unmanned boat, the current local observation result of the pursuit unmanned boat is obtained. Then, based on the current speed, the expected speed and all the corresponding speed obstacle areas of the pursuit unmanned boat, a reward function for evaluating the pursuit effect of the pursuit unmanned boat is constructed. Then, the current local observation result is added to the global state. According to the reward function and the global state, the final pursuit strategy of the pursuit unmanned boat is obtained. Finally, the pursuit unmanned boat is controlled according to the final pursuit strategy. Among them, the expected speed is obtained based on the moving speed and the circling speed, and the individual information and collective information of the pursuing unmanned boat are taken into account, so that the accuracy of the expected speed is improved. At the same time, the current local observation results obtained according to the speed obstacle area can well reflect the information of obstacles within the perception range of the pursuing unmanned boat, considering the limitations of the perception range and the interference of obstacles, which is practical. The reward function constructed based on the current speed, the highly accurate expected speed, and all the corresponding speed obstacle areas can more comprehensively and accurately evaluate the pursuit effect of the pursuing unmanned boat. The rationality of the final pursuit strategy obtained based on the practical current local observation results and the comprehensive and accurate reward function is improved, thereby improving the control stability and robustness of the unmanned boat cluster.

[0046] Next, an exemplary description is given of the pursuit and escape game control method of the unmanned boat cluster provided in this application.

[0047] like Figure 1 As shown, the pursuit and escape game control method of the unmanned boat cluster provided in this application includes the following steps:

[0048] For each unmanned boat in the pursuit game, perform the following steps:

[0049] Step 11, obtaining the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the avoiding unmanned boat.

[0050] In some embodiments of the present application, a speed acquisition device such as a speed sensor can be used to obtain the current speed of the pursuing unmanned boat, and a distance acquisition device such as a laser distance sensor can be used to obtain the current distance between the pursuing unmanned boat and the avoiding unmanned boat.

[0051] It should be noted that in the pursuit and escape game, there are usually multiple pursuit unmanned boats and one evasion unmanned boat. The expected capture scenario of the pursuit and escape game is: all pursuit unmanned boats approach the evasion unmanned boat and form an ideal encirclement around the evasion unmanned boat without collision. That is, the distance between the pursuit unmanned boat and the evasion unmanned boat should be approximately equal to the encirclement radius, and the distance between every two pursuit unmanned boats should be approximately equal to the safety distance. In order to prevent the evasion unmanned boat from escaping from the gap between the pursuit unmanned boats, the final angular velocity of the pursuit unmanned boat is Should meet:

[0052]

[0053] in, It represents the horizontal coordinate of the unmanned boat in the world coordinate system. It represents the angle of the pursuing unmanned boat relative to the evading unmanned boat, Indicates the current moment, Indicates the control period.

[0054] For example, in order to facilitate intuitive observation of the state of chasing and avoiding unmanned boats, the physical properties of the unmanned boats, such as the position and yaw angle, can be obtained, and a dynamic model can be constructed for each unmanned boat:

[0055]

[0056]

[0057] in, express The first derivative of express The first derivative of represents the state vector of the unmanned boat, , It represents the horizontal coordinate of the unmanned boat in the world coordinate system. It represents the vertical coordinate of the unmanned boat in the world coordinate system. represents the yaw angle of the unmanned boat, represents the velocity vector of the unmanned boat, , express, represents the linear velocity of the unmanned boat in the hull coordinate system, represents the turning angular velocity of the unmanned boat in the hull coordinate system, represents the moment of inertia matrix of the unmanned boat, represents the three-axis torque of the unmanned boat, , express, express, express, represents the unmodeled part, Represents the transformation matrix from the hull coordinate system to the world coordinate system:

[0058]

[0059] The motion state of each unmanned boat can be expressed as:

[0060]

[0061]

[0062] in, Indicates the position of the unmanned boat. represents the speed of the unmanned boat, Indicates the current moment, represents the control cycle, represents a hyperparameter that adjusts the speed gain.

[0063] It is worth mentioning that by obtaining the physical properties of the pursuit unmanned boat, the motion state of the pursuit unmanned boat can be described. At the same time, building a dynamic model of each unmanned boat can facilitate the observation and description of the state of the unmanned boat when executing the pursuit and escape game project.

[0064] The above unmanned boat is exemplarily described below with reference to a specific example.

[0065] like Figure 2 As shown in the figure, The coordinates of the origin are the world coordinate system, with The coordinates of the origin are the hull coordinate system of the unmanned boat, and the horizontal axis of the hull coordinate system is The angle with the vertical axis of the world coordinate system is the yaw angle of the unmanned boat, and Indicates the power device of the unmanned boat. Indicates the current speed of the unmanned boat. Indicates that the unmanned boat is The velocity component in the direction, Indicates that the unmanned boat is The velocity component in the direction, It represents the steering angular velocity of the unmanned boat in the hull coordinate system.

[0066] Depend on Figure 2 The unmanned boat shown in the figure is used for the game pursuit project, and the expected capture scenario is as follows Figure 3 As shown, Figure 2 China-Israel The coordinates of the origin are the world coordinate system, Indicates the first unmanned boat to be pursued. Indicates the second unmanned boat that is chasing after the enemy. Indicates the third unmanned boat in pursuit. It means the fourth unmanned boat is being pursued. It means avoiding unmanned boats. represents the radius of the encirclement, It represents the safe distance, the dotted circle represents the encirclement of the pursuing unmanned boat, the dotted straight line represents the distance between the evading unmanned boat and the pursuing unmanned boat, and the solid line represents the distance between the pursuing unmanned boats.

[0067] Step 12, according to the current distance between the evading unmanned boat and the pursuing unmanned boat, obtain the moving speed of the pursuing unmanned boat toward the evading unmanned boat, and according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat, obtain the circumferential speed of the pursuing unmanned boat.

[0068] In some embodiments of the present application, the steps of obtaining the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat, and obtaining the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat are specifically as follows:

[0069] The first step is to obtain the moving speed of the pursuing unmanned boat towards the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat.

[0070] Specifically, through the formula:

[0071]

[0072] Calculate the The speed at which a chasing unmanned boat moves toward an evading unmanned boat .

[0073] in, Indicates The initial speed of the hunting unmanned boat, , Indicates the number of unmanned boats being pursued, Indicates the current moving speed coefficient, Indicates The current distance between the pursuing unmanned boat and the evading unmanned boat, Indicates the radius of the encirclement of all the unmanned boats. Indicates The maximum speed change rate allowed for a hunting unmanned boat is: represents adjustable gain, Represents the velocity decay function:

[0074]

[0075] It should be noted that after the pursuit unmanned boat obtains the position of the evading unmanned boat, its control task is to reach a radius of The moving speed decreases as the distance from the evading unmanned boat decreases.

[0076] The second step is to obtain the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the avoiding unmanned boat.

[0077] Specifically, through the formula:

[0078]

[0079] Calculate the The circumferential speed of the hunting drone boat .

[0080] in, Indicates the degree of encirclement, Indicates A hunting unmanned boat from The normal velocity of a pursuing unmanned boat in the direction of the evading unmanned boat.

[0081] It should be noted that when all the pursuing unmanned boats form an encirclement, it is necessary to rotate around the evading unmanned boat at a fixed circling speed to improve the encirclement effect.

[0082] For example, the moving speed and the circling speed of the hunting unmanned boat can be obtained by calculation using computer software such as Mathematic and Matlab.

[0083] It is worth mentioning that by obtaining the moving speed and circling speed of the pursuing unmanned boat, the speed of the pursuing unmanned boat when chasing and surrounding the evading unmanned boat can be described respectively, which is convenient for analyzing these two aspects of information in subsequent calculations.

[0084] Step 13, obtaining the expected speed of the pursuit unmanned boat based on the moving speed and the circling speed.

[0085] Specifically, through the formula:

[0086]

[0087] Calculate the Expected speed of a hunting drone boat .

[0088] in, Indicates The speed at which a pursuing unmanned boat moves toward an evading unmanned boat, Indicates The circling speed of the hunting drone boat, , Indicates the number of unmanned boats being pursued.

[0089] For example, the above formula can be run using computer software such as Mathematic and Matlab to obtain the expected speed for chasing the unmanned boat.

[0090] It is worth mentioning that the expected speed is obtained based on the moving speed and the circling speed, taking into account the individual information and collective information of the pursuing unmanned boat, so that the accuracy of the expected speed is improved.

[0091] Step 14, generating a speed obstacle area between the pursuing unmanned boat and each obstacle according to the current speed of the pursuing unmanned boat and the current speed of each obstacle.

[0092] The above obstacles are within the current perception range of the pursuit unmanned boat. The obstacles are other pursuit unmanned boats or static obstacles in the pursuit and escape game. The perception range is the working range of the laser radar and other sensing devices of the pursuit unmanned boat.

[0093] Specifically, through the formula:

[0094]

[0095] Get the The first one to pursue the unmanned boat and the Speed ​​barrier area between obstacles ;

[0096] in, Indicates speed barrier area The vertex of , Indicates speed barrier area The left border of , Indicates the speed obstacle area on the speed plane The horizontal coordinate of the left border, Indicates the speed obstacle area on the speed plane The ordinate of the left border, Indicates speed barrier area The right boundary of , Indicates the speed obstacle area on the speed plane The horizontal coordinate of the right boundary of Indicates the speed obstacle area on the speed plane The ordinate of the right boundary, Indicates The current speed of the hunting drone boat, Indicates The current speed of the obstacle, when the When the obstacle is a static obstacle, , , Indicates the number of unmanned boats being pursued, , Indicates the current moment The number of obstacles within the sensing range of the hunting unmanned boat, , Indicates the current moment The number of other unmanned boats in the sensing range of the unmanned boat. Indicates the current moment The number of static obstacles within the sensing range of the hunting unmanned boat, Indicates The current location of the hunting drone boat, represents the Minkowski sum, Indicates that from The current position of the hunting unmanned boat is along Direction of rays.

[0097] It should be noted that the speed barrier area represents the set of speeds that may cause collision within a certain period of time. The pursuit unmanned boat is encouraged to choose a speed outside the speed barrier area to avoid collision. Based on this, the speed barrier area can be expressed as .

[0098] For example, the speed obstacle area between the pursuit unmanned boat and the obstacle can be obtained by using computer software such as Mathematic and Matlab.

[0099] It is worth mentioning that by obtaining the speed obstacle area, the collision risk of the pursuing unmanned boat can be described, which facilitates the obstacle avoidance control of the pursuing unmanned boat.

[0100] Step 15, based on all speed obstacle areas corresponding to the pursuit unmanned boat, obtain the current local observation results of the pursuit unmanned boat.

[0101] The above current local observation results are used to describe the information of all obstacles within the current perception range of the pursuit unmanned boat.

[0102] Specifically, the current local observation results are:

[0103]

[0104] in, Indicates Current local observation results of the hunting unmanned boat, Indicates The state of the hunting unmanned boat itself, Indicates The current local observation value of the first other unmanned boat for the first unmanned boat, Indicates A pursuit of unmanned boats Current local observations of other unmanned boats in pursuit, Indicates The current local observation value of the first static obstacle by the unmanned pursuit boat, Indicates A pursuit of unmanned boats Current local observations of static obstacles:

[0105]

[0106]

[0107]

[0108]

[0109]

[0110] in, Indicates The current speed of the hunting drone boat, Indicates The expected speed of the hunting drone boat, Indicates The current yaw angle of the hunting drone boat, Indicates The collision radius of the hunting unmanned boat, Indicates The speed barrier area between the first unmanned boat and the first other unmanned boat, Indicates The distance between the first unmanned boat and the first other unmanned boat, Indicates The predicted collision time between the first pursuing unmanned boat and the first other pursuing unmanned boat, Indicates The first one to pursue the unmanned boat and the speed barrier area between other pursuit drone boats, Indicates The first one to pursue the unmanned boat and the The distance between the other hunting drones, Indicates The first one to pursue the unmanned boat and the The predicted collision time between the other hunting drones is Indicates The speed obstacle area between the first pursuit drone and the first static obstacle, Indicates The distance between the pursuit unmanned boat and the first static obstacle, Indicates The predicted collision time between the pursuit unmanned boat and the first static obstacle, Indicates The first one to pursue the unmanned boat and the The speed barrier area between the static obstacles, Indicates The first one to pursue the unmanned boat and the The distance between static obstacles, Indicates The first one to pursue the unmanned boat and the The predicted collision time between two static obstacles.

[0111] For example, the current local observation results can be obtained using computer software such as Mathematic and Matlab.

[0112] It is worth mentioning that the current local observation results obtained based on the speed obstacle area can well reflect the information of obstacles within the perception range of the pursuit unmanned boat, taking into account the limitations of the perception range and the interference of obstacles, and is practical.

[0113] Step 16, based on the current speed of the unmanned boat, the expected speed, and all corresponding speed obstacle areas, a reward function for evaluating the pursuit effect of the unmanned boat is constructed.

[0114] Specifically, the reward function is:

[0115]

[0116] in, Indicates The reward function value corresponding to the pursuit of unmanned boats is: represents the obstacle avoidance reward, represents delayed reward, Indicates the encirclement reward:

[0117]

[0118]

[0119] in, , , , , and All are parameters. Indicates The current speed of the hunting drone boat, Indicates The expected speed of the hunting drone boat, Indicates the safe obstacle avoidance time. Indicates The time when the unmanned boats collided. Indicates The unit vector of the pursuing UAV pointing to the evading UAV, Indicates The unit vector of the pursuing UAV pointing to the evading UAV, Indicates the number of unmanned boats being pursued, Indicates All speed obstacle areas corresponding to the pursuit unmanned boat.

[0120] It should be noted that you can use Determine whether the current speed is in the speed obstacle area:

[0121]

[0122]

[0123] The obstacle avoidance reward is used to encourage the pursuing unmanned boat to choose a speed outside the speed obstacle area to avoid collision. The delay reward is used to provide a negative reward after a collision occurs. The encirclement reward is used to describe the effect of the encirclement.

[0124] For example, the reward function can be constructed using computer software such as Matlab.

[0125] It is worth mentioning that by integrating obstacle avoidance rewards and delay rewards, the pursuit of unmanned boats can consider both current tasks and long-term goals, which helps to obtain a capture strategy with excellent performance. The reward function constructed based on obstacle avoidance rewards, delay rewards, and encirclement rewards can more comprehensively and accurately evaluate the pursuit effect of the unmanned boat.

[0126] Step 17, add the current local observation results to the global state, and obtain the final pursuit strategy for the unmanned boat based on the reward function and the global state.

[0127] The above-mentioned global state is used to describe the current environmental information of the environment in which the pursuit unmanned boat is located. The pursuit action in the final pursuit strategy is used to describe the speed change of the pursuit unmanned boat. The pursuit state in the final pursuit strategy is used to describe the current speed of the pursuit unmanned boat. The above-mentioned current environmental information is the information of all unmanned boats and obstacles in the environment at the current moment.

[0128] In some embodiments of the present application, the above steps of adding the current local observation results to the global state and obtaining the final pursuit strategy for pursuing the unmanned boat according to the reward function and the global state are specifically as follows:

[0129] The first step is to extract features of the current local observation results of the pursuit unmanned boat to obtain the current local observation features of the pursuit unmanned boat.

[0130] It should be noted that since the number of obstacles within the perception range of the pursuit unmanned boat is uncertain, there is a situation where the length of the current local observation result is not fixed, so the current local observation result needs to be converted into a current local observation feature with a fixed length.

[0131] In some embodiments of the present application, a bidirectional gated recurrent unit (BiGRU) feature network may be used to extract features of the current local observation results to obtain current local observation features of a fixed length.

[0132] The second step is to add the current local observation features to the global state.

[0133] The third step is to train the policy network based on the reward function and the global state.

[0134] Specifically, initialize the policy network, value network and experience replay pool, and set the training cycle to 1.

[0135] Determine whether the training period reaches the preset period.

[0136] If the training cycle reaches the preset cycle, the policy network is used as the trained policy network.

[0137] If the training cycle does not reach the preset cycle, the current speed of the pursuing unmanned boat will be used as the pursuit state.

[0138] Substitute the pursuit state into the reward function, obtain the reward function value corresponding to the pursuit state, and determine whether the reward function value is greater than the reward threshold.

[0139] If the reward function value is greater than the reward threshold, then based on the global state, the policy network outputs multiple pursuit actions corresponding to the current state, that is, the action set that satisfies the normal probability distribution, and determines the simulated pursuit action from all pursuit actions according to the normal probability distribution.

[0140] If the reward function value is less than or equal to the reward threshold, a pursuit action at the current moment is randomly generated, and the randomly generated pursuit action is used as a simulated pursuit action.

[0141] According to the simulated pursuit action, the pursuit unmanned boat at the current moment is simulated and controlled to obtain the simulation state of the next moment of the current moment, collect the current state, all pursuit actions and reward function values ​​into the experience replay pool, and judge whether the experience replay pool reaches the preset capacity.

[0142] If the experience replay pool has reached the preset capacity, the policy network parameters are optimized, and the policy network after parameter optimization is used as the policy network, and the capacity of the experience replay pool is initialized.

[0143] If the experience replay pool does not reach the preset capacity, the policy network parameters will not be optimized for the time being.

[0144] Determine whether a collision occurs with the pursuing unmanned boat, or whether the next moment after the current moment is a preset moment.

[0145] If the simulation result of chasing the unmanned boat collides, or the next moment of the current moment is the preset moment, the training cycle is increased by 1, and the step of determining whether the training cycle reaches the preset cycle is returned.

[0146] If the simulation result of chasing the unmanned boat does not collide, and the next moment after the current moment is not the preset moment, then the next moment after the current moment is taken as the current moment, the simulation state is taken as the chasing state, and the chasing state is substituted into the reward function to obtain the reward function value corresponding to the chasing state.

[0147] In some embodiments of the present application, the above-mentioned policy network is a policy network in the Multi-Agent Proximal Policy Optimization (MAPPO) algorithm. The above-mentioned normal probability distribution is ,in Indicates that for The probability distribution of all pursuit actions output by the pursuit unmanned boat strategy network, express The mean of this normal probability distribution is express The standard deviation of this normal probability distribution. The above process of optimizing the parameters of the policy network is specifically as follows: calculating the update gradient of the policy network and the value network in the multi-agent proximal policy optimization algorithm, which is the update gradient in the multi-agent proximal policy optimization algorithm, and updating the parameters of the policy network and the value network according to the update gradient. The value network is used to evaluate and predict the expected return and advantage estimation of the reward function from the current state to the end of a training, and is used to improve and optimize the strategy to achieve better hunting results.

[0148] It should be noted that the objective function of the above strategy network can be defined as:

[0149]

[0150]

[0151]

[0152] in, represents the objective function value, Indicates the length of the batch data, Indicates the number of unmanned boats being pursued, represents the advantage function, represents the importance sampling weight, represents the threshold function, Indicates The first to hunt down an unmanned boat The pursuit action in the data, Indicates The first to hunt down an unmanned boat The global state in the data, Represents the parameters and introduces the threshold function to prevent excessive updating of the policy network to improve the stability of the training process.

[0153] The role of the policy network in the multi-agent proximal policy optimization algorithm is to guide the agent on how to choose actions based on the current state to maximize long-term rewards.

[0154] The value function plays an important role in evaluating the value of a state or state-action pair in multi-agent proximal policy optimization algorithms. It is used to estimate the expected future reward of the agent in a given state. The accuracy of the value function directly affects the update of the policy network and the learning effect of the agent. By accurately estimating the state value, the value function can help the agent better understand the environment and make better decisions.

[0155] The fourth step is to use the trained strategy network to obtain the final pursuit strategy for the unmanned boat.

[0156] Specifically, the current speed of the pursuing unmanned boat is input into the trained strategy network as the pursuit state to obtain the final pursuit strategy.

[0157] Exemplarily, the above steps can be run using computer software such as Pytorch to obtain the final pursuit strategy for the unmanned boat.

[0158] It should be noted that the above-mentioned preset moment is a moment in the future of the current moment, such as the current moment is the 5th moment, and the preset moment is the 1000th moment. The above-mentioned training process can be expressed as follows: when the training cycle has not reached the preset cycle and the capacity in the experience replay pool has not reached the preset capacity, the policy network and simulation control are used to generate the pursuit state and pursuit action of the pursuit unmanned boat at multiple moments, and all pursuit states, pursuit actions, and corresponding reward function values ​​are continuously collected into the experience replay pool. When the capacity of the experience replay pool reaches the preset capacity, the policy network is parameter updated, and the capacity of the experience replay pool is initialized, so that the capacity of the experience replay pool is recounted. If the simulation result of the pursuit of the unmanned boat does not collide at this time and the preset moment has not been reached, the policy network after the parameter update is used to continue to generate the pursuit action at the next moment. If the simulation result of the pursuit of the unmanned boat collides or reaches the preset moment, the training cycle is increased by 1 until the training cycle reaches the preset cycle.

[0159] It is worth mentioning that the rationality of the final pursuit strategy obtained based on the practical current local observation results and the comprehensive and accurate reward function is improved, thereby improving the control stability of the pursuit and escape game of the unmanned boat cluster.

[0160] Step 18, controlling the pursuit unmanned boat according to the final pursuit strategy.

[0161] In some embodiments of the present application, the pursuit unmanned boat can be controlled by controlling the speed control system, speed control equipment, etc. of the pursuit unmanned boat.

[0162] For example, the final pursuit strategy describes the pursuit action at a certain moment as a speed change rate of 3 km / h per second, and a speed direction of 30° east-southeast. The speed control system of the pursuit unmanned boat controls the speed change rate of the pursuit unmanned boat to increase by 3 km / h per second, and adjusts the direction to 30° east-southeast.

[0163] It is worth mentioning that the expected speed is obtained based on the moving speed and the circling speed, and the individual information and collective information of the pursuing unmanned boat are taken into account, so that the accuracy of the expected speed is improved. At the same time, the current local observation results obtained according to the speed obstacle area can well reflect the information of obstacles within the perception range of the pursuing unmanned boat, taking into account the limitations of the perception range and the interference of obstacles, which is practical. The reward function constructed based on the current speed, the expected speed with high accuracy, and all the corresponding speed obstacle areas can more comprehensively and accurately evaluate the pursuit effect of the pursuing unmanned boat. The rationality of the final pursuit strategy obtained based on the practical current local observation results and the comprehensive and accurate reward function is improved, thereby improving the control stability and robustness of the unmanned boat cluster.

[0164] The pursuit-escape game control method of the unmanned boat cluster of the present application is exemplified below with reference to a specific example.

[0165] Use Pytorch to simulate the pursuit and escape game project. Set up 3 pursuit unmanned boats and 1 evasion unmanned boat. The evasion unmanned boat moves towards the target area. If the evasion unmanned boat reaches the area within a limited time, it is considered a successful escape. The artificial potential field (APF) method is used as the escape strategy of the evasion unmanned boat. The pursuit unmanned boat needs to form an encirclement to prevent the evasion unmanned boat from reaching the target area. In addition, there are circular static obstacles. The pursuit unmanned boat must avoid collisions with obstacles and other pursuit unmanned boats during the capture process. The perception range of each pursuit unmanned boat is limited, and all pursuit unmanned boats have the same capture strategy.

[0166] The pursuit-escape game control method of the unmanned boat cluster of the present application is used to control each of the above-mentioned pursuit unmanned boats.

[0167] The position changes of chasing unmanned boats and avoiding unmanned boats are as follows Figure 4 As shown, Figure 4 The solid line in the middle represents the position trajectory of the unmanned boat E (i.e. the evading unmanned boat), the dotted line represents the position trajectory of the unmanned boat P1 (i.e. the first pursuing unmanned boat), the dotted line with dots represents the position trajectory of the unmanned boat P2 (i.e. the second pursuing unmanned boat), the dotted line with triangles represents the unmanned boat P3 (i.e. the third pursuing unmanned boat), the circle filled with slashes represents obstacles, and the circle represents the encirclement of the pursuing unmanned boat. Figure 4(a) The position trajectories of the four unmanned boats before the first moment, Figure 4 (b) The position trajectories of the four unmanned boats before the second moment, Figure 4 (c) The position trajectories of the four unmanned boats before the third moment, Figure 4 (d) Position trajectories of the four UAVs before the fourth moment, before which the pursuing UAV successfully captured the evading UAV.

[0168] The speed change curves of all unmanned boats are as follows: Figure 5 As shown, Figure 5 The horizontal axis is the number of running steps, the vertical axis is the speed, the solid line represents the speed component in the horizontal axis (X axis) direction in the world coordinate system, and the dotted line represents the speed component in the vertical axis (Y axis) direction in the world coordinate system. The speed change curve of avoiding the unmanned boat is shown in the figure. Figure 5 As shown in (a), the speed change curve of the first unmanned boat is as follows: Figure 5 As shown in (b), the speed change curve of the second unmanned boat is as follows: Figure 5 As shown in (c), the speed change curve of the third unmanned boat is as follows: Figure 5 (d) as shown.

[0169] The pursuit and escape game control method of the unmanned boat cluster of the present application, the multi-agent policy learning method based on policy gradient (COMA, Counterfactual Multi-agent Policy Gradients), the multi-agent proximal policy optimization algorithm (MAPPO, Multi-Agent Proximal Policy Optimization) and the multi-agent actor-critic algorithm for mixed cooperative competitive environments (MADDPG, Multi-Agent Actor-Critic for Mixed Cooperative-Competitive Environments) were used to control the pursuit unmanned boats. Four experiments were conducted. The cumulative reward curves of the four methods during the training process of the experiment are shown in the figure. Figure 6 As shown in the figure, the vertical axis represents the cumulative reward value, the solid line represents the cumulative reward obtained by the method proposed in this application, the dotted line represents the cumulative reward obtained by the MADDPG method, the dotted line represents the cumulative reward obtained by the COMA method, and the dotted line represents the cumulative reward obtained by the MAPPO method. The capture success rate obtained by the four experiments is shown in Figure 7 As shown in the figure, the horizontal axis represents the number of pursuers participating in the training process, the vertical axis represents the capture success rate, the solid line represents the final capture success rate of the method proposed in this application, the dotted line represents the capture success rate obtained by the MADDPG method, the dotted line represents the capture success rate obtained by the COMA method, and the dotted line represents the capture success rate obtained by the MAPPO method.

[0170] It can be seen that the pursuit and escape game control method of the unmanned boat cluster of the present application can well improve the stability of the control of the pursuing unmanned boats and improve the capture success rate.

[0171] The following is an exemplary description of the pursuit and escape game control device for the unmanned boat cluster provided in this application.

[0172] like Figure 8 As shown, the embodiment of the present application provides a pursuit and escape game control device for an unmanned boat cluster, and the pursuit and escape game control device 800 for an unmanned boat cluster includes:

[0173] The first acquisition module 801 acquires the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the avoiding unmanned boat;

[0174] The second acquisition module 802 acquires the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat, and acquires the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat;

[0175] An expected speed acquisition module 803 acquires an expected speed of the pursuit unmanned boat based on the moving speed and the circling speed;

[0176] The generation module 804 generates a speed obstacle area between the pursuit unmanned boat and each obstacle according to the current speed of the pursuit unmanned boat and the current speed of each obstacle; the obstacle is located within the current perception range of the pursuit unmanned boat, and the obstacle is other pursuit unmanned boats or static obstacles in the pursuit and escape game project;

[0177] The third acquisition module 805 acquires the current local observation result of the pursuit unmanned boat based on all speed obstacle areas corresponding to the pursuit unmanned boat; the current local observation result is used to describe the information of all obstacles within the current perception range of the pursuit unmanned boat;

[0178] A construction module 806 constructs a reward function for evaluating the pursuit effect of the unmanned boat based on the current speed, the expected speed, and all corresponding speed obstacle areas of the unmanned boat;

[0179] Adding module 807, adding the current local observation result to the global state, and obtaining the final pursuit strategy for the pursuit unmanned boat according to the reward function and the global state; the global state is used to describe the current environmental information of the environment in which the pursuit unmanned boat is located, the pursuit action in the final pursuit strategy is used to describe the speed change of the pursuit unmanned boat, and the pursuit state in the final pursuit strategy is used to describe the current speed of the pursuit unmanned boat;

[0180] The control module 808 controls the pursuit unmanned boat according to the final pursuit strategy.

[0181] It should be noted that the information interaction, execution process, etc. between the above-mentioned devices / units are based on the same concept as the method embodiment of the present application. Their specific functions and technical effects can be found in the method embodiment part and will not be repeated here.

[0182] The technicians in the relevant field can clearly understand that for the convenience and simplicity of description, only the division of the above-mentioned functional units and modules is used as an example for illustration. In practical applications, the above-mentioned function allocation can be completed by different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiment can be integrated in a processing unit, or each unit can exist physically separately, or two or more units can be integrated in one unit. The above-mentioned integrated unit can be implemented in the form of hardware or in the form of software functional units. In addition, the specific names of the functional units and modules are only for the convenience of distinguishing each other, and are not used to limit the scope of protection of this application. The specific working process of the units and modules in the above-mentioned system can refer to the corresponding process in the aforementioned method embodiment, which will not be repeated here.

[0183] like Fig. 9 As shown, an embodiment of the present application provides a terminal device. The terminal device D10 of this embodiment includes: at least one processor D100 ( Fig. 9 Only one processor is shown in the figure), a memory D101, and a computer program D102 stored in the memory D101 and executable on the at least one processor D100, wherein the processor D100 implements the steps of any of the above-mentioned method embodiments when executing the computer program D102.

[0184] Specifically, when the processor D100 executes the computer program D102, it obtains the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the evading unmanned boat, then obtains the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat, and obtains the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat, then obtains the expected speed of the pursuing unmanned boat based on the moving speed and the circumferential speed, then generates a speed obstacle area between the pursuing unmanned boat and each obstacle based on the current speed of the pursuing unmanned boat and the current speed of each obstacle, then obtains the current local observation result of the pursuing unmanned boat based on all speed obstacle areas corresponding to the pursuing unmanned boat, then constructs a reward function for evaluating the pursuit effect of the pursuing unmanned boat based on the current speed, expected speed and all corresponding speed obstacle areas of the pursuing unmanned boat, then adds the current local observation result to the global state, obtains the final pursuit strategy of the pursuing unmanned boat based on the reward function and the global state, and finally controls the pursuing unmanned boat according to the final pursuit strategy. Among them, the expected speed is obtained based on the moving speed and the circling speed, and the individual information and collective information of the pursuing unmanned boat are taken into account, so that the accuracy of the expected speed is improved. At the same time, the current local observation results obtained according to the speed obstacle area can well reflect the information of obstacles within the perception range of the pursuing unmanned boat, considering the limitations of the perception range and the interference of obstacles, which is practical. The reward function constructed based on the current speed, the highly accurate expected speed, and all the corresponding speed obstacle areas can more comprehensively and accurately evaluate the pursuit effect of the pursuing unmanned boat. The rationality of the final pursuit strategy obtained based on the practical current local observation results and the comprehensive and accurate reward function is improved, thereby improving the control stability and robustness of the pursuit and escape game of the unmanned boat cluster.

[0185] The processor D100 may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor, etc.

[0186] In some embodiments, the memory D101 may be an internal storage unit of the terminal device D10, such as a hard disk or memory of the terminal device D10. In other embodiments, the memory D101 may also be an external storage device of the terminal device D10, such as a plug-in hard disk, a smart memory card (SMC, SmartMedia Card), a secure digital (SD, Secure Digital) card, a flash card (Flash Card), etc. equipped on the terminal device D10. Further, the memory D101 may also include both an internal storage unit of the terminal device D10 and an external storage device. The memory D101 is used to store an operating system, an application program, a boot loader (BootLoader), data, and other programs, such as the program code of the computer program, etc. The memory D101 may also be used to temporarily store data that has been output or is to be output.

[0187] An embodiment of the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps in the above-mentioned method embodiments can be implemented.

[0188] An embodiment of the present application provides a computer program product. When the computer program product runs on a terminal device, the terminal device can implement the steps in the above-mentioned method embodiments when executing the computer program product.

[0189] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present application implements all or part of the processes in the above-mentioned embodiment method, which can be completed by instructing the relevant hardware through a computer program. The computer program can be stored in a computer-readable storage medium, and the computer program can implement the steps of the above-mentioned various method embodiments when executed by the processor. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form. The computer-readable medium may at least include: any entity or device, recording medium, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electric carrier signal, telecommunication signal and software distribution medium that can carry the computer program code to the pursuit and escape game control method device / terminal device of the unmanned boat cluster. For example, a USB flash drive, a mobile hard disk, a disk or an optical disk.

[0190] In the above embodiments, the description of each embodiment has its own emphasis. For parts that are not described or recorded in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0191] Those of ordinary skill in the art will appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware or a combination of computer software and electronic hardware. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professional and technical personnel can use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of this application.

[0192] The above is a preferred embodiment of the present application. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principles described in the present application. These improvements and modifications should also be regarded as the scope of protection of the present application.

Claims

1. A pursuit-escape game control method for an unmanned boat swarm, characterized in that: include: For each unmanned boat in the pursuit game, perform the following steps: Obtaining the current speed of the pursuing unmanned boat and the current distance between the pursuing unmanned boat and the avoiding unmanned boat; According to the current distance between the evading unmanned boat and the pursuing unmanned boat, the moving speed of the pursuing unmanned boat toward the evading unmanned boat is obtained, and according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the evading unmanned boat, the circumferential speed of the pursuing unmanned boat is obtained; Obtaining an expected speed of the pursuit unmanned boat based on the moving speed and the circling speed; Generating a speed obstacle area between the pursuit unmanned boat and each obstacle according to the current speed of the pursuit unmanned boat and the current speed of each obstacle; The obstacle is located within the current sensing range of the pursuit unmanned boat, and the obstacle is another pursuit unmanned boat or a static obstacle in the pursuit and escape game; Based on all speed obstacle areas corresponding to the pursuit unmanned boat, a current local observation result of the pursuit unmanned boat is obtained; the current local observation result is used to describe information of all obstacles within the current perception range of the pursuit unmanned boat; Based on the current speed, expected speed, and all corresponding speed obstacle areas of the pursuit unmanned boat, construct a reward function for evaluating the pursuit effect of the pursuit unmanned boat; Adding the current local observation result to the global state, and obtaining the final pursuit strategy for the pursuit of the unmanned boat according to the reward function and the global state; The global state is used to describe the current environment information of the environment in which the pursuit unmanned boat is located, the pursuit action in the final pursuit strategy is used to describe the speed change of the pursuit unmanned boat, and the pursuit state in the final pursuit strategy is used to describe the current speed of the pursuit unmanned boat; Controlling the pursuit unmanned boat according to the final pursuit strategy; Wherein, obtaining the moving speed of the pursuing unmanned boat toward the evading unmanned boat according to the current distance between the evading unmanned boat and the pursuing unmanned boat includes: By formula: Calculate the The moving speed of the pursuing unmanned boat towards the evading unmanned boat ; in, Indicates the The initial speed of the hunting unmanned boat, , Indicates the number of unmanned boats being pursued, Indicates the current moving speed coefficient, Indicates the The current distance between the pursuing unmanned boat and the evading unmanned boat, Indicates the radius of the encirclement of all the unmanned boats. Indicates the The maximum speed change rate allowed for a hunting unmanned boat is: represents adjustable gain, Represents the velocity decay function: The obtaining the circumferential speed of the pursuing unmanned boat according to the normal speed of the pursuing unmanned boat in the direction from the pursuing unmanned boat to the avoiding unmanned boat comprises: By formula: Calculate the The circumferential speed of the hunting drone boat ; in, Indicates the degree of encirclement, Indicates the A hunting unmanned boat was in the A normal velocity of a pursuing unmanned boat in the direction of the evading unmanned boat; The obtaining the expected speed of the pursuit unmanned boat based on the moving speed and the circling speed includes: By formula: Calculate the Expected speed of a hunting drone boat .

2. The control method of the pursuit-escape game according to claim 1, characterized in that: The step of generating a speed obstacle area between the pursuit unmanned boat and each obstacle according to the current speed of the pursuit unmanned boat and the current speed of each obstacle comprises: By formula: Get the The first one to pursue the unmanned boat and the Speed ​​barrier area between obstacles ; in, Indicates speed barrier area The vertex of , Indicates speed barrier area The left border of , Indicates the speed obstacle area on the speed plane The horizontal coordinate of the left boundary vertex, Indicates the speed obstacle area on the speed plane The ordinate of the left boundary vertex, Indicates speed barrier area The right boundary of , Indicates the speed obstacle area on the speed plane The horizontal coordinate of the right boundary vertex, Indicates the speed obstacle area on the speed plane The ordinate of the right boundary vertex, Indicates the The current speed of the hunting drone boat, Indicates the The current speed of the obstacle, when the When the obstacle is a static obstacle, , , Indicates the number of unmanned boats being pursued, , Indicates the current moment The number of obstacles within the sensing range of the hunting unmanned boat, , Indicates the current moment The number of other unmanned boats in the sensing range of the unmanned boat. Indicates the current moment The number of static obstacles within the sensing range of the hunting unmanned boat, Indicates the The current location of the hunting drone boat, represents the Minkowski sum, Indicates that from the The current position of the hunting unmanned boat is along Direction of rays.

3. The control method of the pursuit-escape game according to claim 2, characterized in that: The current local observation result is: in, Indicates the Current local observation results of the hunting unmanned boat, Indicates the The state of the hunting unmanned boat itself, Indicates the The current local observation value of the first other unmanned boat for the first unmanned boat, Indicates the A pursuit of unmanned boats Current local observations of other unmanned boats in pursuit, Indicates the The current local observation value of the first static obstacle by the unmanned pursuit boat, Indicates the A pursuit of unmanned boats Current local observations of static obstacles: in, Indicates the The current speed of the hunting drone boat, Indicates the The expected speed of the hunting drone boat, Indicates the The current yaw angle of the hunting drone boat, Indicates the The collision radius of the hunting unmanned boat, Indicates the a speed obstacle area between the first other unmanned pursuit boat and the first other unmanned pursuit boat, Indicates the The distance between the first other unmanned pursuit boat and the first other unmanned pursuit boat, Indicates the the predicted collision time between the first other pursuing unmanned boat and the first other pursuing unmanned boat, Indicates the The pursuit of the unmanned boat and the speed barrier area between other pursuit drone boats, Indicates the The pursuit of the unmanned boat and the The distance between the other hunting drone boats, Indicates the The pursuit of the unmanned boat and the The predicted collision time between the other hunting drones is Indicates the a speed obstacle area between the pursuit unmanned boat and the first static obstacle, Indicates the The distance between the pursuit unmanned boat and the first static obstacle, Indicates the The predicted collision time between the pursuit unmanned boat and the first static obstacle, Indicates the The pursuit of the unmanned boat and the The speed barrier area between the static obstacles, Indicates the The pursuit of the unmanned boat and the The distance between static obstacles, Indicates the The pursuit of the unmanned boat and the The predicted collision time between two static obstacles.

4. The control method of the pursuit-escape game according to claim 1, characterized in that: The reward function is: in, Indicates The reward function value corresponding to the pursuit of unmanned boats is: represents the obstacle avoidance reward, represents delayed reward, Indicates the encirclement reward: in, , , , , and All are parameters. Indicates the The current speed of the hunting drone boat, Indicates the The expected speed of a hunting drone boat, Indicates the safe obstacle avoidance time. Indicates the The time when the unmanned boat collided with the pursuit boat. Indicates the The unit vector of the pursuing UAV pointing to the evading UAV, Indicates The unit vector of the pursuing UAV pointing to the evading UAV, Indicates the number of unmanned boats being pursued, Indicates the All speed obstacle areas corresponding to the pursuit unmanned boat.

5. The control method of the pursuit-escape game according to claim 4, characterized in that: The adding the current local observation result to the global state comprises: Extracting features of the current local observation results of the unmanned boat being pursued to obtain the current local observation features of the unmanned boat being pursued; Adding the current local observation feature to the global state; The obtaining of the final pursuit strategy for pursuing the unmanned boat according to the reward function and the global state includes: Based on the reward function and the global state, the policy network is trained, and the trained policy network is used to obtain the final pursuit strategy for the unmanned boat.

6. The control method of the pursuit-escape game according to claim 5, characterized in that: The step of training the policy network based on the reward function and the global state includes: Initialize the policy network, value network and experience replay pool, and set the training cycle to 1; Determining whether the training period reaches a preset period; If the training cycle reaches a preset cycle, the policy network is used as a trained policy network; If the training cycle does not reach the preset cycle, the current speed of the pursuit unmanned boat is used as the pursuit state; Substituting the pursuit state into the reward function to obtain a reward function value corresponding to the pursuit state, and determining whether the reward function value is greater than a reward threshold; If the reward function value is greater than the reward threshold, based on the global state, multiple pursuit actions corresponding to the current state are output through the policy network, that is, a set of actions that satisfy the normal probability distribution, and a simulated pursuit action is determined from all pursuit actions according to the normal probability distribution; If the reward function value is less than or equal to the reward threshold, randomly generating a pursuit action at the current moment, and using the randomly generated pursuit action as a simulated pursuit action; According to the simulated pursuit action, the pursuit unmanned boat at the current moment is simulated and controlled to obtain the simulation state at the next moment of the current moment, the current state, all pursuit actions and reward function values ​​are collected into an experience replay pool, and it is determined whether the experience replay pool reaches a preset capacity; If the experience replay pool has reached the preset capacity, the policy network is optimized, and the policy network after the parameter optimization is used as the policy network, and the capacity of the experience replay pool is initialized; If the experience replay pool has not reached the preset capacity, the policy network will not be optimized for the time being; Determine whether the pursuit unmanned boat collides with the target, or whether the next moment after the current moment is a preset moment; If the simulation result of the pursuit of the unmanned boat collides, or the next moment of the current moment is the preset moment, the training cycle is increased by 1, and the step of determining whether the training cycle reaches the preset cycle is returned; If the simulation result of chasing the unmanned boat does not cause a collision, and the next moment after the current moment is not the preset moment, then the next moment after the current moment is taken as the current moment, and the simulation state is taken as the chasing state, and the step of substituting the chasing state into the reward function to obtain the reward function value corresponding to the chasing state is returned.

7. A terminal device, comprising a memory, a processor, and a computer program stored in the memory and executable on the processor, characterized in that: When the processor executes the computer program, the pursuit-escape game control method of the unmanned boat cluster as described in any one of claims 1 to 6 is implemented.

8. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the pursuit-escape game control method of the unmanned boat cluster as described in any one of claims 1 to 6 is implemented.