Game AI Character Skill Determination Method, Device, Electronic Device and Storage Medium

Through the Bayesian neural network model training state inference and skill probability model, dynamically configure game AI character skills, solving the problems of low configuration efficiency and rigidity in the existing technology, and achieving the effect of diversification and anthropomorphism.

CN114522426BActive Publication Date: 2025-08-01NETEASE (HANGZHOU) NETWORK CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202111596329.5
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-24
Publication Date
2025-08-01
Estimated Expiration
2041-12-24

AI Technical Summary

Technical Problem

The skill configuration of existing game AI characters is inefficient and rigid, unable to perform diversified and lacks anthropomorphic performance.

Method used

The Bayesian neural network model is used to train the state inference model and skill probability model. By obtaining the state occurrence time ratio and skill selection probability of the game character collection, the skills of the game AI character are dynamically configured.

Benefits of technology

It improves the flexibility and diversity of game AI character skills configuration, enhances anthropomorphic performance, and ensures the winning rate.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114522426B_ABST
    Figure CN114522426B_ABST
Patent Text Reader

Abstract

The present application provides a method, apparatus, electronic device, and storage medium for determining skills of game AI characters. The method includes inputting a set of game characters into a trained state inference model to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time; inputting the time proportion of each state of each game AI character into a trained skill probability model to obtain the selection probability of each skill of each game AI character; wherein the skill probability model is based on a Bayesian neural network model; determining the skills configured for each game AI character based on the selection probability of each skill of each game AI character, so as to efficiently and accurately determine the skills configured for each game AI character, making the skills configured for game AI characters more diversified and anthropomorphic while ensuring the winning rate of game AI characters.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of virtual AI technology, and in particular to a method, device, electronic device, and storage medium for determining skills of game AI characters. Background Art

[0002] This section aims to provide background or context for the embodiments of the present application stated in the claims. The description herein is not admitted to be prior art merely by including it in this section.

[0003] The skills or inscription configurations of existing game AI characters are basically configured manually by planners or configured using the skills with the highest win rate analyzed through data statistics. Whether it is manual configuration by planners or configuration using the skills with the highest win rate, not only is the efficiency low, but the skills of game AI characters will appear relatively rigid and unable to show diversification. As players, they hope that game AI characters are not predictable. Not only should the skills configured for each game AI character be different when matching different game AI characters, but even when repeatedly matching the same game AI character, there should still be certain reasonable changes in the skill configurations of each game AI character each time, so as to have a stronger anthropomorphic performance. Summary of the Invention

[0004] In view of this, the purpose of this application is to propose a method, device, electronic device, and storage medium for determining skills of game AI characters.

[0005] Based on the above purpose, this application provides a method for determining skills of game AI characters, including:

[0006] Obtain a set of game characters to be run, and input the set of game characters into a trained state inference model to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time, where the set of game characters includes at least one game AI character;

[0007] Input the time proportion of each state of each game AI character into a trained skill probability model to obtain the selection probability of each skill of each game AI character; where the skill probability model is based on a Bayesian neural network model;

[0008] Determine the skills configured for each game AI character based on the selection probability of each skill of each game AI character.

[0009] In some embodiments, the skills configured for each game AI character at least include a first type of skill and a second type of skill, and the priority of the first type of skill configured is higher than the priority of the second type of skill configured; determining the skills configured for each game AI character based on the selection probabilities of the respective skills of each game AI character specifically includes:

[0010] Obtain the level of each game AI character;

[0011] Based on the level of each game AI character, determine the first quantity of the first type of skills that can be configured for each game AI character; wherein, different levels correspond to different first quantities;

[0012] Based on the first quantity and the selection probabilities of the respective first type of skills of each game AI character, determine the first type of skills configured for each game AI character.

[0013] In some embodiments, determining the skills configured for each game AI character based on the probabilities of each game AI character configuring respective skills specifically further includes:

[0014] Based on the level of each game AI character, determine the total quantity of available skill points of each game AI character, wherein, each game AI character consumes a certain quantity of skill points for each configured skill;

[0015] Based on the total quantity and the quantity of skill points consumed by all the first type of skills configured by each game AI character, determine the remaining quantity of available skill points of each game AI character;

[0016] Based on the remaining quantity and the selection probabilities of the respective second type of skills of each game AI character, determine the second type of skills configured for each game AI character.

[0017] In some embodiments, determining the first type of skills configured for each game AI character based on the first quantity and the selection probabilities of the respective first type of skills of each game AI character specifically includes:

[0018] Obtain the first average probability of each game AI character configuring the respective first type of skills in historical data;

[0019] For each first type of skill, based on the first average probability and the selection probability of the first type of skill, determine the comprehensive selection probability of the first type of skill;

[0020] Determine the first - type skills configured for each game AI character based on the comprehensive selection probability of the first quantity and each of the first - type skills of each game AI character.

[0021] In some embodiments, the comprehensive selection probability of the first - type skills is determined by the following formula:

[0022] P final(t1) =α1*P states(t1) +β1*P pid(t1) ;

[0023] where P final(t1) represents the comprehensive selection probability of the first - type skills, P states(t1) represents the selection probability of the first - type skills, P pid(t1) represents the first average probability, α1 represents the preset weight of the selection probability of the first - type skills, β1 represents the preset weight of the first average probability, and α1>β1.

