Heterogeneous action representation multi-intelligence reinforcement learning method and system based on role allocation

By adopting a heterogeneous action representation method based on role assignment in multi-agent reinforcement learning, the problems of homogenization of agent behavior, dimensionality disaster and insufficient dynamic adaptability are solved, and efficient collaborative learning and individuality in complex environments are achieved. Action value estimation.

CN118526797BActive Publication Date: 2024-09-24NANJING ARTIFICIAL INTELLIGENCE CHIPS RES INST OF AUTOMATION CHINESE ACAD OF SCI
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202411004095.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-07-25
Publication Date
2024-09-24
Estimated Expiration
2044-07-25

AI Technical Summary

Technical Problem

In multi-agent reinforcement learning, there are problems such as homogenization of agent behavior, disaster of dimensionality, insufficient adaptability to dynamic environments, difficulties in processing heterogeneous action spaces, and long-term dependence and credit allocation. It performs poorly in complex, dynamic, and large-scale environments. good.

Method used

Using a heterogeneous action representation method based on role assignment, the agent is divided into different role groups. Each role is responsible for a predetermined sub-task. Through role vector representation learning and dynamic role assignment, differentiated strategy learning is achieved, and mixed action values ​​are achieved. Network processing of heterogeneous action spaces.

Benefits of technology

It effectively avoids behavioral homogeneity, reduces the risk of dimensional disaster, improves adaptability and learning efficiency in dynamic environments, simplifies long-term planning, and improves the accuracy and personalization of collaborative learning in complex multi-agent interactions. .

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118526797B
    Figure CN118526797B
Patent Text Reader

Abstract

The present invention discloses a heterogeneous action representation multi-intelligence reinforcement learning method and system based on role allocation, the method includes learning through role vector representation, dividing all agents into different role groups, each role is responsible for a predetermined subtask, and agents of the same role share a strategy network; assigning a predetermined role to the agent at each time step, extracting identity information from the historical trajectory information of the agent, encoding the trajectory information into implicit information for representing its role identity, and using the implicit information to determine the role to which the current agent belongs; under the predetermined role, determining the degree of attention of different opponents according to the agent role dynamics, using the role strategy with heterogeneous action representation, analyzing opponent information according to the role dynamics, evaluating the action value, and thus performing differentiated strategy learning for each agent. The method solves the problem of agent strategy homogeneity caused by the use of parameter sharing strategy in the multi-agent reinforcement learning process.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to reinforcement learning technology, in particular to a heterogeneous action representation multi-intelligence reinforcement learning method and system based on role allocation. Background Art

[0002] As a cutting-edge research direction in the field of artificial intelligence, Multi-Agent Reinforcement Learning (MARL) has received widespread attention in recent years. MARL can simulate and solve complex decision-making problems in the real world, such as traffic management, smart grid scheduling, multi-robot collaboration, game interaction, etc. For example, in traffic management, MARL can be used to optimize traffic light control, reduce congestion and improve road utilization. MARL provides a framework for collaborative learning and decision-making for artificial intelligence systems, which helps to develop smarter and more flexible autonomous systems. In multi-robot collaborative tasks, such as collaborative search and rescue or warehouse management, MARL enables robots to learn to cooperate with each other and improve overall efficiency. In addition, MARL provides new ideas for solving decision-making problems in high-dimensional and non-stationary environments.

[0003] The current research status of MARL mainly focuses on the following aspects: parameter sharing technology, centralized training decentralized execution (CTDE) framework, communication mechanism and attention mechanism. Parameter sharing technology is a widely used method. Algorithms such as QMIX and MAVEN use this technology to improve learning efficiency and generalization ability. The CTDE framework allows the use of global information in the training phase and only relies on local observations in the execution phase. For example, the COMA algorithm adopts this framework. The research on communication mechanism aims to improve the efficiency of information exchange between agents. For example, the IC3Net algorithm introduces a learnable communication protocol. The attention mechanism is used to deal with the dynamic relationship between agents. For example, the ATOC algorithm uses the attention mechanism to dynamically form agent subgroups. These studies have improved the performance and applicability of MARL to a certain extent, but there are still some key issues.

[0004] Although MARL has made significant progress, it still faces some problems. For example, although parameter sharing improves learning efficiency, it may lead to homogenization of agent behavior and fail to fully utilize individual differences and specialization advantages. For example, in team competitive games, all agents may tend to adopt the same strategy and lack role division. In addition, existing methods have difficulty in effectively dealing with the curse of dimensionality in large-scale multi-agent systems. When the number of agents increases, the joint action space grows exponentially, resulting in a sharp drop in learning efficiency. In some scenarios, the role adaptability in dynamic environments is insufficient. In complex tasks, agents may need to dynamically adjust their roles and behaviors, but existing methods lack an effective dynamic role allocation mechanism. In addition, the processing of heterogeneous action spaces remains a challenge. Different agents may have different action spaces, and how to achieve effective collaborative learning in this case has not been well solved. Finally, existing methods still have shortcomings in dealing with long-term dependencies and credit allocation problems, especially in complex tasks that require long-term planning. For example, in strategic games, it is difficult for agents to attribute the final victory to the key decisions made in the early stage. Solving these problems is crucial to improving the performance of MARL in complex, dynamic, and large-scale environments, and is also the focus of current research.

[0005] Therefore, research innovation is needed. Summary of the invention

[0006] The purpose of the invention is to provide a heterogeneous action representation multi-intelligence reinforcement learning method and system based on role allocation, in order to solve one of the above problems.

[0007] The technical solution provides a heterogeneous action representation multi-intelligence reinforcement learning method based on role allocation, including the following steps:

[0008] Step S1: Through role vector representation learning, all agents are divided into different role groups, each role is responsible for a predetermined subtask, and agents with the same role share a strategy network;

[0009] For example, in the game, the initialization parameters include the agent's own information and enemy information. The agent's own information is the current agent's position in the map, current health, and current action data, which are stored in the form of vectors.

[0010] Enemy information includes the enemy agent's position in the map, current health, and current action data, stored in vector form.

[0011] The self-data and local data are combined into a vector as the input of the agent; the output dimension is the number of defined roles, indicating which identity role is selected, and the number of roles is a predetermined value.

[0012] In the heterogeneous action information representation module, the input dimension is the dimension of all enemy information received by the agent itself, including the enemy agent's position in the map, current health, and current action data, stored in the form of vectors. The output dimension is the Q value corresponding to all actions. The output dimension in the game is 11, representing 6 movement actions and 5 actions to attack different enemies. The movement actions are up, down, left, right, stay still, and die. The attack action is that there are 5 hostile targets at present, so there are 5 attack actions.

[0013] For example, in a robot handling task, the input dimension of the role vector representation module network is the dimension of all information received by the handling robot, including its own information and information about all the goods to be handled. The own information is the current position of the handling robot, the current task, the current action, and its own handling capacity. The information about the goods to be handled includes the location of the goods, the type of goods, the weight of the goods, and other data. The output dimension is the number of defined roles, indicating which identity role is selected. It is assumed that it is defined as 4, representing handling, sorting, loading, and unloading respectively.

