AI large model-based auxiliary decision-making method and system
By introducing the neural network and DQN model into the large AI model, the training startup time and resource utilization of the agent are optimized, which solves the problem of wasting server processing power in virtual military training and achieves the maintenance of agent confrontation intensity and improvement of resource efficiency. promote.
Patent Information
- Application Number
- CN202411171786.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-26
- Publication Date
- 2024-09-20
- Estimated Expiration
- 2044-08-26
AI Technical Summary
In military training in a virtual environment, the data processing requirements of the agent increase sharply during periods of high confrontation intensity, resulting in a waste of server processing power. It is difficult for the existing technology to effectively allocate the data processing tasks of game operation and agent training, resulting in Waste of resources.
An auxiliary decision-making method based on AI large models is used to dynamically adjust the training start time and experience number of the agent by adding a neural network. It combines the DQN model and the target network to optimize server resource utilization and reduce the peak demand for processing tasks.
It effectively reduces the peak demand for server processing task resources, while ensuring that the agent maintains a certain intensity of confrontation during the game, avoiding the waste of server resources.
Smart Images

Figure CN118662913A
Abstract
Description
Technical Field
[0001] The present invention relates to the field of reinforcement learning technology, and more specifically, to an auxiliary decision-making method and system based on an AI big model. Background Art
[0002] In military training in a virtual environment, an intelligent agent trained by reinforcement learning is used to assist the commander in training. Reinforcement learning needs to optimize the intelligent agent by continuously iterating and updating the parameters of the intelligent agent. In order for the intelligent agent to quickly adapt to the commander's strategy changes and continue to innovate, the intelligent agent needs to be learned and adjusted online. During the commander training process, the intelligent agent needs to reason and learn at the same time. The training of the intelligent agent and the operation of the game both rely on the network bandwidth and processing power of the server. The intensity of confrontation in the military training process is different. The intelligent agent will start a round of training after receiving a set number of behavioral rewards. In the time period with higher confrontation intensity, the frequency of environmental feedback to the intelligent agent's behavior is higher, so the frequency of intelligent agent updates is higher. At the same time, the virtual environment of military training requires more data processing, which generates a sudden increase in data processing during this period. If the processing capacity of the server is redundantly configured to ensure the maximum data processing capacity, the processing capacity of the server will be wasted in other time periods. It is necessary to reasonably allocate the game operation data processing tasks that fluctuate with the game process and the data processing tasks of the intelligent agent training to reduce the demand for server processing capacity. Summary of the invention
[0003] The present invention provides an auxiliary decision-making method and system based on an AI large model, which adds a neural network to the online training of the intelligent agent, so that the intelligent agent can dynamically adjust the training start time and the number of selected experiences through the neural network, so that the intelligent agent can more intelligently reduce the task processing peak of the server, while also ensuring a certain confrontation strength of the intelligent agent, and solving the problem that the processing capacity of the server is wasted in other time periods if the processing capacity of the redundantly configured server is used to ensure the maximum data processing capacity.
[0004] The present invention provides an auxiliary decision-making method based on an AI big model, comprising the following steps: Step 100, collecting training data and encoding them into observation vectors; The training data includes current weather data, combat training map data, enemy information, own information, and server information; Weather data: temperature, humidity, visibility; Combat training map data: topographic map, combat area division map, position marking map; Enemy information: enemy quantity, movement speed, location, and equipment; Your own information: your own soldier type, position, number, and equipment; Server information: server resource utilization; Server resource utilization is the weighted sum of CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
[0005] Step 200: The observation vector currently acquired Input into the DQN (Deep Q Network) model, output the Q values corresponding to all first actions in the first action space, use the first action selection strategy to select a first action from all first actions, decode and execute; In one embodiment of the present invention, a first action in the first action space is expressed as: ; in, , and They represent the target battlefield areas to which the 1st, 2nd, and nth combat units need to move respectively; Combat behavior , and They represent the combat operations that the 1st, 2nd, and nth combat units need to perform respectively; In one embodiment of the present invention, the battlefield area is an area divided by a training battlefield, and combat operations include marching, retreating, attacking, and position defense.
[0006] In one embodiment of the present invention, the first action selection strategy includes: according to -The greedy strategy chooses the first action: set up The initial value is 0.1; Generate a random number r∈[0,1], if r< , then randomly select a first action, otherwise, select the first action with the largest Q value.
[0007] Step 300, define time t as the current time, and the first action taken at time t is , execute the first action The observation vector collected at time t+1 is , execute the first action Rewards , combined into a high-dimensional vector exp and stored in the experience replay pool; , represents the observation vector collected at time t; The calculation formula is:
[0008] in , , , Represents the first, second, third, and fourth reward values respectively. The initial value is 0. Execute the first action back The cumulative number of enemy soldiers killed. Add up the number of your own soldiers killed, The number of positions occupied by your side is accumulated. The number of positions lost by the enemy is accumulated. Represents the total number of enemy soldiers, Indicates the total number of soldiers on one's side. represents the total number of enemy positions at the beginning of training, Indicates the total number of friendly positions at the beginning of training. , , , They represent the first, second, third, and fourth tendency coefficients respectively. The sum of the four tendency coefficients is 1. The default values are 0.2, 0.2, 0.3, and 0.3 respectively. Step 400, input the observation vector from time tn to time t into the trained first neural network, output the time when the training starts and the number of experiences collected during the training, and when the time when the training starts is reached, collect the corresponding number of experiences from the experience replay pool to train the DQN model.
[0009] As a further optimization solution of the present invention, the DQN model includes a Q network and Network, Q Network and The network is the same; In one embodiment of the present invention, the calculation formula of Q network is as follows:
[0010]
[0011] Where Z represents the latent vector, and Both represent trainable weight parameters, and Both represent trainable bias parameters, represents the first output vector, the value of the i-th component of the first output vector represents the Q value of the i-th first action, Represents the Sigmoid function.
[0012] In one embodiment of the present invention, the DQN model adopts a recurrent neural network.
[0013] In one embodiment of the present invention, the training steps of the DQN model include: Step 101, randomly obtain an experience from the experience pool;
[0014] express The maximum Q value output by the target network; according to and Calculate the loss value loss and update the Q network;
[0015] Indicates status and the first action The output Q value of the next Q network is, Indicates status and the first action The output Q value of the target network is: is the discount factor, which is a value between 0 and 1, used to balance the weights of immediate rewards and future rewards. The default value is 0.6; Step 102, updating the target network every fixed number of network updates so that its parameters are the same as those of the current Q network; The default value for the fixed network update interval is 10.
[0016] Step 103, until the number of collected experiences equals the number of experiences collected in this training, the step is terminated.
[0017] In one embodiment of the present invention, the calculation formula of the first neural network is as follows:
[0018]
[0019]
[0020]
[0021]
[0022]
[0023] in, and They represent the Lth observation vector of the input (the observation vector at time tn is the first observation vector), n≥L≥1, , , and Both represent trainable weight parameters, , , and Both represent trainable bias parameters, represents the dot product, Indicates The first intermediate feature, Indicates The second intermediate feature, Indicates A third intermediate feature, and Respectively represent the L-1th and output features, represents the second output vector, the value of the i-th component of the second output vector represents the Q value of the i-th second action, tanh represents the tanh function, Represents the Sigmoid function.
[0024] The beneficial effects of the present invention are: The present invention provides an auxiliary decision-making method based on an AI large model and an online training mechanism for an intelligent agent in the system, which can effectively reduce the peak value of the server's task processing resource requirements while ensuring that the intelligent agent can maintain a certain confrontation strength during the game. BRIEF DESCRIPTION OF THE DRAWINGS
[0025] Figure 1 It is a flowchart of the auxiliary decision-making method based on the AI big model and the online training process of the intelligent agent in the system of the present invention; DETAILED DESCRIPTION The subject matter described herein will now be discussed with reference to example implementations. It should be understood that the discussion of these implementations is only to enable those skilled in the art to better understand and implement the subject matter described herein, and the functions and arrangements of the elements discussed may be changed without departing from the scope of protection of the present specification. Various examples may omit, replace, or add various processes or components as needed. In addition, the features described in some examples may also be combined in other examples.
[0026] At least one embodiment of the present invention discloses an auxiliary decision-making method based on an AI big model, such as Figure 1 As shown, the following steps are included: Step 100, collecting training data and encoding them into observation vectors; The training data includes current weather data, combat training map data, enemy information, own information, and server information; Weather data: temperature, humidity, visibility; Combat training map data: topographic map, combat area division map, position marking map; Enemy information: enemy quantity, movement speed, location, and equipment; Your own information: your own soldier types (sniper, demolition, assault, machine gun, decryption, medical), location, number, and equipment; Server information: server resource utilization; Server resource utilization is the weighted sum of CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
[0027] The formula for calculating server resource utilization is:
[0028]
[0029] is the resource utilization of the server at time t, is the CPU utilization at time t, is the memory utilization at time t, is the disk I / O utilization at time t, is the network bandwidth utilization at time t, is the weight of CPU utilization, is the weight of memory utilization, is the weight of disk I / O utilization, is the weight of network bandwidth utilization.
[0030] As an example, , , , , , , , .
[0031] Step 200: The observation vector currently acquired Input into the DQN (Deep Q Network) model, output the Q values corresponding to all first actions in the first action space, use the first action selection strategy to select a first action from all first actions, decode and execute; In one embodiment of the present invention, a first action in the first action space is expressed as: ; in, , and They represent the target battlefield areas to which the 1st, 2nd, and nth combat units need to move respectively; Combat behavior , and They represent the combat operations that the 1st, 2nd, and nth combat units need to perform respectively; In one embodiment of the present invention, the battlefield area is an area divided by a training battlefield, and combat operations include marching, retreating, attacking, and position defense.
[0032] In one embodiment of the present invention, the first action selection strategy includes: according to -The greedy strategy chooses the first action: set up The initial value is 0.1; Generate a random number r∈[0,1], if r< , then randomly select a first action, otherwise, select the first action with the largest Q value.
[0033] Step 300, define time t as the current time, and the first action taken at time t is , execute the first action The observation vector collected at time t+1 is , execute the first action Rewards , combined into a high-dimensional vector exp and stored in the experience replay pool; , represents the observation vector collected at time t; The calculation formula is:
[0034] in , , , Represents the first, second, third, and fourth reward values respectively. The initial value is 0. Execute the first action back The cumulative number of enemy soldiers killed. Add up the number of your own soldiers killed, The number of positions occupied by your side is accumulated. The number of positions lost by the enemy is accumulated. Represents the total number of enemy soldiers, Indicates the total number of soldiers on one's side. represents the total number of enemy positions at the beginning of training, Indicates the total number of friendly positions at the beginning of training. , , , They represent the first, second, third, and fourth tendency coefficients respectively. The sum of the four tendency coefficients is 1. The default values are 0.2, 0.2, 0.3, and 0.3 respectively. Step 400, input the observation vector from time tn to time t into the trained first neural network, output the time when the training starts and the number of experiences collected during the training, and when the time when the training starts is reached, collect the corresponding number of experiences from the experience replay pool to train the DQN model.
[0035] As a further optimization solution of the present invention, the DQN model includes a Q network and a target network, and the Q network is the same as the target network; In one embodiment of the present invention, the calculation formula of the DQN model is as follows:
[0036]
[0037] Where Z represents the latent vector, and Both represent trainable weight parameters, and Both represent trainable bias parameters, represents the first output vector, the value of the i-th component of the first output vector represents the Q value of the i-th first action, Represents the Sigmoid function.
[0038] In one embodiment of the present invention, the DQN model adopts a recurrent neural network.
[0039] In one embodiment of the present invention, the training steps of the DQN model include: Step 101, randomly obtain an experience from the experience pool;
[0040] express The maximum Q value of the target network output is the termination, which means the end of the virtual military training; according to and Calculate the loss value loss and update the Q network;
[0041] Indicates status and the first action The output Q value of the next Q network is, Indicates status and the first action The output Q value of the target network is: is the discount factor, which is a value between 0 and 1, used to balance the weights of immediate rewards and future rewards. The default value is 0.6; Step 102, updating the target network every fixed number of network updates so that its parameters are the same as those of the current Q network; The default value for the fixed network update interval is 10.
[0042] Step 103, until the number of collected experiences equals the number of experiences collected in this training, the step is terminated.
[0043] In one embodiment of the present invention, the calculation formula of the first neural network is as follows:
[0044]
[0045]
[0046]
[0047]
[0048]
[0049] in, and They represent the Lth observation vector of the input (the observation vector at time tn is the first observation vector), n≥L≥1, , , and Both represent trainable weight parameters, , , and Both represent trainable bias parameters, represents the dot product, Indicates The first intermediate feature, Indicates The second intermediate feature, Indicates A third intermediate feature, and Respectively represent the L-1th and output features, represents the second output vector, the value of the i-th component of the second output vector represents the Q value of the i-th second action, tanh represents the tanh function, Represents the Sigmoid function.
[0050] In one embodiment of the present invention, the second action belongs to the second action space. The method for generating the second action in the second action space is as follows: The range from 0% to 100% is discretized into multiple point values, which are then combined with an optional number of experience points collected for training.
[0051] For example, a second action is expressed as: ; in, The ratio of the time difference between the start of training and time t to the time difference between t and t+1 is ; 10 represents the number of experiences collected during training.
[0052] In one embodiment of the present invention, the first neural network is trained using a Q learning method, and the state of Q learning is defined as a set of observation vectors from time tn to time t; The reward function for Q learning is:
[0053] in, is the reward obtained by taking the second action selected from time t to t+1, is the resource utilization of the server at time t. When the utilization is below 80%, optimization is considered to maximize utilization. When it is above 80%, it is punished for excessive load. When it is above 100%, it is severely punished.
[0054] It should be noted that the training of the first neural network is carried out before the military training, so it will not occupy server resources during the military training.
[0055] The above describes an embodiment of the present invention, but this embodiment is not limited to the above-mentioned specific implementation mode. The above-mentioned specific implementation mode is merely illustrative and not restrictive. Under the guidance of this embodiment, ordinary technicians in this field can also make more forms of equivalent embodiments, all of which are within the protection of this embodiment.
Claims
1. An auxiliary decision-making method based on an AI large model, characterized in that: Online training of the agent consists of the following steps: Step 100, collecting training data and encoding them into observation vectors; Step 200: The observation vector currently acquired Input into the DQN model, output the Q values corresponding to all first actions in the first action space, use the first action selection strategy to select a first action from all first actions to decode and execute; Step 300, define time t as the current time, and the first action taken at time t is , execute the first action The observation vector collected at time t+1 is , execute the first action Rewards , combined into a high-dimensional vector exp and stored in the experience replay pool; , represents the observation vector collected at time t; Step 400, input the observation vector from time tn to time t into the trained first neural network, output the time when the training starts and the number of experiences collected during the training, and when the time when the training starts is reached, collect the corresponding number of experiences from the experience replay pool to train the DQN model.
2. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: The training data in step 100 includes current weather data, combat training map data, enemy information, own information, and server information; Weather data: temperature, humidity, visibility; Combat training map data: topographic map, combat area division map, position marking map; Enemy information: enemy quantity, movement speed, location, and equipment; Your own information: your own soldier type, position, number, and equipment; Server information: server resource utilization.
3. The auxiliary decision-making method based on AI big model according to claim 2 is characterized in that: Server resource utilization is the weighted sum of CPU utilization, memory utilization, disk I / O utilization, and network bandwidth utilization.
4. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: A first action in the first action space in step 200 is expressed as: ; in, , and They represent the target battlefield areas to which the 1st, 2nd, and nth combat units need to move respectively; Combat behavior , and They respectively represent the combat operations that the 1st, 2nd, and nth combat units need to perform.
5. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: The first action selection strategy in step 200 includes: according to -The greedy strategy chooses the first action: set up The initial value is 0.1; Generate a random number r∈[0,1], if r< , then randomly select a first action, otherwise, select the first action with the largest Q value.
6. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: In step 300 The calculation formula is: ; in , , , Represents the first, second, third, and fourth reward values respectively. The initial value is 0. Execute the first action back The cumulative number of enemy soldiers killed. Add up the number of your own soldiers killed, The number of positions occupied by your side is accumulated. The number of positions lost by the enemy is accumulated. Represents the total number of enemy soldiers, Indicates the total number of soldiers on one's side. represents the total number of enemy positions at the beginning of training, Indicates the total number of friendly positions at the beginning of training. , , , They represent the first, second, third and fourth tendency coefficients respectively. The sum of the four tendency coefficients is 1. The default values are 0.2, 0.2, 0.3 and 0.3 respectively.
7. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: In step 400, the DQN model includes a Q network, and the calculation formula of the Q network is as follows: ; ; Where Z represents the latent vector, and Both represent trainable weight parameters, and Both represent trainable bias parameters, represents the first output vector, the value of the i-th component of the first output vector represents the Q value of the i-th first action, Represents the Sigmoid function.
8. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: The training steps of the DQN model in step 400 include: Step 101, randomly obtain an experience from the experience pool; ; in, express The maximum Q value output by the target network; according to and Calculate the loss value loss and update the Q network; ; Indicates status and the first action The output Q value of the next Q network is, Indicates status and the first action The output Q value of the target network is: is the discount factor, which is a value between 0 and 1, used to balance the weights of immediate rewards and future rewards. The default value is 0.6; Step 102, updating the target network every fixed number of network updates so that its parameters are the same as those of the current Q network; Step 103, until the number of collected experiences equals the number of experiences collected in this training, the step is terminated.
9. The auxiliary decision-making method based on AI big model according to claim 1 is characterized in that: The calculation formula of the first neural network in step 400 is as follows: ; ; ; ; ; ; in, and They represent the Lth observation vector of the input, n≥L≥1, , , and Both represent trainable weight parameters, , , and Both represent trainable bias parameters, represents the dot product, Indicates The first intermediate feature, Indicates The second intermediate feature, Indicates A third intermediate feature, and Respectively represent the L-1th and output features, represents the second output vector, the value of the i-th component of the second output vector represents the Q value of the i-th second action, tanh represents the tanh function, Represents the Sigmoid function.
10. An auxiliary decision-making system based on an AI big model, characterized in that: It is used to execute the auxiliary decision-making method based on the AI big model as described in any one of claims 1-9.
Citation Information
Patent Citations
Deep reinforcement learning-based battery intelligent battle drill system
CN112221149A
DQN-based agent confrontation behavior implementation method under augmented reality condition
CN112802091A
Data processing method and device
CN112884066A
DQN-based multi-platform collaborative intelligent confrontation decision-making method for aircraft soldiers
CN114330093A
Multi-agent reinforcement learning method for collaborative decision-making of multiple combat units
CN114358141A
Cited By
Intelligent decision-making method and system based on artificial intelligence
CN118917697A