[0024] In some embodiments, determining the second - type skills configured for each game AI character based on the remaining quantity and the selection probability of each of the second - type skills of each game AI character specifically includes:

[0025] Obtain the second average probability of each game AI character configuring each of the second - type skills in historical data;

[0026] For each of the second - type skills, determine the comprehensive selection probability of the second - type skills based on the second average probability and the selection probability of the second - type skills;

[0027] Determine the second - type skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each of the second - type skills of each game AI character.

[0028] In some embodiments, the comprehensive selection probability of the second - type skills is determined by the following formula:

[0029] P final(t2) =α2*P states(t2) +β2*P pid(t2) ;

[0030] where P final(t2) represents the comprehensive selection probability of the second - type skills, P states(t2) represents the selection probability of the second - type skills, P pid(t2) represents the second average probability, α2 represents the preset weight of the selection probability of the second - type skills, β2 represents the preset weight of the second average probability, and α2>β2.

[0031] In some embodiments, the various skills configured for each game AI character are arranged in a tree structure. In this tree structure, when configuring the skills corresponding to each child node, the skills corresponding to its parent node need to be configured first, and the skills corresponding to all child nodes of the root node can be directly configured. All the first type of skills are distributed on the leaf nodes; determining the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each game AI character for configuring each of the second type of skills specifically includes:

[0032] In the tree structure, determine all the currently directly configurable skill nodes;

[0033] Determine the target node with the minimum cost from all the currently directly configurable skill nodes. Among them, the cost of each node is the difference between the comprehensive selection probability of the skill corresponding to its parent node and the comprehensive selection probability of the skill corresponding to this node. The comprehensive selection probability for calculating the cost of the root node and all the nodes corresponding to the second type of skills configured when configuring the first type of skills is 1;

[0034] Based on the target node, re-determine all the currently directly configurable skill nodes, and re-determine the target node from the re-determined currently directly configurable skill nodes until the remaining quantity of available skill points for each game AI character is consumed;

[0035] Determine the second type of skills corresponding to all the target nodes as the second type of skills configured for each game AI character.

[0036] In some embodiments, determining the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each game AI character for configuring each of the second type of skills specifically further includes:

[0037] In response to determining that the second type of skill corresponding to any node is the same as the second type of skill corresponding to its child node and the second type of skill corresponding to this node is the highest level of this function, adjust the cost of this node to 0.

[0038] In some embodiments, after obtaining the time proportion of the occurrence of each state of each game AI character in the game character set within a preset time, the method further includes:

[0039] Rank the time ratios of the occurrences of the respective states of each game AI character from largest to smallest, determine the main states of each game AI character whose rankings are within a preset range, and input the time ratios of the occurrences of the respective main states into the skill probability model obtained through training to obtain the selection probabilities of the respective skills of each game AI character.

[0040] Based on the same inventive concept, an exemplary embodiment of the present application further provides a game AI character skill determination device, including:

[0041] A state module that inputs a game character set into the state inference model obtained through training to obtain the time ratios of the occurrences of the respective states of each game AI character in the game character set within a preset time;

[0042] A probability module that inputs the time ratios of the occurrences of the respective states of each game AI character into the skill probability model obtained through training to obtain the selection probabilities of the respective skills of each game AI character; wherein, the skill probability model is based on a Bayesian neural network model;

[0043] A skill configuration module that determines the skills configured for each game AI character based on the selection probabilities of the respective skills of each game AI character.

[0044] Based on the same inventive concept, an exemplary embodiment of the present application further provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable by the processor, and when the processor executes the program, it implements the game AI character skill determination method as described above.

[0045] Based on the same inventive concept, an exemplary embodiment of the present application further provides a non-transitory computer-readable storage medium, and the non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the game AI character skill determination method as described above.

[0046] As can be seen from the above, in the method for determining the skills of game AI characters provided by this application, the set of game characters is input into the trained state inference model to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time; the time proportion of each state of each game AI character is input into the trained skill probability model to obtain the selection probability of each skill of each game AI character; wherein, the skill probability model is based on the Bayesian neural network model; the skills configured for each game AI character are determined based on the selection probability of each skill of each game AI character, so as to efficiently and accurately determine the skills configured for each game AI character, making the skills configured for the game AI characters more diversified and anthropomorphic while ensuring the winning rate of the game AI characters. BRIEF DESCRIPTION OF THE DRAWINGS

[0047] In order to more clearly illustrate the technical solutions in this application or related technologies, the following will briefly introduce the drawings required for use in the description of the embodiments or related technologies. Obviously, the drawings in the following description are only the embodiments of this application. For those of ordinary skill in the art, other drawings can be obtained based on these drawings without creative efforts.

[0048] Figure 1 It is a schematic flowchart of a method for determining the skills of game AI characters according to an embodiment of this application;

[0049] Figure 2 It is a schematic flowchart of obtaining the time proportion of each state of each game AI character through a state inference model according to an embodiment of this application;

[0050] Figure 3 It is a schematic flowchart of obtaining the selection probability of each skill of each game AI character through a skill probability model according to an embodiment of this application;

[0051] Figure 4 It is a schematic diagram of a tree structure of the skill distribution of game AI characters according to an embodiment of this application;

[0052] Figure 5 It is a schematic diagram of the structure of a device for determining the skills of game AI characters according to an embodiment of this application;

[0053] Figure 6 It is a schematic diagram of the structure of a specific electronic device according to an embodiment of this application. DETAILED DESCRIPTION OF THE EMBODIMENTS

