Model generation method and game data processing method

By obtaining the character status and interactive action sequence of game objects and using reinforcement learning model training, the problem of dull behavior of companion robots in the existing technology is solved, and efficient action decision-making and behavioral generalization in complex game scenarios are achieved.

CN118718402APending Publication Date: 2024-10-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202310323679.7
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-03-29
Publication Date
2024-10-01

AI Technical Summary

Technical Problem

Existing companion robots make action decisions based on finite state machines, resulting in dull and repetitive behaviors, making it difficult to meet the needs of complex multi-team and multi-role game scenarios.

Method used

By obtaining the character status and interactive action sequence of the game object, use the reinforcement learning model for training, and generate a model that can output actions in different game scenarios to achieve the generalization of the game object's behavior and the accuracy of action decision-making.

Benefits of technology

It improves the performance of game objects in different game scenarios, realizes the learning process from simple character battles to complex character battles, and improves the generalization of the reinforcement learning model and the accuracy of action decision-making.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118718402A_ABST
    Figure CN118718402A_ABST
Patent Text Reader

Abstract

The invention provides a model generation method and a game data processing method. The model generation method comprises the steps of obtaining target role configuration information of a current training round from preset candidate role configuration information according to a training round sequence; initializing a role state of a target game object in the first game team and a role state of a reference game object in the second game team according to the target role configuration information; and based on the role state of the target game object and the role state of the reference game object, obtaining an interaction action sequence when the target game object interacts with the reference game object in the virtual environment, and further performing training of a current training round on a first reinforcement learning model of the target game object based on the interaction action sequence. Different role states are initialized for the game objects under different training rounds, so that generalization of the reinforcement learning model for the game objects under different role states is improved, and accuracy of subsequent action information decision making is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the field of artificial intelligence technology, and specifically to a model generation method, device, computer equipment and storage medium, and a game data processing method, device, computer equipment and storage medium. Background Art

[0002] With the development of games, artificial intelligence technology is widely used in electronic games. In order to reduce players' game waiting time and increase game popularity, artificial intelligence technology is often used to build a companion robot to simulate game players to operate game characters and compete and fight with other game players.

[0003] In the prior art, companion robots usually make action decisions for game characters based on finite state machines. However, the action decisions simulated by the finite state machines are often limited regular actions, which causes the game character behaviors corresponding to the companion robots to be rigid and repetitive. They can only cope with limited game scenarios and are difficult to meet complex game scenarios such as multiple teams and multiple characters. Summary of the invention

[0004] Based on this, it is necessary to provide a model generation method, device, computer equipment and storage medium, as well as a game data processing method, device, computer equipment and storage medium to address the above-mentioned technical problems, so as to improve the game performance of the reinforcement learning model of the game object in different game scenarios.

[0005] In a first aspect, the present application provides a model generation method, the method comprising:

[0006] Obtaining the character status of the target game object in the first game team and the character status of the reference game object in the second game team in the current training round;

[0007] Based on the character state of the target game object and the character state of the reference game object, an interactive action sequence is obtained when the target game object interacts with the reference game object in a virtual environment, and the interactive action sequence includes sample game state information, sample action information, and sample reward information of the target game object during the interaction process; wherein the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model;

[0008] Based on the sample game state information, sample action information and sample reward information in the interactive action sequence, the first reinforcement learning model of the target game object is trained for the current training round, and the target reinforcement learning model is obtained after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

[0009] In some embodiments of the present application, the game status information includes at least the character status of the virtual game object, the character status of other game objects in the game team to which the virtual game object belongs, and the character status of each game object in the game team that is hostile to the virtual game object.

[0010] In some embodiments of the present application, the step of obtaining the character status of the target game object in the first game team and the character status of the reference game object in the second game team in the current training round includes:

[0011] According to the training round order, the target role configuration information of the current training round is obtained from the preset candidate role configuration information;

[0012] The character status of the target game object in the first game team and the character status of the reference game object in the second game team are updated according to the target character configuration information.

[0013] In some embodiments of the present application, the target role configuration information includes first role configuration information and second role configuration information; the step of updating the role state of the target game object in the first game team and the role state of the reference game object in the second game team according to the target role configuration information includes:

[0014] Update the character state of the target game object in the first game team according to the first character configuration information;

[0015] The character status of the reference game object in the second game team is updated according to the second character configuration information.

[0016] In some embodiments of the present application, the step of training the first reinforcement learning model of the target game object for the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence includes: calculating the loss value of the first reinforcement learning model according to the sample game state information, sample action information and sample reward information in the interactive action sequence; adjusting the model parameters of the first reinforcement learning model according to the loss value to obtain a third reinforcement learning model; updating the second reinforcement learning model according to the first reinforcement learning model, and updating the first reinforcement learning model according to the third reinforcement learning model, and continuing to execute the step of obtaining the interactive action sequence when the target game object interacts with the reference game object in a virtual environment based on the character state of the target game object and the character state of the reference game object.

[0017] In a second aspect, the present application provides a game data processing method, the method comprising:

[0018] Get game state information associated with the virtual game object;

[0019] The object state information of the virtual game object is input into the trained reinforcement learning model, and the initial action information corresponding to the virtual game character is obtained through the reinforcement learning model; the reinforcement learning model is obtained through the above-mentioned model generation method

[0020] Control the virtual game object to perform the action corresponding to the initial action information.

[0021] In some embodiments of the present application, the step of controlling the virtual game object to perform an action corresponding to the initial action information includes:

[0022] Obtaining action probability information for initial action information;

[0023] Adjust the initial action information based on the action probability information to obtain the target action information;

[0024] Control the virtual game object to perform the action corresponding to the target action information.

[0025] In some embodiments of the present application, the step of inputting object state information of a virtual game object into a trained reinforcement learning model includes:

[0026] If the game state information matches the preset state information, the virtual game object is controlled to output a rule action corresponding to the preset state information;

[0027] If the game state information does not match the preset state information, the object state information of the virtual game object is input into the trained reinforcement learning model.

[0028] In a third aspect, the present application provides a model generation device, the device comprising:

[0029] A character state generation module, used to obtain the character state of the target game object in the first game team and the character state of the reference game object in the second game team in the current training round;

