Game balance testing method and device
By combining the opponent pool and lineup matching model, we can quickly and comprehensively test the game balance, solve the time-consuming and labor-intensive problems in existing technologies, and improve the efficiency of game updates.
Patent Information
- Application Number
- CN202111217061.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-10-19
- Publication Date
- 2025-09-23
- Estimated Expiration
- 2041-10-19
AI Technical Summary
The existing methods for testing game balance are difficult to cover all lineup combinations, consume a lot of time and energy, and are not conducive to game updates and iterations.
By maintaining an opponent pool and using a pre-trained lineup matching model, lineup matching is performed based on the feature data in the matching pool, and battles are conducted in the battle server to obtain battle result data and analyze the rationality of the lineup matching.
Quickly identify unbalanced lineups, evaluate the balance of the overall environment, reduce manual testing time, and increase game iteration speed.
Smart Images

Figure CN113952729B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of game technology, and in particular to a game balance testing method and a game balance testing device. Background Art
[0002] Game balance is crucial to a game's long-term success. In strategy games, different combinations of heroes, units, and equipment create diverse lineups. Avoiding combinations with excessively high win rates and ensuring the balance of these lineups is a major challenge. As the variety of lineups increases, testing whether they meet the designer's expectations consumes considerable time and effort. Fast and efficient testing methods allow designers to iterate on the game more quickly.
[0003] In the existing art, game balance is generally tested using two methods: manual lineup testing by testers, which not only requires a high level of gaming proficiency but also makes it difficult to cover all possible lineup combinations. The other method involves iterating through all possible lineup combinations. However, since strategy games typically involve multiple combinations such as heroes, units, and equipment, the number of possible lineup combinations increases exponentially. Iterating through all possible combinations takes considerable time, which is often unacceptable. Furthermore, every time the game designer modifies the game parameters, retesting is necessary. These two methods consume too much time and effort, hindering game updates and iterations. Summary of the Invention
[0004] In view of the fact that the above-mentioned method for testing game balance is difficult to cover all lineup combinations, and requires a lot of time and effort, which is not conducive to game updates and iterations, an embodiment of the present invention is proposed to provide a game balance testing method and a corresponding game balance testing device that overcome the above-mentioned problems or at least partially solve the above-mentioned problems.
[0005] An embodiment of the present invention discloses a game balance testing method, comprising:
[0006] Obtaining a pairing pool, an opponent pool, and a lineup pairing model; wherein the pairing pool includes first feature data of multiple dimensions, and the opponent pool includes multiple opponent lineups;
[0007] inputting the first feature data into the lineup matching model to determine a first lineup from the matching pool;
[0008] Sampling a second lineup from a plurality of opponent lineups in the opponent pool;
[0009] The virtual characters in the first lineup and the second lineup are controlled to fight each other to obtain battle result data.
[0010] Optionally, inputting the first feature data into the lineup matching model to determine a first lineup from the matching pool includes:
[0011] When there is no second feature data input into the lineup matching model, the lineup matching model matches the first feature data to obtain a first lineup;
[0012] When there is second feature data input into the lineup matching model, the lineup matching model matches according to the second feature data to obtain a first lineup.
[0013] Optionally, the second feature data is data of a third lineup determined from an opponent pool; and the first lineup is a combination that restrains the third lineup.
[0014] Optionally, the second feature data is feature data of one or more dimensions of one's own team; and the first lineup is a combination adapted to the feature data of one or more dimensions of one's own team.
[0015] Optionally, after the step of inputting the first feature data into the lineup matching model and determining the first lineup from the matching pool, the method further includes:
[0016] At a preset time interval, a fourth lineup is obtained by sampling from a plurality of opponent lineups in the opponent pool, and the first lineup is replaced by the fourth lineup.
[0017] Optionally, the multiple opponent lineups have one-to-one corresponding average resource loss ratios, and the step of sampling the second lineup from the multiple opponent lineups in the opponent pool includes:
[0018] Determining a sampling probability corresponding to each opponent lineup based on the average resource loss ratio of all opponent lineups;
[0019] According to the sampling probability, a second lineup is obtained by sampling from multiple opponent lineups in the opponent pool.
[0020] Optionally, it also includes:
[0021] The opponent pool is updated according to the battle result data.
[0022] Optionally, it also includes:
[0023] Combining the first feature data of the multiple dimensions in the matching pool to obtain a fifth lineup;
[0024] The fifth lineup is added to the opponent pool.
[0025] Optionally, it also includes:
[0026] When the opponent pool is updated to add a new opponent lineup in the opponent pool, the new opponent lineup is controlled to fight against the virtual characters in the first lineup to determine the average resource loss ratio corresponding to the new opponent lineup.
[0027] Optionally, it also includes:
[0028] When the opponent lineup in the opponent pool reaches a preset value, a target lineup is determined from the opponent pool according to the average resource loss ratio, and the target lineup is deleted.
[0029] Optionally, it also includes:
[0030] The lineup matching model is updated according to the battle result data.
[0031] Optionally, the battle result data includes a first remaining resource ratio corresponding to the first lineup and a second remaining resource ratio corresponding to the second lineup, and updating the lineup matching model according to the battle result data includes:
[0032] Calculating the battle loss difference and the resource loss ratio based on the first remaining resource ratio and the second remaining resource ratio;
[0033] The gradient value is determined by backpropagation based on the battle loss difference and resource loss ratio, and the lineup matching model is updated according to the gradient value.
[0034] Optionally, controlling the virtual characters in the first lineup and the second lineup to fight against each other to obtain battle result data includes:
[0035] Create multiple battle environments;
[0036] In the multiple battle environments, the virtual characters in the first lineup and the second lineup are controlled to battle to obtain battle result data.
[0037] The embodiment of the present invention further discloses a game balance testing device, comprising:
[0038] A collocation pool acquisition module is used to acquire a collocation pool, an opponent pool, and a lineup collocation model; wherein the collocation pool contains first feature data of multiple dimensions, and the opponent pool contains multiple opponent lineups;
[0039] a first lineup determination module, configured to input the first feature data into the lineup matching model and determine a first lineup from the matching pool;
[0040] A second lineup determination module, configured to obtain a second lineup by sampling from a plurality of opponent lineups in the opponent pool;
[0041] The lineup battle module is used to control the virtual characters in the first lineup and the second lineup to fight each other to obtain battle result data.
[0042] An embodiment of the present invention further discloses an electronic device, including:
[0043] A processor and a storage medium, wherein the storage medium stores machine-readable instructions executable by the processor. When the electronic device is running, the processor executes the machine-readable instructions to perform the method as described in any one of the embodiments of the present invention.
[0044] An embodiment of the present invention further discloses a computer-readable storage medium, on which a computer program is stored. When the computer program is executed by a processor, the method according to any one of the embodiments of the present invention is executed.
[0045] The embodiments of the present invention include the following advantages:
[0046] In an embodiment of the present invention, by maintaining an opponent pool, a pre-trained lineup matching model is used to quickly match lineups according to the first feature data of multiple dimensions contained in the matching pool, and a first lineup is output. The first lineup output by the model is played against the virtual characters in the second lineup sampled from the opponent pool to obtain battle result data, so that the rationality of each lineup matching can be determined based on the battle result data analysis, and unbalanced lineups can be searched out from the matching pool, avoiding the need to consume a lot of time through manual testing. Moreover, the lineup matching method using the lineup matching model can cover all lineup matching situations, and the overall game environment can be evaluated in a short time, which is convenient for game planners to quickly adjust game parameters and speed up game iteration. BRIEF DESCRIPTION OF THE DRAWINGS
[0047] In order to more clearly illustrate the technical solution of the present invention, the following briefly introduces the drawings required for use in the description of the present invention. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0048] Figure 1 This is a flowchart of the steps of a game balance testing method provided by an embodiment of the present invention;
[0049] Figure 2 This is a schematic diagram of the structure of a game balance testing system provided by an embodiment of the present invention;
[0050] Figure 3 This is a structural block diagram of a game balance testing device provided by an embodiment of the present invention;
[0051] Figure 4 It is a structural block diagram of an electronic device of the present invention;
[0052] Figure 5 It is a structural block diagram of a computer-readable storage medium of the present invention. DETAILED DESCRIPTION
[0053] To make the above-mentioned objects, features, and advantages of the present invention more clearly understood, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments. It should be understood that the embodiments described are only a portion of the embodiments of the present invention, not all of them. All other embodiments derived by persons of ordinary skill in the art based on the embodiments of the present invention without inventive effort are also within the scope of protection of the present invention.
[0054] In existing technology, strategy game balance is primarily tested through manual lineup testing by testers or by traversing all lineup combinations. These two methods struggle to cover all lineup combinations, require significant time and effort, and hinder game updates and iterations. To address this issue, an embodiment of the present invention provides a method for game balance testing to quickly identify unbalanced lineups and assess the overall balance of the environment.
[0055] Specifically, in the embodiments of the present invention, a matching pool and a battle server can be given, and a lineup matching based on the feature data in the matching pool can be used to output a stronger lineup. The output lineup can be tested in the battle server, and then an uneven lineup can be searched based on the test results. In order to solve the above problems, the embodiments of the present invention need to have the following features:
[0056] 1. Quickly identify unbalanced lineups: Since the game's build pool is regularly updated to enhance the game's freshness, it's crucial to ensure that builds with significantly different win rates are maintained to ensure the correctness and stability of the released version. To address this issue, a build pool model is pre-trained. During testing, this model is used to create lineups based on feature data from all dimensions in the build pool, covering all possible lineup combinations. The build pool model consistently outputs strong lineups for testing to avoid builds with significantly different win rates after game updates, ensuring the correctness and stability of the released version.
[0057] 2. Ability to find significantly different pairings: There are many factors influencing game balance (e.g., heroes, units, equipment), and different pairings have different characteristics. For example, the pairings of ranged and melee heroes are completely different. Therefore, the lineups found should be different to ensure a diverse lineup. To address this, the lineup model inputs the opponent's lineup as feature data according to preset probabilities. The model then generates a lineup based on this feature data and outputs the first lineup that counters this opponent's lineup for testing. This enhances the diversity of the first lineup output by the lineup model and ensures a diverse lineup.
[0058] 3. Ability to assess the overall balance of the meta: This requires not only identifying unbalanced lineups but also providing strong pairings for each hero, thereby assessing the overall meta. To address this, the lineup matching model inputs one or more of its own characteristic data into the lineup matching model according to preset probabilities. The model then outputs the lineup that best fits this characteristic data for testing. For example, when a single hero is input as characteristic data, it outputs strong pairings for this hero. By adjusting the input characteristic data, the diversity of the lineups used for testing is further ensured, enabling assessment of the overall game environment.
[0059] In the specific implementation, deep reinforcement learning methods are mainly used to search for unbalanced lineups. Specifically, it mainly includes three parts: opponent pool update and sampling, model design, and model update:
[0060] (1) Opponent pool maintenance and sampling: This module is responsible for maintaining an opponent pool and sampling lineups and model matches. The quality of the opponent pool affects the convergence speed and final results of the model. The stronger the opponent, the easier it is for the model to find unbalanced combinations.
[0061] (2) Model design: This module mainly extracts key features from the collocation pool. The quality of the features affects the convergence speed and final results of the model. The extracted features need to meet the following requirements:
[0062] a. Distinguishability: For heroes, classes, and equipment with similar functions, their features should be as close as possible in space. For heroes, classes, and equipment with different functions, their features should be as far apart as possible in space.
[0063] b. Scalability: The game will regularly update heroes, arms, and equipment. For these new components, the features do not need to be redesigned, achieving a plug-and-play effect for the new components.
[0064] c. Model Update: This module includes reward function design and action sampling methods. The reward function design ensures the direction and speed of model updates, while the action sampling method needs to be able to both identify the current strongest lineup and explore more combinations.
[0065] Reference Figure 1 , shows a flowchart of a method for testing game balance according to an embodiment of the present invention. The method may specifically include the following steps:
[0066] Step 101: Acquire a pairing pool, an opponent pool, and a lineup pairing model; wherein the pairing pool includes first feature data of multiple dimensions, and the opponent pool includes multiple opponent lineups;
[0067] The matching pool can be updated by the game planner according to the current game version, and all the feature data used for lineup matching in the game can be added to the matching pool. The matching pool can contain first feature data of multiple dimensions, and the first feature data is the data used to match the lineup in the matching pool, for example, data of dimensions such as heroes, arms, and equipment. Among them, heroes are virtual characters in the game that players control through terminal devices; arms can refer to the types of heroes, including melee, ranged, mages, tanks, assassins, etc. Melee heroes have higher resistance but shorter skill ranges, while ranged heroes have lower resistance and longer skill ranges; equipment is used to enhance the attributes of heroes, and usually includes weapons, shoes, resistant clothing and other equipment.
[0068] The opponent pool can be maintained by using a previously completed lineup. The opponent pool can contain multiple opponent lineups, each of which has corresponding heroes, arms, equipment and other characteristics.
[0069] The lineup model is a pre-trained network model that generates and outputs the strongest lineup based on user-entered feature data. In practice, the lineup model can be trained using match results from previously played lineups and updated with the latest match data to adapt to the latest game versions.
[0070] Step 102: input the first feature data into the lineup matching model to determine a first lineup from the matching pool;
[0071] The first lineup is used to represent the lineup obtained by model matching. In an embodiment of the present invention, all first feature data in the entire matching pool can be input into the lineup matching model, and the first feature data are matched by the lineup matching model to obtain the first lineup.
[0072] Step 103, sampling from multiple opponent lineups in the opponent pool to obtain a second lineup;
[0073] The second lineup is used to represent the lineup selected from the opponent pool. Specifically, the opponent lineups may have a one-to-one corresponding average resource loss ratio, and the second lineup may be sampled from multiple opponent lineups in the hand pool according to the average resource loss ratio.
[0074] Step 104 : Control the virtual characters in the first lineup and the second lineup to fight against each other to obtain battle result data.
[0075] After determining the first lineup and the second lineup, the virtual characters in the first lineup and the second lineup can be controlled to fight against each other to obtain battle result data, so as to determine whether the combination of each lineup is reasonable based on the battle result data, and evaluate the balance of the overall environment to ensure the balance of the game.
[0076] In a preferred embodiment of the present invention, inputting the first feature data into the lineup matching model to obtain the first lineup includes:
[0077] When there is no second feature data input into the lineup matching model, the lineup matching model obtains the first lineup based on the first feature data; when there is second feature data input into the lineup matching model, the lineup matching model obtains the first lineup based on the second feature data.
[0078] In this embodiment, the first feature data in the pairing pool is fixed, and the output of the lineup pairing model will be relatively similar during the iteration process. In this embodiment of the present invention, second feature data can be added to force the network to learn outputs under different information. The second feature data refers to feature data not determined from the pairing pool. For example, the second feature data can be data of a third lineup determined from the opponent pool, or feature data of one or more dimensions of the own team. In other embodiments, the first feature data in the pairing pool can be dynamically changed according to specific needs.
[0079] When no second feature data is input, the lineup matching model should output the lineup combination with the highest probability of winning. When a lineup matching model is input, the lineup matching model should output the combination with the highest probability of winning under these circumstances. In a specific implementation, the lineup matching model first determines whether the second feature data is input into the lineup matching model. If the second feature data is not input into the lineup matching model, the lineup matching model uses the first feature data to match the first lineup. If the second feature data is input into the lineup matching model, the lineup matching model uses the second feature data to match the first lineup.
[0080] In a preferred embodiment of the present invention, the second characteristic data is data of a third lineup determined from an opponent pool; and the first lineup is a combination that restrains the third lineup.
[0081] The data for the third lineup determined from the opponent pool must include all the required lineup features, such as hero, unit type, and equipment characteristics. In this case, the lineup combination model can output the combination that best counters the third lineup based on the data of the third lineup determined from the opponent pool.
[0082] In a preferred embodiment of the present invention, the second feature data is feature data of one or more dimensions of one's own team; and the first lineup is a combination adapted to the feature data of one or more dimensions of one's own team.
[0083] The team's feature data for one or more dimensions need not include all the features required for a lineup; only some of them are sufficient. In this case, the lineup combination model can output the team's most suitable combination based on the feature data for one or more dimensions. For example, if the second feature data is the characteristics of the team's hero, the lineup combination model will output a lineup that includes the most suitable arms and equipment for this hero.
[0084] In an embodiment of the present invention, step 102 includes:
[0085] The first feature data is input into the lineup matching model for matching to obtain multiple lineup matchings and output probabilities corresponding to the multiple lineup matchings; and the first lineup is obtained by sampling from the multiple lineup matchings according to the output probabilities.
[0086] In an embodiment of the present invention, by inputting the first feature data into the lineup matching model for matching, multiple lineup matchings and output probabilities corresponding to the multiple lineup matchings are obtained, and the first lineup is obtained by sampling from the multiple lineup matchings according to the output probabilities.
[0087] In a preferred embodiment of the present invention, after step 102, the method further includes:
[0088] At a preset time interval, a fourth lineup is obtained by sampling from a plurality of opponent lineups in the opponent pool, and the first lineup is replaced by the fourth lineup.
[0089] In addition to sampling the first lineup output by the model based on the output probability, to enhance exploration, a timed trigger is set to periodically sample a lineup from the opponent pool as the lineup selection action for the lineup combination model. This can alleviate the problem of local optimality. Specifically, a preset time interval is set as the trigger period. At the preset time interval, multiple opponent lineups in the opponent pool are sampled to obtain a fourth lineup, and the first lineup is replaced by the fourth lineup.
[0090] In a preferred embodiment of the present invention, the plurality of opponent lineups have one-to-one corresponding average resource loss ratios, and step 103 includes:
[0091] Determine a sampling probability corresponding to each opponent lineup based on the average resource loss ratio of all opponent lineups; and obtain a second lineup by sampling from multiple opponent lineups in the opponent pool according to the sampling probability.
[0092] In an embodiment of the present invention, the opponent lineups in the opponent pool have a one-to-one corresponding average resource loss ratio, which is used to describe the ratio of the average loss that occurs during the lineup battle. Both parties have all the resources before the battle starts, and the resources lost in the battle are calculated based on the remaining resources after the battle ends. The resource loss ratio is further calculated, and the average resource loss ratio is further calculated based on the resource loss ratio of each battle.
[0093] In practice, the sampling probability for each opponent lineup is determined based on the average resource loss ratio of all opponent lineups. For example, if there are three opponent lineups in the opponent pool with average resource loss ratios of 2.9, 1.8, and 0.7, the sampling probabilities for each lineup are 2.9 / (2.9+1.8+0.7), 1.8 / (2.9+1.8+0.7), and 0.7 / (2.9+1.8+0.7). After determining the sum of the sampling probabilities, the second lineup can be sampled from multiple opponent lineups in the opponent pool according to the sampling probability.
[0094] In a preferred embodiment of the present invention, the method further comprises:
[0095] The opponent pool is updated according to the battle result data.
[0096] In an embodiment of the present invention, after the battle, the opponent pool may be updated based on the battle result data. For example, the average resource loss ratio corresponding to the second lineup may be updated.
[0097] In a preferred embodiment of the present invention, the method further comprises:
[0098] According to the first feature data of multiple dimensions in the matching pool, a fifth lineup is obtained by combining and adding the fifth lineup to the opponent pool.
[0099] Specifically, a timing trigger can be set to periodically combine the first feature data of multiple dimensions in the matching pool to obtain a fifth lineup, and add the fifth lineup to the opponent pool, so that the lineup in the opponent pool can be continuously updated to explore more matching strengths.
[0100] In a preferred embodiment of the present invention, the method further comprises:
[0101] When a new opponent lineup is added to the opponent pool, the new opponent lineup is controlled to fight against the virtual characters in the first lineup to determine the average resource loss ratio corresponding to the new opponent lineup.
[0102] Specifically, when a new opponent lineup is added to the opponent pool, the new opponent lineup can be first controlled to fight against the virtual characters in the first lineup, so as to calculate the resource loss ratio corresponding to the new opponent lineup based on the battle result data obtained from the battle, and further determine the average resource loss ratio corresponding to the new opponent lineup.
[0103] In a preferred embodiment of the present invention, the method further comprises:
[0104] When the opponent lineup in the opponent pool reaches a preset value, a target lineup is determined from the opponent pool according to the average resource loss ratio, and the target lineup is deleted.
[0105] Among them, the preset value is a pre-set lineup critical value, which is used to represent the capacity of the opponent pool. When the opponent lineup in the opponent pool reaches the preset value, it means that the capacity of the opponent pool is full. According to the average resource loss ratio, the lineup with higher average resource loss is determined from the opponent pool as the target lineup, and the target lineup is deleted.
[0106] In a preferred embodiment of the present invention, the method further comprises:
[0107] The lineup matching model is updated according to the battle result data.
[0108] In the embodiment of the present invention, after the battle is completed, the battle result data may be stored in the data buffer, so that the lineup matching model may be updated according to the battle result data stored in the data buffer.
[0109] In a preferred embodiment of the present invention, the battle result data includes a first remaining resource ratio corresponding to the first lineup and a second remaining resource ratio corresponding to the second lineup, and updating the lineup matching model according to the battle result data includes:
[0110] According to the first remaining resource ratio and the second remaining resource ratio, the battle damage difference and the resource loss ratio are calculated; the gradient value is determined by backpropagation according to the battle damage difference and the resource loss ratio, and the lineup matching model is updated according to the gradient value.
[0111] In an embodiment of the present invention, the battle result data may include a first remaining resource ratio corresponding to the first lineup and a second remaining resource ratio corresponding to the second lineup. After the battle, the battle loss difference and resource loss ratio may be calculated based on the first remaining resource ratio and the second remaining resource ratio. A gradient value may be determined by backpropagation based on the battle loss difference and the average resource loss ratio, and the lineup combination model may be updated according to the gradient value.
[0112] Specifically, both sides possess all their resources before the battle begins. After the battle ends, the battle losses are calculated based on the remaining resources. The difference in battle losses provides a visual representation of the outcome of the battle. Another metric is the resource loss ratio of both sides. Different lineups have different levels of resource acquisition difficulty, so battle losses are multiplied by a resource correction factor. This resource loss ratio truly reflects the balance of both lineups.
[0113] As an example, assuming the first remaining resource ratio is R1 and the second remaining resource ratio is R2, we can calculate that the combat loss D1 = 1-R1 and D2 = 1-R2, and further calculate the combat loss difference D = D1-D2. Assuming the resource correction coefficients are C1 and C2 (C1 and C2 can be set as needed and are not limited in this embodiment of the present invention), the resource loss ratio R = D1*C1 / (D2*C2).
[0114] In a preferred embodiment of the present invention, step 104 includes:
[0115] Creating a plurality of battle environments; and controlling the virtual characters in the first lineup and the second lineup to fight in the plurality of battle environments to obtain battle result data.
[0116] In an embodiment of the present invention, a battle server can be maintained. Multiple battle environments can be created in the battle server. In these multiple battle environments, virtual characters in a first lineup and a second lineup can be controlled to battle against each other to obtain battle result data. Each battle environment can support one or more lineups for battle, allowing multiple lineups to be tested simultaneously, further accelerating the speed of game balance testing.
[0117] In order to understand the solution of the embodiment of the present invention more easily, Figure 2A framework diagram of a game balance test system is shown. The game balance test system consists of two modules: the Worker battle module and the Trainer training module. The Worker is mainly responsible for sampling battle data. Each Worker obtains the latest version of the lineup matching model from the Trainer and batch manages N battle environments, each of which can be used for battles to obtain data. The specific process is to input all the feature data in the entire matching pool into the lineup matching model, and then the lineup matching model will output the strongest lineup. At the same time, the opponent lineup is sampled from the opponent pool. The two lineups compete to obtain battle result data. The battle data will be used to update the opponent pool and will also be put into the data cache to update the lineup matching model. The Trainer is mainly responsible for updating the model parameters. It uses the Actor-Critic framework to continuously obtain training data from the data cache, perform gradient updates and broadcast model parameters, so that the Worker is updated to the latest version of the model.
[0118] It should be noted that for the sake of simplicity, the method embodiments are described as a series of actions. However, those skilled in the art should be aware that the embodiments of the present invention are not limited by the order of the actions described, because according to the embodiments of the present invention, certain steps can be performed in other orders or simultaneously. Secondly, those skilled in the art should also be aware that the embodiments described in this specification are all preferred embodiments, and the actions involved are not necessarily required by the embodiments of the present invention.
[0119] Reference Figure 3 , shows a structural block diagram of a game balance testing device provided by an embodiment of the present invention, which may specifically include the following modules:
[0120] A matching pool acquisition module 301 is used to acquire a matching pool, an opponent pool, and a lineup matching model; wherein the matching pool includes first feature data of multiple dimensions, and the opponent pool includes multiple opponent lineups;
[0121] A first lineup determination module 302 is configured to input the first feature data into the lineup matching model and determine a first lineup based on the matching model;
[0122] A second lineup determination module 303 is configured to obtain a second lineup by sampling from a plurality of opponent lineups in the opponent pool;
[0123] The lineup battle module 304 is used to control the virtual characters in the first lineup and the second lineup to fight each other to obtain battle result data.
[0124] In a preferred embodiment of the present invention, the first lineup determination module 302 includes:
[0125] A first lineup determination submodule, configured to, when there is no second feature data input into the lineup matching model, use the lineup matching model to match the first feature data to obtain a first lineup;
[0126] The second lineup determination submodule is configured to, when there is second feature data input into the lineup matching model, enable the lineup matching model to match the first lineup according to the second feature data.
[0127] In a preferred embodiment of the present invention, the second characteristic data is data of a third lineup determined from an opponent pool; and the first lineup is a combination that restrains the third lineup.
[0128] In a preferred embodiment of the present invention, the second feature data is feature data of one or more dimensions of one's own team; and the first lineup is a combination adapted to the feature data of one or more dimensions of one's own team.
[0129] In a preferred embodiment of the present invention, it also includes:
[0130] The lineup replacement module is used to sample a fourth lineup from multiple opponent lineups in the opponent pool at a preset time interval, and replace the first lineup with the fourth lineup.
[0131] In a preferred embodiment of the present invention, the plurality of opponent lineups have one-to-one corresponding average resource loss ratios, and the second lineup determination module 303 includes:
[0132] a sampling probability determination submodule, configured to determine a sampling probability corresponding to each opponent lineup based on the average resource loss ratio of all opponent lineups;
[0133] The second lineup determination submodule is used to sample a second lineup from multiple opponent lineups in the opponent pool according to the sampling probability.
[0134] In a preferred embodiment of the present invention, it also includes:
[0135] The opponent pool updating module is used to update the opponent pool according to the battle result data.
[0136] In a preferred embodiment of the present invention, it also includes:
[0137] a lineup combination module, configured to combine the first feature data of multiple dimensions in the combination pool to obtain a fifth lineup;
[0138] A lineup adding module is used to add the fifth lineup to the opponent pool.
[0139] In a preferred embodiment of the present invention, it also includes:
[0140] The loss ratio determination module is used to control the newly added opponent lineup to fight against the virtual characters in the first lineup when the opponent pool is updated to add a new opponent lineup in the opponent pool, so as to determine the average resource loss ratio corresponding to the newly added opponent lineup.
[0141] In a preferred embodiment of the present invention, it also includes:
[0142] The lineup deletion module is used to determine a target lineup from the opponent pool according to the average resource loss ratio and delete the target lineup when the opponent lineup in the opponent pool reaches a preset value.
[0143] In a preferred embodiment of the present invention, it also includes:
[0144] A model updating module is used to update the lineup matching model according to the battle result data.
[0145] In a preferred embodiment of the present invention, the battle result data includes a first remaining resource ratio corresponding to the first lineup and a second remaining resource ratio corresponding to the second lineup, and the model updating module includes:
[0146] a loss ratio determination submodule, configured to calculate a battle loss difference and a resource loss ratio based on the first remaining resource ratio and the second remaining resource ratio;
[0147] The model update submodule is used to determine the gradient value by backpropagation based on the battle loss difference and resource loss ratio, and update the lineup matching model according to the gradient value.
[0148] In a preferred embodiment of the present invention, the lineup battle module 304 includes:
[0149] The battle environment creation submodule is used to create multiple battle environments;
[0150] The battle submodule is used to control the virtual characters in the first lineup and the second lineup to fight in the multiple battle environments to obtain battle result data.
[0151] As for the device embodiment, since it is basically similar to the method embodiment, the description is relatively simple, and the relevant parts can be referred to the partial description of the method embodiment.
[0152] The embodiment of the present invention further provides an electronic device, such as Figure 4 As shown, including:
[0153] Processor 401 and storage medium 402, wherein storage medium 402 stores machine-readable instructions executable by processor 401. When the electronic device is running, processor 401 executes the machine-readable instructions to perform the method according to any one of the embodiments of the present invention. The specific implementation methods and technical effects are similar and will not be repeated here.
[0154] The embodiment of the present invention also provides a computer readable storage medium, such as Figure 5 As shown, the storage medium stores a computer program 501, which is executed by a processor to execute the method according to any one of the embodiments of the present invention. The specific implementation and technical effects are similar and will not be described in detail here.
[0155] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0156] Those skilled in the art will appreciate that embodiments of the present invention may be provided as methods, apparatus, or computer program products. Thus, embodiments of the present invention may take the form of a fully hardware embodiment, a fully software embodiment, or an embodiment combining software and hardware. Furthermore, embodiments of the present invention may take the form of a computer program product implemented on one or more computer-usable storage media (including but not limited to magnetic disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0157] The embodiments of the present invention are described with reference to the flowcharts and / or block diagrams of the methods, terminal devices (systems), and computer program products according to the embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of the processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing terminal device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing terminal device generate instructions for implementing the process in the flowchart and / or block diagram. Figure 1 a process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0158] These computer program instructions may also be stored in a computer readable memory that can direct a computer or other programmable data processing terminal device to operate in a specific manner, so that the instructions stored in the computer readable memory produce a manufactured product including an instruction device, which implements the process Figure 1 a process or multiple processes and / or boxes Figure 1The function specified in one or more boxes.
[0159] These computer program instructions can also be loaded onto a computer or other programmable data processing terminal device so that a series of operating steps are executed on the computer or other programmable terminal device to produce a computer-implemented process, thereby providing instructions for executing on the computer or other programmable terminal device to implement the process. Figure 1 a process or multiple processes and / or boxes Figure 1 A step that specifies a function in one or more boxes.
[0160] Although the preferred embodiments of the present invention have been described, those skilled in the art may make additional changes and modifications to these embodiments once they become aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications that fall within the scope of the embodiments of the present invention.
[0161] Finally, it should be noted that, in this document, relational terms such as first and second, etc., are used only to distinguish one entity or operation from another entity or operation, and do not necessarily require or imply any actual relationship or order between these entities or operations. Moreover, the terms "comprises," "comprising," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or terminal device that includes a series of elements includes not only those elements, but also other elements not explicitly listed, or elements inherent to such process, method, article, or terminal device. In the absence of further limitations, an element defined by the phrase "comprising a ..." does not exclude the presence of additional identical elements in the process, method, article, or terminal device that includes the element.
[0162] The above is a detailed introduction to a game balance testing method and a game balance testing device provided by the present invention. Specific examples are used herein to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only intended to help understand the method of the present invention and its core concept. At the same time, for those skilled in the art, according to the concept of the present invention, there may be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A game balance testing method, characterized in that: include: Obtaining a pairing pool, an opponent pool, and a lineup pairing model; wherein the pairing pool includes first feature data of multiple dimensions, and the opponent pool includes multiple opponent lineups; inputting the first feature data into the lineup matching model to determine a first lineup from the matching pool; Sampling a second lineup from a plurality of opponent lineups in the opponent pool; Controlling the virtual characters in the first lineup and the second lineup to fight against each other to obtain battle result data; The multiple opponent lineups have one-to-one corresponding average resource loss ratios, and the step of sampling the second lineup from the multiple opponent lineups in the opponent pool includes: Determining a sampling probability corresponding to each opponent lineup based on the average resource loss ratio of all opponent lineups; According to the sampling probability, a second lineup is obtained by sampling from multiple opponent lineups in the opponent pool.
2. The method according to claim 1, characterized in that Inputting the first feature data into the lineup matching model and determining a first lineup from the matching pool includes: When there is no second feature data input into the lineup matching model, the lineup matching model matches the first feature data to obtain a first lineup; When there is second feature data input into the lineup matching model, the lineup matching model matches according to the second feature data to obtain a first lineup.
3. The method according to claim 2, characterized in that The second characteristic data is data of a third lineup determined from an opponent pool; the first lineup is a combination that restrains the third lineup.
4. The method according to claim 2, characterized in that The second feature data is feature data of one or more dimensions of one's own team; the first lineup is a combination adapted to the feature data of one or more dimensions of one's own team.
5. The method according to claim 1, wherein After the step of inputting the first feature data into the lineup matching model and determining the first lineup from the matching pool, the method further includes: At a preset time interval, a fourth lineup is obtained by sampling from a plurality of opponent lineups in the opponent pool, and the first lineup is replaced by the fourth lineup.
6. The method according to claim 1, characterized in that Also includes: The opponent pool is updated according to the battle result data.
7. The method according to claim 1, characterized in that Also includes: Combining the first feature data of the multiple dimensions in the matching pool to obtain a fifth lineup; The fifth lineup is added to the opponent pool.
8. The method according to claim 7, characterized in that Also includes: When updating the opponent pool to add a new opponent lineup in the opponent pool, the newly added opponent lineup is controlled to fight against the virtual characters in the first lineup to determine the average resource loss ratio corresponding to the newly added opponent lineup.
9. The method according to claim 1, characterized in that Also includes: When the opponent lineup in the opponent pool reaches a preset value, a target lineup is determined from the opponent pool according to the average resource loss ratio, and the target lineup is deleted.
10. The method according to claim 1, characterized in that Also includes: The lineup matching model is updated according to the battle result data.
11. The method according to claim 10, characterized in that The battle result data includes a first remaining resource ratio corresponding to the first lineup and a second remaining resource ratio corresponding to the second lineup, and updating the lineup matching model according to the battle result data includes: Calculating the battle loss difference and the resource loss ratio based on the first remaining resource ratio and the second remaining resource ratio; The gradient value is determined by backpropagation based on the battle loss difference and resource loss ratio, and the lineup matching model is updated according to the gradient value.
12. The method according to claim 1, characterized in that The controlling the virtual characters in the first lineup and the second lineup to fight against each other to obtain battle result data includes: Create multiple battle environments; In the multiple battle environments, the virtual characters in the first lineup and the second lineup are controlled to battle to obtain battle result data.
13. A game balance testing device, characterized in that: include: A collocation pool acquisition module is used to acquire a collocation pool, an opponent pool, and a lineup collocation model; wherein the collocation pool contains first feature data of multiple dimensions, and the opponent pool contains multiple opponent lineups; a first lineup determination module, configured to input the first feature data into the lineup matching model and determine a first lineup from the matching pool; A second lineup determination module, configured to obtain a second lineup by sampling from a plurality of opponent lineups in the opponent pool; A lineup battle module, used for controlling the virtual characters in the first lineup and the second lineup to fight each other to obtain battle result data; The plurality of opponent lineups have one-to-one corresponding average resource loss ratios, and the second lineup determination module includes: a sampling probability determination submodule, configured to determine a sampling probability corresponding to each opponent lineup based on the average resource loss ratio of all opponent lineups; The second lineup determination submodule is used to sample a second lineup from multiple opponent lineups in the opponent pool according to the sampling probability.
14. An electronic device, characterized in that: include: A processor and a storage medium, wherein the storage medium stores machine-readable instructions executable by the processor, and when the electronic device is running, the processor executes the machine-readable instructions to perform the method according to any one of claims 1 to 12.
15. A computer-readable storage medium, characterized in that The storage medium stores a computer program, which, when executed by a processor, executes the method according to any one of claims 1 to 12.
Citation Information
Patent Citations
Game balance test method and device, electronic equipment and storage medium
CN112263835A
Training method and device for reinforcement learning model in battle game
CN112402986A