[0054] The principles and spirit of the present application will be described below with reference to several exemplary embodiments. It should be understood that these embodiments are provided only to enable those skilled in the art to better understand and then implement the present application, rather than limiting the scope of the present application in any way. On the contrary, these embodiments are provided to make the present application more thorough and complete, and to be able to fully convey the scope of the present application to those skilled in the art.

[0055] According to an embodiment of the present application, a method, apparatus, electronic device, and storage medium for determining skills of a game AI character are provided.

[0056] In this article, it should be understood that the number of any element in the drawings is for illustration rather than limitation, and any naming is only for distinction and does not have any limiting meaning.

[0057] Below, with reference to several representative embodiments of the present application, the principles and spirit of the present application will be elaborated in detail. Summary of the Invention

[0059] In the prior art, the skills of game AI characters in a large number of lineups need to be manually configured by professional planners. Since there are many situations that occur when game AI characters play games, and it is impossible to consider all possible situations when manually configuring, when encountering unconsidered situations, it is easy for players to feel that the skills configured for game AI characters are rather rigid; when using data analysis to configure the skills with the highest win rate, it will result in the skills configured for game AI characters being rather single, and it is impossible to achieve the anthropomorphism and diversification of AI character skills.

[0060] To solve the above problems, the present application provides a method for determining skills of a game AI character, which specifically includes:

[0061] Obtain the set of game characters to be run, and input the set of game characters into the state inference model obtained through training to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time; input the time proportion of each state of each game AI character into the skill probability model obtained through training to obtain the selection probability of each skill of each game AI character; wherein, the skill probability model is based on the Bayesian neural network model as the benchmark model; determine the skills configured for each game AI character based on the selection probability of each skill of each game AI character. Since the Bayesian neural network model is used as the benchmark model, the process of training the skill probability model will not produce serious overfitting, thereby making the results output by the skill probability model have a certain degree of flexibility, so as to make the skills configured for the game AI characters more diversified and anthropomorphic while ensuring the winning rate of the game AI characters. At the same time, since the skills that each game AI character needs to use in a game are closely related to the state of the game AI character. For example, if a certain game AI character is in a bleeding state, then the game AI character must need a skill to recover blood. Therefore, by determining the time proportion of each state of each game AI character through the state inference model obtained through training and using this time proportion as the input of the skill probability model, the accuracy of the skills configured for the game AI characters can be further improved.

[0062] After introducing the basic principle of the present application, the various non-limiting implementation manners of the present application will be specifically introduced below.

[0063] Overview of Application Scenarios

[0064] In some specific application scenarios, the game AI character skill determination method of the present application can be applied to any system provided with game AI characters. This system can be a game system, an animation system, or any other system involving AI characters.

[0065] In some specific application scenarios, the game AI character skill determination method of the present application can be directly run locally or run on a cloud server. When running on a cloud server, the obtained data to be processed is sent to the cloud server through the network, and the server processes the data to be processed through the game AI character skill determination method of the present application and sends the processing result to the local through the network.

[0066] The game AI character skill determination method according to the exemplary implementation manner of the present application will be described below in combination with specific application scenarios. It should be noted that the above application scenarios are only shown for the convenience of understanding the spirit and principle of the present application, and the implementation manners of the present application are not limited in this regard. On the contrary, the implementation manners of the present application can be applied to any applicable scenario.

[0067] Exemplary Method

[0068] Reference Figure 1 , an embodiment of the present application provides a method for determining the skills of a game AI character, including the following steps:

[0069] S101. Obtain a set of game characters to be run, and input the set of game characters into a trained state inference model to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time, where the set of game characters includes at least one game AI character.

[0070] Specifically, when implementing, first obtain a set of game characters to be run. This set of game characters includes multiple game AI characters, and the specific number of game AI characters is not limited here. Among them, this set of game characters includes at least one game AI character. Optionally, the set of game characters can include game player characters, that is, game characters controlled by player users. This set of game characters can include duplicate game characters or non-duplicate game characters, which is not limited here. After obtaining the set of game characters to be configured with skills, input the set of game characters into a trained state inference model to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time. This preset time can be set as needed. For example, set this preset time to half an hour. Optionally, the preset time can be set by referring to the time of a game in historical game data. It should be noted that each game AI character has multiple states, such as bleeding from injury, falling to the ground, running, walking, jumping, saving people, being saved, etc. The more a skill is used in the game field, the more important this talent is in the eyes of players, that is, the higher the selection probability of this skill. And the use of skills in the game field is often closely related to the state of game characters. For example, the skill talent "indomitable" can increase the speed of self-healing when falling to the ground and the moving speed, and this skill is related to the state of falling to the ground. Therefore, the present application first determines the time proportion of each state through a state inference model.

[0071] It should be noted that when training the state inference model, an existing neural network model is selected as the benchmark model, and then the benchmark model is trained through a large amount of game data to obtain the state inference model. The input game data includes multiple sets of game character sets, and each set of game character sets includes multiple game characters, and these game characters can be game AI characters or game player characters, which is not limited here. After inputting the set of game characters into the benchmark model, the benchmark model is tested by the time proportion of each state corresponding to each game character in the set of game characters in the game data.

[0072] Since each game AI character has a relatively large number of states, and the time proportions of these states are extremely uneven, and the time of many states is extremely short or even does not appear at all. Therefore, when training the state inference model, the main target states can be selected from all states, and the output layer of the state inference model can be controlled so that the state inference model only outputs the time proportions of the occurrences of all target states respectively.