[0030] A sample data acquisition module is used to acquire an interactive action sequence when the target game object interacts with the reference game object in a virtual environment based on the character state of the target game object and the character state of the reference game object, wherein the interactive action sequence includes sample game state information, sample action information, and sample reward information of the target game object during the interaction process; wherein the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model;

[0031] The model training module is used to train the first reinforcement learning model of the target game object in the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence, and obtain the target reinforcement learning model after completing all training rounds; wherein the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

[0032] In a fourth aspect, the present application provides a game data processing device, the device comprising:

[0033] A status information acquisition module, used to acquire game status information associated with a virtual game object;

[0034] An action information acquisition module, used to input the object state information of the virtual game object into a trained reinforcement learning model, and obtain the initial action information corresponding to the virtual game character through the reinforcement learning model; the reinforcement learning model is obtained through the above-mentioned model generation device;

[0035] The action execution module is used to control the virtual game object to execute the action corresponding to the initial action information.

[0036] In a fifth aspect, the present application also provides a computer device, comprising: one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the above-mentioned model generation method or game data processing method.

[0037] In a sixth aspect, the present application also provides a computer-readable storage medium on which a computer program is stored, and the computer program is loaded by a processor to execute the steps in the above-mentioned model generation method or game data processing method.

[0038] In a seventh aspect, an embodiment of the present application provides a computer program product or a computer program, the computer program product or the computer program including computer instructions, the computer instructions being stored in a computer-readable storage medium. A processor of a computer device reads the computer instructions from the computer-readable storage medium, and the processor executes the computer instructions, so that the computer device executes the method provided in the first aspect above.

[0039] The above-mentioned model generation method and game data processing method, device, computer equipment and storage medium obtain the character state of the target game object in the first game team and the character state of the reference game object in the second game team in the current training round; based on the character state of the target game object and the character state of the reference game object, obtain the interaction action sequence when the target game object interacts with the reference game object in a virtual environment, and the interaction action sequence includes sample game state information, sample action information and sample reward information of the target game object during the interaction process; wherein, the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model; based on the sample game state information, sample action information and sample reward information in the interaction action sequence, the first reinforcement learning model of the target game object is trained for the current training round, and the target reinforcement learning model is obtained after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object. By initializing different character states for the target game object in the first game team and the reference game object in the second game team in different training rounds, during the training process of the reinforcement learning model used to control the actions output by the game objects, the learning process of controlling the reinforcement learning model from simple role battles to complex role battles is achieved, thereby improving the generalization of the reinforcement learning model for game objects in different character states in game scenarios and improving the accuracy of subsequent reinforcement learning models in making decisions on the action information of game objects. BRIEF DESCRIPTION OF THE DRAWINGS

[0040] In order to more clearly illustrate the technical solutions in the embodiments of the present application, the drawings required for use in the description of the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For those skilled in the art, other drawings can be obtained based on these drawings without creative work.

[0041] Figure 1 It is a scene schematic diagram of the model generation method or the game data processing method in the embodiment of the present application;

[0042] Figure 2 It is a flow chart of the model generation method in the embodiment of the present application;

[0043] Figure 3 is a flowchart of the steps of the game data processing method in an embodiment of the present application;

[0044] Figure 4 This is a schematic diagram of an application scenario of the model generation method in an embodiment of the present application;

[0045] Figure 5It is a flow chart of the model generation method in the embodiment of the present application;

[0046] Figure 6 It is a structural schematic diagram of a model generating device in an embodiment of the present application;

[0047] Figure 7 is a schematic diagram of the structure of a game data processing device in an embodiment of the present application;

[0048] Figure 8 It is a schematic diagram of the structure of a computer device in an embodiment of the present application. DETAILED DESCRIPTION

[0049] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of this application.

[0050] In the description of this application, the terms "first" and "second" are used for descriptive purposes only and should not be understood as indicating or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of the features. In the description of this application, "plurality" means two or more, unless otherwise clearly and specifically defined.

[0051] In the description of the present application, the word "for example" is used to mean "used as an example, illustration or explanation". Any embodiment described as "for example" in the present application is not necessarily to be construed as being more preferred or advantageous than other embodiments. The following description is given to enable any technician in the field to implement and use the present invention. In the following description, details are listed for the purpose of explanation. It should be understood that a person of ordinary skill in the art can recognize that the present invention can be implemented without using these specific details. In other examples, well-known structures and processes will not be elaborated in detail to avoid obscuring the description of the present invention with unnecessary details. Therefore, the present invention is not intended to be limited to the embodiments shown, but is consistent with the widest scope consistent with the principles and features disclosed in the present application.

[0052] In the prior art, a companion robot usually makes action decisions for game objects based on a finite state machine. For example, taking a companion robot in a multi-team competitive game scene as an example, the companion robot makes decisions based on a finite state machine. The goal in this game scene is to protect the game object with the highest score on one's side or to defeat the game object with the highest score on the enemy side. The game scene includes various props. Game objects or companion robots can actively pick up various props in the game scene to improve their own attribute values, that is, to achieve development. The game scene also includes non-player objects (NPCs) such as wild monsters. Killing non-player objects such as wild monsters can obtain certain income rewards. After the game starts, the initial state of the companion robot is usually the "development state", and the main output action is to pick up various props in the game scene to improve its own health, armor and other attribute values; when the companion robot encounters enemy game objects or non-player objects such as wild monsters, it will change from the "development state" to the "attack enemy state" or "attack non-player object state"; in the "attack enemy state" or "attack non-player object state", the main output action of the companion robot is to output attack skills. In addition, when the corresponding health of the companion robot is too low, it will enter the "escape state" from the "attack enemy state" or "attack non-player object state". In the "escape state", the main output action of the companion robot is movement; after successfully escaping, it will enter the "development state" again from the "escape state". In addition, in the "development state", if the game object corresponding to Party B's teammate is in a situation where support is needed, such as low health, the robot can enter the "support state" from the "development state". In the "support state", the actions output by the companion robot are mainly moving actions and actions to treat the game object; after completing the support task, the companion robot can return to the "development state". When the health is reduced during the support process, it can also enter the "escape state". Companion robots based on finite state machines usually output actions according to limited rules, with repetitive actions and poor performance in game scenes. In addition, they have low efficiency in development, execution, and maintenance, making it difficult to meet the needs of companions in complex game scenes such as multiple teams and multiple roles.