[0014] In the heterogeneous action information representation module, the input dimension is all the information about the goods to be transported received by the handling robot, including data such as the location of the goods, the type of goods, and the weight of the goods. The output dimension is the Q value corresponding to all actions. The robot's actions include moving actions and task actions. The moving actions have five states: up, down, left, right, and stay still. The task actions have three actions: grabbing, carrying, and placing.

[0015] Step S2: assign a predetermined role to the agent at each time step, extract identity information from the historical trajectory information of the agent, encode the trajectory information into implicit information for representing its role identity, and use the implicit information to determine the role to which the current agent belongs;

[0016] Step S3: Under the predetermined role, the attention level of different opponents is determined according to the agent role dynamics, and the role strategy with heterogeneous action representation is used to analyze the opponent information according to the role dynamics and evaluate the action value, so as to perform differentiated strategy learning for each agent.

[0017] According to another aspect of the present application, a heterogeneous action representation multi-agent reinforcement learning system based on role allocation is also provided, comprising:

[0018] A role allocation module, configured to receive a predefined number of roles and a role vector dimension, generate a role one-hot vector, and map the role one-hot vector to a role vector representation;

[0019] The local strategy encoding module is used to obtain the historical trajectory information of the intelligent agent, generate implicit information representing the identity of the intelligent agent, and calculate the matching degree between the intelligent agent and each role based on the implicit information and the role vector representation;

[0020] The target observation encoding module is used to obtain the observation information of other agents and generate historical trajectory information;

[0021] A role decoding module, which is used to map the role vector representation into the parameters of the role policy network;

[0022] Hybrid action-value network module, including:

[0023] A private action processing unit, used to generate private action representations based on the agent's observation information and calculate the value of the private action;

[0024] An interactive action processing unit, used to generate interactive action representations based on historical trajectory information and role strategy network parameters, and calculate the value of interactive actions;

[0025] The global value estimation unit is used to map the local action values ​​of all agents to the global action values;

[0026] The parameter update module is used to optimize the parameters of each network in the system based on the timing difference error and update the target network through soft update.

[0027] Beneficial effect: For the problem of agent strategy homogeneity caused by the use of parameter sharing strategy in multi-agent reinforcement learning, an efficient and feasible solution is provided, which effectively helps the convergence of multi-agent reinforcement learning strategy. The relevant technical effects will be described in detail in conjunction with specific embodiments. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a flow chart of the present invention.

[0029] Figure 2 This is a flow chart of step S1 of the present invention.

[0030] Figure 3 This is a flow chart of step S2 of the present invention.

[0031] Figure 4 This is a flow chart of step S3 of the present invention.

[0032] Figure 5 It is a topological architecture diagram of the present invention.

[0033] Figure 6 It is a flow chart of the present invention. DETAILED DESCRIPTION

[0034] As mentioned in the background technology, in order to improve learning efficiency, most recent multi-agent reinforcement learning studies adopt a parameter sharing approach, which means that all agents share the same strategy or value network. However, fully sharing parameters may have adverse effects, such as causing all agents to behave similarly, ignoring information such as the impact of different actions, etc. In order to alleviate these problems, a new framework is introduced, called heterogeneous action representation based on role assignment. Specifically, a vector representation is first learned for each role, and the same role specializes in certain subtasks. In order to reasonably assign agents to different roles, the experience trajectories are encoded as implicit information, representing their current identities. All agents determine their individual roles by matching the information with the role vector representation. Further integrating the information of different actions into the role strategy, based on the heterogeneous action representation of role assignment, helps the role of the agent understand which other agents should pay attention to. Details are as follows:

[0035] like Figure 1 As shown, a heterogeneous action representation multi-intelligence reinforcement learning method based on role allocation is provided, comprising the following steps:

[0036] Step S1: Through role vector representation learning, all agents are divided into different role groups, each role is responsible for a predetermined subtask, and agents with the same role share a strategy network;

[0037] The process of learning the role vector representation includes receiving initialization parameters, constructing a role encoder, generating a role one-hot vector, calculating the role vector representation, and storing these role vector representations;

[0038] Step S2: assign a predetermined role to the agent at each time step, extract identity information from the historical trajectory information of the agent, encode the trajectory information into implicit information for representing its role identity, and use the implicit information to determine the role to which the current agent belongs;

[0039] The process of agent role assignment specifically includes processing the agent's historical information, calculating the matching degree with each role, generating the role assignment probability, selecting a specific role, and forming a complete state representation;

[0040] Step S3: Under the predetermined role, the attention level of different opponents is determined according to the agent role dynamics, and the role strategy with heterogeneous action representation is used to analyze the opponent information according to the role dynamics and evaluate the action value, so as to perform differentiated strategy learning for each agent.

[0041] The process of role-based heterogeneous action representation includes processing private actions and interaction actions, calculating action values, generating global action values, and updating network parameters.

[0042] In this application, all agents are divided into different role groups, each role is responsible for a predetermined subtask, and agents of the same role share a strategy network; a predetermined role is assigned to the agent at each time step, identity information is extracted from the historical trajectory information of the agent, the trajectory information is encoded into implicit information used to represent its role identity, and the implicit information is used to determine the role to which the current agent belongs; under the predetermined role, the degree of attention of different opponents is determined according to the agent role dynamics, and the role strategy with heterogeneous action representation is used to analyze the opponent information according to the role dynamics, evaluate the action value, and finally use the QMIX network to integrate the action value information of all agents, minimize the TD loss of the global action value function to optimize the neural network parameters.

[0043] In one embodiment of the present invention, when the agent roles are grouped, four roles are predefined according to the task requirements, and each role corresponds to a predetermined subtask. All agents are assigned to these role groups during initialization, and agents in the same role group share a strategy network. The purpose is to divide all agents into different role groups, and each role is responsible for a predetermined subtask.

[0044] In one embodiment of the present invention, in the character vector representation learning, a two-layer linear network is used, wherein the input layer is 4 layers of the number of character types and the output is a 128-dimensional vector, and a character encoder f is learned. e (·;θ e ): R k →R d , this encoder converts the character Φ i Corresponding one-hot vector d i ∈R k Mapped to a d-dimensional vector, in this case 128, k is a hyperparameter, which is the number of predefined roles, in this case 4. The learned role vector representation is denoted by Z φi Represented as follows:

[0045] Z φi =f e (d i θ e ), ∧ i∈1, 2, …, k; where ∧ represents all;

[0046] At the very beginning of training, the number of roles k is initialized and assigned. k is fixed during the training process and is 4 in this example.

[0047] In one embodiment of the present invention, in the role assignment and identity implicit information encoding, role assignment refers to extracting identity information from the historical trajectory information of the agent and encoding the trajectory information into implicit information for representing its role identity. The purpose is to assign a predetermined role to the agent at each time step so that the agent can dynamically adapt to the environment.

[0048] In one embodiment of the present invention, in the role allocation and identity implicit information encoding, the identity implicit information encoding agent first uses a linear layer and a gated recurrent unit to obtain the action-observation history information τ i .