[0073] In order to further improve the recognition efficiency of the model, in some embodiments, after obtaining the time proportions of the occurrences of the various states of each game AI character in the game character set within a preset time, the method further includes:

[0074] Rank the time proportions of the occurrences of the various states of each game AI character from largest to smallest, determine the various states within a preset range as the main states of each game AI character, and input the time proportions of the occurrences of the various main states into the trained skill probability model to obtain the selection probabilities of the various skills of each game AI character. Among them, the preset range can be set as needed. For example, the preset range can be set to the top 1 to 40.

[0075] Reference Figure 2 , which is a schematic flowchart of obtaining the time proportions of the occurrences of the various states of each game AI character through a state inference model; among them, the game character set input into the model includes four game AI characters. By inputting these four characters into the state inference model (fc), the time proportions of the occurrences of the various states of each character can be obtained. It should be noted that the state inference model (fc) in the figure outputs the time proportions of the occurrences of the top 40 states of each game character. In practical applications, the number of states of each game character can be set as needed and is not limited here.

[0076] S102, input the time proportions of the occurrences of the various states of each game AI character into the trained skill probability model to obtain the selection probabilities of the various skills of each game AI character; among them, the skill probability model is based on a Bayesian neural network model.

[0077] Specifically, when obtaining the time proportions of the occurrences of the various states of each game AI character, input the time proportions of the occurrences of the various states of each game AI character into the trained skill probability model to obtain the selection probabilities of the various skills of each game AI character.

[0078] It should be noted that when training the skill probability model, a Bayesian neural network model is used as the benchmark model. Since the results output by the Bayesian neural network model have a certain degree of randomness, it can ensure that each game AI character is more flexible when configuring skills.

[0079] Reference Figure 3 is a schematic flow chart for obtaining the selection probability of each skill of each game AI character through a skill probability model. Among them, the input of the skill probability model (BNN) is Figure 2 the proportion of the time when the top 40 states of each of the four game AI characters obtained in

[0080] S103. Determine the skills configured for each game AI character based on the selection probability of each skill of each game AI character.

[0081] In specific implementation, when the selection probability of each skill of each game AI character is obtained, the skills configured for each game AI character can be determined through the selection probability of each skill. Optionally, the corresponding skills can be configured for each game AI character from large to small according to the magnitude of the selection probability.

[0082] In some embodiments, the skills configured for each game AI character at least include a first type of skill and a second type of skill, and the priority of configuring the first type of skill is higher than the priority of configuring the second type of skill; determining the skills configured for each game AI character based on the selection probability of each skill of each game AI character specifically includes:

[0083] Obtain the level of each game AI character;

[0084] Determine the first quantity of the first type of skills that can be configured for each game AI character based on the level of each game AI character; where different levels correspond to different first quantities;

[0085] Determine the first type of skills configured for each game AI character based on the first quantity and the selection probability of each of the first type of skills of each game AI character.

[0086] In specific implementation, in some embodiments, the skills of the game AI character at least include the first type of skills and the second type of skills. Optionally, the skills of the game AI character may further include other types of skills other than the first type of skills and the second type of skills. The priority of the other types of skills can be set as needed and will not be limited here. The first type of skills can be understood as more powerful "big skills", so they will be preferentially configured for each character. However, the number of the first type of skills that each character can configure is limited, and the specific number is determined by the level of each game AI character. Generally speaking, the higher the level of the game AI character, the more first type of skills it can be equipped with. For example, if the level of a certain game AI character is divided into three levels from low to high: novice, expert, and master, then the number of the first type of skills corresponding to the novice can be 1, the number of the first type of skills corresponding to the expert can be 2, and the number of the first type of skills corresponding to the master can be 3. After obtaining the level of the game AI character, the first number of the first type of skills that each game AI character can configure can be determined according to this level. After obtaining this first number, the first type of skills that each game AI character should configure can be determined according to the selection probability of each of the first type of skills. For example, if the level of a certain game AI character is expert, then this game AI character can be configured with 2 first type of skills, and then two first type of skills with the first and second highest probabilities are selected from all the first type of skills as the first type of skills configured for this game AI character.

[0087] In some embodiments, determining the skills configured by each game AI character based on the probability of each game AI character configuring each skill specifically further includes:

[0088] Determining the total number of available skill points of each game AI character based on the level of each game AI character, where each game AI character consumes a certain number of skill points for each configured skill;

[0089] Determining the remaining number of available skill points of each game AI character based on the total number and the number of skill points consumed by all the first type of skills configured by each game AI character;

[0090] Determining the second type of skills configured by each game AI character based on the remaining number and the selection probability of each of the second type of skills of each game AI character.

[0091] In specific implementation, in some embodiments, each game AI character has a total number of available skill points, which determines how many skills each game AI character can configure. Among them, this total number is determined by the level of the game AI character. Generally speaking, the higher the level of the game AI character, the higher the total number of available skill points. Specifically, the total number of available skill points corresponding to each level can be set as needed and will not be limited here. Each time a game AI character configures a skill, it needs to consume a certain number of skill points. The specific number of skill points consumed can be set as needed. Optionally, the number of skill points consumed for the same type of skill can be the same or different. Since each game AI character will prioritize configuring the first type of skill, after configuring the first type of skill, the remaining number of available skill points for each game AI character can be obtained based on the total number of available skill points of each game AI character and the number of skill points already consumed by the first type of skill. This remaining number is used to determine how many second type of skills each game AI character can still configure. After determining this remaining number, the second type of skills configured by each game AI character can be determined based on this remaining number and the selection probability of each of the second type of skills of each game AI character. Optionally, the second type of skills can be configured for the game AI character in descending order of the selection probability of each of the second type of skills until the remaining number is 0 or the remaining number is not enough to configure any one skill.