[0053] In view of the above technical problems, the model generation method or game data processing method provided in the embodiments of the present application can be applied to Figure 1In the game system shown in the figure, the game system includes a terminal 110 and a server 120, and the terminal 110 can be one of a mobile phone, a tablet computer, a laptop computer, etc. The server 120 can be an independent server, or a server network or server cluster composed of servers, which includes but is not limited to a computer, a network host, a single network server, a plurality of network server sets or a cloud server composed of multiple servers. The cloud server is composed of a large number of computers or network servers based on cloud computing. Specifically, the server 120 can obtain the target role configuration information of the current training round from the preset candidate role configuration information according to the training round order; initialize the role state of the target game object in the first game team and the role state of the reference game object in the second game team according to the target role configuration information; based on the role state of the target game object and the role state of the reference game object, obtain the interaction action sequence when the target game object interacts with the reference game object in the virtual environment, and the interaction action sequence includes sample game state information, sample action information and sample reward information of the target game object during the interaction process; wherein, the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model; based on the sample game state information, sample action information and sample reward information in the interaction action sequence, the first reinforcement learning model of the target game object is trained for the current training round, and the target reinforcement learning model is obtained after completing all training rounds; subsequently, the virtual game object (i.e., the companion robot) is controlled by the target reinforcement learning model, the action information of the virtual game object is output by the target reinforcement learning model, and the action information is sent to the terminal 110 to control the companion robot corresponding to the virtual game object to output actions, thereby realizing the companion function.

[0054] Those skilled in the art will understand that Figure 1 The application environment shown in the figure is only one application scenario of the present application solution and does not constitute a limitation on the application scenario of the present application solution. Other application environments may also include Figure 1 More or less computer equipment as shown in Figure 1 Only one server 120 is shown in FIG. 1 . It is understandable that the game system may also include one or more other servers, which are not specifically limited here. Figure 1 As shown, the game system may also include a memory for storing data, such as storing model parameters of a reinforcement learning model.

[0055] It should also be noted that Figure 1The scene diagram of the game system shown is only an example. The game system and scene described in the embodiment of the present invention are intended to more clearly illustrate the technical solution of the embodiment of the present invention, and do not constitute a limitation on the technical solution provided by the embodiment of the present invention. Ordinary technicians in this field can know that with the evolution of the game system and the emergence of new business scenarios, the technical solution provided by the embodiment of the present invention is also applicable to similar technical problems.

[0056] See also Figure 2 The present application embodiment provides a model generation method, which is mainly applied to the above Figure 1 Taking the server 120 in the example, the method includes steps S210 to S230, which are as follows:

[0057] Step S210, obtaining the character status of the target game object in the first game team and the character status of the reference game object in the second game team in the current training round.

[0058] The first game team and the second game team are different game teams in the game scene, each target game object in the first game team is a subsequent training sample collection object, and each reference game object in the second game team is not a subsequent training sample collection object, but only an auxiliary team for realizing game interaction. Specifically, in one embodiment, the number of the first game team is one, and the number of the second game team is multiple; for example, in a five-on-five game, the number of the first game team is one, and the number of the second game team is four.

[0059] Among them, the character state refers to the state information of a certain game object, including but not limited to the game character type, health information, armor value, position information, skill information, etc. of the corresponding game object. It is understandable that in different training rounds, the target game object in the first game team and the reference game object in the second game object can be set to different character states; for example, in a low-order training round, the target game object in the first game team and the reference game object in the second game object can be set to the same character state, and in a high-order training round, the target game object in the first game team and the reference game object in the second game object can be set to different character states, that is, as the training rounds increase, the complexity of the character state of each game object in each game team can be gradually increased. In each training round, as the number of training increases, the initial character state of the target game object in the first game team and the reference game object in the second game object changes accordingly.

[0060] Specifically, in one embodiment, the step of obtaining the character status of the target game object in the first game team in the current training round, and the character status of the reference game object in the second game team, includes: obtaining the target character configuration information of the current training round from the preset candidate character configuration information in the order of the training rounds; updating the character status of the target game object in the first game team, and the character status of the reference game object in the second game team according to the target character configuration information.

[0061] Among them, the role configuration information includes the role type, equipment of the game characters, etc. corresponding to different game objects in a game team; taking the game characters as different hero characters as an example, the game characters in the current game scene include hero A, hero B, hero C and hero D, and the four game objects form a game team, then a candidate game role configuration information can be that the four game objects in the game team are all configured as hero A with basic game equipment, or the four game objects in the game team can be respectively configured as hero A, hero B, hero C and hero D with different game equipment.

[0062] It is understandable that in a game scenario, game players can often choose game characters (such as different hero characters) of the game objects they control to participate in a game. Different game characters often have different game skills, game equipment, etc. These game characters, game skills, and game equipment usually change the character status of the game characters, such as health, armor, skill effects, etc. In a multiplayer competitive game scenario, the game character configuration information such as the character lineup and character equipment of a game composed of different game characters is huge. Directly training the model under all the game character configuration information will lead to low training efficiency and poor training effect. Therefore, fixed candidate character configuration information can be set in advance. Each game character configuration information includes the character configuration corresponding to all game objects under a game team; after determining the order of the current training round, the target character configuration information of the current training round can be obtained from the candidate character configuration information.

[0063] Further, in one embodiment, different level labels, such as high, medium, and low, can be set for different candidate character configuration information according to the number of role categories of the game characters in the candidate character configuration information, the number of equipment corresponding to the game characters, etc. As the order of the training rounds increases, the candidate character configuration information corresponding to the level label and the order of the training rounds is used as the target character configuration information. For example, in a low-order training round, the low-level candidate character configuration information can be selected as the target character configuration information of the current training round, that is, in the early stage of training the reinforcement learning model, all game objects under each game team can be configured as the same game character with the same equipment; in a high-order training round, the medium-level or high-level candidate character configuration information can be selected as the target character configuration information of the current training round, that is, in the middle and late stages of training the reinforcement learning model, the complexity of the game characters and the game equipment of the game characters between each game object under each game team can be gradually increased. By setting the role configuration information in different training rounds, the learning process of the reinforcement learning model used to control the game objects from simple role configuration to complex role configuration is realized, the generalization of the reinforcement learning model in simulating game objects corresponding to different game roles is improved, and the accuracy of subsequent reinforcement learning models in making decisions on the action information of game objects is improved.

