Multi-agent encompassing reinforcement learning method based on skill learning and self-attention
Through the multi-agent reinforcement learning method that combines skill learning and self-attention mechanism in the problem of maritime unmanned boat round-up, the problem of insufficient generalization and robustness of training strategies in the existing technology is solved, and the problem is achieved in complex environments. efficient round-up.
Patent Information
- Application Number
- CN202410620791.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-20
- Publication Date
- 2024-08-30
AI Technical Summary
The existing technology lacks adaptability to complex environments and multiple obstacles in the problem of maritime unmanned boat roundups, the generalization and robustness of training strategies are low, and the interpretability and credibility of reinforcement learning methods are insufficient. It is difficult to achieve effective round-up in complex marine environments.
A multi-agent reinforcement learning method based on skill learning and self-attention is adopted, combining skill discovery and multi-agent reinforcement learning, using individual discriminators and overall discriminators to generate intrinsic rewards, and encoding the observation space of the unmanned vehicle through a multi-head attention mechanism , improve skill coordination and training efficiency.
In multi-obstacle environments, the efficiency of round-up is improved, the adaptability to complex dynamic environments is achieved, the generalization and robustness of the strategy are enhanced, and the interpretability and credibility of round-up are improved.
Smart Images

Figure CN118569066A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of artificial intelligence technology, and more specifically, to a method for encircling multi-agent reinforcement learning based on skill learning and self-attention. Background Art
[0002] The pursuit-escape game is an optimization problem with the goal of minimizing the time and energy costs, such as aircraft trajectory planning, unmanned boat encirclement problems at sea, etc. In the prior art, some researchers have proposed the dynamics problem of the isovelocity coplanar model with infinite turnover, and given the geometric solution of the time-optimal pursuit strategy. Some researchers have adopted a control method based on reachability to solve the pursuit-escape differential game problem of a fugitive and multiple pursuers in the presence of interference. With the development of artificial intelligence technology, learning-based game methods have gradually been introduced. By utilizing data, knowledge, and rules, combined with machine learning methods, the decision-making models of various action entities in the game confrontation process are established and optimized, making the analysis results more convincing.
[0003] Artificial Potential Field Algorithm (APF) is a simple and effective method in robot path planning algorithm. The basic idea of artificial potential field method is to construct an artificial potential field in the working environment of mobile robot. The potential field includes repulsive poles and attractive poles. The areas and obstacles that the robot is not expected to enter are defined as repulsive poles, and the target and the area recommended for the robot to enter are defined as gravitational poles, so that the mobile robot in the potential field is affected by the gravitational field of its target posture and the repulsive field around the obstacles, and moves towards the target. In addition, the rapid development of reinforcement learning has promoted the research on optimal control, decision-making and planning. For example, PPO (Proximal Policy Optimization) algorithm is a policy gradient method in reinforcement learning. PPO algorithm is based on actor-critic architecture. Its goal is to optimize a "substitute" objective function using stochastic gradient ascent after interacting with the environment to sample data, thereby improving the policy. PPO algorithm is widely used to solve various Markov process problems. The PPO algorithm has also been newly extended in the field of multi-agents, namely the MAPPO algorithm (Multi-Agent Proximal Policy Optimization), which is a reinforcement learning algorithm extended in a multi-agent environment. The algorithm is also based on the classic actor-critic structure and trains two separate neural networks: the policy network and the evaluation network. MAPPO is an on-policy algorithm whose purpose is to find the optimal strategy to generate the optimal action of the agent. The algorithm can be applied to different scenarios, such as cooperative scenarios, where all agents share rewards, that is, the rewards of all agents are generated by the same reward function.
[0004] Skill discovery is a method to solve the complex task of reinforcement learning because it is able to discover various skills even without any external rewards. Unsupervised skill discovery methods aim to learn skills by exploring the environment without relying on any external rewards. The basic principle of skill discovery is empowerment, which describes what the agent is able to do while learning how to do something. A skill is a latent variable z~p(z) from the skill space, which can be continuous or discrete. Skill discovery methods aim to find a skill-conditioned policy π(a|s,z) to maximize the mutual information between states s and z.
[0005] After analysis, taking the problem of encirclement and capture of unmanned boats as an example, the existing pursuit and escape game scheme has the following main defects:
[0006] 1) Most studies use numerical geometric models instead of simulation environments, lack interference, and have relatively ideal environments and action spaces. They do not consider the impact of sea waves on the movement of ships, directly use geometric results without sensors, and do not consider the time delay of operations.
[0007] 2) Whether the USV (unmanned surface vehicle) training strategy for a specific simulation scenario is generalizable and robust. Existing research has not mentioned relevant methods for improvement and testing, which makes the trained strategy less credible and more difficult to implement.
[0008] 3) Since the roundup problem involves a two-party game, most of the reinforcement learning methods used in existing studies adopt complex training methods, with different and staged training methods for roundup USVs and escape USVs, which makes the algorithm less interpretable and credible.
[0009] In summary, in the unmanned boat game problem with multiple obstacles, the combination and coordination of skills can often achieve better results. For example, when an unmanned boat needs to avoid obstacles and cannot form a capture circle in time, other unmanned boats can cooperate with it to delay the capture and thus succeed in the capture. However, the existing methods lack correlation between skills. In addition, in a complex marine environment, the reef area is a place with dense obstacles and more dangerous. In the capture relationship, the existence of reefs will make the escaping ship take risks, and the pursuing ship often finds it difficult to pass through in formation for safety. Therefore, in this case, how to use reinforcement learning methods to adapt to complex and dynamic environments and successfully capture the escaping ship is a key issue. Therefore, although the existing research on skill discovery can realize collaborative skill discovery in multi-agent systems, there are still unresolved issues. Summary of the invention
[0010] The purpose of the present invention is to overcome the defects of the above-mentioned prior art and provide a method for multi-agent reinforcement learning based on skill learning and self-attention. The method comprises the following steps:
[0011] Modelling of offshore capture environments;
[0012] Constructing a reinforcement learning model for training an unmanned boat agent, wherein the reinforcement learning model includes an actor network and a critic network, the actor network includes multiple policy networks, each policy network corresponds to an unmanned boat agent, and the critic network is used to evaluate the policy performance output by the policy network;
[0013] Through interaction with the offshore capture environment, the unmanned boat agent is trained through reinforcement learning to learn the optimization strategy under skill conditions using the set overall reward function.
[0014] Compared with the prior art, the advantages of the present invention are that, in a multi-obstacle capture environment, the method of skill discovery is combined with multi-agent reinforcement learning, the principle of empowerment is used for skill discovery, and the individual discriminator and the overall discriminator are used to generate intrinsic rewards, so as to better combine the individual skills and coordinate the capture skills, thereby improving the capture efficiency. In addition, a multi-head attention mechanism is used to encode the observation space of the unmanned boat agent in the capture environment, so that the single agent can better pay attention to effective information and reduce irrelevant information when learning and discovering skills, and the parameter sharing method is used to reduce the number of parameters and improve the training efficiency.
[0015] Further features and advantages of the present invention will become apparent from the following detailed description of exemplary embodiments of the present invention with reference to the attached drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0016] The accompanying drawings, which are incorporated in and constitute a part of the specification, illustrate embodiments of the invention and, together with the description, serve to explain the principles of the invention.
[0017] Figure 1 is a flowchart of a method for multi-agent reinforcement learning based on skill learning and self-attention according to an embodiment of the present invention;
[0018] Figure 2 It is a general framework diagram of a method for encircling multi-agent reinforcement learning based on skill learning and self-attention according to an embodiment of the present invention;
[0019] Figure 3 is a flow chart of a skill learning algorithm according to one embodiment of the present invention;
[0020] Figure 4 is a schematic diagram of a neural network architecture of an unmanned boat intelligent agent according to an embodiment of the present invention;
[0021] Figure 5 is a schematic diagram of a hull grid simulation according to an embodiment of the present invention;
[0022] Figure 6 is a schematic diagram of a Unity ocean environment according to an embodiment of the present invention;
[0023] Figure 7 It is a schematic diagram of the overall design of the marine environment according to an embodiment of the present invention. DETAILED DESCRIPTION
[0024] Various exemplary embodiments of the present invention will now be described in detail with reference to the accompanying drawings. It should be noted that the relative arrangement of components and steps, numerical expressions and numerical values set forth in these embodiments do not limit the scope of the present invention unless otherwise specifically stated.
[0025] The following description of at least one exemplary embodiment is merely illustrative in nature and is in no way intended to limit the invention, its application, or uses.
[0026] Technologies, methods, and equipment known to ordinary technicians in the relevant art may not be discussed in detail, but where appropriate, the technologies, methods, and equipment should be considered as part of the specification.
[0027] In all examples shown and discussed herein, any specific values should be interpreted as merely exemplary and not limiting. Therefore, other examples of the exemplary embodiments may have different values.
[0028] It should be noted that like reference numerals and letters refer to similar items in the following figures, and therefore, once an item is defined in one figure, it need not be further discussed in subsequent figures.
[0029] In the multi-unmanned boat pursuit problem in a multi-obstacle environment, the environment is dynamic and complex, and skill coordination is very important. The present invention proposes an adaptive multi-agent reinforcement learning approach for pursuit-evasion based on skill learning and self-attention, or SLSA (An Adaptive Multi-Agent Reinforcement Learning Approach for Pursuit-EvasionBased on Skill Learning and Self-Attention), which can effectively adapt to dynamic and complex environments and better learn the skills of pursuit coordination.
[0030] In general, the present invention combines skill discovery with multi-agent reinforcement learning methods to learn the coordination skills among multiple agents in a complex dynamic environment with multiple obstacles, which is beneficial for the capture vessel to combine safe driving with rapid capture skills, better coordinate the action combination of multiple unmanned boats for capture, improve the capture efficiency, and improve the training method of multiple unmanned boats by using the self-attention mechanism.
[0031] Specifically, see Figure 1 As shown, the proposed method for rounding up multi-agent reinforcement learning based on skill learning and self-attention includes the following steps:
[0032] Step S110, for the unmanned boat encirclement problem in a multi-obstacle environment, a reinforcement learning model based on skill learning is constructed to train multiple unmanned boat intelligent agents.
[0033] Reinforcement learning is a method of learning optimal strategies through the interaction between an agent and the environment. In the embodiment of the present invention, the reinforcement learning model used to train multiple unmanned boat agents is constructed using an actor-critic architecture, see Figure 2As shown. Strategy optimization is achieved by training the actor network and the critic network at the same time. The actor network (Actor) is responsible for learning the strategy function and selecting actions according to the current state; the critic network (Critic) is responsible for evaluating the quality of the strategy and giving the corresponding reward signal. The goal of this reinforcement learning model is to enable the agent to obtain the maximum cumulative reward by continuously optimizing the strategy function. The actor network and the critic network can be implemented using deep neural networks. The round-up algorithm technical solution designed by the present invention combines multi-agent reinforcement learning with skill discovery. For example, it can be trained using a centralized training distributed execution method. Figure 2 In the example, z represents skill, r represents in Reward for skill learning, r task As a quest reward. i,j represents the jth observation vector from the i-th unmanned boat. i , m i is the intermediate characteristic variable.
[0034] In one embodiment, mutual information is used to measure the influence of skill. Mutual information I(S, Z) is a general measure of the dependency between two random variables. It is defined as the Kullback-Leibler divergence between the joint distribution p(s, z) and the product of the two distributions p(s)·p(z), expressed as:
[0035]
[0036] Another expression, I(S, Z) = H(S) - H(S|Z), implies that when mutual information is high, the uncertainty of variable S is significantly reduced given Z. Therefore, mutual information can be interpreted as the empowerment of one variable on another.
[0037] In the reinforcement learning process of the unmanned boat agent, a latent random variable Z is introduced as a condition of the strategy π(a|s, z). It is hoped that the latent variable can project its controllability on a continuous state or trajectory. It is direct to set the mutual information between Z and the state S as the unsupervised target. If I(S, Z) is maximized, the behavior of the agent will remain consistent under different latent coding values. According to the symmetry, I(S, Z) = H(Z)-H(Z|S). When the prior of Z is fixed, maximizing I(S, Z) is equivalent to maximizing the negative entropy - H(Z|S). However, the posterior distribution p(z|s) is still unknown and cannot be calculated directly because the marginal distribution p(s) is difficult to handle. Through the variational inference tool, there is a variational lower bound of the target.
[0038]
[0039] In the above formula (2), q φ(z|s) is designed as a discriminator of the true posterior with φ as parameter. In fact, the gap between this inequality is p(z|s) and q φ The KL divergence between (z|s) means that the more accurate the discriminator is, the tighter the lower bound will be. The discriminator is learned synchronously with the reinforcement learning training process.
[0040] In summary, still combined with Figure 2 As shown, in an embodiment of the present invention, the actor network includes multiple policy networks, each policy network corresponds to an unmanned boat agent, and for each policy network, an independent discriminator can be used to evaluate the respective intrinsic rewards, and a global discriminator can be used to evaluate the overall intrinsic rewards.
[0041] Step S120, training the unmanned boat agent and learning the coordination skills among multiple agents using the set overall reward function, wherein the overall reward includes an intrinsic reward and a task reward.
[0042] Combination Figure 3 As shown, during the training process of the unmanned boat agent based on skill discovery, a more accurate state value function estimation is obtained based on the overall reward (or mixed reward). The overall reward includes the intrinsic reward and the task reward, while the intrinsic reward includes the evaluation of the independent discriminator and the evaluation of the global discriminator.
[0043] In one embodiment, the following formula is used as the intrinsic reward to train the unmanned boat agent.
[0044]
[0045] in, Indicated by φ i is the true a posteriori independent discriminator of the i-th unmanned boat agent with parameters, where o i is the observation vector of the i-th unmanned boat, q φ (z|s) represents the discriminator of the true posterior with φ as parameter (global discriminator), λ1 and λ2 are the weight coefficients of the corresponding terms, z represents the latent variable, s represents the state, is an independent discriminator, q φ (z|s) is the global discriminator, φ i represents the parameters of the independent discriminator, φ is the parameter of the global discriminator, i represents the i-th unmanned boat agent, o i represents the observation vector of the i-th unmanned boat agent, and a represents the action of the i-th agent.
[0046] The final total reward is calculated by adding the intrinsic reward and the task reward, expressed as:
[0047] r i (s, a) = r i,in (s,a)+ri,task (s, a) (4)
[0048] Among them, r i (s, a) represents the total reward of the i-th unmanned boat agent, r i,task (s, a) represents the reward for the roundup task of the i-th agent.
[0049] In one embodiment, in a multi-unmanned boat capture mission, the mission reward r i,task Set to:
[0050] r i,task =0.2-k1*Δd-k2*β (5)
[0051] Among them, k1, k2 are coefficients, Δd is the difference between the remaining capture distance and the last skill decision, and β is the deviation angle (the angle between the current unmanned boat heading and the target).
[0052] Figure 4 It is the neural network structure of the unmanned boat agent, in which the observation space encoding neural network is a shared parameter, including the CNN layer (convolutional neural network) encoding the observation space vector of the unmanned boat grid sensor, the FFN layer (feedforward neural network) encoding other observation space vectors, and the self-attention layer encoding the agent observation sequence feature vector. Finally, the critic network of the independent FFN architecture of each agent outputs an independent state value function value, and each unmanned boat agent makes decisions through an independent strategy network during training.
[0053] For clarity, the following is a pseudo code of the process of training the unmanned boat agent:
[0054]
[0055] Step S130, modeling the marine multi-unmanned boat capture environment, and using the trained unmanned boat intelligent agent to verify the capture capability.
[0056] Taking multi-obstacle combat waters as an example, there are three unmanned boats of the same structure forming a pursuit group to jointly guard an important base on the island (preset target point). When the pursuit group USV finds an unknown ship (escaper) approaching the base, it needs to capture the escaper as quickly as possible while avoiding obstacles. The escaper needs to reach the predetermined target point as quickly as possible without being caught by the pursuit USV.
[0057] For both pursuit and escaping USVs, a successful mission requires the following conditions to be met respectively:
[0058] For hunting USV:
[0059] (1) The escaping USV fails to reach the predetermined target point within the specified time.
[0060] (2) The distances between the three chasing USVs and the escapee are all smaller than the capture radius R cap .
[0061] (3) The capture angle γ between two arbitrary chasing USVs ab Not greater than the set threshold.
[0062] For escaping USVs: reach the preset target point within the time limit before being successfully captured by the pursuer.
[0063] Unmanned boat dynamics simulation:
[0064]
[0065] Among them, x i ,y i represents the position of the i-th unmanned boat; u i , v i , r i They are forward speed (surge), lateral speed (sway) and yaw angular velocity (yaw), represents the acceleration of the i-th unmanned boat in the x-axis direction of the world coordinate system, represents the acceleration of the i-th unmanned boat in the y-axis direction of the world coordinate system, represents the angular acceleration of the i-th unmanned boat hull relative to the world coordinate system, ψ i Represents the angle of the hull of the i-th unmanned boat relative to the world coordinate system.
[0066] The hull modeling of the unmanned boat is as follows Figure 5 As shown, it includes 698 triangles (tris) and 1336 vertices (verts). To simplify the calculation, it is simplified to 42 triangles and 21 vertices during simulation.
[0067] The simulation of sea waves includes three parts: modeling of wind speed, waves and current speed.
[0068] (1) Wind speed modeling:
[0069] The wind on the sea surface is the main cause of waves, which can change the direction and position of the unmanned surface vehicle. The surface wind speed is constantly changing, and a wind speed model needs to be established, which can be expressed as:
[0070] U wind =U p +U c +U g +U r (7)
[0071] Among them, U p is the primary wind component, U c is the gradually varying wind component, Ug is the gust component, U r is the random wind component, which can be represented by the API wind spectrum. Then, the disturbance force / torque of the wind on the USV model can be calculated, which is expressed as:
[0072]
[0073] Since the volume of USV is usually small, only the disturbance force and yaw moment in the horizontal direction need to be considered. rw is the relative wind speed, γ rω is the angle of attack of the USV, H oa is the total length of the USV, A Fω A represents the forward projection area of the hull. Lω represents the lateral projection area of the hull, ρ a is the hull density. Then, the three-degree-of-freedom wind load coefficient of USV {C X , C Y , C N}.
[0074] (2) Wave simulation
[0075] Wave simulation uses the Gerstner function to simulate surface waves. Different water surfaces can be obtained by superimposing regular waves of different frequencies and directions. In order to construct a surface that is more in line with the real scene, it is necessary to obtain the surface height field parameters from the spectrum, such as the PM spectrum, whose wave energy distribution can be expressed as:
[0076]
[0077] Where ω is the angular frequency, θ is the wind direction, u is the wind speed, S PM (ω) represents the signal power density at the signal ω, D(θ) represents the directional spectrum function recommended by ITTC (International Ship Test Pool Conference), and g represents the gravity coefficient. After obtaining the height field of each water surface, its mesh can be constructed and rendered using the Crest toolkit in Unity's HDRP pipeline. In addition, a two-dimensional irrotational flow is added to the water surface mesh, and a global wind field is added to the Unity scene, acting on the water surface and USV, together forming a complete ocean environment.
[0078] (3) Water flow simulation
[0079] The system uses a two-dimensional irrotational flow model acting on the kinematic model of the USV:
[0080]
[0081] Where w is the vertical velocity, V c is the water flow vector, βc is the angle between the flow velocity and the hull direction, u r It represents the speed of the hull relative to the water flow in the direction of the hull in the hull coordinate system, v r represents the speed of the hull relative to the water flow in the lateral direction of the hull in the hull coordinate system, w r It represents the speed of the ship relative to the water flow in the vertical direction of the ship in the ship coordinate system.
[0082] Unity ocean environment simulation Figure 6 As shown, the purple line is the buoyancy line and the white line is the ray sensor:
[0083] The simulation of the force of the marine environment on the unmanned boat includes the influence of buoyancy, wave disturbance force, wind speed and flow speed. The relevant data can be calculated through the Unity dynamic water physics toolkit. First, the simulation calculation formula of buoyancy is:
[0084]
[0085] Among them, ρ fluid is the buoyancy coefficient of water, g is the gravity coefficient, is the finite element mesh volume, as Figure 7 As shown:
[0086] The wave disturbance force / torque calculation diagram and calculation formula of the wave on the unmanned boat model are expressed as follows:
[0087]
[0088] Where Cw is the force coefficient, is the normal of the i-th hull triangle mesh, is the dot product of these two normals. is the wave speed above the i-th hull triangle mesh, is the area of the i-th hull triangle mesh. Then, the wave disturbance moment is calculated using the position of a single hull triangle mesh.
[0089] To further verify the effect of the present invention, experimental simulation was carried out. The simulation experiment platform includes Unity Hub version 2.4.4, Unity engine version f1c12020.1.12, Com. Unity ML-Agents (C#) version 1.7.2, ML-Agents version 0.23.0, and Communicator (C# and Python) version 1.3.0. The algorithm and interactive software were developed using Python and C#.
[0090] During the verification process, three pursuit USVs (USV0, USV1, USV2) and one escape USV were designed. The observation space of the pursuit USV agent is ray sensor, grid sensor, geometric position variable, and the action space is the hull engine thrust and direction, rudder direction and speed.
[0091] The observation space input of the unmanned boat consists of two parts, one is the geometric variable observation, and the other is the sensor input (including ray sensors and local grid sensors). When the ray detects scene objects (islands, other ships, boundaries), it will be input into the reinforcement learning algorithm in the form of a unique hot vector.
[0092] In order to simulate the USV cluster maritime combat mission, Unity3D software was used to build a maritime scene map, which includes six physical models.
[0093] 1) Training Boundary: It limits the simulation to a fixed area, which is easy to observe and helps speed up training.
[0094] 2) Sea level. The Crest water resource library is used to simulate and render the sea surface wave environment, and the Unity DynamicWater Physics 2 library is used to realize the interaction between the hull and the waves.
[0095] 3) Obstacles. Mainly islands of different sizes, which increase the complexity and authenticity of the environment.
[0096] 4) USV model. It contains two different camps, the pursuers and the escapers, of which there are three pursuers and one escaper.
[0097] 5) In offshore environment, the particle collision effect of the physical engine is used to realize the interference of wind speed on waves and USV.
[0098] In the simulation experiment, the average capture time and escape success rate are used to measure the capture efficiency and escape ability, see Table 1.
[0099] Table 1 Meaning of evaluation indicators
[0100]
[0101] In the non-cooperative game algorithm, evaluating the pros and cons of the strategy requires some additional steps, and in the setting of non-cooperative relationships, the average return cannot be used directly to evaluate the pros and cons of the strategy. and Train the policy network and record the policy network trained by them as:
[0102]
[0103] in, Representation method The trained hunting agent strategy network parameters, Representation method The trained hunting agent strategy network parameters, Representation method The trained escape agent policy network parameters, Representation method Parameters of the trained escaping agent policy network.
[0104] In the setting of non-cooperative relationship, we specifically evaluate the two methods and In the trap-and-escape game, let the pursuer trained by one method compete with the escapee trained by another method:
[0105]
[0106] Record the average reward of the two predators, denoted as The size of the two can reflect and The advantages and disadvantages.
[0107] In summary, compared with the prior art, the present invention has the following advantages:
[0108] 1) In a multi-obstacle capture environment, the skill discovery method is combined with multi-agent reinforcement learning, the empowerment principle is used for skill discovery, and the individual discriminator and the overall discriminator are used to generate intrinsic rewards respectively, so as to better combine individual skills and coordinate capture skills, thereby improving the capture efficiency.
[0109] 2) A multi-head attention mechanism is used to encode the observation space of the unmanned boat agent in the capture environment, so that a single agent can better pay attention to effective information and reduce irrelevant information when learning and discovering skills. The parameter sharing method is used to reduce the number of parameters and improve the training efficiency.
[0110] The present invention may be a system, a method and / or a computer program product. The computer program product may include a computer-readable storage medium carrying computer-readable program instructions for causing a processor to implement various aspects of the present invention.
[0111] Computer readable storage medium can be a tangible device that can hold and store instructions used by an instruction execution device. Computer readable storage medium can be, for example, but not limited to, an electrical storage device, a magnetic storage device, an optical storage device, an electromagnetic storage device, a semiconductor storage device, or any suitable combination thereof. More specific examples (non-exhaustive list) of computer readable storage medium include: a portable computer disk, a hard disk, a random access memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), a static random access memory (SRAM), a portable compact disk read-only memory (CD-ROM), a digital versatile disk (DVD), a memory stick, a floppy disk, a mechanical encoding device, for example, a punch card or a convex structure in a groove on which instructions are stored, and any suitable combination thereof. The computer readable storage medium used here is not interpreted as a transient signal itself, such as a radio wave or other freely propagating electromagnetic wave, an electromagnetic wave propagated by a waveguide or other transmission medium (for example, a light pulse by an optical fiber cable), or an electrical signal transmitted by a wire.
[0112] The computer-readable program instructions described herein can be downloaded from a computer-readable storage medium to each computing / processing device, or downloaded to an external computer or external storage device via a network, such as the Internet, a local area network, a wide area network, and / or a wireless network. The network can include copper transmission cables, optical fiber transmissions, wireless transmissions, routers, firewalls, switches, gateway computers, and / or edge servers. The network adapter card or network interface in each computing / processing device receives the computer-readable program instructions from the network and forwards the computer-readable program instructions for storage in the computer-readable storage medium in each computing / processing device.
[0113] The computer program instructions for performing the operation of the present invention may be assembly instructions, instruction set architecture (ISA) instructions, machine instructions, machine-dependent instructions, microcode, firmware instructions, state setting data, or source code or object code written in any combination of one or more programming languages, including object-oriented programming languages-such as Smalltalk, C++, Python, etc., and conventional procedural programming languages-such as "C" language or similar programming languages. Computer-readable program instructions may be executed completely on a user's computer, partially on a user's computer, as an independent software package, partially on a user's computer, partially on a remote computer, or completely on a remote computer or server. In the case of a remote computer, the remote computer may be connected to the user's computer via any type of network-including a local area network (LAN) or a wide area network (WAN), or may be connected to an external computer (e.g., using an Internet service provider to connect via the Internet). In some embodiments, an electronic circuit, such as a programmable logic circuit, a field programmable gate array (FPGA), or a programmable logic array (PLA), may be personalized by utilizing the state information of the computer-readable program instructions, and the electronic circuit may execute the computer-readable program instructions, thereby realizing various aspects of the present invention.
[0114] Various aspects of the present invention are described herein with reference to the flow charts and / or block diagrams of the methods, devices (systems) and computer program products according to embodiments of the present invention. It should be understood that each box of the flow chart and / or block diagram and the combination of each box in the flow chart and / or block diagram can be implemented by computer-readable program instructions.
[0115] These computer-readable program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, or other programmable data processing device, thereby producing a machine, so that when these instructions are executed by the processor of the computer or other programmable data processing device, a device that implements the functions / actions specified in one or more boxes in the flowchart and / or block diagram is generated. These computer-readable program instructions can also be stored in a computer-readable storage medium, and these instructions cause the computer, programmable data processing device, and / or other equipment to work in a specific manner, so that the computer-readable medium storing the instructions includes a manufactured product, which includes instructions for implementing various aspects of the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0116] Computer-readable program instructions may also be loaded onto a computer, other programmable data processing apparatus, or other device so that a series of operating steps are performed on the computer, other programmable data processing apparatus, or other device to produce a computer-implemented process, thereby causing the instructions executed on the computer, other programmable data processing apparatus, or other device to implement the functions / actions specified in one or more boxes in the flowchart and / or block diagram.
[0117] The flow charts and block diagrams in the accompanying drawings show the possible architecture, functions and operations of the systems, methods and computer program products according to multiple embodiments of the present invention. In this regard, each box in the flow chart or block diagram can represent a part of a module, a program segment or an instruction, and a part of the module, a program segment or an instruction contains one or more executable instructions for realizing the specified logical function. In some alternative implementations, the functions marked in the box can also occur in a different order from the order marked in the accompanying drawings. For example, two consecutive boxes can actually be executed substantially in parallel, and they can sometimes be executed in the opposite order, depending on the functions involved. It should also be noted that each box in the block diagram and / or flow chart, and the combination of the boxes in the block diagram and / or flow chart can be implemented by a dedicated hardware-based system that performs the specified function or action, or can be implemented by a combination of dedicated hardware and computer instructions. It is well known to those skilled in the art that it is equivalent to implement it by hardware, implement it by software, and implement it by combining software and hardware.
[0118] Embodiments of the present invention have been described above, and the above description is exemplary, not exhaustive, and is not limited to the disclosed embodiments. Many modifications and variations will be apparent to those of ordinary skill in the art without departing from the scope and spirit of the described embodiments. The selection of terms used herein is intended to best explain the principles of the embodiments, practical applications, or technical improvements in the marketplace, or to enable other persons of ordinary skill in the art to understand the embodiments disclosed herein. The scope of the present invention is defined by the appended claims.
Claims
1. A multi-agent reinforcement learning method based on skill learning and self-attention, The following steps are involved: Modelling of offshore capture environments; Constructing a reinforcement learning model for training an unmanned boat agent, wherein the reinforcement learning model includes an actor network and a critic network, the actor network includes multiple policy networks, each policy network corresponds to an unmanned boat agent, and the critic network is used to evaluate the policy performance output by the policy network; Through interaction with the maritime capture environment, the unmanned boat agent is trained through reinforcement learning to learn the optimization strategy under skill conditions using the set overall reward function to maximize the mutual information and task reward between the state and potential skill variables.
2. The method according to claim 1, It is characterized in that The overall reward function is set as: r i (s,a)=r i,in (s,a)+r i,task (s,a) in: r i,task =0.2-k 1 *Δd-k 2 *β Among them, r i (s, a) represents the total reward of the i-th unmanned boat agent, r i,in (s, a) is the intrinsic reward, r i,task (s, a) represents the reward for the roundup task of the i-th agent, k 1 , k 2 is the setting coefficient, Δd represents the difference between the remaining capture distance and the last skill decision, β is the deviation angle, and λ 1 and λ 2 is the weight coefficient, s represents the state, a represents the action of the i-th unmanned boat agent, Indicated by φ i The posterior independent discriminator of the i-th unmanned boat agent is parameterized, o i is the observation vector of the i-th unmanned boat agent, q φ (z|s) denotes the discriminator of the true posterior with φ as parameter, and z denotes the latent variable of skill.
3. The method according to claim 1, It is characterized in that Mutual information is used to measure the influence of skills, and information entropy calculates the mutual information.
4. The method according to claim 1, It is characterized in that The strategy is based on skills as conditions and selects actions from the action space according to the current state. The action space is the hull engine thrust and direction, rudder direction and speed. For the pursuit type unmanned boat intelligent agent, the corresponding observation space is the ray sensor, grid sensor and geometric position variable.
5. The method according to claim 2, It is characterized in that The spatial encoding neural network of the observation vector is a shared parameter, including a convolutional neural network, a feedforward neural network, and a self-attention layer. The convolutional neural network encodes the observation space vector of the unmanned boat grid sensor, the feedforward neural network is used to encode other observation space vectors, and the self-attention layer is used to encode the observation sequence feature vector of the unmanned boat intelligent agent; the critic network outputs an independent state value function value. During training, each unmanned boat intelligent agent makes decisions through an independent strategy network, and uses a multi-head attention mechanism to encode the observation space of the unmanned boat intelligent agent in the capture environment.
6. The method according to claim 1, It is characterized in that The modeling of the offshore capture environment includes: The dynamics simulation of the unmanned boat is carried out based on the following formula: Among them, u i , v i , r i They are forward speed, lateral speed and yaw angular velocity, represents the acceleration of the i-th unmanned boat in the x-axis direction of the world coordinate system, represents the acceleration of the i-th unmanned boat in the y-axis direction of the world coordinate system, represents the angular acceleration of the i-th unmanned boat hull relative to the world coordinate system, ψ i Indicates the angle of the hull of the i-th unmanned boat relative to the world coordinate system; The wind speed model is established and expressed as: IN wind =U p +U c +U q +U r Among them, U wind is the total wind speed, U p is the primary wind component, U c is the gradually varying wind component, U g is the gust component, U r is the random wind component; The disturbance force of wind on the unmanned boat model is calculated and expressed as: Among them, τ wind is the disturbance force, V rw is the relative wind speed, γ rω is the angle of attack of the unmanned boat, H oa is the total length of the unmanned boat, and the three-degree-of-freedom wind load coefficient of the unmanned boat is {C X , C Y , C N }, A Fω A represents the forward projection area of the unmanned boat hull. Lω represents the lateral projection area of the unmanned boat hull, ρ a is the hull density; The following formula is used to simulate waves: Where ω is the angular frequency, θ is the wind direction, u is the wind speed, S PM (ω) represents the signal power density at the signal ω, D(θ) is the set directional spectrum function, and g represents the gravity coefficient; The water flow is simulated using the following formula: Where w is the vertical velocity, V c is the water flow vector, β c is the angle between the flow velocity and the direction of the unmanned boat, u r represents the speed of the hull relative to the water flow in the direction of the hull in the coordinate system of the unmanned boat, v r represents the velocity of the hull relative to the water flow in the lateral direction of the hull in the coordinate system of the unmanned boat, w r It represents the speed of the hull in the vertical direction relative to the water flow in the hull coordinate system of the unmanned boat.
7. The method according to claim 6, It is characterized in that It also includes simulating the offshore environment according to the following steps: Calculate the buoyancy of the unmanned boat, expressed as: Among them, ρ fluid is the buoyancy coefficient of water, g is the gravity coefficient, is the volume of the finite element mesh; Calculate the wave disturbance force of the waves on the unmanned boat, expressed as: Among them, C w is the force coefficient, is the normal of the triangle mesh of the hull of the i-th unmanned boat, is the dot product of two normals, is the wave speed above the triangle mesh of the i-th unmanned boat hull, is the area of the triangle mesh of the hull of the i-th unmanned boat, and n is the number of unmanned boats.
8. The method according to claim 1, It is characterized in that The training performance of the policy network is evaluated according to the following steps: Two methods are used and The policy network is trained, and the trained policy networks are respectively denoted as: in, Representation method The trained hunting agent strategy network parameters, Representation method The trained hunting agent strategy network parameters, Representation method The trained escape agent policy network parameters, Representation method The trained escape agent strategy network parameters, π represents the strategy, s represents the state, and a represents the action; Let the hunting agent trained by one method compete with the escaping agent trained by another method: Showdown Showdown Record the average rewards of the pursuit agent and the escape agent respectively, denoted as By comparison and The size of both, determine and The advantages and disadvantages.
9. A computer-readable storage medium having a computer program stored thereon, in, When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 8 are implemented.
10. A computer device comprising a memory and a processor, wherein a computer program capable of being executed on the processor is stored on the memory, It is characterized in that When the processor executes the computer program, the steps of the method according to any one of claims 1 to 8 are implemented.
Citation Information
Cited By
Multi-unmanned ship cooperative hunting method based on channel attention mechanism deep reinforcement learning algorithm
CN119168601A
Unmanned ship intelligent hunting control method, device and equipment
CN120276451A
Intelligent agent training method and device, equipment, storage medium and program product
CN120317320A
Radar intelligent anti-interference method combining attention mechanism and A2C algorithm
CN120669211A
Unmanned ship cluster joint search and rescue method, device and equipment and storage medium
CN121115794A