[0092] In order to more accurately configure the first type of skills for each game AI character, in some embodiments, determining the first type of skills configured by each game AI character based on the first quantity and the selection probability of each of the first type of skills of each game AI character specifically includes:

[0093] Obtain the first average probability of each game AI character configuring each of the first type of skills in historical data;

[0094] For each of the first type of skills, determine the comprehensive selection probability of the first type of skills based on the first average probability and the selection probability of the first type of skills;

[0095] Determine the first type of skills configured by each game AI character based on the first quantity and the comprehensive selection probability of each of the first type of skills of each game AI character.

[0096] In some embodiments, the comprehensive selection probability of the first type of skills is determined by the following formula:

[0097] P finar(t1) =α1*P states(t1) +β1*P pid(t1) ;

[0098] Among them, P final(t1) represents the comprehensive selection probability of the first type of skills, and P states(t1) represents the selection probability of the first type of skills, and P pid(t1) represents the first average probability, α1 represents the preset weight of the selection probability of the first type of skills, β1 represents the preset weight of the first average probability, and α1 > β1.

[0099] It should be noted that both α1 and β1 can be set as needed, and the specific values are not limited.

[0100] In some embodiments, the second type of skills configured for each game AI character is determined based on the remaining quantity and the selection probability of each of the second type of skills of each game AI character, and specifically includes:

[0101] Obtain the second average probability of each game AI character configuring each of the second type of skills in historical data;

[0102] For each of the second type of skills, determine the comprehensive selection probability of the second type of skills based on the second average probability and the selection probability of the second type of skills;

[0103] Determine the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each of the second type of skills of each game AI character.

[0104] In order to more accurately configure the second type of skills for each game AI character, in some embodiments, the second type of skills configured for each game AI character is determined based on the remaining quantity and the selection probability of each of the second type of skills of each game AI character, and specifically includes:

[0105] Obtain the second average probability of each game AI character configuring each of the second type of skills in historical data;

[0106] For each of the second type of skills, determine the comprehensive selection probability of the second type of skills based on the second average probability and the selection probability of the second type of skills;

[0107] Determine the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each of the second type of skills of each game AI character.

[0108] In some embodiments, the comprehensive selection probability of the second type of skills is determined by the following formula:

[0109] P final(t2) = α2 * P sLates(t2)+β2*P pid (t2);

[0110] Wherein, P final(t2) represents the comprehensive selection probability of the second type of skills, P states(t2) represents the selection probability of the second type of skills, P pid(t2) represents the second average probability, α2 represents the preset weight of the selection probability of the second type of skills, β2 represents the preset weight of the second average probability, and α2 > β2.

[0111] It should be noted that both α2 and β2 can be set as needed, and the specific values are not limited.

[0112] In some embodiments, the skills configured for each game AI character are arranged in a tree structure. In the tree structure, when a skill corresponding to each child node is configured, the skill corresponding to its parent node needs to be configured first, and all the skills corresponding to the child nodes of the root node can be directly configured. All the first type of skills are distributed on the leaf nodes; determining the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probability of each of the second type of skills configured for each game AI character specifically includes:

[0113] In the tree structure, determine all the nodes that can be directly configured with skills currently;

[0114] Determine the target node with the minimum cost from all the nodes that can be directly configured with skills currently. Among them, the cost of each node is the difference between the comprehensive selection probability of the skill corresponding to its parent node and the comprehensive selection probability of the skill corresponding to this node. The comprehensive selection probability for calculating the cost of the root node and all the nodes corresponding to the second type of skills configured when configuring the first type of skills is 1;

[0115] Based on the target node, re-determine all the nodes that can be directly configured with skills currently, and re-determine the target node from the re-determined all the nodes that can be directly configured with skills currently until the remaining quantity of the available skill points of each game AI character is consumed;

[0116] Determine the second type of skills corresponding to all the target nodes as the second type of skills configured for each game AI character.

[0117] During specific implementation, refer to Figure 4 , which is a tree structure of the skill distribution of a game AI character. Among them, SOURCE is the root node. Optionally, this root node can be configured with skills or not, which is not limited here. For example, Figure 4 the root node in does not have skills configured.