[0064] After determining the target character configuration information, the game characters of the game objects in the first game team and the second game team can be configured according to the target character configuration to determine the initial character state of each target game object in the first game team and the character state of each reference game object in the second game team.

[0065] Further, in one embodiment, the target character configuration information includes first character configuration information and second character configuration information, and the step of initializing the character state of the target game object in the first game team and the character state of the reference game object in the second game team according to the target character configuration information includes: updating the character state of the target game object in the first game team according to the first character configuration information; updating the character state of the reference game object in the second game team according to the second character configuration information.

[0066] Among them, two different role configuration information can be screened from the candidate role configuration information as the target role configuration information in this training round; specifically, the game characters of the game objects in the first game team can be configured according to the first role configuration to determine the initial role state of each target game object in the first game team, and the game characters of the game objects in the second game team can be configured according to the second role configuration to determine the initial role state of each reference game object in the second game team.

[0067] Taking a three-on-three game as an example, the game scene usually includes game team A, game team B, and game team C; with game team A as the first game team, and game team B and game team C as the second game team, the three game objects in game team A can be configured with game roles according to the first role configuration information, and the three game objects in game team B and game team C can be configured with game roles according to the second role configuration information. By setting different role configuration information for the three target game objects in the first game team and the three reference game objects in each second game team, the learning process of the reinforcement learning model for controlling the game objects from simple role battles to complex role battles is realized, the generalization of the reinforcement learning model for game objects in the game scene is improved, and the accuracy of the subsequent reinforcement learning model's decision on the action information of the game objects is improved.

[0068] Step S220, based on the character state of the target game object and the character state of the reference game object, obtain an interaction action sequence when the target game object interacts with the reference game object in a virtual environment, the interaction action sequence including sample game state information, sample action information and sample reward information of the target game object during the interaction process; wherein, the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model.

[0069] Among them, the reinforcement learning model is used to obtain the action information of the game object according to the game state information corresponding to the game object, and output the corresponding reward value. Specifically, the game state information corresponding to the game object is the input data of the reinforcement learning model. The game state information specifically takes the game object itself as the perspective to obtain various states in the game scene, including its own character state, the character state of other game objects in its own game team, the character state of game objects in the enemy game team, and other scene states in the game scene; for example, the character state includes but is not limited to the game character type, blood volume information, armor value, position information, skill information, etc. of the corresponding game object; the scene state includes but is not limited to the current game time, the remaining game time, game item information, non-player units (NPCs), etc., wherein the game item information includes the information of pickable items around the game object and the information of non-player units, the item information includes the type of item, the location of the item and the number of items, and the non-player unit information includes the location information and blood volume information of non-players such as wild monsters. Action information is the output data of the reinforcement learning model, which is the relevant information of the specific action performed by the control game object, and may include action skills, action direction, and action target; for example, a certain action information is [normal attack, move to the left, action target B1], which means that the game object uses the normal attack skill to attack the game object B1 and moves to the left at the same time. The reward value is the value evaluation of executing certain action information under the game state information of the game object, and may include the damage value of the game object's own blood volume after the action corresponding to the output action information, the kill value of the blood volume of other game objects, and the reward items such as win-lose information; further, the reward value can also set the weight coefficient of the kill value based on the difference between the blood volume of other game objects and its own blood volume. The larger the blood volume difference, the larger the weight coefficient of the kill value in the reward value; in addition, the reward value provided by killing other objects in the game scene can be added as a reward item. For example, if there are important wild monsters in the game scene, the game object can obtain greater benefits by killing wild monsters, so a reward item corresponding to killing wild monsters can be added to the reward value. Similarly, killing important targets can provide corresponding additional rewards as additional reward items.

[0070] It can be understood that the first reinforcement learning model and the second reinforcement learning model can be the same reinforcement learning model or different reinforcement learning models; specifically, the first reinforcement learning model can be the latest trained reinforcement learning model, and the second reinforcement learning model can be a trained historical reinforcement learning model, which increases the difficulty of the game when the first game object and the second game object interact, thereby improving the effectiveness of the interaction sequence.

[0071] Among them, the virtual environment refers to the virtual scene environment in which the target game object and the reference game object are located, such as the virtual environment can be a game scene; it can be understood that, in the virtual environment, the target game object controlled by the first reinforcement learning model and the reference game object controlled by the second reinforcement learning model play a game against each other; for example, in a one-to-one game environment, it can include a target game object and a reference game object. The first reinforcement learning model can be used to control the target game object to output an attack on the reference game object, causing damage to the reference game object. Similarly, the first reinforcement learning model can also be used to control the target game object to dodge the attack output by the reference game object to avoid the damage to the target game object caused by the attack output by the reference game object; similarly, the second reinforcement learning model can be used to control the reference game object to output an attack on the target game object, causing damage to the target game object. The second reinforcement learning model can also be used to control the reference game object to dodge the attack output by the target game object to avoid the damage to the reference game object caused by the attack output by the target game object; the target game object and the reference game object interact based on the control of the reinforcement learning model until the end of the round or the number of interaction rounds reaches a certain threshold.

[0072] Among them, the interactive action sequence includes sample game state information, sample action information and sample reward information of each interactive round; in the process of interaction between the target game object and the reference game object, the state information of the target game object, the reference game object and the virtual environment can be collected in real time to obtain the sample game state information corresponding to the target game object, and at the same time, the action information output by the first reinforcement learning model is collected to obtain the sample action information of the target game object, and the reward value is calculated based on the character state of the target game object and the character state of the reference game object to obtain the sample reward information; and then the interactive action sequence is generated based on the sample game state information, the sample action information and the sample reward information, so as to subsequently train the first reinforcement learning model based on the interactive action sequence.

[0073] Step S230, based on the sample game state information, sample action information and sample reward information in the interactive action sequence, the first reinforcement learning model of the target game object is trained in the current training round, and the target reinforcement learning model is obtained after completing all training rounds; wherein the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

