Multi-agent system fault self-recovery method and device, computer equipment and medium
The input of the faulty agent is processed through the attention module of the value network and the policy network, and evaluation values and actions are generated, which solves the problem of self-healing ability and load pressure of the multi-agent system under fault conditions, and improves the task execution effect of the system.
Patent Information
- Application Number
- CN202410728158.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-06-06
- Publication Date
- 2024-09-24
AI Technical Summary
When a fault occurs in the existing multi-agent system, it is difficult to train the strategy library, the agent load pressure is high, and the strategies before and after the fault are independent, making it difficult to coordinate, which affects system performance.
The value network and policy network are used to process the input of faulty and normal agents respectively through the first attention module and the second attention module, generate evaluation values and actions, and update network parameters to ensure that the system can effectively self-heal under fault conditions. .
It reduces the impact of faulty agents on training, improves the self-healing ability and task execution effect of multi-agent systems, reduces load pressure, and improves the system's ability to cope with sudden failures.
Smart Images

Figure CN118689685A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of computer technology, and in particular to a multi-agent system fault self-healing method, device, computer equipment and medium. Background Art
[0002] With the rapid development and application of computer technology, multi-agent systems play an important role in many fields. Considering the complexity of the operating environment and tasks of multi-agent systems, it is inevitable that the agents in the system will fail, which seriously threatens the task execution capability of the multi-agent system. By training the model used for multi-agent system to make decisions, the multi-agent system has a certain self-healing ability and is widely used.
[0003] In the related technology, multiple strategies can be set according to the structural differences of the multi-agent system before and after the failure, so as to adapt to the task requirements before and after the failure respectively. When the failure occurs, the multi-agent system switches to the corresponding strategy. This method requires training corresponding strategies for different agent failures and forming a strategy library. Due to the large number of agents, it is difficult for the strategy library to cover all possible failure situations faced by the multi-agent system, and the training process is extremely cumbersome. Deploying multiple strategies for the agents puts a lot of load pressure. In addition, setting multiple strategies to adapt to the task requirements before and after the failure will cause the strategies of the system before and after the failure to be relatively independent, making it difficult to ensure the coordinated operation of the strategies before and after the failure, and failing to maximize the performance of the multi-agent system.
[0004] Therefore, how to design a multi-agent system fault self-healing method based on the uncertainty of fault occurrence and reduce load pressure has become a technical problem that technical personnel in this field urgently need to solve. Summary of the invention
[0005] In view of this, the present invention provides a multi-agent system fault self-healing method, device, computer equipment and medium to solve the problems of difficulty in training the strategy library and high load pressure of the agents in the related technology.
[0006] In a first aspect, the present invention provides a multi-agent system fault self-healing method, comprising:
[0007] Determine the value network and strategy network corresponding to the multi-agent system;
[0008] When there is a faulty agent among all agents, the input of the value network and the input of the policy network are generated; the input of the value network includes: the sub-input corresponding to the normal agent, the sub-input corresponding to the faulty agent, and the first label information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent; the sub-input corresponding to the normal agent includes: the local observation information and initial action of the normal agent, and the sub-input corresponding to the faulty agent includes: the local observation information and initial action of the faulty agent; the input of the policy network includes: the local observation information of a single agent;
[0009] The value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents; the strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents;
[0010] Using the value network to generate a predicted output of the value network based on the input of the value network, and using the policy network to generate a predicted output of the policy network based on the input of the policy network;
[0011] According to the predicted output of the value network, the parameter values of the parameters of the value network are updated, and according to the predicted output of the policy network and the predicted output of the value network, the parameter values of the parameters of the policy network are updated;
[0012] Among them, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network; the target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
[0013] In an optional implementation, the utilizing the value network to generate a predicted output of the value network according to the input of the value network includes:
[0014] Determine the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent by using the first attention module according to the first tag information in the input of the value network for distinguishing the sub-input corresponding to the normal agent and the sub-input corresponding to the faulty agent; wherein the weight of the sub-input corresponding to the normal agent is greater than the weight of the sub-input corresponding to the faulty agent;
[0015] According to the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent, an evaluation value corresponding to each agent is generated.
[0016] In an optional implementation, the using the policy network to generate a prediction output of the policy network according to the input of the policy network includes:
[0017] The local observation information of a single agent is input into the policy network, and the weight of the local observation information of the single agent is determined using the second attention module, wherein the weight of the local observation information of the single agent includes the weight of the local observation information of the faulty agent in the local observation information of the single agent determined according to task requirements; and a new action of the single agent is generated according to the weight of the local observation information of the single agent.
[0018] In an optional implementation, updating the parameter values of the parameters of the value network according to the predicted output of the value network includes:
[0019] The loss is calculated based on the predicted output of the value network, and the parameter values of the value network are updated with the goal of minimizing the loss.
[0020] In an optional implementation, updating the parameter values of the parameters of the policy network according to the predicted output of the policy network and the predicted output of the value network includes:
[0021] Use the predicted output of the policy network to replace the initial action of the single agent in the input of the value network to generate a new input for the value network;
[0022] Using the value network to generate new predicted outputs of the value network based on new inputs of the value network;
[0023] Determine the policy gradient based on the predicted output of the value network and the new predicted output of the value network;
[0024] Update parameter values of parameters of the policy network according to the policy gradient.
[0025] In an optional implementation, before using the policy network to generate a prediction output of the policy network based on the input of the policy network, the method further includes:
[0026] Generate second marking information for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent according to the task requirements; wherein the first agent and the second agent are both faulty agents, there is a correlation between the sub-input corresponding to the first agent and the sub-input corresponding to the normal agent, and there is no correlation between the sub-input corresponding to the second agent and the sub-input corresponding to the normal agent.
[0027] In an optional implementation, the inputting the local observation information of the single agent into the policy network and determining the weight of the local observation information of the single agent using the second attention module includes:
[0028] The local observation information of a single agent is input into the policy network, and the weight of the local observation information of the single agent is determined by a second attention module based on second label information used to distinguish between the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent.
[0029] In a second aspect, the present invention provides a multi-agent system fault self-healing device, comprising:
[0030] The first processing module is used to determine the value network and strategy network corresponding to the multi-agent system;
[0031] The second processing module is used to generate the input of the value network and the input of the policy network when there is a faulty agent among all agents; the input of the value network includes: the sub-input corresponding to the normal agent, the sub-input corresponding to the faulty agent, and the first label information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent; the sub-input corresponding to the normal agent includes: the local observation information and initial action of the normal agent, and the sub-input corresponding to the faulty agent includes: the local observation information and initial action of the faulty agent; the input of the policy network includes: the local observation information of a single agent;
[0032] The value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents; the strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents;
[0033] A third processing module is used to generate a predicted output of the value network based on the input of the value network using the value network, and to generate a predicted output of the policy network based on the input of the policy network using the policy network;
[0034] A fourth processing module, used to update the parameter values of the parameters of the value network according to the predicted output of the value network, and to update the parameter values of the parameters of the strategy network according to the predicted output of the strategy network and the predicted output of the value network;
[0035] Among them, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network; the target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
[0036] In a third aspect, the present invention provides a computer device comprising: a memory and a processor, the memory and the processor being communicatively connected to each other, the memory storing computer instructions, and the processor executing the multi-agent system fault self-healing method of the first aspect or any corresponding embodiment thereof by executing the computer instructions.
[0037] In a fourth aspect, the present invention provides a computer-readable storage medium having computer instructions stored thereon, the computer instructions being used to enable a computer to execute the multi-agent system fault self-healing method of the first aspect or any corresponding embodiment thereof.
[0038] In a fifth aspect, the present invention provides a computer program product, comprising computer instructions for causing a computer to execute the multi-agent system fault self-healing method of the first aspect or any corresponding embodiment thereof.
[0039] The technical solution provided by the present invention has the following technical effects:
[0040] The value network of the present invention includes a first attention module. When there is a faulty agent among all agents, the first attention module can transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network based on the first tag information in the input of the value network used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent. The strategy network includes a second attention module. When there is a faulty agent among all agents, the second attention module can selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements. Based on the first attention module set in the value network and the second attention module set in the strategy network, the influence of the faulty agent on the training can be reduced, the operation effect of the multi-agent system task can be guaranteed, and the ability of the multi-agent system to cope with sudden failures can be improved. BRIEF DESCRIPTION OF THE DRAWINGS
[0041] In order to more clearly illustrate the specific embodiments of the present invention or the technical solutions in the related technologies, the drawings required for use in the specific embodiments or the related technical descriptions will be briefly introduced below. Obviously, the drawings described below are some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.
[0042] Figure 1 is a flowchart of a multi-agent system fault self-healing method according to an embodiment of the present invention;
[0043] Figure 2 is a schematic diagram of a network structure according to an embodiment of the present invention;
[0044] Figure 3 is a structural block diagram of a multi-agent system fault self-healing device according to an embodiment of the present invention;
[0045] Figure 4 It is a schematic diagram of the hardware structure of a computer device according to an embodiment of the present invention. DETAILED DESCRIPTION
[0046] In order to make the purpose, technical solution and advantages of the embodiments of the present invention clearer, the technical solution in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments are part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present invention.
[0047] In the related art, corresponding fault self-healing methods are proposed for multi-agent systems formed based on traditional decision-making and control technologies. However, for multi-agent systems based on multi-agent reinforcement learning, agent execution failures will cause a large amount of abnormal information to be generated in the input state of the multi-agent reinforcement learning algorithm, which seriously interferes with the training and deployment of the multi-agent reinforcement learning model, causing the multi-agent system to produce unpredictable abnormal behaviors, and thus making it difficult to ensure the task execution effect of the multi-agent system. At present, how to reduce the impact of agent execution failures on multi-agent reinforcement learning algorithms has not been solved. It is urgent to optimize the model structure based on the mainstream multi-agent reinforcement learning model, aiming at the characteristics of agent execution failures and the impact they cause, so as to improve the self-healing ability of multi-agent systems based on multi-agent reinforcement learning.
[0048] Agent execution failures will cause changes in the number of agents in multi-agent reinforcement learning, changes in the state space dimension, mutations in the training environment, etc., which will bring difficulties to the training and deployment of multi-agent reinforcement learning algorithms. Based on the analysis of the above problems, there are two ways to deal with the above agent execution failures:
[0049] One idea is to set up multiple training environments to characterize the differences in the working environment faced by the multi-agent system before and after the fault occurs when training the algorithm, and then provide multiple strategies for the multi-agent system to adapt to the task requirements before and after the fault respectively. When the fault occurs, the multi-agent system needs to switch to the corresponding strategy in real time. This method can reduce the impact of changes in the number of agents, changes in the state space dimension, and sudden changes in the training environment caused by agent execution failures. However, this method requires training corresponding strategies for different situations and forming a strategy library. The randomness of the fault makes it difficult for the strategy library to cover all possible working environments faced by the multi-agent system, and the training process is extremely cumbersome. At the same time, the deployment of multiple strategies puts a lot of pressure on the load of the agent. In addition, this method causes the strategies adopted by the multi-agent system before and after the fault to be completely independent, resulting in the multi-agent reinforcement learning algorithm being unable to realize that appropriate behaviors should be taken to prevent the impact of the fault before the fault occurs, which will seriously weaken the task execution performance of the multi-agent system in complex environments. Therefore, the application effect of this method in the collaborative tasks of the multi-agent system is poor, and it is difficult to fully tap the potential of the multi-agent system.
[0050] Another approach is to integrate the strategy models of the multi-agent system before and after the fault, and use an end-to-end neural network to uniformly represent the behavior strategies required by the multi-agent system. This approach requires the model to extract the characteristics of the fault through a large number of trial and error, and adapt to problems such as changes in the number of agents and sudden changes in the training environment, which brings great difficulty to the training of the multi-agent reinforcement learning algorithm. In addition, the state space will contain all the agent information at the beginning of the multi-agent system. After the fault occurs, the state variables representing the damaged agent information in the state space will no longer be updated and will still serve as input information for the neural network. This information is irrelevant information for strategy optimization after the fault occurs, which will interfere with the training of the reinforcement learning algorithm. Therefore, this type of method increases the difficulty of training the multi-agent reinforcement learning algorithm, making it difficult to converge to a behavioral strategy with better performance, and also weakens the application effect of the multi-agent system in collaborative tasks.
[0051] Therefore, how to design a multi-agent system fault self-healing method based on the uncertainty of fault occurrence, reduce the difficulty of training, alleviate the load pressure, and prevent faulty agents from interfering with training has become a technical problem that technical personnel in this field urgently need to solve.
[0052] Therefore, an embodiment of the present invention provides a multi-agent system fault self-healing method, apparatus, computer equipment and medium to solve the above-mentioned problems.
[0053] According to an embodiment of the present invention, an embodiment of a multi-agent system fault self-healing method is provided. It should be noted that the steps shown in the flowchart of the accompanying drawings can be executed in a computer system such as a set of computer executable instructions, and although a logical order is shown in the flowchart, in some cases, the steps shown or described can be executed in an order different from that shown here.
[0054] Figure 1 It is a flowchart of a multi-agent system fault self-healing method according to an embodiment of the present invention.
[0055] like Figure 1 As shown, a multi-agent system fault self-healing method provided in an embodiment of the present invention includes:
[0056] S101: Determine the value network and strategy network corresponding to the multi-agent system.
[0057] In this embodiment, the multi-agent system fault self-healing method is specifically applied to agent execution type faults in the multi-agent system. Agent execution type faults refer to the inability of the agent to continue to move or perform tasks after the failure of the agent. As an example, a collaborative decision model of the multi-agent system can be constructed based on the multi-agent deep deterministic policy gradient, and the collaborative decision model includes a value network and a policy network. As an example, the multi-agent system fault self-healing method can be applied to the distribution network, and a multi-agent system can be established based on the voltage control problem of the distribution network, and the voltage control problem of the distribution network can be converted into a Markov decision model.
[0058] In this embodiment, the Markov decision model corresponding to the multi-agent system, as well as the value network and policy network corresponding to the Markov decision model can be determined. As an example, the Markov decision model can be a partially observable Markov decision model. The partially observable Markov decision model can be represented by a multi-tuple:, where represents the state set, is the joint action set, represents the state transfer function, is the local observation information set of the agent, and Y = {Y 1 ,…,Y N} is the set of observation functions of the agent. At each time t, agent i receives local observation information o i =Y i (s):S→O i , according to the strategy Take action a i , and receive a reward i =R(s,a i ):S×A i→R. Assume that the probability of failure of the agent is p, which is determined by the state s and the current time t, that is: p = F{s, t}. Therefore, the state update method of the environment in which the multi-agent system is located is: s′ = T(s, a 1 ,…,a N ,p):S×A 1 ×…×A N →S. The optimization goal of each agent is to maximize its expected reward
[0059] Among them, γ∈[0,1] represents the attenuation factor of the reward, r i,t represents the reward obtained by agent i at time t, and M represents the termination time of a round of Markov decision process.
[0060] S102: When there is a faulty agent among all agents, generate inputs of the value network and the strategy network.
[0061] In this embodiment, Figure 2 is a schematic diagram of a network structure according to an embodiment of the present invention, such as Figure 2 As shown, each agent has a value network and a policy network. The value network and policy network targeted by S102-S104 can be the value network and policy network of any agent. For example, the value network and policy network of agent i. The input of the value network includes: the sub-input corresponding to the normal agent, the sub-input corresponding to the faulty agent, and the first marking information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent. The sub-input corresponding to the normal agent includes: the local observation information and initial action of the normal agent, and the sub-input corresponding to the faulty agent includes: the local observation information and initial action of the faulty agent. The input of the policy network includes: the local observation information of a single agent.
[0062] In this embodiment, the value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents. The strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents.
[0063] In this embodiment, the local observation information of a single agent includes the local observation information of the single agent on all agents except the single agent. Therefore, the input of the policy network includes the local observation information of the single agent on all agents except the single agent.
[0064] In this embodiment, each agent has a value network and a policy network. The value network includes a first decoder and a first encoder in addition to a first attention module. The policy network includes a second decoder and a second encoder in addition to a second attention module.
[0065] S103: Using the value network to generate a predicted output of the value network based on the input of the value network, and using the policy network to generate a predicted output of the policy network based on the input of the policy network.
[0066] In this embodiment, the predicted output of the value network is generated based on the input of the value network using the value network, including: using the first attention module to determine the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent based on the first tag information in the input of the value network for distinguishing the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent. The weight of the sub-input corresponding to the normal agent is greater than the weight of the sub-input corresponding to the faulty agent. Based on the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent, an evaluation value corresponding to each agent is generated.
[0067] In this embodiment, the prediction output of the value network is the evaluation value corresponding to each intelligent agent.
[0068] As an example, the sub-input corresponding to the normal agent and the sub-input corresponding to the faulty agent in the input of the value network can be input into the first encoder in the value network, and the first encoder encodes the local observation information and initial action of the agent, and converts the local observation information and initial action of the agent into the parameter e j =f i c (o i ,a i ), then the first attention module calculates the weight α of the sub-input corresponding to the agent according to the first label information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent ij , the first attention module can assign different weights to the sub-inputs corresponding to the normal agent and the sub-inputs corresponding to the faulty agent according to the first tag information, and the weight of the sub-input corresponding to the normal agent is greater than the weight of the sub-input corresponding to the faulty agent. The first attention module can transfer attention from the sub-input corresponding to the faulty agent to other relevant information in the input of the value network. For example, the attention is transferred from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network. Based on the above scheme, the impact of the faulty agent on the training can be reduced. In addition, the parameter b of the evaluation value of the evaluation agent i can also be calculated i , the first decoder According to b i Output the evaluation value of agent i
[0069]
[0070] in, Indicates the first decoder According to b i The output evaluation value of agent i, φ represents the parameters of the value network, including the parameters of the first encoder and the first decoder, W v represents the parameters of the first attention module, o = {o 1 ,…,o N} represents the local observation information of the agent, a={a 1 ,…,a N} represents the initial action of the agent, α ij represents the weight of the sub-input corresponding to agent i, b i Parameter representing the evaluation value of agent i.
[0071] In this embodiment, considering that sudden agent failures will directly affect the input of the value network, in order to enable the value network to distinguish whether an agent has failed, when agent j fails, the local observation information o of the failed agent j is set j = z·1, initial action a j =0. j Each bit of is a special mark z, that is, the first marking information, and the absolute value of z is much larger than the normal value. The above setting can make the local observation information and initial action of the faulty agent more prominent in the input of the value network. Although this setting is conducive to the value network to detect the occurrence of faults, the abnormal value of the special mark z will seriously damage the training of the value network, especially when the fault occurs randomly. In order to solve this problem, the present invention introduces a first attention module into the network structure of the value network. The first attention module helps to shift attention from the local observation information and initial action of the faulty agent to the local observation information and initial action of the normal agent, which can solve the problem that the abnormal value of the special mark z will seriously damage the training of the value network.
[0072] In this embodiment, before inputting the local observation information and initial actions of all agents into the value network, it is necessary to mark the local observation information and initial actions of the faulty agent to obtain the first marking information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent. The specific marking method is: set the local observation information o of the faulty agent j j = z·1, initial action a j =0. jEach bit of is a special flag z, and the absolute value of z is much larger than the normal value. The sub-input corresponding to the normal agent, the sub-input corresponding to the faulty agent, and the first tag information for distinguishing the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent are input into the value network. The value network can determine the value of the abnormal size according to the first tag information. The agent corresponding to the value of the abnormal size is a faulty agent, and the faulty agent and the normal agent can be distinguished.
[0073] Taking into account that when faults occur randomly, when marking is performed according to the above-mentioned marking method, the values of the local observation information and initial actions of the faulty agent are abnormal, which will seriously affect the training. Therefore, the present invention introduces a first attention module when marking the local observation information and initial actions of the faulty agent. The first attention module can allocate weights based on the first marking information. The weight of the local observation information and initial actions of the faulty agent is smaller than the weight of the local observation information and initial actions of the normal agent, thereby shifting the attention from the local observation information and initial actions of the faulty agent to the local observation information and initial actions of the normal agent, thereby solving the problem that after the local observation information and initial actions of the faulty agent are marked, the marked values affect the training.
[0074] In this embodiment, the prediction output of the policy network is generated based on the input of the policy network using the policy network, including: inputting the local observation information of a single agent into the policy network, using the second attention module to determine the weight of the local observation information of the single agent, wherein the weight of the local observation information of the single agent includes determining the weight of the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements. According to the weight of the local observation information of the single agent, a new action of the single agent is generated.
[0075] In this embodiment, the prediction output of the policy network is the new action of the single agent. In this embodiment, different from the structure of the value network, the purpose of the policy network is to output a new action based on the local observation information of each agent.
[0076] As an example, a token e can be added to agent i i0 , to help it output new actions. On this basis, the second encoder o i,j Convert to parameter o i,j (j∈{N+1,…,N+M) represents the local observation information of agent i on agent j. The second attention module calculates token e i0 To e ij The weight α i,0j and its corresponding second attention module output parameter bi0 . Second decoder According to b i0 Output the new action of agent i
[0077]
[0078] in, represents the new action of agent i, θ i are the policy network parameters of agent i, including the parameters of the second encoder and the second decoder, represents the parameters in the second attention module, b i0 represents the parameter of the output of the second attention module, α i,0j Represents token e i0 To e ij The weight of i,j represents the local observation information of agent i on agent j, e ij Indicates the second encoder o i,j Parameters to be converted.
[0079] S104: updating the parameter values of the parameters of the value network according to the predicted output of the value network, and updating the parameter values of the parameters of the policy network according to the predicted output of the policy network and the predicted output of the value network.
[0080] In this embodiment, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network. The target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
[0081] In this embodiment, updating the parameter values of the parameters of the value network according to the predicted output of the value network includes: calculating the loss according to the predicted output of the value network, and updating the parameter values of the parameters of the value network with the goal of minimizing the loss.
[0082] In this embodiment, the loss can be calculated according to the loss function:
[0083]
[0084]
[0085] in, represents the loss, y i represents the target evaluation value, which can be calculated based on the target network parameters, φ′ represents the target network parameters of the value network, and θ j ′ represents the target network parameters of the policy network, U(D) represents the experience data sampled from the experience buffer pool, and E U(D) Represents the expectation corresponding to the sampled empirical data.
[0086] In this embodiment, the parameter values of the parameters of the policy network are updated according to the predicted output of the policy network and the predicted output of the value network, including:
[0087] Use the predicted output of the policy network to replace the initial action of the single agent in the input of the value network to generate a new input for the value network.
[0088] The value network is used to generate new predicted outputs of the value network based on new inputs of the value network.
[0089] Determine the policy gradient based on the predicted output of the value network and the new predicted output of the value network.
[0090] Update the parameter values of the policy network's parameters according to the policy gradient.
[0091] In this embodiment, in order to update the parameter values of the parameters of the policy network of agent i, it is necessary to remove the initial action of agent i from the input of the value network and replace it with the new action Replace, and at the same time the initial action a of other agents in the input of the value network \i Remain unchanged.
[0092] Assume that the strategy set of N agents in the multi-agent system is where θ i represents the policy network parameters of agent i, then the policy gradient of agent i is:
[0093]
[0094] in, Represents the evaluation value of agent i. The parameter value of the parameter of the value network corresponding to agent i is represented by φ i express. The input is the initial action of all agents a = [a 1 ,…,a N ] and local observation information x = [o 1 ,…,o N ] U(D) represents the experience data sampled from the experience buffer pool, which is in the form of (x,x′,a,r 1 ,…,r N ), where x′ is the next state of x, which is determined by the transition function of the environment. The parameter values of the policy network corresponding to each agent are updated through the above policy gradient.
[0095] φ i Update via:
[0096]
[0097]
[0098] in, Represents the target policy set, whose parameters are The parameter values of the parameters of the value network are updated by minimizing the above loss function.
[0099] The loss function corresponding to the policy network is:
[0100] in, Indicates a new action.
[0101] In an optional implementation, before using the policy network to generate a predicted output of the policy network based on the input of the policy network, the multi-agent system fault self-healing method further includes:
[0102] Second label information is generated according to the task requirements for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent, wherein the first agent and the second agent are both faulty agents, there is a correlation between the sub-input corresponding to the first agent and the sub-input corresponding to the normal agent, and there is no correlation between the sub-input corresponding to the second agent and the sub-input corresponding to the normal agent.
[0103] In this embodiment, the sub-input corresponding to the first agent includes local observation information of the first agent, and the sub-input corresponding to the second agent includes local observation information of the second agent.
[0104] In this embodiment, the input of the policy network includes, in addition to the local observation information of a single agent, second labeling information for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent.
[0105] In this embodiment, the sudden failure of the agent will have a direct impact on the input of the policy network, because the state of the faulty agent j will affect the observation results of the normal agent, and will affect the local observation information of the normal agent i on the faulty agent j, that is, it will affect the local observation information of the single agent i. i,j , where i∈{1,…,N}\j (this symbol indicates that i∈{1,…,N} and i≠j). In order to enable the policy network to distinguish agent failures and selectively use the local observation information of the faulty agent in the local observation information of the single agent according to task requirements, we can set o according to the importance of the faulty agent j at different stages of task execution. i,jSpecifically, when there is a correlation between the sub-input corresponding to the faulty agent j and the sub-input corresponding to the normal agent, it means that the faulty agent j is still meaningful to the decision of other agents, then the faulty agent j is the first agent, then o i,j =Y i (s j ,t 0 ), where t 0 is the moment when the failure occurs. i (s j ,t 0 ) represents the local observation information of agent i on faulty agent j at the time of fault occurrence. Otherwise, when there is no correlation between the sub-input corresponding to faulty agent j and the sub-input corresponding to the normal agent, it means that the fault of agent j will not be meaningful to the decision-making of other agents. Similar to the value network, setting o i,j = z·1, making the local observation information of agent i to the faulty agent j more prominent and easier to identify.
[0106] In an optional implementation, local observation information of a single agent is input into the policy network, and a weight of the local observation information of the single agent is determined using a second attention module, including:
[0107] The local observation information of a single agent is input into the policy network, and the weight of the local observation information of the single agent is determined by a second attention module based on second label information used to distinguish between the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent.
[0108] In this embodiment, both the first agent and the second agent are faulty agents. The fault of the first agent will affect the decisions of other agents, while the fault of the second agent will not affect the decisions of other agents. When the local observation information of a single agent is input into the policy network, if the single agent is a normal agent, the weight of the local observation information of the single agent on the first agent in the local observation information of the single agent is greater than the weight of the local observation information of the single agent on the second agent.
[0109] In this embodiment, before the local observation information of a single agent i is input into the policy network, it is necessary to mark the local observation information of the agent i on the faulty agent in the local observation information of the agent i, and obtain the second marking information for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the agent i.
[0110] The specific marking method is: when there is a correlation between the sub-input corresponding to the faulty agent j and the sub-input corresponding to the normal agent, set the local observation information o of agent i on the faulty agent j i,j =Y i (s j ,t 0 ). When there is no correlation between the sub-input corresponding to the faulty agent j and the sub-input corresponding to the normal agent, set the local observation information o of agent i on the faulty agent j i,j =z·1, the absolute value of z is much larger than the normal value.
[0111] The local observation information of agent i and the second labeling information used to distinguish the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of agent i are input into the strategy network. The strategy network can determine the value of the abnormal size based on the second labeling information. The agent corresponding to the value of the abnormal size is the second agent.
[0112] By marking the input state as above, it is possible to dynamically determine whether to pay attention to the capabilities of the faulty agent at different stages of task execution. To achieve this goal, in addition to the special design of the input state, the present invention also introduces a second attention module in the policy network to flexibly incorporate information about the faulty agent.
[0113] The technical solution of the present invention is illustrated below with a specific example: the environment includes: 2 static obstacles, 1 prey agent and 3 predator agents. The 3 predator agents form a multi-agent system, which can be named the predator multi-agent system. In this scenario, the task undertaken by the predator multi-agent system is to pursue the prey agent through collaboration between agents. Each predator agent has a limited communication and perception range. In the process of executing the task, the predator multi-agent system needs to maintain the communication topology and distribute tasks between agents to improve the task completion effect of the multi-agent system. In this scenario, it is assumed that the prey agent has pre-set a behavioral strategy to avoid being pursued by the prey agent.
[0114] A multi-agent system with three potentially faulty agents can be modeled as a partially observable Markov decision process defined as<S,A,T,R,Y,O,γ,F> , where S represents the state set, A={A 1 ,A 2 ,A 3} is a set of joint actions, T represents the state transition function in the above environment, O = {O 1 ,O 2 ,O 3} is the local observation information set of the agent, Y = {Y 1 ,Y 2 ,Y 3} is the set of observation functions of the agent, where T and Y are determined by the environment. At each time t, agent i receives local observation information o i =Y i (s):S→O i , according to the strategy Take initial action a i . And get reward r i =R(s,a i ):S×A i →R, in the above scenario, the reward is r i Can be set to:
[0115] r i =r com +r out +r col +r dis +r goal ;
[0116] Among them, r com 、r out 、r col and r dis They are rewards for encouraging the three predator agents to maintain the communication structure, stay within the boundaries of the scene, avoid collisions with teammates, and approach the prey agent. These four rewards are rewards for the predator agents themselves and are obtained independently by each predator agent. goal It is the overall reward of the multi-agent system consisting of three predator agents. When any of the predator agents completes the task, the reward is awarded to all predator agents.
[0117] In addition, in the above scenario, it can be assumed that the probability of failure of the predator agent is p = 0.1. Therefore, the state of the environment in which the multi-agent system is located is updated as follows: s′ = T(s, a 1 ,…,a N ,p):S×A 1 ×…×A N →S. The optimization goal of each agent is to maximize its expected reward Among them, γ∈[0,1] represents the attenuation factor of the reward, r i,t represents the reward obtained by agent i at time t, M represents the termination time of a round of Markov decision process, Figure 3 In the scenario shown, it is assumed that M=50, that is, each round of the Markov decision process lasts for 50 time steps (it ends early when the task is completed).
[0118] A collaborative decision-making model of a multi-agent system is constructed based on multi-agent deep deterministic policy gradient. The collaborative decision-making model includes a value network and a policy network.
[0119] Each predator agent has a strategy network and a value network. The strategy set of the three agents in the multi-agent system is set as Then the policy gradient of agent i is:
[0120]
[0121] in, Represents the evaluation value of agent i. The parameter value of the parameter of the value network corresponding to agent i is represented by φ i express. The input is the initial action of the three predator agents a = [a 1 ,a 2 ,a 3 ] and local observation information x = [o 1 ,o 2 ,o 3 ] U(D) represents the experience data sampled from the experience buffer pool, which is in the form of (x,x′,a,r 1 ,…,r N ), where x′ is the next state of x, which is determined by the transition function of the environment. The parameter values of the policy network corresponding to each agent are updated through the above policy gradient.
[0122] The value network of agent i takes the local observation information and initial behavior of the three agents as input, that is: o = {o 1 ,o 2 ,o 3} and a={a 1 ,a 2 ,a 3}, with the corresponding evaluation value The policy network of agent i takes the local observation information o of agent i as output. i As input, and in the strategy Next, distribute the output of new actions.
[0123] In the above scenario, the local observation information of predator agent i includes the following information: the position of predator agent i itself, the positions of other predator agents in the multi-agent system except predator agent i, the positions of two obstacles in the environment, and the position of the prey agent. Therefore, the local observation information of predator agent i can be described as (in the above scenario, M is 3, i.e., 2 obstacles and 1 prey agent):
[0124] o={o i1 ,…,Oi(N+M)}.
[0125]
[0126] Among them, Y i (s j ) represents the local observation information of agent i on agent j. ij represents the communication status between agent i and agent j, c ij is a one-hot encoding vector, and different bits represent different communication states. In the above scenario, there are three connection states, namely: normal communication (c ij =[1,0,0]), out of communication range (c ij =[0,1,0]), failure occurs (c ij =[0,0,1]). i,j (j∈{4,5,6}) represents the local observation information of agent i on the environment and task state. In addition, if there is an unexpected failure on agent j, the local observation information o of the faulty agent j j and the initial action a j will fail and be specially configured when the above information is input into the value network, namely: j = z·1,a j = 0, let z = 10. In addition, the local observation information o of the normal agent i about the faulty agent j i,j , special configuration should also be performed when inputting into the policy network, namely: i,j =z·1, let z=10.
[0127] In the present invention, the impact of agent execution failures in the multi-agent system on the training and deployment of the multi-agent reinforcement learning algorithm is systematically analyzed. The innovatively proposed multi-agent system fault self-healing method based on the attention mechanism provides a new solution for the multi-agent reinforcement learning model to quickly identify environmental changes and data differences before and after the failure and reduce the interference of irrelevant information on strategy optimization. It successfully solves the impact of changes in the number of agents, changes in the state space dimension, and sudden changes in the training environment on the training and deployment of the algorithm in multi-agent reinforcement learning, so that the multi-agent system based on multi-agent reinforcement learning can automatically identify sudden failures and reduce the impact of failures on the task execution effect of the multi-agent system.
[0128] It should be noted that the contents not described in detail in the specification of the present invention belong to the common knowledge of those skilled in the art.
[0129] In this embodiment, a multi-agent system fault self-healing device is also provided, which is used to implement the above-mentioned embodiment and optional implementation methods, and the descriptions that have been made will not be repeated. As used below, the term "module" can implement a combination of software and / or hardware of a predetermined function. Although the device described in the following embodiments is preferably implemented in software, the implementation of hardware, or a combination of software and hardware, is also possible and conceivable.
[0130] Figure 3 It is a structural block diagram of a multi-agent system fault self-healing device according to an embodiment of the present invention.
[0131] This embodiment provides a multi-agent system fault self-healing device, such as Figure 3 As shown, including:
[0132] The first processing module 11 is used to determine the value network and strategy network corresponding to the multi-agent system.
[0133] The second processing module 12 is used to generate the input of the value network and the input of the policy network when there is a faulty agent among all agents. The input of the value network includes: the sub-input corresponding to the normal agent, the sub-input corresponding to the faulty agent, and the first label information used to distinguish the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent. The sub-input corresponding to the normal agent includes: the local observation information and initial action of the normal agent, and the sub-input corresponding to the faulty agent includes: the local observation information and initial action of the faulty agent. The input of the policy network includes: the local observation information of a single agent.
[0134] The value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents. The strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents.
[0135] The third processing module 13 is used to generate a predicted output of the value network based on the input of the value network by using the value network, and to generate a predicted output of the policy network based on the input of the policy network by using the policy network.
[0136] The fourth processing module 14 is used to update the parameter values of the parameters of the value network according to the predicted output of the value network, and to update the parameter values of the parameters of the strategy network according to the predicted output of the strategy network and the predicted output of the value network.
[0137] Among them, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network. The target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
[0138] In an optional embodiment, the third processing module 13 includes a first processing unit, the first processing unit is used to determine the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent according to the first tag information in the input of the value network for distinguishing the sub-input corresponding to the normal agent from the sub-input corresponding to the faulty agent using the first attention module. The weight of the sub-input corresponding to the normal agent is greater than the weight of the sub-input corresponding to the faulty agent.
[0139] According to the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent, an evaluation value corresponding to each agent is generated.
[0140] In an optional embodiment, the third processing module 13 further includes a second processing unit, which is used to input the local observation information of the single agent into the policy network, and use the second attention module to determine the weight of the local observation information of the single agent, wherein the weight of the local observation information of the single agent includes determining the weight of the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements. According to the weight of the local observation information of the single agent, a new action of the single agent is generated.
[0141] In an optional embodiment, the fourth processing module 14 includes a first processing unit, which is used to calculate the loss according to the predicted output of the value network and update the parameter values of the parameters of the value network with the goal of minimizing the loss.
[0142] In an optional implementation, the fourth processing module 14 further includes a second processing unit.
[0143] The second processing unit comprises:
[0144] The first subunit is used to replace the initial action of the single agent in the input of the value network with the predicted output of the policy network to generate a new input of the value network.
[0145] The second subunit is used to generate a new predicted output of the value network based on the new input of the value network using the value network.
[0146] The third subunit is used to determine the policy gradient based on the predicted output of the value network and the new predicted output of the value network.
[0147] The fourth subunit is used to update the parameter values of the parameters of the policy network according to the policy gradient.
[0148] In an optional embodiment, the multi-agent system fault self-healing device further includes a fifth processing module, which is used to generate second label information for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent according to the task requirements before using the policy network to generate the predicted output of the policy network according to the input of the policy network. The first agent and the second agent are both faulty agents, and there is a correlation between the sub-input corresponding to the first agent and the sub-input corresponding to the normal agent, and there is no correlation between the sub-input corresponding to the second agent and the sub-input corresponding to the normal agent.
[0149] In an optional embodiment, the second processing unit included in the third processing module 13 is specifically used to input the local observation information of a single agent into the policy network, and use the second attention module to determine the weight of the local observation information of the single agent based on the second labeling information used to distinguish the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent.
[0150] The further functional description of each of the above modules and units is the same as that of the above corresponding embodiments and will not be repeated here.
[0151] The multi-agent system fault self-healing device in this embodiment is presented in the form of a functional unit, where the unit refers to an ASIC (Application Specific integrated Circuit) circuit, a processor and memory that executes one or more software or fixed programs, and / or other devices that can provide the above functions.
[0152] The embodiment of the present invention also provides a computer device having the above Figure 3 The multi-agent system fault self-healing device shown.
[0153] See also Figure 4 , Figure 4 Schematic diagram of the hardware structure of the computer device according to the embodiment of the present invention. Figure 4As shown, the computer device includes: one or more processors 10, a memory 20, and interfaces for connecting various components, including high-speed interfaces and low-speed interfaces. Various components are connected to each other using different buses for communication, and can be installed on a common mainboard or installed in other ways as needed. The processor can process instructions executed in the computer device, including instructions stored in or on the memory to display the graphical information of the GUI on an external input / output device (such as a display device coupled to the interface). In an optional embodiment, if necessary, multiple processors and / or multiple buses can be used together with multiple memories and multiple memories. Similarly, multiple computer devices can be connected, and each device provides some necessary operations (for example, as a server array, a group of blade servers, or a multi-processor system). Figure 4 A processor 10 is taken as an example.
[0154] The processor 10 may be a central processing unit, a network processor or a combination thereof. The processor 10 may further include a hardware chip. The hardware chip may be a dedicated integrated circuit, a programmable logic device or a combination thereof. The programmable logic device may be a complex programmable logic device, a field programmable gate array, a general purpose array logic or any combination thereof.
[0155] The memory 20 stores instructions executable by at least one processor 10, so that at least one processor 10 executes the method shown in the above embodiment.
[0156] The memory 20 may include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function. The data storage area may store data created according to the use of the computer device, etc. In addition, the memory 20 may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage devices. In an optional embodiment, the memory 20 may optionally include a memory remotely arranged relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0157] The memory 20 may include a volatile memory, such as a random access memory. The memory may also include a non-volatile memory, such as a flash memory, a hard disk or a solid state drive. The memory 20 may also include a combination of the above-mentioned types of memory.
[0158] The computer device further comprises a communication interface 30 for the computer device to communicate with other devices or a communication network.
[0159] The embodiment of the present invention also provides a computer-readable storage medium. The method according to the embodiment of the present invention can be implemented in hardware, firmware, or can be implemented as a computer code that can be recorded in a storage medium, or can be implemented as a computer code that is originally stored in a remote storage medium or a non-temporary machine-readable storage medium and will be stored in a local storage medium through a network download, so that the method described herein can be stored in such software processing on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. Among them, the storage medium can be a disk, an optical disk, a read-only storage memory, a random access memory, a flash memory, a hard disk or a solid-state hard disk, etc. Further, the storage medium can also include a combination of the above-mentioned types of memories. It can be understood that a computer, a processor, a microprocessor controller, or programmable hardware includes a storage component that can store or receive software or computer code. When the software or computer code is accessed and executed by a computer, a processor, or hardware, the method shown in the above embodiment is implemented.
[0160] A part of the present invention may be applied as a computer program product, such as a computer program instruction, which, when executed by a computer, can call or provide the method and / or technical solution according to the present invention through the operation of the computer. Those skilled in the art should understand that the existence of the computer program instruction in a computer-readable medium includes, but is not limited to, a source file, an executable file, an installation package file, etc., and accordingly, the way in which the computer program instruction is executed by the computer includes, but is not limited to: the computer directly executes the instruction, or the computer compiles the instruction and then executes the corresponding compiled program, or the computer reads and executes the instruction, or the computer reads and installs the instruction and then executes the corresponding installed program. Here, the computer-readable medium may be any available computer-readable storage medium or communication medium accessible to the computer.
[0161] Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the present invention, and such modifications and variations are all within the scope defined by the appended claims.
Claims
1. A multi-agent system fault self-healing method, characterized in that: include: Determine the value network and strategy network corresponding to the multi-agent system; When there is a faulty agent among all agents, generate inputs to the value network and inputs to the policy network; The input of the value network includes: the sub-input corresponding to the normal intelligent agent, the sub-input corresponding to the faulty intelligent agent, and the first label information used to distinguish the sub-input corresponding to the normal intelligent agent from the sub-input corresponding to the faulty intelligent agent; the sub-input corresponding to the normal intelligent agent includes: the local observation information and initial action of the normal intelligent agent, and the sub-input corresponding to the faulty intelligent agent includes: the local observation information and initial action of the faulty intelligent agent; the input of the policy network includes: the local observation information of a single intelligent agent; The value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents; the strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents; Using the value network to generate a predicted output of the value network based on the input of the value network, and using the policy network to generate a predicted output of the policy network based on the input of the policy network; According to the predicted output of the value network, the parameter values of the parameters of the value network are updated, and according to the predicted output of the policy network and the predicted output of the value network, the parameter values of the parameters of the policy network are updated; Among them, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network; the target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
2. The method according to claim 1, characterized in that: The utilizing the value network to generate a predicted output of the value network based on the input of the value network includes: Determine the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent by using the first attention module according to the first tag information in the input of the value network for distinguishing the sub-input corresponding to the normal agent and the sub-input corresponding to the faulty agent; wherein the weight of the sub-input corresponding to the normal agent is greater than the weight of the sub-input corresponding to the faulty agent; According to the weight of the sub-input corresponding to the normal agent and the weight of the sub-input corresponding to the faulty agent, an evaluation value corresponding to each agent is generated.
3. The method according to claim 1, characterized in that The using the policy network to generate a prediction output of the policy network according to the input of the policy network includes: The local observation information of a single agent is input into the policy network, and the weight of the local observation information of the single agent is determined using the second attention module, wherein the weight of the local observation information of the single agent includes the weight of the local observation information of the faulty agent in the local observation information of the single agent determined according to task requirements; and a new action of the single agent is generated according to the weight of the local observation information of the single agent.
4. The method according to claim 1, characterized in that: The updating of parameter values of parameters of the value network according to the predicted output of the value network includes: The loss is calculated based on the predicted output of the value network, and the parameter values of the value network are updated with the goal of minimizing the loss.
5. The method according to claim 1, characterized in that The updating of the parameter values of the parameters of the policy network according to the predicted output of the policy network and the predicted output of the value network includes: Use the predicted output of the policy network to replace the initial action of the single agent in the input of the value network to generate a new input for the value network; Using the value network to generate new predicted outputs of the value network based on new inputs of the value network; Determine the policy gradient based on the predicted output of the value network and the new predicted output of the value network; Update parameter values of parameters of the policy network according to the policy gradient.
6. The method according to claim 3, characterized in that Before using the policy network to generate a prediction output of the policy network based on an input of the policy network, the method further includes: Generate second marking information for distinguishing the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent according to the task requirements; wherein the first agent and the second agent are both faulty agents, there is a correlation between the sub-input corresponding to the first agent and the sub-input corresponding to the normal agent, and there is no correlation between the sub-input corresponding to the second agent and the sub-input corresponding to the normal agent.
7. The method according to claim 6, characterized in that The inputting of the local observation information of a single agent into the policy network and determining the weight of the local observation information of the single agent by using the second attention module includes: The local observation information of a single agent is input into the policy network, and the weight of the local observation information of the single agent is determined by a second attention module based on second label information used to distinguish between the sub-input corresponding to the first agent and the sub-input corresponding to the second agent in the local observation information of the single agent.
8. A multi-agent system fault self-healing device, characterized in that: include: The first processing module is used to determine the value network and strategy network corresponding to the multi-agent system; A second processing module is used to generate an input of a value network and an input of a policy network when there is a faulty agent among all agents; The input of the value network includes: the sub-input corresponding to the normal intelligent agent, the sub-input corresponding to the faulty intelligent agent, and the first label information used to distinguish the sub-input corresponding to the normal intelligent agent from the sub-input corresponding to the faulty intelligent agent; the sub-input corresponding to the normal intelligent agent includes: the local observation information and initial action of the normal intelligent agent, and the sub-input corresponding to the faulty intelligent agent includes: the local observation information and initial action of the faulty intelligent agent; the input of the policy network includes: the local observation information of a single intelligent agent; The value network includes: a first attention module, which is used to transfer attention from the sub-input corresponding to the faulty agent to the sub-input corresponding to the normal agent in the input of the value network when there is a faulty agent among all agents; the strategy network includes: a second attention module, which is used to selectively use the local observation information of the faulty agent in the local observation information of the single agent according to the task requirements when there is a faulty agent among all agents; A third processing module is used to generate a predicted output of the value network based on the input of the value network using the value network, and to generate a predicted output of the policy network based on the input of the policy network using the policy network; A fourth processing module, used to update the parameter values of the parameters of the value network according to the predicted output of the value network, and to update the parameter values of the parameters of the strategy network according to the predicted output of the strategy network and the predicted output of the value network; Among them, the policy network is used to determine the target policy corresponding to the normal agent after completing the training for the policy network; the target policy corresponding to the normal agent is used to control the operation of the multi-agent system.
9. A computer device, characterized in that: include: A memory and a processor, wherein the memory and the processor are communicatively connected to each other, the memory stores computer instructions, and the processor executes the steps of the method according to any one of claims 1 to 7 by executing the computer instructions.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and the computer instructions are used to enable a computer to execute the steps of the method according to any one of claims 1 to 7.
Citation Information
Cited By
Fault self-healing multi-strategy collaborative optimization method and system for power distribution network
CN119940582A
