Retention prediction model training method and device, role control method and device and storage medium
Through retention prediction model training and behavior adjustment of non-player characters, the problem of inconsistency in game experience is solved, the consistency of game experience and player retention rate are improved, and personalized and dynamic game difficulty adjustments are achieved.
Patent Information
- Application Number
- CN202411190976.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-08-27
- Publication Date
- 2024-12-20
AI Technical Summary
In existing gaming technology, sudden changes in the difficulty of non-player characters may lead to incoherent gaming experiences, resulting in a simplified and mechanized gaming experience.
The retention prediction model training method is adopted to predict the player's retention results by obtaining the historical characteristics of the player's characters and the behavior control characteristics of the non-player characters, and adjust the game behavior of the non-player characters based on the prediction results to ensure the smoothness and nature of the difficulty changes.
It improves the coherence and immersion of the game experience, enhances player retention, provides a personalized and dynamic gaming experience, and reduces the predictability and mechanization of the game.
Smart Images

Figure CN119158262A_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a retention prediction model training method, a character control method, a device and a storage medium. Background Art
[0002] The application of artificial intelligence in game design has been very extensive, from simple behavior trees and state machines to complex learning algorithms and neural networks, providing games with richer and more realistic interactive experiences.
[0003] At present, the difficulty of the game is usually changed based on different rules. The player's performance is monitored in real time during the game, including key indicators such as health points, scores, time to complete tasks, and number of deaths. When the player's performance meets or violates certain preset conditions, the corresponding rules are triggered to automatically adjust the difficulty parameters of the non-player characters. The non-player characters can simulate the player's behavior, emotions, and decision-making process, thereby providing a more challenging and immersive gaming environment.
[0004] However, the sudden changes in difficulty of the above-mentioned non-player characters may make the game experience inconsistent, resulting in an overly simplified and mechanical game experience. Summary of the invention
[0005] In view of this, the embodiments of the present application provide a retention prediction model training method, a character control method, an apparatus and a storage medium to solve the problem that the sudden change in the difficulty of non-player characters may lead to an inconsistent gaming experience, resulting in an overly simplified and mechanized gaming experience.
[0006] In a first aspect, an embodiment of the present application provides a player retention prediction model training method, comprising:
[0007] Obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of non-player characters in the plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of the player character in the plurality of consecutive game matches include: historical in-game and out-game features of the player character in N consecutive game matches and historical out-game features of the player character in the N+1th game match;
[0008] According to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, obtaining a predicted retention result of the player character in the next historical time period;
[0009] Model training is performed according to the actual retention results and the predicted retention results to obtain a player retention prediction model.
[0010] In a second aspect, the embodiment of the present application further provides a character control method, including:
[0011] Obtaining the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match;
[0012] A player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, wherein the player retention prediction model is the player retention prediction model described in any one of the first aspects, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different;
[0013] Determine a target behavior control combination from multiple behavior control combinations based on multiple player retention results;
[0014] According to the target behavior control combination, the non-player character is controlled to perform corresponding game behavior in the current game match.
[0015] In a third aspect, the embodiment of the present application further provides a retention prediction model training device, comprising:
[0016] Obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of non-player characters in the plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of the player character in the plurality of consecutive game matches include: historical in-game and out-game features of the player character in N consecutive game matches and historical out-game features of the player character in the N+1th game match;
[0017] The acquisition module is further used to acquire the predicted retention result of the player character in the next historical time period according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features;
[0018] A training module is used to perform model training according to the actual retention results and the predicted retention results to obtain a player retention prediction model.
[0019] In a fourth aspect, an embodiment of the present application further provides a character control device, including:
[0020] An acquisition module is used to obtain the current in-game and out-game features of the player characters in a plurality of consecutive game matches within a current time period;
[0021] A prediction module, for using a player retention prediction model to process the current in-game and out-game features of the player characters in the multiple consecutive game matches and each behavior control combination of the non-player characters in the multiple game matches, and predict the player retention result corresponding to each behavior control combination in the next time period of the current time period, wherein the player retention prediction model is the player retention prediction model according to any one of claims 1 to 4, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different;
[0022] A determination module, configured to determine a target behavior control combination from the plurality of behavior control feature combinations according to the plurality of player retention results;
[0023] The control module is used to control the non-player character to perform corresponding game behavior in the current game according to the target behavior control combination.
[0024] In a third aspect, an embodiment of the present application further provides an electronic device, comprising: a processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor communicates with the memory through the bus, and the processor executes the machine-readable instructions to execute the method described in any one of the first aspect or the second aspect.
[0025] In a fourth aspect, an embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored, and when the computer program is executed by a processor, the method described in any one of the first aspect or the second aspect is executed.
[0026] The present application provides a retention prediction model training method, a character control method, a device and a storage medium. The character control method includes: obtaining the out-of-game features of the player character in the current game and the in-game and out-of-game features of the player character in N consecutive game games before the current game, using the player retention prediction model, processing the out-of-game features of the player character, the in-game and out-of-game features of the player character and each behavior control combination of the non-player character, predicting the player retention result corresponding to each behavior control combination, determining the target behavior control combination from multiple behavior control combinations based on multiple player retention results, and controlling the non-player character to perform the corresponding game behavior in the current game according to the target behavior control combination. By introducing a machine learning algorithm to adjust the game behavior of the non-player character, the game experience is more coherent, providing players with a better quality and immersive game experience, and improving the player retention rate. BRIEF DESCRIPTION OF THE DRAWINGS
[0027] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings required for use in the embodiments will be briefly introduced below. It should be understood that the following drawings only show certain embodiments of the present application and therefore should not be regarded as limiting the scope. For ordinary technicians in this field, other related drawings can be obtained based on these drawings without paying creative work.
[0028] Figure 1 Schematic diagram of the process of training the retention prediction model provided in the embodiment of the present application Figure 1 ;
[0029] Figure 2 Schematic diagram of the process of training the retention prediction model provided in the embodiment of the present application Figure 2 ;
[0030] Figure 3 Schematic diagram of the process of the character control method provided in the embodiment of the present application Figure 1 ;
[0031] Figure 4 Schematic diagram of the process of the character control method provided in the embodiment of the present application Figure 2 ;
[0032] Figure 5 A schematic diagram of the structure of a retention prediction model training device provided in an embodiment of the present application;
[0033] Figure 6 A schematic diagram of the structure of a character control device provided in an embodiment of the present application;
[0034] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application. DETAILED DESCRIPTION
[0035] To make the purpose, technical scheme and advantages of the embodiments of the present application clearer, the technical scheme in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. The components of the embodiments of the present application generally described and shown in the drawings here can be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of the present application provided in the drawings is not intended to limit the scope of the application claimed for protection, but merely represents the selected embodiments of the present application. Based on the embodiments of the present application, all other embodiments obtained by those skilled in the art without making creative work belong to the scope of protection of the present application.
[0036] Player retention is one of the key indicators of game success. A high retention rate means that players are highly satisfied with the game. Game developers need to constantly explore new methods and technologies to improve player retention. By collecting and analyzing player behavior data, developers can understand players' preferences, habits, and game progress, thereby providing each player with a personalized gaming experience. Machine learning algorithms, such as decision trees, neural networks, and deep learning, can be used to analyze and predict player behavior and further optimize game AI, i.e., non-player characters (NPCs).
[0037] Dynamic Experience Adjustment is a technology that automatically adjusts the gaming experience based on player performance. By analyzing the player's skill level and game progress in real time, the Dynamic Experience System can dynamically adjust the difficulty of enemies and challenges to ensure that the game is neither too easy nor too difficult, thereby providing the best player experience.
[0038] There are currently two main ways to change the difficulty parameters of non-player characters:
[0039] One is to change the difficulty of the game through preset rules. By presetting the difficulty of AI behavior, the performance of the player character is monitored in real time during the game, including key indicators such as health points, scores, time to complete tasks, and number of deaths. When the performance of the player character meets or violates certain preset conditions, the corresponding rules are triggered to automatically adjust the difficulty parameters of the non-player character. However, the advantage of this method is that it is relatively simple to implement and easy to understand and adjust. However, it may also cause the game experience to be too mechanical, and may not be able to adapt to the unique styles and skill levels of all players. The specific defects are as follows:
[0040] 1. Lack of flexibility and adaptability: Rule-based systems may not be able to fully adapt to the individual differences of players and the diversity of play styles. The rules are preset and may not apply to all players' situations.
[0041] 2. Possible discontinuity in the game experience: Sudden changes in difficulty may cause discontinuity in the player experience, especially at the critical point of difficulty adjustment, players may feel unnatural changes in the game challenge.
[0042] 3. Overly simplified and mechanized game experience: Fixed rules may make the game experience predictable, lacking dynamic changes and unexpected surprises, which may reduce the appeal and replayability of the game.
[0043] 4. Unbalanced difficulty curve: Designing a set of rules that covers all possibilities is difficult and may result in some players experiencing too easy or too difficult challenges in certain parts of the game.
[0044] 5. Development and maintenance costs: While the initial implementation may be simple, maintaining and updating the rule set may become cumbersome and error-prone as the complexity of the game increases.
[0045] The other is to recommend preset experience AI, which uses certain rules to define several specific AIs, and then uses machine learning methods to make personalized recommendations, with the recommended objects being these preset AIs. However, although the recommendation process is based on data, the recommended objects are preset based on rules in advance, lacking a more detailed consideration of the mapping of AI behavior to player experience.
[0046] To solve the above problems, the present application provides a retention prediction model training method and a character control method. By introducing a machine learning algorithm to adjust the game behavior of non-player characters, the game experience is more coherent, providing players with a better and more immersive game experience, thereby improving player retention rate.
[0047] Figure 1 Schematic diagram of the process of training the retention prediction model provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be an electronic device.
[0048] like Figure 1 As shown, the method may include:
[0049] S101, obtaining historical in-game and out-game features of a player character in multiple consecutive game matches within a target historical time period, historical behavior control features of a non-player character in multiple game matches, and actual retention results corresponding to the player character in a next historical time period of the target historical time period.
[0050] Among them, the target historical time period is any historical time period, and the historical in-game and out-game features of the player character in multiple consecutive game matches include: the historical in-game and out-game features of the player character in N consecutive game matches and the historical out-game features of the player character in the N+1th game match.
[0051] The player character may be a game character controlled by the player in a game match. There may be multiple player characters. The historical in-game and out-of-game features of the player character in N game matches include in-game features and out-of-game features of the player character in the N game matches. The in-game features may be understood as battle features. The battle features of the player character in the N game matches are respectively expressed as historical battle 1 features, historical battle 2 features... historical battle N features.
[0052] Among them, the in-game features may include: combat features, lobby behavior features, and combat information. Among them, the combat features may include, for example, the number of kills, deaths, assists, team participation rate, whether to hang up, output rate, etc. of the player character. Among them, the number of kills refers to the number of enemies killed by the player character in the game, the number of deaths refers to the number of deaths of the player character in the game, the number of assists refers to the number of assists of the player character in the game, the team participation rate refers to the frequency of the player character participating in team battles in the game, which is usually used to measure the activity and contribution of a character in team combat, and can be expressed as (personal kills + personal assists) / team kills, whether to hang up refers to whether the player character is in the hang-up state in the game, the output rate refers to the proportion of damage caused by the character or player in the game to the enemy per unit time, which is used to measure its combat efficiency, and can be expressed as the total damage value of the individual to the enemy / the total damage value of the team to the enemy.
[0053] Lobby behavior features may include, for example, chat box click events, email click events, and avatar click events, wherein the chat box click event is used to indicate the clicks on the chat box by the player controlling the player character in the game. The more clicks on the chat box in the game, the more attractive it is to the players and the greater the possibility of player retention. The email click event is used to indicate the clicks on the email by the player controlling the player character in the game. The more clicks on the email in the game, the greater the attractiveness to the players and the greater the possibility of player retention. The avatar click event is used to indicate the clicks on other character avatars by the player controlling the player character in the game. The more clicks on the avatar in the game, the greater the attractiveness to the players and the greater the possibility of player retention.
[0054] Battle information may include, for example, the number of battles, winning rate, the number of Most Valuable Players (MVPs), and the number of LMVPs, where the number of battles refers to the number of battles of different gameplay types, such as 5V5 battles, the winning rate refers to the winning rate of the player character in the game, the number of MVPs refers to the number of times the player character becomes the MVP in the game, and the LMVP refers to the number of times the player character becomes the LMVP in the game.
[0055] The out-of-game features may include the gameplay type of the game, the start time of the game, the time between the current game and the previous game, etc., wherein the gameplay type may include, for example, single-player battle, 5V5 battle, and 3V3 battle.
[0056] The N+1th game match is the next game match of N consecutive game matches, and the historical out-of-game features of the player character in the N+1th game match are the out-of-game features of the player character in the N+1th game match, including the gameplay type of the N+1th game match, the start time of the game match, the time between the game match and the previous game match, etc., wherein the gameplay type may include, for example, single-player battle, 5V5 battle, and 3V3 battle.
[0057] The historical behavior control features of non-player characters in multiple game matches are the characteristic values of multiple behavior control features of non-player characters in N+1 game matches. The multiple behavior control features include but are not limited to skill hit rate, return rate, and group participation rate. The skill hit rate is used to indicate the skill hit situation of the non-player character, and the return rate is used to indicate the frequency of the non-player character leaving the central area of the game map. It is worth noting that the characteristic values of the historical behavior control features of non-player characters in different game matches within the target historical time period are the same, for example, the skill hit rate is 50%, the return rate is 23%, and the return rate is 30%. Among them, the behavior control feature is used to indicate the game behavior of the non-player character in the game match, so that the result corresponding to the game behavior of the non-player character meets the characteristic value requirements of the behavior control feature.
[0058] The actual retention result corresponding to the player character in the next historical time period of the target historical time period is used to indicate whether the player corresponding to the player character is retained in the next historical time period, wherein a label can be used to represent it, for example, 1 represents retention and 0 represents loss.
[0059] For example, if the target historical period is the first day, and the next historical period is the second day, there are 10 players A, B, C, D, E, F, G, H, I, and J. If 5 players A, B, C, D, and E do not come online on the second day, it means that they have been lost. Then the output labels of the samples Pa, Pb, Pc, Pd, and Pe of these 5 players are all represented by 0. The output labels of the other 5 remaining players are all represented by 1.
[0060] It is worth noting that the reason why the historical out-of-game features of the player character in the N+1th game are obtained here instead of the historical in-game and out-of-game features of the player character in the N+1th game is that in the model inference stage, since the next game of N game games has not yet ended, the in-game features of the player character in the next game game cannot be known. In order to ensure the effectiveness of the model, in the model training stage, only the out-of-game features of the player character in the N+1th game game are obtained.
[0061] It can be understood that the value of N here can be 5, 6, 7, etc., which can be selected according to actual needs, and this embodiment does not specifically limit this.
[0062] S102. Obtain the predicted retention result of the player character in the next historical time period based on the player character's historical in-game and out-game characteristics, as well as historical behavior control characteristics.
[0063] The historical in-game and out-of-game features of the player character in N consecutive game matches, the historical out-of-game features of the player character in the N+1th game match, and the historical behavior control features of the non-player character are used as model inputs and input into a preset machine learning model. The model output is the predicted retention result of the player character in the next historical time period, wherein the predicted retention result is the retention result of the player character in the next historical time period output by the model.
[0064] S103. Perform model training based on actual retention results and predicted retention results to obtain a player retention prediction model.
[0065] According to the actual retention results and the predicted retention results, the loss value is calculated, and the preset machine learning model is trained according to the loss value to obtain a player retention prediction model, wherein the preset machine learning model can be a single-layer feedforward network, and the output of the sigmoid activation function of the single-layer feedforward network, i.e., the predicted retention result, and the loss value between the actual predicted result of the player are calculated, and the model parameters are iterated by back-propagating the gradient. When a certain number of iterations is reached or the loss value no longer decreases, the model training is stopped, and the model when a certain number of iterations is reached or the loss value no longer decreases is determined to be the player retention prediction model.
[0066] In this embodiment, by introducing a machine learning algorithm to adjust the gaming behavior of non-player characters, the gaming experience is more coherent, providing players with a better quality and more immersive gaming experience, and improving player retention. In addition, by introducing a machine learning algorithm, the system can learn and adjust the experience based on the player's behavior and preferences, design a more detailed difficulty adjustment mechanism, ensure that the difficulty change is smoother and more natural for the player, use data analysis and player feedback to fine-tune the difficulty curve (i.e., train the player retention prediction model), ensure the appropriateness and fairness of the challenge, and adopt a modular and extensible design to facilitate future updates and maintenance.
[0067] In an optional implementation, the above step S101, obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, may include:
[0068] During the grayscale launch stage of non-player characters at various difficulty levels, the historical in-game and out-of-game characteristics, historical behavior control characteristics, and actual retention results of player characters at each difficulty level are obtained.
[0069] Among them, the grayscale launch stage of non-player characters of various difficulty levels can be understood as pushing non-player characters of various difficulty levels to some players rather than all players, so as to avoid excessive impact on the overall user experience.
[0070] Non-player characters of different difficulty levels refer to non-player characters having different difficulty levels, and the different difficulty levels of non-player characters are determined according to the characteristic values of different historical behavior control characteristics. For example, the higher the skill hit rate, the higher the difficulty level, and the lower the skill hit rate, the lower the difficulty level.
[0071] That is to say, for some game players, non-player characters of various difficulty levels are put online, so that the player characters controlled by some game users can perform game operations with non-player characters of various difficulty levels in the game, and obtain the historical in-game and out-of-game characteristics of the player characters in multiple consecutive game matches at various difficulty levels within the target historical time period, the historical behavior control characteristics of the non-player characters, and the actual retention results of the player characters in the next historical time period of the target historical time period.
[0072] It is understandable that for non-player characters of different difficulty levels, that is, for different feature values of behavior control characteristics, the game players pushed can be different, as long as the historical in-game and out-game characteristics and actual retention results of player characters at different difficulty levels can be obtained.
[0073] Figure 2 Schematic diagram of the process of training the retention prediction model provided in the embodiment of the present application Figure 2 ,like Figure 2 As shown, in an optional implementation, the above step S102, based on the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, obtains the predicted retention result of the player character in the next historical time period, which may include:
[0074] S201, splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features to obtain historical splicing features.
[0075] The historical in-game and out-game features of the player characters in N consecutive game matches, the historical out-game features of the player characters in the N+1th game match, and the historical behavior control features of the non-player characters are spliced to obtain the historical splicing features.
[0076] For example, the feature vectors of the historical in-game and out-game features of a player character in N consecutive game matches are (1, 2, 3, 4, 5), the feature vector of the historical out-game features of the player character in the N+1th game match is (8), and the feature vector of the historical behavior control features of non-player characters is (0, 9). Then the feature vector of the spliced historical splicing features is (1, 2, 3, 4, 5, 8, 0, 9).
[0077] In an optional implementation, the above step S201, splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features to obtain the historical splicing features, may include:
[0078] The preset long short-term memory network is used to process the historical in-game and out-game features of the player character to obtain the first target feature;
[0079] The historical splicing features are obtained by splicing the first target features, the historical out-of-game features of the player character, and the historical behavior control features.
[0080] The historical in-game and out-game features of the player characters in N consecutive game matches are input into the preset long short-term memory network (LSTM), and the first target feature is output. The first target feature is the battle feature of the intermediate layer semantics, that is, it has become a string of digital vectors without direct physical meaning. It is an abstract feature that is used to form a splicing feature with other features later. The first target feature carries the time sequence information of N game matches.
[0081] The first target feature, the historical out-of-game features of the player character in the N+1th game match, and the historical behavior control features of the non-player character are spliced to obtain a historical splicing feature.
[0082] S202. Obtain predicted retention results based on historical splicing features.
[0083] The historical splicing features are used as model input and input into the preset machine learning model. The model output is the predicted retention result of the player character in the next historical time period, wherein the predicted retention result is the retention result of the player character in the next historical time period output by the model.
[0084] In this embodiment, the features are processed through a long short-term memory network to obtain a first target feature, which is then spliced to obtain a historical splicing feature, and then a model is trained based on the historical splicing feature. By introducing a machine learning algorithm to adjust the game behavior of non-player characters, the game experience is more coherent, providing players with a better and more immersive game experience, thereby improving player retention rate.
[0085] Figure 3Schematic diagram of the process of the character control method provided in the embodiment of the present application Figure 1 The execution subject of this embodiment may be an electronic device.
[0086] like Figure 3 As shown, the method may include:
[0087] S301, obtaining the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match.
[0088] Among them, the current game game may be the N+1th game game. Since the current game game has not yet ended, the in-game features of the player character in the current game game cannot be known, so what is obtained here are the out-of-game features of the player character in the current game game, wherein the out-of-game features may include: the play type of the player character in the current game game, the start time of the current game game, the time between the current game game and the previous game game, etc., wherein the play type may include, for example, single-player battle, 5V5 battle, 3V3 battle, etc.
[0089] The in-game and out-game features of the player characters in N consecutive game games before the current game game include the in-game features and out-of-game features of the player characters in N consecutive game games. For a specific explanation of the in-game features, please refer to the above-mentioned related embodiments, which will not be repeated here.
[0090] S302: Using a player retention prediction model, processing the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, predicting the player retention result corresponding to each behavior control combination.
[0091] The player retention prediction model is a player retention prediction model trained using the above-mentioned retention prediction model training method.
[0092] Each behavior control combination includes: characteristic values of multiple behavior control features. The characteristic values of the same behavior control feature in different behavior control combinations are the same or different. Multiple behavior control features include but are not limited to skill hit rate, return to city rate, and team participation rate. For example, behavior control combination 1 includes skill hit rate of 30%, return to city rate of 50%, and team participation rate of 35%. Behavior control combination 2 includes skill hit rate of 20%, return to city rate of 40%, and team participation rate of 35%.
[0093] Multiple behavior control features can have multiple feature values, and each behavior control feature in each behavior control combination has one feature value. For example, the skill hit rate has M1 feature values, the return rate has M2 feature values, and the team participation rate has M3 feature values. Assuming the number of behavior control combinations is M, then M=M1×M2×M3.
[0094] The out-of-game features of the player character in the current game, the in-game and out-of-game features of the player character in N consecutive game games before the current game, and each behavior control combination of the non-player character are used as the model input of the player retention prediction model, and the model output is the predicted player retention result corresponding to each behavior control combination.
[0095] Among them, the current game game and the N consecutive game games before the current game game are game games within the current time period, and the predicted player retention result is the player retention result of the next time period of the current time period.
[0096] That is to say, a batch is input into a single-layer feedforward network, and the output after the sigmoid activation function is calculated. The output result is M floating-point numbers between 0 and 1.
[0097] S303. Determine a target behavior control combination from multiple behavior control combinations based on multiple player retention results.
[0098] There are multiple player retention results corresponding to multiple behavior control combinations. According to the multiple player retention results, a behavior control combination that meets the preset retention conditions is determined from the multiple behavior control combinations as the target behavior control combination, wherein the behavior control combination corresponding to the maximum value can be the target behavior control combination.
[0099] S304: Control the non-player character to perform corresponding game behaviors in the current game according to the target behavior control combination.
[0100] According to the target behavior control combination, the non-player character is controlled to perform the corresponding game behavior in the current game, so that the result corresponding to the game behavior of the non-player character in the current game meets the characteristic value requirements of each behavior control feature in the target behavior control combination.
[0101] In this embodiment, the recommendation objects are specific to the behavior of non-player characters, combined with random events and diversified game paths, to reduce predictability, increase the variability and replay value of the game, and through optimization measures for dynamic difficulty behavior control of out-of-game features and in-game features, the experience of non-player characters is made more intelligent, flexible and player-friendly, thereby providing a more high-quality and immersive gaming experience.
[0102] In an optional implementation, in the above step S302, the player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and before predicting the player retention result corresponding to each behavior control combination, the method may further include:
[0103] Multiple feature values of multiple behavior control features are traversed and combined to generate multiple behavior control combinations.
[0104] Each behavior control feature has multiple feature values, and multiple feature values of multiple behavior control features are traversed and combined to generate multiple behavior control combinations.
[0105] It is worth noting that the characteristic value of each behavior control feature has preset upper and lower limits. According to the preset upper and lower limits of the characteristic value of each behavior control feature, traversal is performed through the specified traversal interval method to obtain multiple characteristic values of each behavior control feature, and they are combined to generate multiple behavior control combinations.
[0106] Figure 4 Schematic diagram of the process of the character control method provided in the embodiment of the present application Figure 2 ,like Figure 4 As shown, in an optional implementation, the above step S302 uses a player retention prediction model to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predicts the player retention result corresponding to each behavior control combination, which may include:
[0107] S401, performing splicing according to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain a target splicing feature corresponding to each behavior control combination.
[0108] The out-of-game features of the player character in the current game, the in-game and out-of-game features of the player character in N game matches, and each behavior control combination are spliced to obtain the target splicing feature corresponding to each behavior control combination, where one behavior control combination corresponds to one target splicing feature.
[0109] In an optional implementation, the above step S301, performing splicing according to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain the target splicing features corresponding to each behavior control combination, may include:
[0110] Using the preset long short-term memory network, the in-game and out-game features of the player character are processed to obtain the second target feature;
[0111] The target splicing feature is obtained by splicing the second target feature, the out-of-game feature of the player character and each behavior control combination.
[0112] The in-game and out-game features of the player characters in N consecutive game matches are input into the preset long short-term memory network (LSTM), and the second target feature is output. The second target feature is the battle feature of the intermediate layer semantics, that is, it has become a string of digital vectors without direct physical meaning. It is an abstract feature that is used to form a splicing feature with other features later. The first target feature carries the time sequence information of N game matches.
[0113] The second target feature, the out-of-game features of the player character in the current game, and each behavior control feature are spliced to obtain a target splicing feature.
[0114] S402: Using a player retention prediction model, the target splicing features are processed to predict the player retention results corresponding to each behavior control combination.
[0115] The target splicing features are used as model input and input into the player retention prediction model. The model output is the predicted player retention result corresponding to each behavior control combination.
[0116] In this embodiment, the features are processed by the long short-term memory network to obtain the second target features, which are then spliced to obtain the target splicing features. The target splicing features are processed by the player retention prediction model to predict the player retention results corresponding to each behavior control combination. The game behavior of non-player characters is then controlled, and the game behavior of non-player characters is adjusted by introducing a machine learning algorithm, making the game experience more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate.
[0117] Figure 5 A schematic diagram of the structure of a retention prediction model training device provided in an embodiment of the present application, which can be integrated in an electronic device.
[0118] like Figure 5 As shown, the device may include:
[0119] The acquisition module 501 is used to acquire historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period;
[0120] The acquisition module 501 is further used to acquire the predicted retention result of the player character in the next historical time period according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features;
[0121] The training module 502 is used to perform model training according to the actual retention results and the predicted retention results to obtain a player retention prediction model.
[0122] In an optional implementation, the acquisition module 501 is specifically configured to:
[0123] According to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, historical splicing features are obtained;
[0124] Obtain predicted retention results based on historical splicing features.
[0125] In an optional implementation, the acquisition module 501 is specifically configured to:
[0126] The preset long short-term memory network is used to process the historical in-game and out-game features of the player character to obtain the first target feature;
[0127] The historical splicing features are obtained by splicing the first target features, the historical out-of-game features of the player character, and the historical behavior control features.
[0128] In an optional implementation, the acquisition module 501 is specifically configured to:
[0129] During the grayscale launch stage of non-player characters at various difficulty levels, the historical in-game and out-of-game characteristics, historical behavior control characteristics, and actual retention results of player characters at each difficulty level are obtained.
[0130] In this embodiment, the acquisition module is used to obtain the historical in-game and out-game features of the player character in a plurality of consecutive game matches in the target historical time period, the historical behavior control features of the non-player characters in a plurality of game matches, and the actual retention results corresponding to the player character in the next historical time period of the target historical time period. The acquisition module is also used to obtain the predicted retention results of the player character in the next historical time period based on the historical in-game and out-game features and historical behavior control features of the player character in a plurality of consecutive game matches. The training module is used to perform model training based on the actual retention results and the predicted retention results to obtain a player retention prediction model. By introducing a machine learning algorithm to adjust the game behavior of non-player characters, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate. In addition, by introducing a machine learning algorithm, the system can learn and adjust the experience according to the player's behavior and preferences, design a more detailed difficulty adjustment mechanism, ensure that the difficulty change is smoother and more natural for the player, use data analysis and player feedback to fine-tune the difficulty curve (i.e., train the player retention prediction model), ensure the appropriateness and fairness of the challenge, and adopt a modular and extensible design for future updates and maintenance.
[0131] Figure 6 This is a schematic diagram of the structure of a character control device provided in an embodiment of the present application, which can be integrated into an electronic device.
[0132] like Figure 6 As shown, the device may include:
[0133] An acquisition module 601 is used to acquire the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match;
[0134] Prediction module 602, used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character using a player retention prediction model, and predict the player retention result corresponding to each behavior control combination, the player retention prediction model is the above-mentioned player retention prediction model, each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different;
[0135] A determination module 603, for determining a target behavior control combination from a plurality of behavior control combinations according to a plurality of player retention results;
[0136] The control module 604 is used to control the non-player character to perform corresponding game behaviors in the current game according to the target behavior control combination.
[0137] In an optional implementation, the prediction module 602 is further configured to:
[0138] Multiple feature values of multiple behavior control features are traversed and combined to generate multiple behavior control combinations.
[0139] In an optional implementation, the prediction module 602 is specifically configured to:
[0140] According to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination, splicing is performed to obtain the target splicing features corresponding to each behavior control combination;
[0141] The player retention prediction model is used to process the target splicing features and predict the player retention results corresponding to each behavior control combination.
[0142] In an optional implementation, the prediction module 602 is specifically configured to:
[0143] Using the preset long short-term memory network, the in-game and out-game features of the player character are processed to obtain the second target feature;
[0144] The target splicing feature is obtained by splicing the second target feature, the out-of-game feature of the player character and each behavior control combination.
[0145] In this embodiment, the acquisition module is used to obtain the out-of-game features of the player character in the current game and the in-game features of the player character in N consecutive game games before the current game. The prediction module is used to use the player retention prediction model to process the out-of-game features of the player character, the in-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination. The player retention prediction model is the above-mentioned player retention prediction model. Each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different. The determination module is used to determine the target behavior control combination from multiple behavior control combinations based on multiple player retention results. The control module is used to control the non-player character to perform the corresponding game behavior in the current game according to the target behavior control combination. By introducing a machine learning algorithm to adjust the game behavior of the non-player character, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate.
[0146] Figure 7 A schematic diagram of the structure of an electronic device provided in an embodiment of the present application, such as Figure 7 As shown, the device may include: a processor 701, a memory 702 and a bus 703, the memory 702 stores machine-readable instructions executable by the processor 701, when the electronic device is running, the processor 701 communicates with the memory 702 through the bus 703, and the processor 701 executes the machine-readable instructions to perform the following steps:
[0147] Obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of a player character in a plurality of consecutive game matches include: historical in-game and out-game features of a player character in N consecutive game matches and historical out-game features of a player character in an N+1th game match;
[0148] According to the historical in-game and out-game characteristics of the player character, the historical out-game characteristics of the player character, and the historical behavior control characteristics, the predicted retention result of the player character in the next historical time period is obtained;
[0149] The model is trained based on the actual retention results and the predicted retention results to obtain the player retention prediction model.
[0150] In an optional implementation, based on the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, the predicted retention result of the player character in the next historical time period is obtained, including:
[0151] According to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, historical splicing features are obtained;
[0152] Obtain predicted retention results based on historical splicing features.
[0153] In an optional implementation, historical splicing features are obtained by splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, including:
[0154] The preset long short-term memory network is used to process the historical in-game and out-game features of the player character to obtain the first target feature;
[0155] The historical splicing features are obtained by splicing the first target features, the historical out-of-game features of the player character, and the historical behavior control features.
[0156] In an optional implementation, obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period includes:
[0157] During the grayscale launch stage of non-player characters at various difficulty levels, the historical in-game and out-of-game characteristics, historical behavior control characteristics, and actual retention results of player characters at each difficulty level are obtained.
[0158] In this embodiment, the processor executes machine-readable instructions to obtain historical in-game and out-game features of the player character in multiple consecutive game matches in the target historical time period, historical behavior control features of non-player characters in multiple game matches, and the actual retention results corresponding to the player character in the next historical time period of the target historical time period, obtain the predicted retention results of the player character in the next historical time period according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, and perform model training according to the actual retention results and the predicted retention results to obtain a player retention prediction model. By introducing a machine learning algorithm to adjust the game behavior of non-player characters, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate. In addition, by introducing a machine learning algorithm, the system can learn and adjust the experience according to the player's behavior and preferences, design a more detailed difficulty adjustment mechanism, ensure that the difficulty change is smoother and more natural for the player, use data analysis and player feedback to fine-tune the difficulty curve (i.e., train the player retention prediction model), ensure the appropriateness and fairness of the challenge, and adopt a modular and extensible design to facilitate future updates and maintenance.
[0159] Alternatively, perform the following steps:
[0160] Obtaining the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match;
[0161] A player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination. The player retention prediction model is the above player retention prediction model, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different;
[0162] Determine a target behavior control combination from multiple behavior control combinations based on multiple player retention results;
[0163] According to the target behavior control combination, the non-player character is controlled to perform corresponding game behaviors in the current game.
[0164] In an optional implementation, a player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and before predicting the player retention result corresponding to each behavior control combination, the method further includes:
[0165] Multiple feature values of multiple behavior control features are traversed and combined to generate multiple behavior control combinations.
[0166] In an optional implementation, a player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, including:
[0167] According to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination, splicing is performed to obtain the target splicing features corresponding to each behavior control combination;
[0168] The player retention prediction model is used to process the target splicing features and predict the player retention results corresponding to each behavior control combination.
[0169] In an optional implementation, splicing is performed based on the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain a target splicing feature corresponding to each behavior control combination, including:
[0170] Using the preset long short-term memory network, the in-game and out-game features of the player character are processed to obtain the second target feature;
[0171] The target splicing feature is obtained by splicing the second target feature, the out-of-game feature of the player character and each behavior control combination.
[0172] In this embodiment, the processor executes machine-readable instructions to obtain the out-of-game features of the player character in the current game and the in-game and out-of-game features of the player character in N consecutive game games before the current game, and uses a player retention prediction model to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, and determine the target behavior control combination from multiple behavior control combinations based on multiple player retention results, and control the non-player character to perform the corresponding game behavior in the current game according to the target behavior control combination. By introducing a machine learning algorithm to adjust the game behavior of the non-player character, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate.
[0173] The embodiment of the present application further provides a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the processor performs the following steps:
[0174] Obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of a player character in a plurality of consecutive game matches include: historical in-game and out-game features of a player character in N consecutive game matches and historical out-game features of a player character in an N+1th game match;
[0175] According to the historical in-game and out-game characteristics of the player character, the historical out-game characteristics of the player character, and the historical behavior control characteristics, the predicted retention result of the player character in the next historical time period is obtained;
[0176] The model is trained based on the actual retention results and the predicted retention results to obtain the player retention prediction model.
[0177] In an optional implementation, based on the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, the predicted retention result of the player character in the next historical time period is obtained, including:
[0178] According to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, historical splicing features are obtained;
[0179] Obtain predicted retention results based on historical splicing features.
[0180] In an optional implementation, historical splicing features are obtained by splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, including:
[0181] The preset long short-term memory network is used to process the historical in-game and out-game features of the player character to obtain the first target feature;
[0182] The historical splicing features are obtained by splicing the first target features, the historical out-of-game features of the player character, and the historical behavior control features.
[0183] In an optional implementation, obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in a plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period includes:
[0184] During the grayscale launch stage of non-player characters at various difficulty levels, the historical in-game and out-of-game characteristics, historical behavior control characteristics, and actual retention results of player characters at each difficulty level are obtained.
[0185] In this embodiment, when the computer program is executed by the processor, the processor executes to obtain the historical in-game and out-game features of the player character in multiple consecutive game matches in the target historical time period, the historical behavior control features of the non-player characters in multiple game matches, and the actual retention results corresponding to the player character in the next historical time period of the target historical time period, and obtain the predicted retention results of the player character in the next historical time period according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, and perform model training according to the actual retention results and the predicted retention results to obtain a player retention prediction model. By introducing a machine learning algorithm to adjust the game behavior of non-player characters, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate. In addition, by introducing a machine learning algorithm, the system can learn and adjust the experience according to the player's behavior and preferences, design a more detailed difficulty adjustment mechanism, ensure that the difficulty change is smoother and more natural for the player, use data analysis and player feedback to fine-tune the difficulty curve (i.e., train the player retention prediction model), ensure the appropriateness and fairness of the challenge, and adopt a modular and extensible design to facilitate future updates and maintenance.
[0186] Alternatively, perform the following steps:
[0187] Obtaining the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match;
[0188] A player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination. The player retention prediction model is the above player retention prediction model, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different;
[0189] Determine a target behavior control combination from multiple behavior control combinations based on multiple player retention results;
[0190] According to the target behavior control combination, the non-player character is controlled to perform the corresponding game behavior in the current game.
[0191] In an optional implementation, a player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and before predicting the player retention result corresponding to each behavior control combination, the method further includes:
[0192] Multiple feature values of multiple behavior control features are traversed and combined to generate multiple behavior control combinations.
[0193] In an optional implementation, a player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, including:
[0194] According to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination, splicing is performed to obtain the target splicing features corresponding to each behavior control combination;
[0195] The player retention prediction model is used to process the target splicing features and predict the player retention results corresponding to each behavior control combination.
[0196] In an optional implementation, splicing is performed based on the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain a target splicing feature corresponding to each behavior control combination, including:
[0197] Using the preset long short-term memory network, the in-game and out-game features of the player character are processed to obtain the second target feature;
[0198] The target splicing feature is obtained by splicing the second target feature, the out-of-game feature of the player character and each behavior control combination.
[0199] In this embodiment, when the computer program is executed by the processor, the processor executes to obtain the out-of-game features of the player character in the current game match and the in-game and out-of-game features of the player character in N consecutive game matches before the current game match, and uses the player retention prediction model to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, and determine the target behavior control combination from multiple behavior control combinations based on multiple player retention results, and control the non-player character to perform the corresponding game behavior in the current game match based on the target behavior control combination. By introducing a machine learning algorithm to adjust the game behavior of the non-player character, the game experience is more coherent, providing players with a more high-quality and immersive game experience, and improving the player retention rate.
[0200] In the embodiment of the present application, the computer program can also execute other machine-readable instructions when run by the processor to execute other methods described in the embodiment. For the specific execution method steps and principles, please refer to the description of the embodiment, which will not be repeated here.
[0201] In the embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. The device embodiments described above are merely schematic. For example, the division of the units is only a logical function division. There may be other division methods in actual implementation. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some communication interfaces, and the indirect coupling or communication connection of the devices or units can be electrical, mechanical or other forms.
[0202] The units described as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0203] In addition, each functional unit in the embodiments provided in the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
[0204] If the functions are implemented in the form of software functional units and sold or used as independent products, they can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art or the part of the technical solution, can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for a computer device (which can be a personal computer, a server, or a network device, etc.) to perform all or part of the steps of the methods described in each embodiment of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0205] It should be noted that similar numbers and letters represent similar items in the following figures. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures. In addition, the terms "first", "second", "third", etc. are only used to distinguish the description and are not to be understood as indicating or implying relative importance.
[0206] Finally, it should be noted that the above-described embodiments are only specific implementation methods of the present application, which are used to illustrate the technical solutions of the present application, rather than to limit them. The protection scope of the present application is not limited thereto. Although the present application is described in detail with reference to the above-mentioned embodiments, ordinary technicians in the field should understand that any technician familiar with the technical field can still modify the technical solutions recorded in the above-mentioned embodiments within the technical scope disclosed in the present application, or can easily think of changes, or make equivalent replacements for some of the technical features therein; and these modifications, changes or replacements do not make the essence of the corresponding technical solutions deviate from the spirit and scope of the technical solutions of the embodiments of the present application. They should all be included in the protection scope of the present application. Therefore, the protection scope of the present application shall be based on the protection scope of the claims.
Claims
1. A retention prediction model training method, It is characterized in that include: Obtaining historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of non-player characters in the plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of the player character in the plurality of consecutive game matches include: historical in-game and out-game features of the player character in N consecutive game matches and historical out-game features of the player character in the N+1th game match; According to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, obtaining a predicted retention result of the player character in the next historical time period; Model training is performed according to the actual retention results and the predicted retention results to obtain a player retention prediction model.
2. The method according to claim 1, It is characterized in that The obtaining, according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, a predicted retention result of the player character in the next historical time period includes: splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features to obtain a historical splicing feature; The predicted retention result is obtained according to the historical splicing features.
3. The method according to claim 2, It is characterized in that The historical splicing features are obtained by splicing the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features, including: Using a preset long short-term memory network, the historical in-game and out-game features of the player character are processed to obtain a first target feature; The historical splicing feature is obtained by splicing the first target feature, the historical out-of-game feature of the player character, and the historical behavior control feature.
4. The method according to any one of claims 1 to 3, It is characterized in that The obtaining of historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of a non-player character in the plurality of game matches, and an actual retention result corresponding to the player character in a next historical time period of the target historical time period includes: During the grayscale online stage of the non-player characters of various difficulty levels, the historical in-game and out-game features, the historical behavior control features, and the actual retention results of the player characters at each difficulty level are obtained respectively.
5. A method for controlling a character, It is characterized in that include: Obtaining the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match; A player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, wherein the player retention prediction model is the player retention prediction model according to any one of claims 1 to 4, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different; Determine a target behavior control combination from multiple behavior control combinations based on multiple player retention results; According to the target behavior control combination, the non-player character is controlled to perform corresponding game behavior in the current game match.
6. The method according to claim 5, It is characterized in that The method further comprises: using the player retention prediction model to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predicting the player retention result corresponding to each behavior control combination. The plurality of feature values of the plurality of behavior control features are traversed and combined to generate the plurality of behavior control combinations.
7. The method according to claim 5, It is characterized in that The player retention prediction model is used to process the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character, and predict the player retention result corresponding to each behavior control combination, including: Splicing is performed according to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain a target splicing feature corresponding to each behavior control combination; The target splicing features are processed using a player retention prediction model to predict the player retention results corresponding to each behavior control combination.
8. The method according to claim 7, It is characterized in that The step of performing splicing according to the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination to obtain a target splicing feature corresponding to each behavior control combination includes: Using a preset long short-term memory network, the in-game and out-game features of the player character are processed to obtain a second target feature; The target splicing feature is obtained by splicing the second target feature, the out-of-game feature of the player character and each behavior control combination.
9. A retention prediction model training device, It is characterized in that include: An acquisition module is used to acquire historical in-game and out-game features of a player character in a plurality of consecutive game matches within a target historical time period, historical behavior control features of non-player characters in the plurality of game matches, and actual retention results corresponding to the player character in a historical time period next to the target historical time period, wherein the historical in-game and out-game features of the player character in the plurality of consecutive game matches include: historical in-game and out-game features of the player character in N consecutive game matches and historical out-game features of the player character in the N+1th game match; The acquisition module is further used to acquire the predicted retention result of the player character in the next historical time period according to the historical in-game and out-game features of the player character, the historical out-game features of the player character, and the historical behavior control features; A training module is used to perform model training according to the actual retention results and the predicted retention results to obtain a player retention prediction model.
10. A character control device, It is characterized in that include: An acquisition module, used to acquire the out-of-game features of the player character in the current game match and the in-game features of the player character in N consecutive game matches before the current game match; A prediction module, for processing the out-of-game features of the player character, the in-game and out-of-game features of the player character, and each behavior control combination of the non-player character using a player retention prediction model, and predicting the player retention result corresponding to each behavior control combination, wherein the player retention prediction model is the player retention prediction model according to any one of claims 1 to 4, and each behavior control combination includes: feature values of multiple behavior control features, and the feature values of the same behavior control feature in different behavior control combinations are the same or different; A determination module, used to determine a target behavior control combination from multiple behavior control combinations according to multiple player retention results; The control module is used to control the non-player character to perform corresponding game behavior in the current game according to the target behavior control combination.
11. An electronic device, It is characterized in that include: A processor, a memory and a bus, wherein the memory stores machine-readable instructions executable by the processor. When the electronic device is running, the processor communicates with the memory via the bus, and the processor executes the machine-readable instructions to execute the retention prediction model training method described in any one of claims 1 to 4, or the character control method described in any one of claims 5 to 8.
12. A computer-readable storage medium, It is characterized in that The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the retention prediction model training method described in any one of claims 1 to 4, or the character control method described in any one of claims 5-8 is executed.