[0074] Among them, the first reinforcement learning model can be specifically trained based on a policy (Policy Based) reinforcement learning algorithm, which can be a proximal policy optimization algorithm (PPO) algorithm, an A3C algorithm or a V-trace algorithm.

[0075] After obtaining the interactive action sequence of the current training round, the reinforcement learning model of the current training round can be trained based on the sample game state information, sample action information and sample reward information in the interactive action sequence; after completing the training of the reinforcement learning model of the current training round, the target character configuration information of the next training round can be obtained from the candidate character configuration information again, and the character state of the target game object in the first game team and the character state of the reference game object in the second game team can be set based on the target character configuration information of the next training round, and then based on the character state of the target game object and the character state of the reference game object, the interactive action sequence of the next training round is obtained again to train the reinforcement learning model of the next training round.

[0076] Specifically, in each training round, the condition for stopping the iterative training of the first reinforcement learning model can be by setting a maximum number of iterations, and stopping the training of the current training round when the iterations exceed the maximum number; in addition, the winning rate of the target game object controlled by the first reinforcement learning model in the interaction round with the reference game object controlled by the second reinforcement learning model can also be obtained. When the winning rate is greater than a preset threshold, the training of the current training round is stopped.

[0077] In one embodiment, the step of training the first reinforcement learning model of the target game object for the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence includes: calculating the loss value of the first reinforcement learning model according to the sample game state information, sample action information and sample reward information in the interactive action sequence; adjusting the model parameters of the first reinforcement learning model according to the loss value to obtain a third reinforcement learning model; updating the second reinforcement learning model according to the first reinforcement learning model, and updating the first reinforcement learning model according to the third reinforcement learning model, and continuing to execute the step of obtaining the interactive action sequence when the target game object interacts with the reference game object in a virtual environment based on the character state of the target game object and the character state of the reference game object.

[0078] Specifically, after adjusting the model parameters of the first reinforcement learning model according to the loss value, a third reinforcement learning model can be obtained; at this time, the model parameters of the first reinforcement learning model can be updated according to the model parameters of the third reinforcement learning model, and the model parameters of the second reinforcement learning model used to control the reference game object can be updated according to the model parameters of the first reinforcement learning model. After the model parameters of the first reinforcement learning model and the second reinforcement learning model are updated, the interaction action sequence when the target game object interacts with the reference game object in the virtual environment can continue to be obtained to continue to update the model parameters of the first reinforcement learning model.

[0079] Among them, the virtual game object refers to the game object specifically controlled by the subsequent target reinforcement learning model; in one embodiment, the game state information corresponding to the virtual game object at least includes the role state of the virtual game object, the role state of other game objects in the game team to which the virtual game object belongs, and the role state of each game object in the game team hostile to the virtual game object. In addition, the game state information corresponding to the virtual game object may also include other scene states in the game scene, which will not be repeated here.

[0080] In the above-mentioned model generation method, the target role configuration information of the current training round is obtained from the preset candidate role configuration information in accordance with the order of the training rounds; the role state of the target game object in the first game team and the role state of the reference game object in the second game team are initialized according to the target role configuration information; based on the role state of the target game object and the role state of the reference game object, the interaction action sequence when the target game object interacts with the reference game object in the virtual environment is obtained, and the interaction action sequence includes sample game state information, sample action information and sample reward information of the target game object during the interaction process; wherein, the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model; based on the sample game state information, sample action information and sample reward information in the interaction action sequence, the first reinforcement learning model of the target game object is trained for the current training round, and the target reinforcement learning model is obtained after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object. By setting different role configuration information in different training rounds, during the training process of the reinforcement learning model used to control the actions output by the game objects, the learning process of the reinforcement learning model from simple role battles to complex role battles is controlled, thereby improving the generalization of the reinforcement learning model for game objects of different game characters in game scenarios, and improving the accuracy of subsequent reinforcement learning models in making decisions on the action information of game objects.

[0081] In addition, the present application embodiment provides a game data processing method, which is mainly applied to the above Figure 1 Take the server 120 in FIG. 1 as an example. Figure 3 As shown, the method includes steps S310 to S330, which are specifically as follows:

[0082] Step S310, obtaining game state information associated with the virtual game object;

[0083] Step S320, inputting the object state information of the virtual game object into the trained reinforcement learning model, and obtaining the initial action information corresponding to the virtual game character through the reinforcement learning model;

[0084] Step S330, controlling the virtual game object to execute the action corresponding to the initial action information.

[0085] Among them, the game status information associated with the virtual game object, that is, taking the virtual game object itself as the perspective, obtains various states in the game scene, specifically including the character state of the virtual game object itself, the character state of other game objects in the team to which the virtual game object belongs, the character state of game objects in the enemy team, and other scene states in the game scene; for example, the character state includes but is not limited to the game character type, blood volume information, armor value, position information, skill information, etc. of the corresponding game object; the scene state includes but is not limited to the current game time, the remaining game time, game item information, non-player units (NPCs), etc., among which the game item information is the information of pickable items around the game object, including item type, item location and item quantity, and non-player units are non-players such as wild monsters. Information such as position information, blood volume information, etc.

[0086] After obtaining the game status information associated with the virtual game object, the game status information associated with the virtual game object can be input into a pre-trained reinforcement learning model, and the initial action information of the virtual game object can be output through the reinforcement learning model, and the corresponding virtual game object can be controlled to perform corresponding actions based on the initial action information.

[0087] Furthermore, in one embodiment, the step of controlling the virtual game object to perform an action corresponding to the initial action information includes: obtaining action probability information for the initial action information; adjusting the initial action information based on the action probability information to obtain target action information; and controlling the virtual game object to perform an action corresponding to the target action information.

[0088] Taking into account that when real players control game objects, the timing and direction of releasing their control skills and the movement of virtual game objects are not very precise, therefore, after obtaining the initial action information, in order to improve the personification of the virtual game object (or the companion robot), action probability information for the initial action information can be randomly generated, and then the initial action information is adjusted based on the action probability information to obtain target action information. Subsequently, the virtual game object is controlled to perform corresponding actions based on the target action information to reduce the accuracy of the executed action or change the execution probability of the action, thereby improving the personification of the companion robot and the gaming experience of real players.