[0118] For the convenience of understanding, Figure 4 in which Skill X is the first type of skill, and all other skills are the second type of skills. Since in the tree structure, when configuring the skills corresponding to each child node, the skills corresponding to its parent node need to be configured first, when configuring Skill X, Skills A, B1, B2,..., and N passed through from the root node will all be configured. It should be noted that in this embodiment, the second type of skills configured by each game AI character are determined by the remaining quantity and the comprehensive selection probability of each game AI character for configuring each of the second type of skills. The second type of skills determined here mainly refer to the second type of skills determined by the available skill points of the remaining quantity. These second type of skills determined by the remaining quantity, combined with the second type of skills determined when configuring the first type of skills, constitute all the second type of skills configured by each character. When determining the second type of skills configured by each game AI character based on the remaining quantity and the comprehensive selection probability of each game AI character for configuring each of the second type of skills, it is necessary to first determine all the nodes in the tree structure that can directly configure skills. For example, Figure 4 in the figure, the nodes corresponding to Skills E, H, P, and D are all the nodes that can directly configure skills at present. Then, the target node with the minimum cost is determined from these nodes. The cost of each node is the difference between the comprehensive selection probability of the skill corresponding to its parent node and the comprehensive selection probability of the skill corresponding to this node. Since no skill is configured for the root node, and Skills A, B1, B2,..., and N have been configured when configuring Skill X, the comprehensive selection probability of these skills corresponding to the nodes for calculating the cost is 1. After the target node is determined for the first time, since the skills corresponding to the child nodes of this target node can also be directly configured, it is necessary to re-determine all the nodes in the tree structure that can directly configure skills at present. For example, if the node corresponding to Skill D is the target node determined for the first time, then the skills that can be directly configured at this time are Skills E, H, P, G1, and F1. Then, the target node is determined again from the nodes corresponding to these directly configurable skills, and the above process of determining the target node is repeated until the remaining quantity of the available skill points of each game AI character is consumed. Finally, all the second type of skills corresponding to the target nodes are determined as the second type of skills configured by each game AI character. In this way, it can be ensured that when the game AI character determines the second type of skills, it configures the skills it needs and can configure as many second type of skills as possible.

[0119] It should be noted that the cost of each node is the difference between the comprehensive selection probability of the skill corresponding to its parent node and the comprehensive selection probability of the skill corresponding to this node. For example Figure 4Among them, the cost of the node corresponding to skill G1 is the comprehensive selection probability of skill D minus the comprehensive selection probability of skill G1. Since the comprehensive selection probability of the root node SOURCE for calculating the cost is set to 1, the cost of the node corresponding to skill E is 1 minus the comprehensive selection probability of skill E.

[0120] In some embodiments, based on the remaining quantity and the comprehensive selection probability of each of the second type of skills for each game AI character, determining the second type of skills configured for each game AI character specifically further includes:

[0121] In response to determining that the second type of skill corresponding to any node is the same as the second type of skill corresponding to its child node in function and the second type of skill corresponding to this node is the highest level of this function, adjust the cost of this node to 0.

[0122] In specific implementation, each of the second type of skills may have multiple levels. For example, Figure 4 Among them, both skill G2 and skill G3 belong to skill G, that is, they have the same function. Assuming that skill G is for restoring health, then the functions of both skill G2 and G3 are to restore health for the game player. However, since G3 has a higher level and is the highest level in terms of restoring health, the health restoration effect is much better than that of G2. Therefore, when the game character has already configured skill G2, skill G3 is generally configured by the way. Therefore, when it is determined that the second type of skill corresponding to any node is the same as the second type of skill corresponding to its child node in function and the second type of skill corresponding to this node is the highest level of this function, adjust the cost of this node to 0 so as to preferentially configure the second type of skill corresponding to this node.

[0123] The method for determining game AI character skills provided by this application inputs the game character set into the trained state inference model to obtain the time proportion of the occurrence of each state of each game AI character in the game character set within the preset time; inputs the time proportion of the occurrence of each state of each game AI character into the trained skill probability model to obtain the selection probability of each skill of each game AI character; wherein, the skill probability model is based on the Bayesian neural network model; determining the skills configured for each game AI character based on the selection probability of each skill of each game AI character, thereby efficiently and accurately determining the skills configured for each game AI character, making the skills configured for the game AI character more diversified and anthropomorphic while ensuring the winning rate of the game AI character.

[0124] Exemplary Device

[0125] Based on the same inventive concept, corresponding to the method of any of the above embodiments, this application also provides a device for determining game AI character skills.

[0126] Reference Figure 5 , the game AI character skill determination device includes:

[0127] A status module 501, which obtains a set of game characters to be run and inputs the set of game characters into a trained status inference model to obtain the time proportion of each status of each game AI character in the set of game characters within a preset time, where the set of game characters includes at least one game AI character;

[0128] A probability module 502, which inputs the time proportion of each status of each game AI character into a trained skill probability model to obtain the selection probability of each skill of each game AI character; where the skill probability model is based on a Bayesian neural network model;

[0129] A skill configuration module 503, which determines the skills configured for each game AI character based on the selection probability of each skill of each game AI character.

[0130] For the convenience of description, when describing the above device, it is divided into various modules according to functions and described separately. Of course, when implementing this application, the functions of each module can be implemented in the same or multiple software and / or hardware.

[0131] The device in the above embodiment is used to implement the corresponding game AI character skill determination method in any one of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0132] Based on the same inventive concept, corresponding to the method in any of the above embodiments, the present application also provides an electronic device, including a memory, a processor, and a computer program stored on the memory and executable on the processor, and the processor implements the game AI character skill determination method described in any one of the above embodiments when executing the program.

[0133] Figure 6 FIG. shows a more specific schematic diagram of the hardware structure of the electronic device provided in this embodiment. The device may include: a processor 1010, a memory 1020, an input / output interface 1030, a communication interface 1040, and a bus 1050. Among them, the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040 are communicatively connected to each other inside the device through the bus 1050.

