A collaborative hunting training method for multiple unmanned vessels based on two-way deep reinforcement learning
Through the two-way deep reinforcement learning training method, the generalization and efficiency of the multi-unmanned ship collaborative round-up model are improved, the problems of low training efficiency and insufficient generalization in the existing technology are solved, and effective responses to different escape strategies are achieved. and improved hunting capabilities.
Patent Information
- Application Number
- CN202411109760.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-14
- Publication Date
- 2024-10-08
- Estimated Expiration
- 2044-08-14
AI Technical Summary
Existing multi-unmanned ship collaborative round-up models based on deep reinforcement learning are prone to overfitting or slow convergence during training, and cannot effectively deal with maneuvering targets with different escape strategies, resulting in insufficient generalization.
A multi-unmanned ship collaborative round-up training method based on two-way deep reinforcement learning is adopted. By establishing a collaborative round-up model and an escape model, multi-task two-way deep reinforcement learning training is performed, including forward training and reverse training, to gradually improve the complexity of the escape strategy. and intelligence, optimizing the reward function design to improve round-up efficiency.
It realizes the efficient hunting ability of multiple unmanned ships for various targets, improves the training efficiency and the generalization of the model, avoids the problems of over-fitting and slow convergence speed, and at the same time improves the safety and obstacle avoidance of unmanned ships. ability.
Smart Images