[0089] For example, the reinforcement learning model decides to release a high-damage skill on the enemy game object based on the game state information corresponding to the virtual game object. Before releasing the high-damage skill, it can randomly generate an action release probability value and an action direction adjustment probability value. When the release probability value meets the preset probability threshold, the release direction of the high-damage skill is adjusted according to the action direction adjustment probability value; when the release probability value does not meet the preset probability threshold, the execution of the high-damage skill release action is canceled.

[0090] In one embodiment, the step of inputting the object state information of the virtual game object into the trained reinforcement learning model includes: if the game state information matches the preset state information, controlling the virtual game object to output a rule action corresponding to the preset state information; if the game state information does not match the preset state information, inputting the object state information of the virtual game object into the trained reinforcement learning model.

[0091] Considering that some actions are difficult to learn for the reinforcement learning model, for example, the reinforcement learning model controls the action of the virtual game object picking up game props, it can be assisted by the semantics of rule actions. Specifically, the preset state information and the rule action corresponding to the preset state information can be pre-set; after obtaining the game state information corresponding to the virtual game object, the game state information and the preset state information can be matched. If the game state information matches the preset state information successfully, the virtual game object can be directly controlled to output the rule action corresponding to the preset state information. If the game state information does not match the preset state information successfully, the object state information of the virtual game object is input into the trained reinforcement learning model to make a decision on the output action of the virtual game object through the reinforcement learning model.

[0092] The following is an explanation of the above model generation method in conjunction with a specific application scenario. Figure 4 , Figure 4A schematic diagram of a training service framework is shown, including a game server and a training server. Among them, the game server is used to simulate the interaction between different game objects in a virtual environment. Specifically, the game server can collect game state information corresponding to each game object (i.e., team member) under each game team, including but not limited to its own character state, the character state of other game objects in its own game team, the character state of game objects in the enemy game team, and other scene states in the game scene; the game server can also collect information about each game object performing certain actions, and calculate the reward value of performing certain action information under the game state information based on the character state (such as blood value, etc.) of the corresponding game object, and send the game state information, action information, and reward value corresponding to the game object as sample data to the training server. The training server is specifically used to train the reinforcement learning model based on the collected sample data. Specifically, the training server includes an inference module, a model training module and a model pool; the inference model includes a reinforcement learning model for each game object under each game team, which is used to decide the action information of the game object based on the received game state information corresponding to the game object, and the action information can be returned to the game server to control the corresponding game object to perform corresponding actions; the model training module is used to train the reinforcement learning model based on the collected sample data to update the reinforcement learning model, and the updated reinforcement learning can be saved in the model pool.

[0093] It is understandable that the game server and the training server can be composed of many server nodes to form a large-scale training capability (wherein the training model and the model pool are shared by all training servers).

[0094] Furthermore, combined with Figure 5 The training process of the reinforcement learning model is further explained. In order to improve the accuracy of the action information output by the reinforcement learning model decision game object, the model training module in the training server can use the self-play training method to generate action information. Figure 5 As shown in the figure, the working process of the training server is as follows:

[0095] Step 1: Initialize a model pool, which is used to store reinforcement learning models generated during the training process. For example, the model pool initially has only one reinforcement learning model with randomly initialized parameters. At this time, all game objects under all game teams in the virtual scene are controlled separately using the reinforcement learning model with this network structure. Subsequently, the model parameters of the reinforcement learning model are updated 1,000 times, and the current reinforcement learning model can be saved to the model pool. Initially, the model pool has only one reinforcement learning model with randomly initialized parameters.

[0096] Step 2: Start a game, randomly select any game team in the virtual scene as the training team (i.e., the first game team), each game object under the training team can be controlled by the reinforcement learning model with the latest model parameters, and the game state information, action information, and corresponding reward value of each game object under the training team are used as training samples to optimize the reinforcement learning model. Other game teams serve as auxiliary teams (i.e., the second game team), and each game object under the auxiliary team is also controlled by the reinforcement learning model, which comes from the model pool. The condition for selecting the reinforcement learning model can be 70% probability of selecting the reinforcement learning model with the latest model parameters, 30% probability of selecting other reinforcement learning models except the reinforcement learning model with the latest model parameters, or selecting according to the winning rate of each reinforcement learning model in the model pool. The game state information and action information corresponding to each game object under the auxiliary team are not used as training samples.

[0097] More specifically, the reinforcement learning model corresponding to each game object under the training team can be updated according to certain conditions. For example, if the reinforcement learning model corresponding to each game object under the training team has simulated more than 200 rounds of battles, or the winning rate of the training team in the battle with the auxiliary team exceeds 60%, the latest reinforcement learning model can be obtained from the model pool to update the reinforcement learning model corresponding to each game object under the training team.

[0098] Step 3: After a game is over, start a new game and repeat the training process in step 2 until the level of the latest reinforcement learning model no longer continues to improve or the training time is long enough.

[0099] It is understandable that step 2 can actually be carried out on a large scale concurrently, that is, the game can be started on a large number of different game servers at the same time, and the sample data generated by each game object under the training team on these game servers can be collected, and these sample data can be sent to the model training server to optimize the reinforcement learning model to achieve the purpose of reducing training time.

[0100] In addition, game players can often choose the game characters (such as different hero characters) of the controlled game objects to participate in a game. Different game characters often have different game skills, game equipment, etc. These game skills and game equipment usually change the character attributes of the game characters, such as health, armor, skill effects, etc. In a multiplayer competitive game scenario, the role lineup, role equipment and other game role configuration information of a game composed of different game characters is huge. Directly performing model training under all the game role configuration information will lead to low training efficiency and poor training effect. Therefore, the candidate role configuration information can be set in advance, and the same role configuration can be configured for the training team and the auxiliary team. On this basis, the game state information, action information and corresponding reward values ​​corresponding to each game character in the training team are collected as training samples to optimize the reinforcement learning model; when the reinforcement learning model is optimized to a certain effect, the next round of training can be entered. At this time, the first role configuration information and the second role configuration information can be randomly selected from the candidate role configuration information, and then the training team and the auxiliary team are configured based on the first role configuration information and the second role configuration information, so that different role configurations are configured for the training team and the auxiliary team, and on this basis, the game state information, action information and corresponding reward values ​​corresponding to each game character in the training team are collected again as training samples to optimize the reinforcement learning model. When the reinforcement learning model is optimized to a certain effect again, the next round of training can be entered.