[0049] In one embodiment of the present invention, the action-observation history information τ is obtained i , which is input into a fully connected network and mapped into implicit information Z used to characterize the identity of the current agent τi ∈R d , has the same dimension as the character representation vector, which is 128 in this case.

[0050] In one embodiment of the present invention, according to the identity information Z of the current agent τi , calculate the dot product with each character vector representation, indicating the degree of match between the current agent and the character:

[0051] Q i j (τ i , Φ j ) = Z τi T Z φj ;

[0052] In one embodiment of the present invention, the calculated matching value is normalized using the Softmax function to obtain the probability distribution of the current agent role assignment, the probability distribution is sampled, and discretized into a k-dimensional unique hot vector to complete the assignment of the agent's current role according to the trajectory information. At each time step, the agent is assigned a role definition to help the agent dynamically cooperate with other individuals based on complex situation information.

[0053] In one embodiment of the present invention, when learning the differentiation strategy, the action set is divided into a private action set A self i and interaction action set A other i ,After assigning roles, the attention levels of different opponents are dynamically determined according to the ,roles of the agents, and differentiated strategy learning is achieved.

[0054] In one embodiment of the present invention, the character Φ kThe network is divided into two sub-modules. For all actions a in the private action set t i ∈A self i , using a two-layer fully connected network and a gated recurrent unit to obtain the action representation m t i , the input is all the observation information of agent i; then a fully connected network is used with parameter θ self , mapping to obtain all action values ​​in the private action set. In summary, the action representation m t i , perform action a t i ∈A self i The value is:

[0055] Q(o t i , a t i )=f self (m t i θ self );

[0056] Synchronously, for the interaction action set A other i , using a target observation encoder, the input is part of the observation information of agent i. For agent i, in order to evaluate the execution of action a on agent j t (i,j) ∈A other i The value of agent i’s observation information o of agent j t (i,j) As input, the target observation encoder first generates the historical trajectory information h(τ t (i,j) ), and then input the historical trajectory information into the role strategy network f φk (·;θ φk ), obtain the action representation m t (i,j) , which represents the correlation between the current role of agent i and the action target agent j. In order to link the role strategy with the role vector representation, a role decoding network is used to generate the parameters θ of the role strategy network based on the input role vector representation. φk The role decoding network is a fully connected network that represents the role vector Z φk Mapped to role strategy network parameters θ φk In addition, in order to avoid information loss, consider using the information of agent i to represent the action m ti With m t (i,j) Combined, we get agent i performing interactive action a t (i,j) The value of:

[0057] Q(o t i , a t (i,j) )=(m t i ) T m t (i,j) ;

[0058] In one embodiment of the present invention, the private action A self i The action value Q(o t i , a t i ) and interactive action A other i The action value Q(o t i , a t (i,j) ) Get the total action value Q i (o t i ,∣⋅).

[0059] In one embodiment of the present invention, a QMIX network is used to transform all local action values ​​(Q i , Q -i ) is mapped to the global action value Q tot , using the minimum Q tot The TD loss is used to optimize the algorithm:

[0060] L(θ)=E D [(r+γmax a' Q* tot (s', a')-Q tot (s,a)) 2 ];

[0061] Finally, a soft update is adopted to tot The target network Q* is obtained by periodically copying the parameters tot As shown below:

[0062] Q* tot =τQ tot +(1-τ)Q tot - ;

[0063] In one embodiment of the present invention, τ is 0.6.

[0064] like Figure 2 As shown, according to one aspect of the present application, step S1 is specifically:

[0065] Step S11, receiving a predefined number of roles and role vector dimensions as system initialization parameters;

[0066] Step S12: Based on the initialization parameters, construct a two-layer linear network as a role encoder, wherein the input layer dimension of the encoder is equal to the number of roles, and the output layer dimension is equal to the role vector dimension;

[0067] Step S13: Generate a set of role one-hot vectors according to the number of roles, where each role one-hot vector corresponds to a predetermined role, and the dimension of the role vector is equal to the number of roles;

[0068] Step S14, inputting the role one-hot vectors into the role encoder in sequence to obtain corresponding role vector representations, wherein the dimension of each role vector representation is equal to the role vector dimension;

[0069] Step S15: Store the role vector representation in a system storage structure, wherein each role vector representation and its corresponding role index form a key-value pair.

[0070] In this embodiment, efficient representation and management of roles in a multi-agent system is achieved through role vector representation learning. By receiving the predefined number of roles and role vector dimensions as initialization parameters, the system is provided with flexible configuration capabilities, so that the method can adapt to multi-agent scenarios of different scales and complexities. The constructed two-layer linear network as a role encoder realizes a nonlinear mapping from a simple one-hot vector to a complex role vector representation, which can capture the potential relationship and characteristics between roles. The process of generating a role one-hot vector ensures the uniqueness and distinguishability of each role, and provides a basis for subsequent role assignment. The process of inputting the role one-hot vector into the role encoder to obtain the role vector representation realizes the dimension reduction and feature extraction of role information, so that the system can process role information in a lower dimensional space and improve computational efficiency. The way of storing the role vector representation as a key-value pair is not only convenient for rapid retrieval and updating, but also provides efficient data structure support for the subsequent role matching and assignment process. The innovation of this role vector representation learning method is that it converts discrete role concepts into continuous vector space representations, so that the system can process the relationship and similarity between roles through vector operations, and provides a mathematical basis for subsequent agent role assignment and role-based decision-making. In addition, this representation method also provides the possibility for interpolation and extrapolation between roles, allowing the system to handle new roles that are not predefined.

[0071] In general, by converting the discrete concept of role into a continuous vector representation, efficient encoding, storage and retrieval of role information is achieved, which provides a solid foundation for subsequent agent role assignment and role-based decision-making, thereby improving the performance and flexibility of the entire multi-agent reinforcement learning system.

[0072] like Figure 3 As shown, according to one aspect of the present application, step S2 is specifically:

[0073] Step S21, obtaining the historical trajectory information of the agent, and processing it using a linear layer and a gated recurrent unit to obtain action-observation history information;

[0074] Step S22: Based on the action-observation history information, a local trajectory encoder network is constructed, where the local trajectory encoder network is a fully connected network, and its output dimension is the same as the dimension of the character vector representation;

[0075] Step S23, inputting the action-observation history information into the local trajectory encoder network to obtain implicit information representing the identity of the agent;

[0076] Step S24, using the implicit information of the agent's identity and the stored role vector representation, calculating the matching degree between the agent and each role, wherein the matching degree is obtained by calculating the dot product of the implicit information and the role vector representation;

[0077] Step S25, applying the Softmax function to the matching degree to obtain the role assignment probability distribution;

[0078] Step S26: Based on the role assignment probability distribution, a random sampling method is used to select a specific role for the agent, and a role selection result is obtained, and the role selection result is represented as a one-hot vector;

[0079] Step S27: Combine the role selection result with the current state information of the agent to form a complete state representation of the agent, and store it for use in subsequent steps.

[0080] This embodiment enables the system to adaptively assign roles based on the historical behavior and current state of the agent.

[0081] By acquiring and processing the historical trajectory information of the agent, the system can capture the behavior patterns and characteristics of the agent. Using linear layers and gated recurrent units to process this information can not only extract temporal features, but also effectively handle long-term dependency issues, which is crucial for understanding the long-term behavior of the agent. The constructed local trajectory encoder network further compresses the processed historical information into implicit information of the same dimension as the role vector representation. This dimensionality reduction operation not only reduces the computational complexity, but also realizes the alignment of the agent's historical information and role representation, laying the foundation for subsequent matching calculations. By calculating the dot product of the implicit information of the agent's identity and the vector representation of each role, the system can quantify the degree of match between the agent and each role. This similarity calculation method based on vector inner product is not only computationally efficient, but also captures implicit semantic similarity.

[0082] The process of converting the degree of matching into probability distribution by applying the Softmax function makes the role allocation random and exploratory, which is crucial for the exploration-exploitation balance in reinforcement learning. The method of selecting specific roles based on random sampling of probability distribution further enhances the randomness and adaptability of the system and avoids the role allocation from falling into the local optimum. The practice of combining the selected role with the current state information of the agent to form a complete state representation realizes the fusion of role information and state information, providing comprehensive information support for the subsequent decision-making process. The effect of this dynamic role allocation method is that it enables the system to adaptively adjust the role according to the historical behavior and current state of the agent, rather than using a fixed role allocation strategy. This flexibility enables the system to better adapt to complex and dynamically changing environments, and each agent can assume the most appropriate role according to its own behavioral characteristics and current situation.

[0083] In summary, by realizing dynamic and adaptive allocation of agent roles, the flexibility and adaptability of the multi-agent system are improved, enabling the system to better cope with complex and dynamically changing environments, thereby improving the performance and efficiency of the entire system.

[0084] like Figure 4 As shown, according to one aspect of the present application, step S3 is specifically:

[0085] Step S31, obtaining a complete state representation of the agent, as well as a predefined private action set and an interactive action set;

[0086] Step S32: construct a private action processing network, including a two-layer fully connected network and a gated recurrent unit, and input the complete state representation of the agent into the network to obtain a private action representation;

[0087] Step S33: Based on the private action representation, the values ​​of all actions in the private action set are calculated through a fully connected network to obtain the private action value;

[0088] Step S34: For the interactive action set, first obtain the observation information of the agent on other agents, and process it through the target observation encoder network to obtain the historical trajectory information;

[0089] Step S35: Based on the role information of the agent, parameters of the role strategy network are generated through the role decoding network;

[0090] Step S36, constructing a role strategy network using role strategy network parameters, inputting historical trajectory information into the role strategy network, and obtaining interactive action representation;

[0091] Step S37: combining the private action representation and the interactive action representation, calculating the value of all actions in the interactive action set to obtain the interactive action value;

[0092] Step S38: Merge the private action value and the interactive action value to obtain a complete action value vector of the agent;

[0093] Step S39, repeating steps S31 to S38 for all agents to obtain a set of action value vectors of all agents;

[0094] Step S310: Use the QMIX network to process the action value vector sets of all agents to obtain the global action value;

[0095] Step S311: Calculate the temporal difference error based on the obtained global action value, and use the error to update the parameters of the QMIX network and other related networks.

[0096] Other networks include role encoder network, local trajectory encoder network, target observation encoder network, role decoder network, private action processing network, and role policy network.

[0097] The updating process is to calculate the timing difference error δ = r + γ max a ' Q̄ tot (s', a') - Q tot (s, a)

[0098] where Q̄ tot is the target network, Q tot is the current QMIX network output.

[0099] Back propagation: Use the calculated temporal difference error δ to calculate the gradient of each network parameter through the back propagation algorithm.

[0100] Parameter update, for each network parameter θ, use gradient descent (or other optimization algorithms) to update:

[0101] θ = θ - α * ∇θL(θ); where α is the learning rate and L(θ) is the loss function (based on temporal difference error).

[0102] Soft update target network: Q̄ tot = τ * Q tot + (1 - τ) * Q̄ tot . Where τ is the soft update coefficient.

[0103] In this embodiment, a role-based heterogeneous action representation is implemented, which enables the system to generate more accurate and personalized action value estimates based on the agent's role and environment state.

[0104] By distinguishing between private action sets and interactive action sets, the system can adopt different processing strategies for different types of actions. This distinction enables the system to better handle complex interactions in multi-agent environments. For private actions, the constructed two-layer fully connected network and gated recurrent unit can effectively extract key information from the complete state representation of the agent and generate private action representations. This representation method can capture the influence of individual characteristics of the agent and the current role, thereby providing a more accurate basis for the value estimation of private actions. The method of calculating the value of private actions through a fully connected network realizes a nonlinear mapping from action representation to action value, which can capture the complex relationship between action value and state. For interactive actions, the system first obtains the observation information of the agent on other agents, and obtains the historical trajectory information through the target observation encoder network. This processing method not only considers the interaction history between agents, but also captures the temporal characteristics of the interaction mode. The method of generating role policy network parameters based on the role information of the agent realizes the close integration of role and strategy, enabling the system to generate personalized policy networks for different roles.

[0105] The method of using the role strategy network to process historical trajectory information to obtain interactive action representation enables the system to generate more accurate interactive action representations based on the role and interaction history of the agent. The method of combining private action representation and interactive action representation to calculate action value realizes the comprehensive consideration of the individual behavior and interactive behavior of the agent, thereby obtaining a more comprehensive and accurate action value estimation. Repeating this process for all agents and using the QMIX network to process the action value vector set of all agents realizes the mapping from local value to global value. This method not only considers the contribution of individual agents, but also ensures the consistency of overall decision-making. Finally, by calculating the temporal difference error and updating the network parameters, the continuous optimization and learning of the entire system are achieved. The innovation of this role-based heterogeneous action representation method is that it can generate more accurate and personalized action value estimates based on the role and environment state of the agent, while considering the influence of private behavior and interactive behavior. This method not only improves the accuracy of action value estimation, but also enhances the system's ability to handle complex multi-agent interactions.

[0106] In summary, by implementing role-based heterogeneous action representation, the accuracy and personalization of action value estimation are improved, enabling the system to better handle complex multi-agent interactions, thereby improving the performance and adaptability of the entire reinforcement learning system.

[0107] like Figure 5 and Figure 6 As shown, according to another aspect of the present application, a heterogeneous action representation multi-agent reinforcement learning system based on role allocation is also provided, comprising:

[0108] A role allocation module, configured to receive a predefined number of roles and a role vector dimension, generate a role one-hot vector, and map the role one-hot vector to a role vector representation;

[0109] The local strategy encoding module is used to obtain the historical trajectory information of the intelligent agent, generate implicit information representing the identity of the intelligent agent, and calculate the matching degree between the intelligent agent and each role based on the implicit information and the role vector representation;

[0110] The target observation encoding module is used to obtain the observation information of other agents and generate historical trajectory information;

[0111] A role decoding module, which is used to map the role vector representation into the parameters of the role policy network;

[0112] Hybrid action-value network module, including:

[0113] A private action processing unit, used to generate private action representations based on the agent's observation information and calculate the value of the private action;

[0114] An interactive action processing unit, used to generate interactive action representations based on historical trajectory information and role strategy network parameters, and calculate the value of interactive actions;

[0115] The global value estimation unit is used to map the local action values ​​of all agents to the global action values;

[0116] The parameter update module is used to optimize the parameters of each network in the system based on the timing difference error and update the target network through soft update.

[0117] According to another aspect of the present application, the role allocation module includes:

[0118] The role encoder is a two-layer linear network that maps the role one-hot vector to a role vector representation.

[0119] A storage unit, used for storing the role vector representation and the corresponding role index in the form of a key-value pair;

[0120] The local policy encoding module includes:

[0121] Trajectory processing unit, which includes linear layers and gated recurrent units, is used to process the historical trajectory information of the agent;

[0122] The identity encoder is a fully connected network that maps the processed trajectory information into implicit information of the agent’s identity;

[0123] A matching degree calculation unit is used to calculate the dot product between the implicit information of the agent's identity and the vector representation of each role to obtain the matching degree;

[0124] The target observation encoding module is a neural network, whose input is the observation information of the agent on other agents, and its output is the encoded historical trajectory information;

[0125] The role decoding module is a fully connected network used to nonlinearly map the role vector representation into the parameters of the role policy network;

[0126] The private action processing units in the hybrid action-value network module include:

[0127] Two layers of fully connected networks and a gated recurrent unit for generating action representations;

[0128] A fully connected network is used to map action representations to private action values.

[0129] According to one aspect of the present application, it also includes:

[0130] The role selection module is used to apply the Softmax function to the matching degree to obtain the role assignment probability distribution, and randomly sample and select the specific role of the agent based on the distribution.

[0131] According to one aspect of the present application, the interactive action processing unit in the hybrid action value network module includes:

[0132] The role policy network, whose parameters are generated by the role decoding module, is used to process historical trajectory information to obtain interactive action representations;

[0133] The value calculation unit is used to calculate the value of the interactive action by combining the private action representation and the interactive action representation.

[0134] According to one aspect of the present application, the global value estimation unit in the hybrid action value network module is a QMIX network, which is used to nonlinearly combine the local action values ​​of all intelligent agents into a global action value.

[0135] According to one aspect of the present application, the parameter updating module includes:

[0136] TD error calculation unit, used to calculate the difference between the action value in the current state and the sum of the maximum expected action value in the next state;

[0137] An optimizer, used to update the parameters of each network in the system based on the TD error;

[0138] A soft update unit is used to periodically copy part of the parameters of the master network to the target network to stabilize the learning process.

[0139] In this embodiment, the function of the target observation encoding module is to obtain the observation information of the agent on other agents and encode it into historical trajectory information. The purpose is to compress and extract the key features of the interaction between agents. The function of the role decoding module is to map the role vector representation into the parameters of the role policy network. The purpose is to dynamically generate a policy network based on the role information and realize the decision-making of the role reservation.

[0140] The target observation encoding module first processes the observation information between agents and generates historical trajectory information h(τ t (i,j) ).

[0141] The role decoding module represents Z according to the currently assigned role vector φk , generating role strategy network parameters θ φk .

[0142] The outputs of these two modules are combined in the hybrid action value network module: historical trajectory information h(τ t (i,j) ) is input into the role policy network f φk (·; θ φk ). The role policy network uses the parameters θ generated by the role decoding module φkThe role strategy network processes historical trajectory information and generates interactive action representation m t (i,j) .

[0143] Finally, the interactive action representation is combined with the private action representation to calculate the action value.

[0144] In another embodiment of the present application, step S1 further includes S16 a dynamic role representation learning process, which is as follows:

[0145] Construct a temporal attention network (Temporal Attention Network), with the input as the historical trajectory of all agents {τ 1 , τ 2 , ..., τ n}.

[0146] For each time step t, calculate the attention weight: α t = softmax(W a tanh(W h h t + b h ) + b a )

[0147] where h t is the hidden state, W a , W h , b h , b a are learnable parameters.

[0148] Generate context vector c = Σ t α t h t

[0149] Input the context vector c into a variational autoencoder (VAE):

[0150] Encoder q φ (z|c) maps c to the latent space Z;

[0151] From the encoder q φ (z|c) is sampled to obtain the latent space z;

[0152] Decoder p θ (c|z) reconstructs the context vector c; minimizes the reconstruction error and KL divergence L = -E qφ (z|c)[logp θ (c|z)] + KL(q φ (z|c)||p(z));

[0153] Use the reparameterization technique for back propagation to update the VAE parameters; the sampled latent space z is used as a dynamic role representation and stored.

[0154] This embodiment is used to capture the dynamic characteristics of a character changing over time and improve the expressiveness of the character representation.

[0155] In some scenarios, the specific implementation cases are as follows:

[0156] S1. Character vector representation learning

[0157] S11. Obtain the predefined number of roles k(a) and the dimension of the role vector d(b). Set these two hyperparameters as system initialization parameters to obtain the initialized number of roles k'(c) and the dimension of the role vector d'(d).

[0158] S12. Based on the initialized number of roles k'(c) and the role vector dimension d'(d), a two-layer linear network is constructed as the role encoder f e (•; θ e )(e). The input layer dimension of the network is k'(c), and the output layer dimension is d'(d), where θ e Represents network parameters.

[0159] S13, using the initialized number of roles k'(c), generate a role unique hot vector set D(g). The processing flow is as follows:

[0160] 1. Create an empty set D(g).

[0161] 2. For each role i (i from 1 to k'), do the following:

[0162] a. Create a k'-dimensional zero vector v i .

[0163] b. v i The i-th element of is set to 1 and the rest remain 0.

[0164] c. The processed vector v i Named i (f), as the one-hot vector of the i-th role.

[0165] d. i (f) is added to the set D(g).

[0166] 3. Repeat step 2 until all k' roles have been processed.

[0167] 4. Finally, we get the character unique hot vector set D(g) = {d 1 , d 2, ..., d k'}, containing k' k'-dimensional one-hot vectors.

[0168] S14. Use the constructed role encoder network f e (•; θ e )(e) and the character one-hot vector set D(g) are used to calculate the character vector representation. The processing flow is as follows:

[0169] 1. Create an empty set Z(h) to store the character vector representation.

[0170] 2. For each one-hot vector d in D(g) i (f), perform the following operations: i (f) Input to the encoder network f e (•; θe)(e); calculate Z φi = fe(d i θ e ), and obtain the d'-dimensional character vector representation; Z φi Add to the set Z(h).

[0171] 3. Repeat step 2 until all one-hot vectors in D(g) are processed.

[0172] 4. Finally, we get the character vector representation set Z(h) = {Z φ1 , Z φ2 , ..., Z φk '}, containing k' d'-dimensional vectors.

[0173] S15, storing the obtained role vector representation set Z(h) into the system storage. The storage process is as follows:

[0174] 1. Create an empty storage structure R(i).

[0175] 2. For each character vector in Z(h) φi , perform the following operations: take the role index i as the key, and the corresponding vector representation Z φi Store the value into R(i).

[0176] 3. Repeat step 2 until all vector representations in Z(h) are stored.

[0177] 4. Finally, a quickly accessible role vector representation storage structure R(i) is obtained for use in subsequent steps.

[0178] S2. Agent role allocation

[0179] S21, obtain the historical trajectory information τ of the intelligent agent i(j) and the stored character vector representation R(i). τ is processed using a linear layer and a gated recurrent unit (GRU) i (j), obtain the action-observation history information h τi (k).

[0180] S22, based on action-observation history information h τi (k), construct the local trajectory encoder network g(•; θ g )(l). This network is a fully connected network with the same input dimension as h τi (k) is the same, and the output dimension is d'(d), which is consistent with the dimension of the character vector representation. Using the local trajectory encoder network g(•; θ g )(l) Action-observation history information h τi (k) Processing to obtain implicit information Z of the agent’s identity τi (m).

[0181] S23, using the obtained implicit information Z of the intelligent agent identity τi (m) and the stored role vector representation R(i), and calculate the matching degree between the agent and each role. The processing flow is as follows:

[0182] 1. Create an empty matching list M(n).

[0183] 2. For each character vector representation Z in R(i) φj , do the following: Calculate Z τi (m) and Z φj The dot product of i j (τ i , Φ j ) =(Z τi ) T •Z φj ; The calculated matching degree Q i j Add to the list M(n).

[0184] 3. Repeat step 2 until all character vector representations in R(i) are processed.

[0185] 4. Finally, we get the matching list M(n) = {Q i 1 , Q i 2 , ..., Q i k'}.

[0186] S24, apply the Softmax function to the matching list M(n) to obtain the role assignment probability distribution P(o). The processing flow is as follows:

[0187] 1. Calculate the exponential sum of all elements in M(n): sum exp =∑exp(Q i j ), j ranges from 1 to k'.

[0188] 2. For each element Q in M(n) i j , calculate its Softmax value: P i j = exp(Q i j ) / sum exp

[0189] 3. All calculated P i j Composition probability distribution P(o) = {P i 1 , P i 2 , ..., P i k '}.

[0190] S25. Based on the role assignment probability distribution P(o), assign specific roles to the agent. The processing flow is as follows:

[0191] 1. Select a role index j from P(o) using a random sampling method.

[0192] 2. Create a k'-dimensional zero vector r i (p).

[0193] 3. Set the zero vector r i The j-th element of (p) is set to 1 and the rest remain 0, forming a one-hot vector.

[0194] 4. Output zero vector r i (p) is the role assignment result of agent i at the current time step.

[0195] S26, assign the role of the agent to the result r i (p) and its current status information s i (q) Combined to form the complete state representation S of the agent i (r). The processing flow is as follows:

[0196] 1. i (p) and s i(q) is concatenated to obtain the extended state vector S i (r) = [r i (p); s i (q)].

[0197] 2. Storage S i (r) for use in subsequent steps.

[0198] S3. Role-based heterogeneous action representation

[0199] S31, obtain the complete state representation S of agent i i (r), which contains the role information r i (p) and current status information s i (q). At the same time, obtain the predefined private action set A self i (s) and the interaction action set A other i (t).

[0200] S32, Processing private action set A self i (s). The process is as follows:

[0201] 1. Build a two-layer fully connected network h self (•; θ h )(u) and a gated recurrent unit GRU(•)(v).

[0202] 2. S i (r) Input to h self (•; θ h )(u), we get the intermediate representation m i '(w).

[0203] 3. Add m i '(w) is input into GRU(•)(v) to obtain the private action representation m t i (x).

[0204] S33, based on private action representation m t i (x), calculate the private action set A self i The value of all actions in (s). The process is as follows:

[0205] 1. Build a fully connected network f self (•; θ self )(y), the input dimension is the same as m t i (x) is the same, the output dimension is |A selfi (s)|(size of private action set).

[0206] 2. Add m t i (x) Input to f self (•; θ self )(y), we get the private action value vector Q self (z) = {Q(o t i , a t i ) |a t i ∈A self i (s)}.

[0207] S34, Processing interactive action set A other i (t). The process is as follows:

[0208] 1. Obtain observation information o of agent i on other agents j t i,j (aa).

[0209] 2. Construct the target observation encoder network e(•; θ e )(ab).

[0210] 3. Place o t i,j (aa) input to e(•; θ e )(ab), get the historical trajectory information h τt i,j (ac).

[0211] S35, based on historical trajectory information h τt i,j (ac) and role information r i (p), generate role strategy network parameters. The process is as follows:

[0212] 1. Construct the role decoding network d(•; θ d )(ad).

[0213] 2. Add r i (p) input to d(•; θ d )(ad), we get the role strategy network parameter θ φk (ae).

[0214] S36, using the generated role strategy network parameters θ φk (ae), build the role strategy network f φk (•; θ φk)(af). The historical trajectory information h τt i,j (ac) input to f φk (•; θ φk )(af), we get the interactive action representation m t i,j (ag).

[0215] S37, combined with private action representation m ti (x) and the interactive action representation m t i,j (ag), calculate the interactive action set A other i The value of all actions in (t). The process is as follows:

[0216] 1. For each interaction action a t i,j ∈ A other i (t), calculate its Q value: Q(o t i , a t i,j ) = (m t i ) T •m t i,j ;

[0217] 2. All calculated Q values ​​form the interactive action value vector Q other (ah) = {Q(o t i , a t i,j )|a t i,j ∈A other i (t)}.

[0218] S38, merge private action value vector Q self (z) and the interaction action value vector Q other (ah), we get the complete action value vector Q of agent i i (ai) = [Q self (z); Q other (ah)].

[0219] S39, repeat steps S31 to S38 for all agents to obtain the action value vector set Q of all agents all (aj) = {Q1, Q2, ..., Qn}, where n is the total number of agents.

[0220] S310, QMIX network processing all (aj), get the global action value Q tot (ak). The process is as follows:

[0221] 1. Construct a QMIX network M(•; θM)(al).

[0222] 2. Q all (aj) is input into M(•; θM)(al), and Q is obtained tot (ak) = M( Qall (aj); θM).

[0223] S311, based on the obtained Q tot (ak), calculate the TD error and update the parameters. The process is as follows:

[0224] 1. Get the current state s(am), the action performed a(an), the reward obtained r(ao), and the next state s'(ap).

[0225] 2. Calculate the target value y(aq) = r(ao) + γ * maxa' Q tot (s'(ap), a'), where γ is the discount factor.

[0226] 3. Calculate the TD error δ(ar) = y(aq) - Q tot (s(am), a(an)).

[0227] 4. Use δ(ar) to update the parameters of the QMIX network M(•; θM)(al) and other related networks.

[0228] In another embodiment of the present application, step S3 is further:

[0229] S3: Role-based heterogeneous action representation, including:

[0230] S31: For all agents that have been assigned roles, learn a strategy for each role;

[0231] S32: Divide the actions into two subsets: Private action set A self i and interaction action set A other i ;

[0232] S33: For private action set A self i Actions in:

[0233] a) Using a two-layer fully connected network and a gated recurrent unit, we take all the observation information of agent i as input and obtain the action representation m t i ;

[0234] b) Use a fully connected network with parameters θ self , mapping to obtain all action values ​​in the private action set;

[0235] c) Calculate and execute action a t i ∈A self i The value of: Q(o t i , a t i ) = f self (m t i θ self );

[0236] S34: For interactive action set A other i Actions in:

[0237] a) Construct a target observation encoder, with the input being the observation information o of agent i on agent j t i,j ;

[0238] b) The target observation encoder generates historical trajectory information hτ t i,j ;

[0239] c) Input historical trajectory information into the role strategy network f Φk (·; θ Φk ), obtain the action representation m t i,j ;

[0240] S35: Use the role decoding network to represent the role vector Z Φk Mapped to role strategy network parameters θ Φk ;

[0241] S36: Combine the information of agent i and calculate and execute interactive action a t i,j The value of: Q(o t i , a t i,j ) = (m t i ) T ·m t i,j ;

[0242] S37: Combine private actions and interactive actions to get the total action value Q of the agent i (o t i , ·);

[0243] S38: Use the QMIX network to transform the local action values ​​(Q i , Q -i ) is mapped to the global action value Q tot ;

[0244] S39: Use TD loss to optimize the algorithm: L(θ) = E D [(r + γ max a ' Q̄ tot (s', a') - Q tot (s,a)) 2 ];

[0245] S310: Use soft update method, from Q tot The target network Q̄ is obtained by periodically copying the parameters tot .

[0246] In this embodiment, the character is specifically interpreted as: τ i : historical trajectory of agent i; s i : The current state of agent i; h t : hidden state at time step t; α t : attention weight at time step t; W a , W h , b h , b a : learnable parameters of the attention network; c: context vector; z: variable in the latent space; q φ (z|c): encoder of variational autoencoder; p θ (c|z): Decoder of variational autoencoder; L: Loss function of variational autoencoder; Q(s, a): State-action value function; Q tot : The total Q value after mixing; φ: monotonically increasing function; M: meta-optimizer; γ: discount factor.

[0247] In another embodiment, in StarCraft SMAC, the number of friendly agents is 3, and the number of enemy agents is 5. First, the role vector representation module network, that is, the role encoder input dimension is the dimension of all information received by the agent itself, including self-information and enemy information. The self-information is the current agent's position in the map, current health, and current action data, which are stored in the form of vectors. The enemy information includes the enemy agent's position in the map, current health, and current action data, which are stored in the form of vectors. The self-data and local data are combined into a vector as the input of the agent; the output dimension is the defined number of roles, indicating which identity role is selected. The number of roles is defined as 4 in this article;

[0248] In the heterogeneous action information representation module, the input dimension is the dimension of all enemy information received by the agent itself, including the enemy agent's position in the map, current health, and current action data, which are stored in the form of vectors. The output dimension is the Q value corresponding to all actions. The output dimension in 3s_vs_5z is 11, indicating 6 movement actions and 5 actions to attack different enemies. The movement actions are up, down, left, right, stay still, and die. The attack action is that there are 5 hostile targets at present, so there are 5 attack actions.

[0249] In the warehouse logistics robot handling scenario, the method of the present application can be used to realize the task of cargo distribution by the handling robots in collaboration. First, the network input dimension of the role vector characterization module is the dimension of all information received by the handling robot, including its own information and information about all the cargo to be handled. Its own information is the current position of the handling robot, the current task, the current action, and its own handling capacity. The information about the cargo to be handled includes the location of the cargo, the type of cargo, the weight of the cargo, and other data. The output dimension is the number of defined roles, indicating which identity role is selected. It is assumed to be defined as 4, representing handling, sorting, loading, and unloading respectively.

[0250] In the heterogeneous action information representation module, the input dimension is all the information about the goods to be transported received by the handling robot, including data such as the location of the goods, the type of goods, and the weight of the goods. The output dimension is the Q value corresponding to all actions. The robot's actions include moving actions and task actions. The moving actions have five states: up, down, left, right, and stay still. The task actions have three actions: grabbing, carrying, and placing.

[0251] In summary, the system predefines multiple roles, each of which corresponds to a predetermined subtask. The role encoder constructed through a two-layer linear network maps the role unique hot vector to a high-dimensional role vector representation. This representation captures the potential relationships and feature differences between roles. Using the local trajectory encoder network, the historical trajectory information of the agent is encoded into implicit identity information. By calculating the matching degree of this information with the vector representation of each role and applying the Softmax function, the system dynamically assigns the most suitable role to each agent. It ensures that different agents can assume different roles and responsibilities, effectively avoids behavioral homogeneity, and makes full use of individual differences and specialization advantages. For example, in team competitive games, agents can assume different roles such as offense, defense, and support to form effective tactical cooperation.

[0252] This solution effectively reduces the dimension of the decision space through role allocation and heterogeneous action representation:

[0253] Based on role strategy sharing: Agents of the same role share a strategy network, which significantly reduces the number of parameters that need to be learned. The action space is divided into a private action set and an interactive action set, which are processed using different network structures, i.e., heterogeneous action representation. This decomposition method effectively reduces the complexity of the joint action space. In this way, the system can maintain a high learning efficiency even when the number of agents increases, effectively alleviating the problem of the curse of dimensionality.

[0254] Improve role adaptability in dynamic environments.

[0255] Role matching based on historical trajectories: The system re-evaluates the matching degree between the agent and each role at each time step to ensure that the role allocation can respond to environmental changes in a timely manner.

[0256] Soft role assignment: Generates role assignment probability distribution through Softmax function instead of rigidly specifying roles, providing flexibility for role switching. This dynamic adaptation mechanism enables the agent to adjust its role and behavior as needed in complex tasks, improving the flexibility and robustness of the system.

[0257] Heterogeneous action representations effectively handle the problem that different agents may have different action spaces.

[0258] Private action processing: For actions that only affect the agent itself, a dedicated network structure is used to process them, taking into account the individual characteristics of the agent.

[0259] Interaction action processing: For actions that affect other agents, a target observation encoder and a role policy network are introduced to capture the interaction features between agents.

[0260] Hybrid Action Value Network: Through the QMIX network, the values ​​of private actions and interactive actions are organically combined to achieve effective collaborative learning in heterogeneous action spaces.

[0261] Through role allocation, the system implicitly introduces task decomposition, which helps to simplify long-term planning problems. Using gated recurrent units (GRUs) to process the agent's historical trajectory helps capture long-term dependencies. By mapping local action values ​​to global action values, the credit allocation problem is alleviated to a certain extent.

[0262] In general, this technical solution effectively solves key problems in multi-agent reinforcement learning, such as behavior homogeneity, dimensionality curse, lack of dynamic adaptability, and heterogeneous action space processing, through innovative role allocation mechanisms and heterogeneous action representation methods. Although there is still room for improvement in long-term dependencies and credit allocation, the overall performance of MARL in complex, dynamic, and large-scale environments has been significantly improved.

[0263] The preferred embodiments of the present invention are described in detail above; however, the present invention is not limited to the specific details in the above embodiments. Within the technical concept of the present invention, various equivalent transformations can be made to the technical solutions of the present invention, and these equivalent transformations all belong to the protection scope of the present invention.

Claims

1. A multi-intelligence reinforcement learning method for heterogeneous action representation based on role allocation, characterized in that: The steps include: Step S1: Through role vector representation learning, all agents are divided into different role groups, each role is responsible for a predetermined subtask, and agents with the same role share a strategy network; Step S2: assign a predetermined role to the agent at each time step, extract identity information from the historical trajectory information of the agent, encode the trajectory information into implicit information for representing its role identity, and use the implicit information to determine the role to which the current agent belongs; Step S3: Under the predetermined role, the attention level of different opponents is determined according to the agent role dynamics, and the role strategy with heterogeneous action representation is used to analyze the opponent information according to the role dynamics and evaluate the action value, so as to learn differentiated strategies for each agent; Step S1 is specifically as follows: Step S11, receiving a predefined number of roles and role vector dimensions as system initialization parameters; Step S12: Based on the initialization parameters, construct a two-layer linear network as a role encoder, wherein the input layer dimension of the encoder is equal to the number of roles, and the output layer dimension is equal to the role vector dimension; Step S13: Generate a set of role one-hot vectors according to the number of roles, where each role one-hot vector corresponds to a predetermined role, and the dimension of the role vector is equal to the number of roles; Step S14, inputting the role one-hot vectors into the role encoder in sequence to obtain corresponding role vector representations, wherein the dimension of each role vector representation is equal to the role vector dimension; Step S15: storing the role vector representation in a system storage structure, wherein each role vector representation and its corresponding role index form a key-value pair; Step S2 is specifically as follows: Step S21, obtaining the historical trajectory information of the agent, and processing it using a linear layer and a gated recurrent unit to obtain action-observation history information; Step S22: Based on the action-observation history information, a local trajectory encoder network is constructed, where the local trajectory encoder network is a fully connected network, and its output dimension is the same as the dimension of the character vector representation; Step S23, inputting the action-observation history information into the local trajectory encoder network to obtain implicit information representing the identity of the agent; Step S24, using the implicit information of the agent's identity and the stored role vector representation, calculating the matching degree between the agent and each role, wherein the matching degree is obtained by calculating the dot product of the implicit information and the role vector representation; Step S25, applying the Softmax function to the matching degree to obtain the role assignment probability distribution; Step S26: Based on the role assignment probability distribution, a random sampling method is used to select a specific role for the agent, and a role selection result is obtained, and the role selection result is represented as a one-hot vector; Step S27, combining the role selection result with the current state information of the agent to form a complete state representation of the agent, and storing it for use in subsequent steps; Step S3 is specifically as follows: Step S31, obtaining a complete state representation of the agent, as well as a predefined private action set and an interactive action set; Step S32: construct a private action processing network, including a two-layer fully connected network and a gated recurrent unit, and input the complete state representation of the agent into the network to obtain a private action representation; Step S33: Based on the private action representation, the values ​​of all actions in the private action set are calculated through a fully connected network to obtain the private action value; Step S34: For the interactive action set, first obtain the observation information of the agent on other agents, and process it through the target observation encoder network to obtain the historical trajectory information; Step S35: Based on the role information of the agent, parameters of the role strategy network are generated through the role decoding network; Step S36, constructing a role strategy network using role strategy network parameters, inputting historical trajectory information into the role strategy network, and obtaining interactive action representation; Step S37: combining the private action representation and the interactive action representation, calculating the value of all actions in the interactive action set to obtain the interactive action value; Step S38: Merge the private action value and the interactive action value to obtain a complete action value vector of the agent; Step S39, repeating steps S31 to S38 for all agents to obtain a set of action value vectors of all agents; Step S310: Use the QMIX network to process the action value vector sets of all agents to obtain the global action value; Step S311: Calculate the temporal difference error based on the obtained global action value, and use the error to update the parameters of the QMIX network and other related networks.

2. A heterogeneous action representation multi-agent reinforcement learning system based on role allocation, characterized in that: include: A role allocation module, configured to receive a predefined number of roles and a role vector dimension, generate a role one-hot vector, and map the role one-hot vector to a role vector representation; The local strategy encoding module is used to obtain the historical trajectory information of the intelligent agent, generate implicit information representing the identity of the intelligent agent, and calculate the matching degree between the intelligent agent and each role based on the implicit information and the role vector representation; The target observation encoding module is used to obtain the observation information of other agents and generate historical trajectory information; A role decoding module, which is used to map the role vector representation into the parameters of the role policy network; Hybrid action-value network module, including: A private action processing unit, used to generate private action representations based on the agent's observation information and calculate the value of the private action; An interactive action processing unit, used to generate interactive action representations based on historical trajectory information and role strategy network parameters, and calculate the value of interactive actions; The global value estimation unit is used to map the local action values ​​of all agents to the global action values; The parameter update module is used to optimize the parameters of each network in the system based on the temporal difference error and update the target network through soft update; The role allocation module includes: The role encoder is a two-layer linear network that maps the role one-hot vector to a role vector representation. A storage unit, used for storing the role vector representation and the corresponding role index in the form of a key-value pair; The local policy encoding module includes: Trajectory processing unit, which includes linear layers and gated recurrent units, is used to process the historical trajectory information of the agent; The identity encoder is a fully connected network that maps the processed trajectory information into implicit information of the agent’s identity; A matching degree calculation unit is used to calculate the dot product between the implicit information of the agent's identity and the vector representation of each role to obtain the matching degree; The target observation encoding module is a neural network, whose input is the observation information of the agent on other agents, and its output is the encoded historical trajectory information; The role decoding module is a fully connected network used to nonlinearly map the role vector representation into the parameters of the role policy network; The private action processing units in the hybrid action-value network module include: Two layers of fully connected networks and a gated recurrent unit for generating action representations; A fully connected network is used to map action representations to private action values.

3. The heterogeneous action representation multi-agent reinforcement learning system based on role allocation according to claim 2, characterized in that: Also includes: The role selection module is used to apply the Softmax function to the matching degree to obtain the role assignment probability distribution, and randomly sample and select the specific role of the agent based on the distribution.

4. The heterogeneous action representation multi-agent reinforcement learning system based on role allocation according to claim 3, characterized in that: The interactive action processing unit in the hybrid action value network module includes: The role policy network, whose parameters are generated by the role decoding module, is used to process historical trajectory information to obtain interactive action representations; The value calculation unit is used to calculate the value of the interactive action by combining the private action representation and the interactive action representation.

5. The heterogeneous action representation multi-agent reinforcement learning system based on role allocation according to claim 3, characterized in that: The global value estimation unit in the hybrid action-value network module is a QMIX network, which is used to nonlinearly combine the local action values ​​of all agents into a global action value.

6. The heterogeneous action representation multi-agent reinforcement learning system based on role allocation according to claim 3, characterized in that: The parameter update module includes: TD error calculation unit, used to calculate the difference between the action value in the current state and the sum of the maximum expected action value in the next state; An optimizer, used to update the parameters of each network in the system based on the TD error; A soft update unit is used to periodically copy part of the parameters of the master network to the target network to stabilize the learning process.

Citation Information

Cited By

  • Strategy optimization method and system for heterogeneous multi-robot cooperative task

    CN122860947A