Figure CN118626867B_ABST
Abstract
Description
Technical Field
[0001] The present application belongs to the technical field of unmanned ship intelligent control, and specifically provides a multi-unmanned ship collaborative capture training method based on bidirectional deep reinforcement learning. Background Art
[0002] As an unmanned maritime mission platform, surface unmanned ships are intelligent, flexible, and concealed. Under the control of intelligent algorithms, a single unmanned ship can complete a given task, or a cluster of multiple unmanned ships can handle more complex tasks. Among them, collaborative capture is a typical application of intelligent control of multiple unmanned ships, which can be used for search and rescue, maritime interception and capture, etc., and has broad application prospects.
[0003] At present, the common method of controlling multiple unmanned ships for coordinated capture is to use deep reinforcement learning algorithms to directly use the original data in the environment for learning, and continuously learn and improve strategies through interaction with the environment, so as to improve the capture capability of multiple unmanned ships. However, there are still many problems with the existing algorithm methods based on deep reinforcement learning: when training the coordinated capture of multiple unmanned ships, the focus is mostly on the training of the capture decision of the unmanned ships, and a fixed escape strategy is often set for the maneuvering targets that need to be captured. However, this method has the following problems in actual training: when the escape strategy of the maneuvering target is too simple, the reinforcement learning training model is prone to overfitting a single task, and when the escape strategy of the maneuvering target is too complex, the algorithm using the reinforcement learning training algorithm in the multi-unmanned ship environment will have problems such as slow convergence speed. At the same time, a single escape strategy will make the capture strategy of multiple unmanned ships unable to cope with maneuvering targets using different escape strategies, resulting in weak generalization of the model.
[0004] Therefore, it is necessary to optimize the training method of the existing multi-unmanned vessel capture model based on deep reinforcement learning so that it can quickly acquire the ability to efficiently capture various types of mobile targets. Summary of the invention
[0005] The purpose of this application is to provide a multi-unmanned ship collaborative capture training method based on bidirectional deep reinforcement learning, so as to realize the efficient training of the multi-unmanned ship collaborative capture model and effectively improve the capture capability of multiple unmanned ships for various targets. The method includes the following steps:
[0006] Establishing a collaborative capture model of multiple unmanned vessels based on deep reinforcement learning, wherein the collaborative capture model includes at least one capture strategy network based on deep reinforcement learning;
[0007] Establishing an escape model of a maneuverable target, wherein the escape model includes at least two non-intelligent escape sub-models and at least one escape strategy network based on deep reinforcement learning;
[0008] The collaborative capture model and the escape model are subjected to multi-task bidirectional deep reinforcement learning training, wherein the multi-task bidirectional deep reinforcement learning training includes at least three forward training tasks and at least one reverse training task.
[0009] Among them, when the maneuvering target performs each forward training task, it uses at least two non-intelligent escape sub-models in the escape model and at least one escape strategy network to perform deep reinforcement learning training on the collaborative capture model, and the complexity of the escape trajectory of the maneuvering target in each forward training task increases successively; when each unmanned ship performs the reverse training task, it performs deep reinforcement learning training on the at least one escape strategy network based on the trained collaborative capture model, and the last reverse training task is executed before the last forward training task.
[0010] Preferably, the escape strategy adopted by the non-intelligent escape sub-model includes at least two of the following escape strategies: a linear motion strategy, an S-shaped maneuvering strategy, and an artificial potential field maneuvering strategy.
[0011] Furthermore, each forward training task includes the following steps:
[0012] S1, initializing a multi-unmanned ship collaborative capture scenario, including determining the capture boundary, randomly determining the initial positions of each unmanned ship and the maneuvering target, and the position of at least one obstacle;
[0013] S2, obtaining the kinematic model, state space, and action space of each unmanned ship;
[0014] S3, if the current forward training task is the first forward training task, initializing the collaborative round-up model to determine the parameters of the round-up strategy network, otherwise setting the parameters of the round-up strategy network based on the training result of the previous forward training task;
[0015] S4, based on the multi-unmanned boat collaborative capture scenario and the kinematic model, state space, and action space of each unmanned boat, the collaborative capture model is trained through three stages of deep reinforcement learning, wherein the three stages are a preparation stage, an encirclement stage, and a capture stage.
[0016] Furthermore, the kinematic model of each unmanned ship includes the motion equation, control constraint conditions and state update equation of each unmanned ship;
[0017] The motion equations of each unmanned ship are shown as follows:
[0018] ,
[0019] in, is the total number of unmanned ships, , , , , , Respectively The lateral position, longitudinal position, speed, heading angle, acceleration and angular velocity of each unmanned ship, , , , They are , , , Derivative with respect to time;
[0020] The control constraints of each unmanned ship are as follows:
[0021] ,
[0022] in, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the roundup boundary, respectively. , , Respectively The maximum speed, maximum acceleration and maximum angular velocity of each unmanned ship;
[0023] The state update equation of each unmanned ship is shown as follows:
[0024] ,
[0025] in, For the At this moment, there are unmanned ships Status information, is the time step, For the An unmanned ship will be in the next moment status information.
[0026] Furthermore, the state space of each unmanned ship for:
[0027] ,
[0028] in, , , The first and , The state space of an unmanned ship, , are the horizontal and vertical coordinates of the obstacle, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by the unmanned boats;
[0029] The action space of each unmanned ship for:
[0030] ,
[0031] in, , , The first and , The action space of an unmanned ship.
[0032] Preferably, in each forward training task, for the Unmanned ships:
[0033] when When Unmanned ships are in the preparation stage, among which: For the The distance between the unmanned ship and the maneuvering target, is the preset distance threshold;
[0034] when When or , then the Unmanned ships are in the encirclement phase, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by the unmanned boats, is the preset angle threshold;
[0035] when When and , then the An unmanned ship is in the encirclement stage.
[0036] Furthermore, in each forward training task, The reward function used for deep reinforcement training of an unmanned ship for:
[0037] ,
[0038] in, is the distance reward function, is the obstacle avoidance reward function, is the encirclement angle reward function, is the boundary reward function, is the reward function for successful roundup, = .
[0039] Preferably, for unmanned ship, the distance reward function Specifically:
[0040] ,
[0041] in is the preset coefficient;
[0042] The obstacle avoidance reward function Specifically:
[0043] ,
[0044] in, , For the A safe boundary between the unmanned ship and obstacles. is the critical collision distance between the unmanned ship and the obstacle, Respectively The distance that the first unmanned ship decelerates from its current speed to zero and the The turning distance required for an unmanned boat to turn 90 degrees is is the distance between the unmanned ship and the obstacle, For the The distance between an unmanned ship and other unmanned ships, is the critical distance for collision between unmanned ships, , is a preset constant, is a Boolean coefficient. When an unmanned ship collides with an obstacle or another unmanned ship, The value of is 1, otherwise The value of is 0, is the preset coefficient;
[0045] The enveloping angle reward function Specifically:
[0046] ,
[0047] in, , is the preset coefficient;
[0048] The boundary reward function Specifically:
[0049] ,
[0050] in, is the distance between the unmanned ship and the capture boundary, , are two preset distance thresholds and , , are the coefficients, , is a preset constant, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the round-up boundary respectively;
[0051] The successful roundup reward function Equal to the preset coefficient .
[0052] Preferably, step S4 also includes the following sudden failure simulation step: Randomly set the The action output of the first unmanned ship is 0, and the other unmanned ships keep The observation of the unmanned ship is ignored in the calculation of the reward function for successful capture and the reward function for the encirclement angle. An unmanned ship.
[0053] Preferably, the method further comprises the following steps: when the number of iterations when the maneuvering target is successfully captured in the last scheduled reverse training task is less than a preset iteration threshold, increasing the number of scheduled reverse training tasks.
[0054] Preferably, step S4 uses the MADDPG algorithm to perform deep reinforcement learning training on the collaborative roundup model, and extracts training samples during the training process through the following steps:
[0055] The first step is to extract from the experience replay pool Experience samples are put into the temporary playback pool, where is the set hyperparameter, is the single training batch size;
[0056] The second step is to calculate each experience sample in the temporary playback pool based on the following formula: Priority :
[0057] ,
[0058] in, , are the proportional coefficients of the state action value in the priority and the proportional coefficients of the TD error in the priority, respectively. and , The initial value of is 1, and its value varies with the empirical sample. The number of times it is used for training increases and decreases, For experience samples The Q value priority, For experience samples TD error priority;
[0059] The third step is to extract the top 0.7* with the highest priority from the temporary replay pool. Experience samples are randomly sampled from the experience replay pool in order. Extract 0.3* experience samples, forming The collaborative round-up model is trained using a training set of empirical samples.
[0060] The embodiment of the present application provides a multi-unmanned vessel collaborative encirclement training method based on bidirectional deep reinforcement learning, which has at least the following beneficial effects:
[0061] First, multiple training tasks are constructed using escape strategies with gradually improved escape capabilities to train the collaborative capture model multiple times. This can not only enable the collaborative capture model to converge quickly in the early stage of training, avoiding the problem of slow convergence of the capture model that has not been fully trained when the mobile target has a high escape capability, but also enable the collaborative capture model to be trained multiple times by using multiple escape strategies and mobile targets with escape capabilities, thus avoiding overfitting caused by continuous training of a single task and the problem of insufficient generalization that cannot adapt to different types of targets.
[0062] Secondly, by performing reverse training tasks on maneuvering targets, in the process of improving the collaborative capture capability of multiple unmanned ships, the escape strategy network of the maneuvering targets is trained in reverse, so that it has the ability of intelligent escape, and the capture capability of multiple unmanned ships is improved synchronously with the escape capability of the random maneuvering targets, which can greatly improve the training efficiency and effectively avoid the problem of invalid training (when the escape capability is much lower than the capture capability) or slow convergence speed (when the escape capability is much higher than the capture capability) caused by the large gap between the escape capability of the maneuvering targets and the capture capability of the unmanned ships;
[0063] In this application, the capture process and reward function design are inspired by the hunting process of lion packs in nature. The entire capture process is divided into three stages according to different goals, so that the strategy learned by the capture unmanned boat is more reasonable, and the obstacle avoidance reward function in the reward function is optimized. A dynamically adjustable safety boundary is designed according to the navigation status information of the unmanned boat and the distance between the unmanned boat and the obstacle, which provides the necessary space for the unmanned boat to avoid obstacles, guides the unmanned boat to avoid potential collisions, and improves the safety of the unmanned boat. BRIEF DESCRIPTION OF THE DRAWINGS
[0064] Figure 1a Schematic diagram of the coordinate system of the unmanned ship;
[0065] Figure 1b A schematic diagram of multiple unmanned ships coordinating to capture a maneuverable target in an embodiment of the present application;
[0066] Figure 2 A schematic diagram of a flow chart of a multi-unmanned vessel collaborative capture training method based on bidirectional deep reinforcement learning according to an embodiment of the present application;
[0067] Figure 3 is a schematic diagram of the architecture of an escape model for a maneuvering target in some embodiments;
[0068] Figure 4 is a schematic diagram of the implementation process of the forward training task in some embodiments;
[0069] Figure 5 Schematic diagram of a framework for deep reinforcement learning training based on the MADDPG algorithm in some embodiments;
[0070] Figure 6 A schematic diagram of a three-stage coordinated capture of a maneuvering target in some embodiments;
[0071] Figure 7 In a specific embodiment, FIG. 5 is an average reward map during the training process of the collaborative hunting model. DETAILED DESCRIPTION
[0072] Hereinafter, the present application will be further described based on preferred embodiments with reference to the accompanying drawings.
[0073] In the description of the embodiments of the present application, it should be noted that if the terms "upper", "lower", "inside", "outside", etc. indicate an orientation or positional relationship based on the orientation or positional relationship shown in the accompanying drawings, or the orientation or positional relationship in which the products of the embodiments of the present application are usually placed when in use, it is only for the convenience of describing the present application and simplifying the description, and does not indicate or imply that the device or element referred to must have a specific orientation, be constructed and operated in a specific orientation, and therefore cannot be understood as a limitation on the present application. In addition, in the description of the present application, in order to distinguish different units, the words first, second, etc. are used in this specification, but these are not limited by the order of manufacture, nor can they be understood as indicating or implying relative importance, and their names may be different in the detailed description and claims of the present application.
[0074] The vocabulary in this specification is used to illustrate the embodiments of the present application, but is not intended to limit the present application. It should also be noted that, unless otherwise clearly specified and limited, the terms "disposed", "connected", and "connected" should be understood in a broad sense. For example, it can be a fixed connection, a detachable connection, or an integral connection; it can be a mechanical connection, a direct connection, an indirect connection through an intermediate medium, or a connection between the two elements. For those skilled in the art, the specific meanings of the above terms in this application can be specifically understood.
[0075] Figure 1a Schematic diagram of the coordinate system of the unmanned ship in some specific embodiments, Figure 1b The following is a schematic diagram of a scenario in which multiple unmanned vessels are used to collaboratively capture a mobile target. Figure 1a and Figure 1b As shown, the maneuvering target can be a manually driven ship or an unmanned ship, which maneuvers under manual control or intelligent algorithm control. After multiple unmanned ships obtain the position and speed information of the maneuvering target, as well as the position and speed information of themselves and other unmanned ships in real time, they use the trained collaborative capture model to capture the maneuvering target.
[0076] Obviously, the quality of training results directly affects the ability and efficiency of multiple unmanned ships to encircle and capture maneuvering targets. As analyzed in the background technology, when training the collaborative capture model of multiple unmanned ships, if only a fixed escape strategy is set, it is often difficult to strike a balance between training effect and training speed: if the escape strategy of the maneuvering target is too simple, the model trained by reinforcement learning is prone to overfitting of a single task, and multiple unmanned ships may not be able to effectively capture maneuvering targets with a high degree of intelligence such as manual control; and when the escape strategy of the maneuvering target is too complicated, the collaborative capture model will face the problem of slow convergence speed in the early stage of its training and easy to fall into the local extreme value trap.
[0077] <Overall framework of training methods>
[0078] In order to solve the problems existing in the above-mentioned prior art, the present application provides a multi-unmanned ship collaborative encirclement training method based on two-way deep reinforcement learning through an embodiment. Figure 2 is a flowchart diagram of the training method, such as Figure 2 As shown, the training method includes the following steps:
[0079] Step 100: Establish a collaborative capture model of multiple unmanned ships based on deep reinforcement learning, wherein the collaborative capture model includes at least one capture strategy network based on deep reinforcement learning.
[0080] Step 200: Establish an escape model for a maneuverable target, wherein the escape model includes at least two non-intelligent escape sub-models and at least one escape strategy network based on deep reinforcement learning.
[0081] Step 300: Perform multi-task bidirectional deep reinforcement learning training on the collaborative capture model and the escape model, wherein the multi-task bidirectional deep reinforcement learning training includes at least three forward training tasks and at least one reverse training task.
[0082] Among the above steps, step 100 is used to establish a multi-unmanned boat collaborative capture model based on deep reinforcement learning. Generally, it includes at least one escape strategy network based on deep reinforcement learning. In addition, in some preferred embodiments, when the escape strategy network is subjected to reinforcement learning training, it is also necessary to configure it with modules such as an evaluation network and an experience replay pool. The architecture of the above deep reinforcement learning model is known to those skilled in the art and will not be repeated here.
[0083] Step 200 is used to establish an escape model of a maneuverable target, which includes at least two non-intelligent escape sub-models and at least one escape strategy network based on deep reinforcement learning. For example, in some specific embodiments, the escape model can be as follows: Figure 3As shown, it includes three non-intelligent escape sub-models (sub-model 1, sub-model 2, and sub-model 3), and an escape strategy network, which can pre-configure escape strategies with different escape trajectory complexity for different non-intelligent escape sub-models. For example, Figure 3 Neutron model 1 adopts a linear motion strategy, sub-model 2 adopts an S-type maneuvering strategy, and sub-model 3 adopts an artificial potential field maneuvering strategy. Obviously, during the execution of the above escape strategies, the complexity of the escape trajectory of the maneuvering target increases successively. Correspondingly, the escape strategy network needs to gradually improve its escape ability through deep reinforcement learning training.
[0084] To this end, in step 300, a bidirectional training method is used to alternately train the capture strategy network in the collaborative capture model and the escape strategy network in the escape model. Specifically:
[0085] 1) When executing each forward training task, the maneuvering target uses at least two non-intelligent escape sub-models and at least one escape strategy network in the escape model to perform at least three deep reinforcement learning trainings on the collaborative capture model, and the complexity of the escape trajectory of the maneuvering target in each forward training task increases successively;
[0086] 2) When each unmanned ship performs the reverse training task, it performs deep reinforcement learning training on at least one escape strategy network of the maneuvering target based on the trained collaborative capture model, and the last reverse training task is executed before the last forward training task.
[0087] Compared with the existing method for training a multi-unmanned vessel collaborative capture model based on deep reinforcement learning, the training method adopted in this application has at least the following advantages:
[0088] First, multiple training tasks are constructed using escape strategies with gradually improved escape capabilities to train the collaborative capture model multiple times. This can not only enable the collaborative capture model to converge quickly in the early stage of training, avoiding the problem of slow convergence of the capture model that has not been fully trained when the mobile target has a high escape capability, but also enable the collaborative capture model to be trained multiple times by using multiple escape strategies and mobile targets with escape capabilities, thus avoiding overfitting caused by continuous training of a single task and the problem of insufficient generalization that cannot adapt to different types of targets.
[0089] Secondly, by performing reverse training tasks on maneuvering targets, in the process of improving the collaborative capture capability of multiple unmanned ships, the escape strategy network of the maneuvering targets is reversely trained, so that it has the ability of intelligent escape, and the capture capability of multiple unmanned ships is improved synchronously with the escape capability of the random maneuvering targets, which can greatly improve the training efficiency and effectively avoid the problem of invalid training (when the escape capability is much lower than the capture capability) or slow convergence speed (when the escape capability is much higher than the capture capability) caused by the large gap between the escape capability of the maneuvering target and the capture capability of the unmanned ship; in addition, the last reverse training task is set to be executed before the last forward training task to ensure that the collaborative capture capability of the collaborative capture model of each unmanned ship is still higher than the escape capability of the maneuvering target when the final training is completed.
[0090] <Forward Training Mission>
[0091] The specific implementation method of performing a forward training task on multiple unmanned ships is described in detail below. Those skilled in the art should know that a reverse training task can be performed on a maneuvering target in a manner similar to the forward training task.
[0092] In some preferred embodiments, Figure 4 As shown, each forward training task includes the following steps:
[0093] S1, initializing the multi-unmanned ship collaborative capture scenario, including determining the capture boundary, randomly determining the initial positions of each unmanned ship and the maneuvering target, and the position of at least one obstacle.
[0094] In some specific embodiments, the collaborative capture scene can be set as a two-dimensional water surface, and an environmental boundary (i.e., a capture boundary) can be set for it. Then, the initial positions of each unmanned ship and the maneuvering target can be randomly set, and the criteria for successful capture can be set (such as the distance between at least one unmanned ship and the maneuvering target is less than a preset threshold, or the number of iterations is greater than a preset threshold), and several obstacles can be randomly generated at different positions in the collaborative capture scene and their positions can be set.
[0095] S2, obtain the kinematic model, state space, and action space of each unmanned ship.
[0096] Specifically, refer to Figure 1a , the motion equations of each unmanned ship are shown as follows:
[0097] ,
[0098] in, is the total number of unmanned ships, , , , , , Respectively The lateral position, longitudinal position, speed, heading angle, acceleration and angular velocity of each unmanned ship, , , , They are , , , Derivative with respect to time;
[0099] The control constraints of each unmanned ship are as follows:
[0100] ,
[0101] in, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the roundup boundary, respectively. , , Respectively The maximum speed, maximum acceleration and maximum angular velocity of each unmanned ship;
[0102] The state update equation of each unmanned ship is shown as follows:
[0103] ,
[0104] in, For the At this moment, there are unmanned ships Status information, is the time step, For the An unmanned ship will be in the next moment status information.
[0105] State space of each unmanned ship for:
[0106] ,
[0107] in, , , The first and , The state space of an unmanned ship, , are the horizontal and vertical coordinates of the obstacle, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by an unmanned boat.
[0108] Action space of each unmanned ship for:
[0109] ,
[0110] in, , , The first and , The action space of an unmanned ship.
[0111] S3: if the current forward training task is the first forward training task, the parameters of the roundup strategy network are determined by initializing the collaborative roundup model; otherwise, the parameters of the roundup strategy network are set based on the training results of the previous forward training task.
[0112] Specifically, the collaborative roundup model can be constructed using a deep reinforcement learning model known to those skilled in the art, such as Figure 5 As shown, in some specific embodiments, a collaborative capture model is constructed using a deep reinforcement learning model based on the MADDPG (Multi-Agent DeepDeterministic Policy Gradient) algorithm. Specifically, the collaborative capture model is composed of a capture strategy network, a capture evaluation network, a target strategy network, a target evaluation network, and an experience replay pool corresponding to each unmanned ship, wherein the target strategy network is consistent with the structure and parameters of the capture strategy network, and the target evaluation network is consistent with the structure and parameters of the capture evaluation network. When the forward training task is performed for the first time, the collaborative capture model needs to be initialized to determine the parameters of each network. The architecture of the above-mentioned deep reinforcement learning model is already known to those skilled in the art and will not be repeated here.
[0113] When a forward training task is completed, its training results will be transferred to the collaborative round-up model before the next forward training task begins, so that when the next forward training task starts, the round-up strategy network will have the corresponding round-up capability based on the previous training.
[0114] S4, based on the multi-unmanned boat collaborative capture scenario and the kinematic model, state space, and action space of each unmanned boat, the collaborative capture model is trained through three stages of deep reinforcement learning, wherein the three stages are a preparation stage, an encirclement stage, and a capture stage.
[0115] <Three stages of collaborative roundup and corresponding reward functions>
[0116] In this application, inspired by the hunting behavior of lion groups in nature, a three-stage encirclement strategy is used to coordinate the encirclement of mobile targets. The encirclement method of lion groups in nature has the following characteristics: priority encirclement: When a lion group encircles prey, it will first circle around the prey to form a scattered encirclement; after a certain encirclement advantage is formed as a whole, the scope of the encirclement will be reduced as a whole; task division: When a lion group hunts a target, it will play a certain role according to its relative position to the target. Research results show that when lions often play the same role, the probability of hunting success will increase.
[0117] In the embodiments of the present application, Figure 6 As shown in the figure, the training process of each forward training task includes three stages: preparation stage (green line), encirclement stage (blue line) and capture stage (red line). In the preparation stage, each unmanned ship moves towards the direction of the maneuvering target. The purpose of this stage is to reduce the distance between the unmanned ship and the maneuvering target. When the distance between the two sides is less than the set value, it enters the encirclement stage; in the encirclement stage, each unmanned ship begins to disperse its formation around the target. The purpose of this stage is to form an encirclement around the maneuvering target to prepare for the subsequent capture of the maneuvering target. After a certain encirclement advantage is formed, it enters the capture stage; in the capture stage, each unmanned ship continues to close the distance between the maneuvering target, and the encirclement formed between each unmanned ship is still maintained until the capture of the maneuvering target is completed. Correspondingly, for each unmanned ship, when it is in different stages, different reward functions need to be used for it so that it can reach its goal in the corresponding stage as quickly as possible.
[0118] In some preferred embodiments, the following criteria are used to judge any unmanned ship: Judging by the stage you are in:
[0119] when When Unmanned ships are in the preparation stage, among which: For the The distance between the unmanned ship and the maneuvering target, is the preset distance threshold;
[0120] when When or , then the Unmanned ships are in the encirclement phase, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by the unmanned boats, is the preset angle threshold;
[0121] when When and , then the An unmanned ship is in the encirclement stage.
[0122] Accordingly, in each forward training task, three reward functions are set for the three stages of collaborative round-up, respectively, so as to obtain the following formula: The reward function of an unmanned ship :
[0123] ,
[0124] in, is the distance reward function, is the obstacle avoidance reward function, is the encirclement angle reward function, is the boundary reward function, is the reward function for successful roundup, = The meaning of each item is explained in detail below.
[0125] a. Distance Reward Function
[0126] The distance reward function is used to reward the unmanned ship when it approaches the maneuvering target. In some preferred embodiments, Specifically:
[0127] ,
[0128] in is the preset coefficient.
[0129] b. Obstacle avoidance reward function
[0130] In some preferred embodiments, the obstacle avoidance reward function Specifically:
[0131] ,
[0132] in, , For the A safe boundary between the unmanned ship and obstacles. is the critical collision distance between the unmanned ship and the obstacle, Respectively The distance that the first unmanned ship decelerates from its current speed to zero and the The turning distance required for an unmanned boat to turn 90 degrees is is the distance between the unmanned ship and the obstacle, For the The distance between an unmanned ship and other unmanned ships, is the critical distance for collision between unmanned ships, , is a preset constant, is a Boolean coefficient. When an unmanned ship collides with an obstacle or another unmanned ship, The value of is 1, otherwise The value of is 0, is the preset coefficient.
[0133] Obstacle Avoidance Reward Function The design takes into account various situations that the unmanned ship may face during obstacle avoidance, including the safety boundary. The design of comprehensively considers that the unmanned ship can avoid obstacles by both deceleration and steering during actual navigation, and uses the smaller value as the safety boundary, which can effectively guide the unmanned ship to more flexibly choose the maneuvering method used for obstacle avoidance and improve its obstacle avoidance performance; in addition, through two penalty terms containing Boolean coefficients, the Severe penalties will be imposed on situations where an unmanned ship collides with obstacles or other unmanned ships to enhance the training effect on obstacle avoidance.
[0134] c. Encirclement Angle Reward Function
[0135] Ideally, The unmanned ships form a circle around the maneuvering target, and the best capture angle is , therefore, in some preferred embodiments, the enveloping angle reward function Specifically:
[0136] ,
[0137] in, , is the preset coefficient.
[0138] d. Boundary reward function
[0139] The boundary reward function Specifically:
[0140] ,
[0141] in, is the distance between the unmanned boat and the capture boundary, , are two preset distance thresholds and , , are the coefficients, , is a preset constant, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the round-up boundary respectively.
[0142] Boundary Reward Function Its function is to guide the unmanned ship to move within the set range. It will be punished when it approaches the environmental boundary, and will be punished more severely when it exceeds the environmental boundary.
[0143] e. Reward function for successful roundup.
[0144] In some preferred embodiments, the reward function for successful roundup is Equal to the preset coefficient , The larger the value of is, the greater the reward value will be given to all unmanned ships when the capture is successful.
[0145] In some preferred embodiments, when executing the first forward training task, the maneuvering target remains stationary, that is, the ability of each unmanned ship to capture a stationary target is first trained.
[0146] In some preferred embodiments, step S4 further includes the following sudden failure simulation step: Randomly set the The action output of the first unmanned ship is 0, and the other unmanned ships keep The observation of the unmanned ship is ignored in the calculation of the reward function for successful capture and the reward function for the encirclement angle. An unmanned ship.
[0147] Through the above steps, on the basis that each unmanned ship has adapted to encircle and capture mobile targets that adopt a variety of different mobile strategies, it is possible to simulate the failure of an unmanned ship to train the ability of the remaining unmanned ships to continue to perform tasks in emergency situations.
[0148] Since in the present application, the training of the cooperative capture capability of each unmanned ship includes the reverse training process of the maneuvering target, the escape capability of the maneuvering target will also affect the training effect of the cooperative capture capability of the unmanned ship. Therefore, in some preferred embodiments, the following steps are also included: when the number of iterations when the maneuvering target is successfully captured in the last scheduled reverse training task is less than the preset iteration threshold, the number of scheduled reverse training tasks is increased. Through the above steps, the problem of invalid training of the cooperative capture model using maneuvering targets with insufficient escape capability can be avoided.
[0149] <Optimization of the process of selecting experience samples for training>
[0150] In the embodiment of the present application, step S4 can be implemented as follows: Figure 5 The MADDPG algorithm shown in the figure performs deep reinforcement learning training on the collaborative roundup model, and in some specific embodiments, step S4 further includes the following steps:
[0151] S401: Initialize hyperparameters: set the experience replay pool size M, the single training batch size N, the maximum step size per round T, the maximum number of rounds E, and the discount factor , learning rate , initialize the number of rounds e=0;
[0152] S402: Initialize the status of I unmanned ships , update the current time t=0;
[0153] S403: For all unmanned ships, output actions according to the output of their respective capture strategy networks and OU noise;
[0154] S404: Each unmanned ship performs actions separately , get instant rewards and the next system state ;
[0155] S405: Experience , the maximum absolute value of TD error , the maximum value of the state action value , Sequential random sampling probability Stored together in the experience replay pool, The initial value is 1, and its value decreases as the number of times the experience samples are used for training increases;
[0156] S406, extracting N experience samples to train the collaborative roundup model;
[0157] S407. Update the parameters of the policy network, evaluation network, target policy network, and target evaluation network of each unmanned ship according to the training results. Among them, the target policy network and the target evaluation network adopt the method of delayed soft update to update the TD error and state-action value of N experience samples used for neural network training.
[0158] S408. Increment the step size t by 1. If t < T and the target has not been surrounded and captured, go to step S403; otherwise, go to S409.
[0159] S409: Increment the number of rounds e by 1. If e < E, go to step S402; otherwise, the training ends.
[0160] In some preferred embodiments, as Figure 5 shown, the training samples are extracted in step S406 through the following steps:
[0161] First step, extract experience samples from the experience replay pool and put them into the temporary replay pool, where is a set hyperparameter, and is the size of a single training batch.
[0162] Second step, calculate the priority of each experience sample in the temporary replay pool based on the following formula:
[0163] ,
[0164] where , are the proportionality coefficients of the state-action value and the TD error in the priority respectively, and , the initial value of is 1, and its value decreases as the number of times the experience sample is used for training increases. is the priority of the Q value of the experience sample and is the TD error priority of the experience sample
[0165] Third step, extract the top 0.7 * experience samples with the highest priority from the temporary replay pool, and randomly sample 0.3 * experience samples from the experience replay pool according to the sequential random sampling probability to form a training set of experience samples to train the collaborative surrounding and capturing model.
[0166] The above-mentioned experience sample extraction method combines sequential random sampling and mixed priority sampling. On the basis of priority experience replay, the priority definition of experience samples is improved, and TD error and state action value are used together as the standard for priority sorting, which can more comprehensively evaluate the priority of each experience sample and avoid the instability caused by relying on a single standard. The sampling process is divided into random sampling, mixed sampling and sequential random sampling. Experience samples are randomly selected from the experience replay pool to the temporary replay pool and then the experience samples in the temporary replay pool are arranged in descending order of priority. Compared with directly sorting all experience samples in the experience replay pool, this method significantly reduces the time overhead. The subsequent mixed sampling process selects high-value experience learning to accelerate the network convergence speed. Sequential random sampling is based on traditional random sampling. Priority is given to experience samples according to the order in which they enter the experience replay pool, which increases the probability of experience samples that enter the experience replay pool late being extracted. The above method can not only improve the utilization rate of important experience, but also reduce the overfitting of the network, while fully improving the utilization rate of each experience.
[0167] Figure 7 The figure shows an average reward graph during the training of the collaborative roundup model in a specific embodiment. It can be seen from the figure that after the experience sample selection strategy is improved, the convergence is completed after about 10,000 rounds of training, while when the conventional MADDPG algorithm is used, it starts to converge after 20,000 rounds, and the average reward values after convergence are -3.1 and -5.7 respectively. This proves that after the experience sample selection strategy is improved, the training convergence speed is faster and the average reward value is higher.
[0168] The above is a detailed introduction to the specific implementation methods of the present application. For those skilled in the art, several improvements and modifications may be made to the present application without departing from the principles of the present application. These improvements and modifications also fall within the scope of protection of the claims of the present application.
Claims
1. A multi-unmanned vessel collaborative hunting training method based on bidirectional deep reinforcement learning, characterized in that: The following steps are involved: Establishing a collaborative capture model of multiple unmanned vessels based on deep reinforcement learning, wherein the collaborative capture model includes at least one capture strategy network based on deep reinforcement learning; Establishing an escape model of a maneuverable target, wherein the escape model includes at least two non-intelligent escape sub-models and at least one escape strategy network based on deep reinforcement learning; The collaborative capture model and the escape model are subjected to multi-task bidirectional deep reinforcement learning training, wherein the multi-task bidirectional deep reinforcement learning training includes at least three forward training tasks and at least one reverse training task. Wherein, when executing each forward training task, the maneuvering target uses at least two non-intelligent escape sub-models in the escape model and at least one escape strategy network to perform deep reinforcement learning training on the collaborative capture model, and the complexity of the escape trajectory of the maneuvering target in each forward training task increases successively; when executing the reverse training task, each unmanned ship performs deep reinforcement learning training on the at least one escape strategy network based on the trained collaborative capture model, and the last reverse training task is executed before the last forward training task; The escape strategy adopted by the non-intelligent escape sub-model includes at least two of the following escape strategies: a linear motion strategy, an S-shaped maneuvering strategy, and an artificial potential field maneuvering strategy; Each forward training task consists of the following steps: S1, initializing a multi-unmanned ship collaborative capture scenario, including determining the capture boundary, randomly determining the initial positions of each unmanned ship and the maneuvering target, and the position of at least one obstacle; S2, obtaining the kinematic model, state space, and action space of each unmanned ship; S3, if the current forward training task is the first forward training task, initializing the collaborative round-up model to determine the parameters of the round-up strategy network, otherwise setting the parameters of the round-up strategy network based on the training result of the previous forward training task; S4, based on the multi-unmanned boat collaborative capture scenario and the kinematic model, state space, and action space of each unmanned boat, the collaborative capture model is trained through three stages of deep reinforcement learning, wherein the three stages are a preparation stage, an encirclement stage, and a capture stage.
2. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 1 is characterized in that: The kinematic model of each unmanned ship includes the motion equation, control constraint conditions and state update equation of each unmanned ship; The motion equations of each unmanned ship are shown as follows: , in, is the total number of unmanned ships, , , , , , Respectively The lateral position, longitudinal position, speed, heading angle, acceleration and angular velocity of each unmanned ship, , , , They are , , , Derivative with respect to time; The control constraints of each unmanned ship are as follows: , in, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the roundup boundary, respectively. , , Respectively The maximum speed, maximum acceleration and maximum angular velocity of each unmanned ship; The state update equation of each unmanned ship is shown as follows: , in, For the At this moment, there are unmanned ships Status information, is the time step, For the An unmanned ship will be in the next moment Status information; The state space of each unmanned ship for: , in, , , The first and , The state space of an unmanned ship, , are the horizontal and vertical coordinates of the obstacle, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by the unmanned boats; The action space of each unmanned ship for: , in, , , The first and , The action space of an unmanned ship.
3. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 1 is characterized in that: In each forward training task, for the Unmanned ships: when When Unmanned ships are in the preparation stage, among which: For the The distance between the unmanned ship and the maneuvering target, is the preset distance threshold; when When or , then the Unmanned ships are in the encirclement phase, , Respectively The numbers of the unmanned ships adjacent to the unmanned ship on both sides, , Respectively The first unmanned ship and the The first unmanned ship and The first unmanned ship and the The capture angle formed by the unmanned boats, is the preset angle threshold; when When and , then the An unmanned ship is in the encirclement stage.
4. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 3 is characterized in that: In each forward training task, The reward function used for deep reinforcement training of an unmanned ship for: , in, is the distance reward function, is the obstacle avoidance reward function, is the encirclement angle reward function, is the boundary reward function, is the reward function for successful roundup, = .
5. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 4 is characterized in that: For An unmanned ship. The distance reward function Specifically: , in is the preset coefficient; The obstacle avoidance reward function Specifically: , in, , For the A safe boundary between the unmanned ship and obstacles. is the critical collision distance between the unmanned ship and the obstacle, For the The speed of an unmanned ship, , Respectively The maximum acceleration and maximum angular velocity of an unmanned ship, Respectively The distance from the current speed of the unmanned ship to zero and the The turning distance required for an unmanned boat to turn 90 degrees is is the distance between the unmanned ship and the obstacle, For the The distance between an unmanned ship and other unmanned ships, is the critical distance for collision between unmanned ships, , is a preset constant, is a Boolean coefficient. When an unmanned ship collides with an obstacle or another unmanned ship, The value of is 1, otherwise The value of is 0, is the preset coefficient; The enveloping angle reward function Specifically: , in, is the total number of unmanned ships, , is the preset coefficient; The boundary reward function Specifically: , in, is the distance between the unmanned ship and the capture boundary, , are two preset distance thresholds and , , are coefficients, , is a preset constant, , Respectively The lateral and longitudinal positions of the unmanned boats, , are the minimum and maximum horizontal coordinates of the roundup boundary, , are the minimum ordinate and maximum ordinate of the round-up boundary respectively; The successful roundup reward function Equal to the preset coefficient .
6. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 1 is characterized in that: Step S4 also includes the following sudden failure simulation steps: By probability Randomly set the The action output of the first unmanned ship is 0, and the other unmanned ships keep The observation of the unmanned ship is ignored in the calculation of the reward function for successful capture and the reward function for the encirclement angle. An unmanned ship.
7. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 1 is characterized in that: The following steps are also included: When the number of iterations when the maneuvering target is successfully captured in the last scheduled reverse training task is less than a preset iteration threshold, the number of scheduled reverse training tasks is increased.
8. The method for training multiple unmanned ships to cooperate in hunting based on two-way deep reinforcement learning according to claim 1 is characterized in that: Step S4 uses the MADDPG algorithm to perform deep reinforcement learning training on the collaborative roundup model, and extracts training samples through the following steps during the training process: The first step is to extract from the experience replay pool Experience samples are put into the temporary playback pool, where is the set hyperparameter, is the single training batch size; The second step is to calculate each experience sample in the temporary playback pool based on the following formula: Priority : , in, , are the proportional coefficients of the state action value in the priority and the proportional coefficients of the TD error in the priority, respectively. and , The initial value of is 1, and its value varies with the empirical sample. The number of times it is used for training increases and decreases, For experience samples The Q value priority, For experience samples TD error priority; The third step is to extract the top 0.7* with the highest priority from the temporary replay pool. Experience samples are randomly sampled from the experience replay pool in order. Extract 0.3* experience samples, forming The collaborative round-up model is trained using a training set of empirical samples.