[0101] In order to better implement the model generation method provided in the embodiment of the present application, on the basis of the model generation method provided in the embodiment of the present application, a model generation device is also provided in the embodiment of the present application, such as Figure 6 As shown, the model generation device 600 includes:

[0102] The character state generation module 610 is used to obtain the character state of the target game object in the first game team and the character state of the reference game object in the second game team in the current training round;

[0103] The sample data acquisition module 620 is used to acquire an interactive action sequence when the target game object interacts with the reference game object in the virtual environment based on the character state of the target game object and the character state of the reference game object, wherein the interactive action sequence includes sample game state information, sample action information and sample reward information of the target game object during the interaction process; wherein the target game object is controlled based on the first reinforcement learning model, and the reference game object is controlled based on the second reinforcement learning model;

[0104] The model training module 630 is used to train the first reinforcement learning model of the target game object in the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence, and obtain the target reinforcement learning model after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

[0105] In some embodiments of the present application, the game status information includes at least the character status of the virtual game object, the character status of other game objects in the game team to which the virtual game object belongs, and the character status of each game object in the game team that is hostile to the virtual game object.

[0106] In some embodiments of the present application, the character state generation module is used to obtain the target character configuration information of the current training round from the preset candidate character configuration information in accordance with the training round order; and update the character state of the target game object in the first game team and the character state of the reference game object in the second game team according to the target character configuration information.

[0107] In some embodiments of the present application, the character state generation module is used to update the character state of the target game object in the first game team according to the first character configuration information; and update the character state of the reference game object in the second game team according to the second character configuration information.

[0108] In some embodiments of the present application, a model training module is used to calculate the loss value of a first reinforcement learning model based on sample game state information, sample action information, and sample reward information in an interactive action sequence; adjust the model parameters of the first reinforcement learning model based on the loss value to obtain a third reinforcement learning model; update the second reinforcement learning model based on the first reinforcement learning model, and update the first reinforcement learning model based on the third reinforcement learning model, and continue to execute the steps of obtaining an interactive action sequence when the target game object interacts with the reference game object in a virtual environment based on the character state of the target game object and the character state of the reference game object.

[0109] In order to better implement the game data processing method provided in the embodiment of the present application, on the basis of the game data processing method provided in the embodiment of the present application, the embodiment of the present application also provides a game data processing device, such as Figure 7 As shown, the game data processing device 700 includes:

[0110] A state information acquisition module 710 is used to acquire game state information associated with a virtual game object;

[0111] The action information acquisition module 720 is used to input the object state information of the virtual game object into the trained reinforcement learning model, and obtain the initial action information corresponding to the virtual game character through the reinforcement learning model;

[0112] The action execution module 730 is used to control the virtual game object to execute the action corresponding to the initial action information.

[0113] In some embodiments of the present application, the action information acquisition module is used to control the virtual game object to output a rule action corresponding to the preset state information if the game state information matches the preset state information; if the game state information does not match the preset state information, the object state information of the virtual game object is input into a trained reinforcement learning model.

[0114] In some embodiments of the present application, the action information acquisition module is used to obtain action probability information for initial action information; adjust the initial action information based on the action probability information to obtain target action information; and control the virtual game object to perform the action corresponding to the target action information.

[0115] In some embodiments of the present application, the model generation device 600 can be implemented in the form of a computer program. The computer program can be implemented in Figure 8 The computer device shown in FIG. 6 is used to run the model generation apparatus 600. The memory of the computer device may store various program modules constituting the model generation apparatus 600, for example, Figure 6 The character state generation module 610, the sample data acquisition module 620 and the model training module 630 are shown. The computer program composed of various program modules enables the processor to execute the steps in the model generation method of each embodiment of the present application described in this specification.

[0116] For example, Figure 8 The computer device shown can be Figure 6 The character state generation module 610 in the model generation device 600 shown executes step S210. The computer device can execute step S220 through the sample data acquisition module 620. The computer device can execute step S230 through the model training module 630. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external computer device through a network connection. When the computer program is executed by the processor, a model generation method is implemented.

[0117] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0118] In some embodiments of the present application, the game data processing device 700 can be implemented in the form of a computer program. The computer program can be implemented in Figure 8 The computer device shown in the figure can be used to run the game data processing apparatus 700. The memory of the computer device can store various program modules constituting the game data processing apparatus 700, for example, Figure 7 The state information acquisition module 710, the action information acquisition module 720 and the action execution module 730 are shown. The computer program composed of various program modules enables the processor to execute the steps of the game data processing method of each embodiment of the present application described in this specification.

[0119] For example, Figure 8 The computer device shown can also be Figure 7 The state information acquisition module 710 in the game data processing device 700 shown in the figure performs step S310. The computer device can perform step S320 through the action information acquisition module 720. The computer device can perform step S330 through the action execution module 730. The computer device includes a processor, a memory and a network interface connected through a system bus. Among them, the processor of the computer device is used to provide computing and control capabilities. The memory of the computer device includes a non-volatile storage medium and an internal memory. The non-volatile storage medium stores an operating system and a computer program. The internal memory provides an environment for the operation of the operating system and the computer program in the non-volatile storage medium. The network interface of the computer device is used to communicate with an external computer device through a network connection. When the computer program is executed by the processor, a game data processing method is implemented.

[0120] Those skilled in the art will understand that Figure 8 The structure shown in the figure is only a block diagram of a part of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. The specific computer device may include more or fewer components than those shown in the figure, or combine certain components, or have a different arrangement of components.

[0121] In some embodiments of the present application, a computer device is provided, comprising one or more processors; a memory; and one or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor in the steps of the above-mentioned model generation method or game data processing method. The steps of the model generation method or game data processing method here may be the steps of the model generation method or game data processing method in the above-mentioned embodiments.

[0122] In some embodiments of the present application, a computer-readable storage medium is provided, which stores a computer program, and the computer program is loaded by a processor, so that the processor executes the steps of the above-mentioned model generation method or game data processing method. The steps of the model generation method or game data processing method here can be the steps of the model generation method or game data processing method in each of the above-mentioned embodiments.