[0134] The processor 1010 can be implemented in the form of a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (ASIC), or one or more integrated circuits, etc., and is used to execute relevant programs to implement the technical solutions provided in the embodiments of this specification.

[0135] The memory 1020 can be implemented in the form of a ROM (Read Only Memory), a RAM (Random Access Memory), a static storage device, a dynamic storage device, etc. The memory 1020 can store an operating system and other application programs. When implementing the technical solutions provided in the embodiments of this specification through software or firmware, the relevant program codes are stored in the memory 1020 and are called and executed by the processor 1010.

[0136] The input / output interface 1030 is used to connect to the input / output module to achieve information input and output. The input / output module can be configured as a component in the device (not shown in the figure) or externally connected to the device to provide corresponding functions. Among them, the input device can include a keyboard, a mouse, a touch screen, a microphone, various sensors, etc., and the output device can include a display, a speaker, a vibrator, an indicator light, etc.

[0137] The communication interface 1040 is used to connect to a communication module (not shown in the figure) to achieve communication and interaction between this device and other devices. Among them, the communication module can achieve communication through a wired method (such as USB, network cable, etc.) or through a wireless method (such as a mobile network, WIFI, Bluetooth, etc.).

[0138] The bus 1050 includes a path for transmitting information between various components of the device (such as the processor 1010, the memory 1020, the input / output interface 1030, and the communication interface 1040).

[0139] It should be noted that although the above device only shows the processor 1010, the memory 1020, the input / output interface 1030, the communication interface 1040, and the bus 1050, in the specific implementation process, this device may also include other components necessary for normal operation. In addition, those skilled in the art can understand that the above device may also only include the components necessary to implement the solution of the embodiments of this specification and does not necessarily include all the components shown in the figure.

[0140] The electronic device of the above embodiment is used to implement the corresponding method for determining the skills of a game AI character in any of the foregoing embodiments, and has the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0141] Exemplary Program Product

[0142] Based on the same inventive concept, corresponding to the method of any of the above embodiments, the present application also provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to execute a method for determining the skills of a game AI character as described in any of the foregoing embodiments.

[0143] The computer-readable medium of this embodiment includes both permanent and non-permanent, removable and non-removable media, and information storage can be implemented by any method or technology. The information can be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette tapes, magnetic tape magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible by a computing device.

[0144] The computer instructions stored in the storage medium of the above embodiment are used to cause the computer to execute a method for determining the skills of a game AI character as described in any of the foregoing embodiments, and have the beneficial effects of the corresponding method embodiments, which will not be elaborated here.

[0145] Those of ordinary skill in the art should understand that: the discussion of any of the above embodiments is only exemplary and is not intended to imply that the scope of the present application (including the claims) is limited to these examples; under the concept of the present application, the technical features in the above embodiments or different embodiments can also be combined, the steps can be implemented in any order, and there are many other variations in different aspects of the embodiments of the present application as described above, which are not provided in detail for the sake of brevity.

[0146] In addition, for simplicity of explanation and discussion, and so as not to make the embodiments of the present application difficult to understand, well-known power / ground connections to integrated circuit (IC) chips and other components may or may not be shown in the provided drawings. Further, the devices may be shown in block diagram form in order to avoid making the embodiments of the present application difficult to understand, and this also takes into account the fact that details of the implementation of these block diagram devices are highly dependent on the platform on which the embodiments of the present application are to be implemented (i.e., these details should be fully within the understanding of those skilled in the art). In cases where specific details (such as circuits) are set forth to describe exemplary embodiments of the present application, it will be apparent to those skilled in the art that the embodiments of the present application may be practiced without these specific details or with variations of these specific details. Accordingly, these descriptions should be considered illustrative rather than restrictive.

[0147] Although the present application has been described in connection with specific embodiments thereof, many alternatives, modifications, and variations of these embodiments will be apparent to those of ordinary skill in the art in light of the foregoing description. For example, other memory architectures (such as dynamic RAM (DRAM)) may be used with the embodiments discussed.

[0148] Embodiments of the present application are intended to cover all such alternatives, modifications, and variations that fall within the broad scope of the appended claims. Therefore, any omissions, modifications, equivalent substitutions, improvements, etc. made within the spirit and principle of the embodiments of the present application shall be included within the protection scope of the present application.

Claims

1. A method for determining the skills of a game AI character, characterized in that, Including: Obtain a set of game characters to be run, and input the set of game characters into a state inference model obtained through training to obtain the time proportion of each state of each game AI character in the set of game characters within a preset time, where the set of game characters includes at least one game AI character; Input the time proportion of each state of each game AI character into a skill probability model obtained through training to obtain the selection probability of each skill of each game AI character; wherein, the skill probability model is based on a Bayesian neural network model; Determine the skills configured for each game AI character based on the selection probability of each skill of each game AI character.

2. The method according to claim 1, wherein The skills configured for each game AI character at least include a first type of skill and a second type of skill, and the configured priority of the first type of skill is higher than the configured priority of the second type of skill; Determine the skills configured for each game AI character based on the selection probability of each skill of each game AI character, specifically including: Obtain the level of each game AI character; Determine the first quantity of the first type of skills that each game AI character can configure based on the level of each game AI character; wherein, different levels correspond to different first quantities; Determine the first type of skills configured for each game AI character based on the first quantity and the selection probability of each first type of skill of each game AI character.