[0123] Those of ordinary skill in the art can understand that all or part of the processes in the above-mentioned embodiment methods can be completed by instructing the relevant hardware through a computer program, and the computer program can be stored in a non-volatile computer-readable storage medium. When the computer program is executed, it can include the processes of the embodiments of the above-mentioned methods. Any reference to memory, storage, database or other media used in the embodiments provided in this application may include at least one of non-volatile and volatile memory. Non-volatile memory may include read-only memory (ROM), magnetic tape, floppy disk, flash memory or optical memory, etc. Volatile memory may include random access memory (RAM) or external cache memory. As an illustration and not limitation, RAM can be in various forms, such as static random access memory (SRAM) or dynamic random access memory (DRAM).

[0124] The technical features of the above embodiments may be combined arbitrarily. To make the description concise, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0125] The above is a detailed introduction to a model generation method or a game data processing method, an apparatus, a computer device and a storage medium provided in an embodiment of the present application. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of ​​the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the content of this specification should not be understood as a limitation on the present invention.

Claims

1. A model generation method, It is characterized in that The method comprises: Obtaining the character status of the target game object in the first game team and the character status of the reference game object in the second game team in the current training round; Based on the character state of the target game object and the character state of the reference game object, an interactive action sequence when the target game object interacts with the reference game object in a virtual environment is obtained, wherein the interactive action sequence includes sample game state information, sample action information, and sample reward information of the target game object during the interaction process; wherein the target game object is controlled based on a first reinforcement learning model, and the reference game object is controlled based on a second reinforcement learning model; Based on the sample game state information, sample action information and sample reward information in the interactive action sequence, the first reinforcement learning model of the target game object is trained in the current training round, and the target reinforcement learning model is obtained after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

2. The method according to claim 1, It is characterized in that The game state information includes at least the character state of the virtual game object, the character states of other game objects in the game team to which the virtual game object belongs, and the character states of each game object in the game team hostile to the virtual game object.

3. The method according to claim 1, It is characterized in that The step of obtaining the character status of the target game object in the first game team and the character status of the reference game object in the second game team in the current training round includes: According to the training round order, the target role configuration information of the current training round is obtained from the preset candidate role configuration information; The character status of the target game object in the first game team and the character status of the reference game object in the second game team are updated according to the target character configuration information.

4. The method according to claim 3, It is characterized in that The target role configuration information includes first role configuration information and second role configuration information; the step of updating the role status of the target game object in the first game team and the role status of the reference game object in the second game team according to the target role configuration information includes: Update the character status of the target game object in the first game team according to the first character configuration information; Update the character status of the reference game object in the second game team according to the second character configuration information.

5. The method according to claim 1, It is characterized in that The step of training the first reinforcement learning model of the target game object for the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence includes: Calculating the loss value of the first reinforcement learning model according to the sample game state information, sample action information, and sample reward information in the interactive action sequence; Adjusting model parameters of the first reinforcement learning model according to the loss value to obtain a third reinforcement learning model; The second reinforcement learning model is updated according to the first reinforcement learning model, and the first reinforcement learning model is updated according to the third reinforcement learning model, and the step of obtaining an interaction action sequence when the target game object interacts with the reference game object in a virtual environment based on the character state of the target game object and the character state of the reference game object is continued.

6. A method for processing game data, It is characterized in that The method comprises: Get game state information associated with the virtual game object; Inputting the object state information of the virtual game object into a trained reinforcement learning model, and obtaining the initial action information corresponding to the virtual game character through the reinforcement learning model; the reinforcement learning model is obtained by the model generation method according to any one of claims 1 to 5; Control the virtual game object to perform an action corresponding to the initial action information.

7. The method according to claim 6, It is characterized in that The step of controlling the virtual game object to perform the action corresponding to the initial action information includes: Acquire action probability information for the initial action information; Adjusting the initial action information based on the action probability information to obtain target action information; Control the virtual game object to perform an action corresponding to the target action information.

8. The method according to claim 6, It is characterized in that The step of inputting the object state information of the virtual game object into the trained reinforcement learning model comprises: If the game state information matches the preset state information, controlling the virtual game object to output a rule action corresponding to the preset state information; If the game state information does not match the preset state information, the object state information of the virtual game object is input into the trained reinforcement learning model.

9. A model generating device, It is characterized in that The device comprises: A character state generation module, used to obtain the character state of the target game object in the first game team and the character state of the reference game object in the second game team in the current training round; A sample data acquisition module, for acquiring, based on the character state of the target game object and the character state of the reference game object, an interactive action sequence when the target game object interacts with the reference game object in a virtual environment, wherein the interactive action sequence includes sample game state information, sample action information, and sample reward information of the target game object during the interaction process; wherein the target game object is controlled based on a first reinforcement learning model, and the reference game object is controlled based on a second reinforcement learning model; A model training module is used to train the first reinforcement learning model of the target game object in the current training round based on the sample game state information, sample action information and sample reward information in the interactive action sequence, and obtain the target reinforcement learning model after completing all training rounds; wherein, the target reinforcement learning model is used to output the action information of the virtual game object based on the game state information corresponding to the virtual game object.

10. A game data processing device, It is characterized in that The device comprises: A status information acquisition module, used to acquire game status information associated with a virtual game object; An action information acquisition module, used to input the object state information of the virtual game object into a trained reinforcement learning model, and obtain the initial action information corresponding to the virtual game character through the reinforcement learning model; the reinforcement learning model is obtained by the model generation device according to claim 9; An action execution module is used to control the virtual game object to execute the action corresponding to the initial action information.

11. A computer device, It is characterized in that The computer device comprises: one or more processors; Memory; and One or more applications, wherein the one or more applications are stored in the memory and configured to be executed by the processor to implement the model generation method or game data processing method described in any one of claims 1 to 8.

12. A computer-readable storage medium, It is characterized in that A computer program is stored thereon, and the computer program is loaded by a processor to execute the steps in the model generation method or game data processing method described in any one of claims 1 to 8.

Citation Information

Cited By

  • Business data processing method and device, equipment and storage medium

    CN121570816A