3. The method according to claim 2, wherein Determine the skills configured for each game AI character based on the probability of each game AI character configuring each skill, specifically further including: Determine the total quantity of available skill points of each game AI character based on the level of each game AI character, where each game AI character consumes a certain quantity of skill points for each configured skill; Determine the remaining quantity of available skill points of each game AI character based on the total quantity and the quantity of skill points consumed by all the first type of skills configured by each game AI character; Determine the second type of skills configured for each game AI character based on the remaining quantity and the selection probability of each second type of skill of each game AI character.

4. The method according to claim 2, wherein Determine the first type of skills configured for each game AI character based on the first quantity and the selection probability of each first type of skill of each game AI character, specifically including: Obtain the first average probability of each game AI character configuring each first type of skill in historical data; For each first type of skill, determine the comprehensive selection probability of the first type of skill based on the first average probability and the selection probability of the first type of skill; Determine the first type of skills configured for each game AI character based on the first quantity and the comprehensive selection probability of each first type of skill of each game AI character.

5. The method according to claim 4, characterized in that Determine the comprehensive selection probability of the first type of skill through the following formula: P final(t1) = α1 * P states(t1) + β1 * P pid(t1) ; Among them, P final(t1) represents the comprehensive selection probability of the first type of skills, P states(t1) represents the selection probability of the first type of skills, P pid(t1) represents the first average probability, α1 represents the preset weight of the selection probability of the first type of skills, β1 represents the preset weight of the first average probability, and α1 > β1.

6. The method according to claim 3, wherein Determine the second type of skills configured for each game AI character based on the remaining quantity and the selection probabilities of the respective second type of skills of each game AI character, specifically including: Obtain the second average probability of each game AI character configuring each of the second type of skills in historical data; For each of the second type of skills, determine the comprehensive selection probability of the second type of skills based on the second average probability and the selection probability of the second type of skills; Determine the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probabilities of the respective second type of skills of each game AI character.

7. The method according to claim 6, wherein Determine the comprehensive selection probability of the second type of skills through the following formula: P final(t2) = α2 * P states(t2) + β2 * P pid(t2) ; Among them, P final(t2) represents the comprehensive selection probability of the second type of skill, P states(t2) represents the selection probability of the second type of skill, P pid(t2) represents the second average probability, α2 represents the preset weight of the selection probability of the second type of skill, β2 represents the preset weight of the second average probability, and α2 > β2.

8. The method according to claim 6, characterized in that The skills configured for each game AI character are arranged in a tree structure. In the tree structure, when the skill corresponding to each child node is configured, the skill corresponding to its parent node needs to be configured first, and the skills corresponding to all child nodes of the root node can be directly configured. All the first type of skills are distributed on the leaf nodes; determine the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probabilities of the respective second type of skills of each game AI character, specifically including: In the tree structure, determine the currently all directly configurable skill nodes; Determine the target node with the minimum cost from the currently all directly configurable skill nodes. Among them, the cost of each node is the difference between the comprehensive selection probability of the skill corresponding to its parent node and the comprehensive selection probability of the skill corresponding to this node. The comprehensive selection probabilities of the root node and all the nodes corresponding to the second type of skills configured when configuring the first type of skills are 1 for calculating the cost; Based on the target node, re-determine the currently all directly configurable skill nodes, and re-determine the target node from the re-determined currently all directly configurable skill nodes until the remaining quantity of the available skill points of each game AI character is consumed; Determine the second type of skills corresponding to all the target nodes as the second type of skills configured for each game AI character.

9. The method according to claim 8, wherein Determine the second type of skills configured for each game AI character based on the remaining quantity and the comprehensive selection probabilities of the respective second type of skills of each game AI character, specifically including: In response to determining that the second type of skills corresponding to any node is the same as the second type of skills corresponding to its child node and the second type of skills corresponding to this node is the highest level of this function, adjust the cost of this node to 0.

10. The method according to claim 1, wherein After obtaining the time proportion of the occurrence of each state of each game AI character in the game character set within a preset time, the method further includes: Rank the time proportions of the occurrences of the respective states of each of the game AI characters from largest to smallest, determine the main states of each of the game AI characters whose rankings are within a preset range, and input the time proportions of the occurrences of the respective main states into the skill probability model obtained through training to obtain the selection probabilities of the respective skills of each of the game AI characters.

11. A device for determining the skills of a game AI character, characterized in that, It includes: A state module that obtains a set of game characters to be run and inputs the set of game characters into the state inference model obtained through training to obtain the time proportions of the occurrences of the respective states of each game AI character in the set of game characters within a preset time, where the set of game characters includes at least one game AI character; A probability module that inputs the time proportions of the occurrences of the respective states of each game AI character into the skill probability model obtained through training to obtain the selection probabilities of the respective skills of each game AI character; where the skill probability model is based on a Bayesian neural network model; A skill configuration module that determines the skills configured for each game AI character based on the selection probabilities of the respective skills of each game AI character.

12. An electronic device, characterized in that, It includes a memory, a processor, and a computer program stored on the memory and executable by the processor. When the processor executes the program, it implements the method according to any one of claims 1 to 10.

13. A non-transitory computer-readable storage medium, characterized in that, The non-transitory computer-readable storage medium stores computer instructions for causing a computer to execute the method according to any one of claims 1 to 10.

Citation Information

Patent Citations

  • Method for learning non-player character combat strategies on basis of deep Q-learning networks

    CN108211362A

  • Game testing method, related device, equipment and storage medium

    CN111249737A