Data generation method and device, storage medium and electronic equipment
By using an agent generation method, a first agent generates alternative static resource data and a second agent simulates player operations, which solves the problem of traditional match-3 game level design relying on experience, achieves more balanced and interesting level design, and improves player retention.
Patent Information
- Application Number
- CN202511002327.7
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-07-18
- Publication Date
- 2025-11-07
- Estimated Expiration
- 2045-07-18
AI Technical Summary
Traditional match-3 game level design relies on the designer's experience, resulting in uneven level quality, difficulty in ensuring balance and fun, and affecting player retention.
An intelligent agent generation method is adopted, in which a first intelligent agent generates candidate static resource data based on basic configuration parameters, and a second intelligent agent simulates player operation, and generates target static resource data based on the simulation results to design game levels.
It improves the balance and fun of level design, increases player retention, and reduces design time and reliance on manual adjustments.
Smart Images

Figure CN120900221A_ABST
Abstract
Description
Technical Field
[0001] This specification relates to the field of reinforcement learning technology, and in particular to a data generation method, apparatus, storage medium, and electronic device. Background Technology
[0002] Currently, match-3 games (i.e., games where three or more elements of the same type are arranged together to eliminate them and score points) hold an important position in the gaming industry as a classic casual game genre. Its simple and easy-to-learn controls and challenging gameplay have attracted a large number of players and garnered a huge user base. However, despite the high entertainment and commercial value of match-3 games, there are currently many problems with their level design.
[0003] Specifically, traditional match-3 game level design methods rely heavily on the designer's personal experience and manual configuration. Designers need to spend a significant amount of time and effort, repeatedly trying and adjusting, to create a relatively reasonable level. This design approach is not only inefficient but also struggles to ensure level balance and engagement. Because each designer has a different style and experience, the quality of the levels varies greatly. Some levels may be too simple, lacking challenge and causing player boredom; while others may be too complex and difficult, resulting in a poor player experience and reducing the game's playability and player retention. Summary of the Invention
[0004] This specification provides a data generation method, apparatus, storage medium, and electronic device to partially solve the aforementioned problems existing in the prior art.
[0005] The following technical solution is adopted in this specification:
[0006] This specification provides a data generation method, including:
[0007] Obtain basic configuration parameters input by the user; these basic configuration parameters are used to reflect the basic operating rules of the game levels.
[0008] The basic configuration parameters are input into a preset first intelligent agent, so that the first intelligent agent generates alternative static resource data based on the basic configuration parameters.
[0009] The alternative static resource data is input into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operation in the game level configured according to the alternative static resource data, and obtain the simulation result;
[0010] According to the simulation result and the alternative static resource data, target static resource data is obtained to generate a game level according to the target static resource data.
[0011] Optionally, the step of inputting the basic configuration parameter into the preset first agent specifically comprises:
[0012] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0013] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0014] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0015] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0016] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0017] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0018] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0019] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0020] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0021] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0022] Optionally, the step of inputting the basic configuration parameter into the preset first agent to make the first agent generate alternative static resource data according to the basic configuration parameter specifically comprises:
[0023] Optionally, the step of inputting the candidate static resource data into a preset second agent to enable the second agent to simulate the game operation of the player in the game level configured according to the candidate static resource data and obtain a simulation result, specifically comprises:
[0024] inputting the candidate static resource data into a preset second agent to enable the second agent to simulate the game operation of the player in the game level configured according to the candidate static resource data, and adjust the dynamically generated relationship used in the simulation process, to obtain a simulation result and an adjusted dynamically generated relationship corresponding to the candidate static resource data; the dynamically generated relationship is used to represent the corresponding relationship between the game operation performed by the player each time and a map adjustment parameter; the map adjustment parameter is used to generate game level map data affected by the game operation performed by the player each time according to the candidate static resource data;
[0025] the step of generating the game level according to the target static resource data, specifically comprises:
[0026] generating the game level according to the target static resource data and the adjusted dynamically generated relationship corresponding to the target static resource data.
[0027] Optionally, the step of inputting the candidate static resource data into a preset second agent to enable the second agent to simulate the game operation of the player in the game level configured according to the candidate static resource data and obtain a simulation result, specifically comprises:
[0028] inputting the candidate static resource data into a preset second agent to enable the second agent to simulate the game operation of the player in the game level configured according to the candidate static resource data for multiple rounds, to obtain a simulation result; wherein for each round of simulation, the dynamically generated relationship used in the round of simulation is adjusted to obtain a target dynamically generated relationship used in the round of simulation, and the round of simulation is performed based on the target dynamically generated relationship to obtain a simulation result.
[0029] Optionally, the method further comprises:
[0030] For each behavior simulation, a second probability matrix used for the behavior simulation is determined; according to the second probability matrix, a target game operation of the behavior simulation is determined from each alternative game operation, and a simulation result after the target game operation is executed is obtained as a simulation result of the behavior simulation, and according to the target game operation and the target dynamic generation relationship, updated game level map data is determined, and according to the updated game level map data, a second probability matrix used for the next behavior simulation is determined, until a preset behavior simulation termination condition is reached, and a simulation result of the round of simulation is obtained.
[0031] The specification provides a data generation apparatus, comprising:
[0032] An acquisition module is configured to acquire a basic configuration parameter input by a user; the basic configuration parameter is used to reflect a basic running rule of a game level;
[0033] A first generation module is configured to input the basic configuration parameter to a preset first agent, so that the first agent generates alternative static resource data according to the basic configuration parameter;
[0034] A simulation module is configured to input the alternative static resource data to a preset second agent, so that the second agent simulates a game operation of a player in a game level configured according to the alternative static resource data, and obtains a simulation result;
[0035] A second generation module is configured to obtain target static resource data according to the simulation result and the alternative static resource data, so as to generate a game level according to the target static resource data.
[0036] The specification provides a computer-readable storage medium, which stores a computer application, and the computer application is executed by a processor to implement the above data generation method.
[0037] The above at least one technical solution adopted by the specification can achieve the following beneficial effects:
[0038] In the data generation method provided by the specification, first, a basic configuration parameter input by a user and used to reflect a basic running rule of a game level is acquired, the acquired basic configuration parameter is input to a preset first agent, so that the first agent generates alternative static resource data according to the basic configuration parameter, the alternative static resource data is input to a preset second agent, so that the second agent simulates a game operation of a player in a game level configured according to the alternative static resource data, and obtains a simulation result, target static resource data is obtained according to the simulation result and the alternative static resource data, and a game level is generated according to the target static resource data.
[0039] As can be seen from the above method, a first intelligent agent can generate static resource data required for designing game levels based on the user-inputted basic configuration parameters, serving as candidate static resource data. A second intelligent agent can then simulate the player's gameplay in a game level generated using the candidate static resource data, testing the candidate static resource data generated by the first intelligent agent. Based on the simulation results, the candidate static resource data can be filtered to improve the balance of difficulty in the generated game levels. Attached Figure Description
[0040] The accompanying drawings, which are included to provide a further understanding of this specification and form part of this specification, illustrate exemplary embodiments and are used to explain this specification, but do not constitute an undue limitation thereof. In the drawings:
[0041] Figure 1 This is a flowchart illustrating a data generation method provided in this specification;
[0042] Figure 2 This is a schematic diagram of the initial map data for the game levels provided in this manual;
[0043] Figure 3 This is a schematic diagram illustrating the interaction process between the first and second intelligent agents provided in this specification.
[0044] Figure 4 This is a schematic diagram of a data generation device provided in this specification;
[0045] Figure 5 This specification provides a corresponding Figure 1 A schematic diagram of an electronic device. Detailed Implementation
[0046] To make the objectives, technical solutions, and advantages of this specification clearer, the technical solutions of this specification will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this specification, and not all of them. Based on the embodiments in this specification, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this specification.
[0047] The technical solutions provided in the various embodiments of this specification are described in detail below with reference to the accompanying drawings.
[0048] In the gaming industry, player retention rate is one of the core indicators for measuring product success and is directly related to the product's life cycle value. This strong correlation makes improving the quality of game level design to increase player retention rate a key factor affecting the game's life cycle value.
[0049] The traditional manual design mode has systematic defects in controlling the quality of the level, mainly reflected in three dimensions: first, the design process highly depends on the subjective judgment of personal experience, and the cognitive difference of different designers on the "reasonable difficulty curve" can reach 40%-60%. A case study of a well-known studio shows that the same level may be evaluated as 3-star or 4.5-star difficulty (full level 5-star) by different designers. This subjectivity leads to a standard deviation of level difficulty of up to 1.2 stars, forming a clear experience fault.
[0050] Second, the iterative mechanism lacks quantitative support. Designers usually distribute elements and obstacles based on intuition, and it takes 7.3 modifications to achieve basic balance for each level, with each modification consuming 2-3 hours per level. More seriously, this experience-oriented design makes it difficult to build an effective KPI system, resulting in 85% of adjustment decisions lacking data support.
[0051] Third, there are structural problems in the test verification link. Traditional manual testing relies on subjective feedback from a limited sample (usually no more than 20 people), while the actual player group's strategy selection presents a long-tail distribution. In some games, the diversity of players' level-breaking strategies is 3.8 times more than expected by the design, making it difficult for manual testing to cover all possibilities.
[0052] The above problems in game level design and testing often directly reflect on user behavior data. When the quality fluctuation of a level group exceeds 15%, the player churn rate is 2.4 times that of a stable level group. Especially when three consecutive levels exceed the user's ability threshold, the next week's retention rate drops by 11.7 percentage points. This reveals that there is a nonlinear relationship between level quality and user stickiness, and a single game level design flaw can seriously damage the continuity of the game experience through cumulative effects. Therefore, how to improve the quality of the designed game level is particularly important.
[0053] Figure 1 The flowchart of a data generation method provided in the present specification includes the following steps:
[0054] S101: Obtain the user inputted basic configuration parameters; the basic configuration parameters are used to reflect the basic running rules of the game level.
[0055] In the present specification, when a user needs to generate a game level, the user can enter a preset level editor to input the basic configuration parameters for the game level to be generated through the preset level editor, so that the business platform can obtain the user inputted basic configuration parameters and generate the game level according to the user inputted basic configuration parameters.
[0056] The level editor mentioned above can be a tool or software program used to create and modify game levels. This level editor can run on a server or on a terminal device, depending on actual needs; this manual does not impose any restrictions on this.
[0057] The basic configuration parameters described above reflect the fundamental operating rules of the game levels. These parameters can be determined based on the type of game level.
[0058] For example, in scenarios requiring the generation of match-3 game levels, the basic configuration parameters mentioned above could include: level time, element types (where elements refer to objects that the player needs to eliminate through actions), obstacle types (e.g., non-eliminable, eliminated after three consecutive eliminations of adjacent elements, eliminated after two consecutive eliminations of adjacent elements, etc.), drop probability (the probability value of regenerating elements in the eliminated cells), etc.
[0059] For example, in scenarios where it is necessary to generate Sokoban game levels, the basic configuration parameters mentioned above may include: level time, pairing relationship between boxes and target points (e.g., fixed pairing, dynamic random pairing, etc.), obstacle type, etc.
[0060] In this specification, the executing entity used to implement the data generation method can refer to a designated device set up on the business platform, such as a server, or a terminal device such as a desktop computer or a laptop computer. For ease of description, the following description will only use the server as the executing entity to illustrate the data generation method provided in this specification.
[0061] S102: Input the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates at least one alternative static resource data according to the basic configuration parameters.
[0062] In this specification, after the server obtains the basic configuration parameters input by the user, it can input the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent can generate at least one alternative static resource data according to the basic configuration parameters.
[0063] Specifically, the server can input the aforementioned basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates a first probability matrix based on the basic configuration parameters, and generates alternative static resource data based on the first probability matrix.
[0064] In this specification, an intelligent agent refers to a computational entity with the ability to perceive the environment, make autonomous decisions, and take action, rather than a neural network model.
[0065] The aforementioned static resource data may include: initial map data for game levels, game level mission objective data, etc.
[0066] In the above content, regarding the initial map data of the game level in the static resource data, this initial map data can be represented by a two-dimensional array. Each variable in this two-dimensional array corresponds to a cell in the initial map data of the game level, and the value of the variable is used to characterize the element type of the cell corresponding to that variable. Specifically, as follows... Figure 2 As shown.
[0067] Figure 2 This is a schematic diagram of the initial map data for the game levels provided in this manual.
[0068] Combination Figure 2 In a match-3 game scenario, the element type of a cell can be apple, watermelon, banana, etc. If the value of the variable is 1, the element type of the cell corresponding to the variable is apple; if the value of the variable is 2, the element type of the cell corresponding to the variable is watermelon; if the value of the variable is 3, the element type of the cell corresponding to the variable is banana, and so on.
[0069] Of course, the format for representing the initial map data of the game level can be determined according to actual needs. For example, in the Sokoban game scenario, the element type of a cell can include "empty space", "wall", "target point", "box", and "player's initial position". In this case, if the value of the variable is 0, it means that the cell is "empty space"; if the value of the variable is 1, it means that the cell is "wall"; if the value of the variable is 2, it means that the cell is "target point" (the box needs to be pushed to this position to complete the level); if the value of the variable is 3, it means that the cell is "box" (that is, a pushable box is initially placed at this position); if the value of the variable is 4, it means that the cell is "player's initial position" (that is, the player's position at the start of the game), and so on.
[0070] It should be noted that the initial map data of the game level mentioned above is not limited to being represented by a two-dimensional array. In practical applications, the initial map data of the game level mentioned above can also be represented by text data.
[0071] For example: "The first cell of the initial map data for a game level has an element type of banana, the second cell has an element type of watermelon," and so on.
[0072] The game level objective data described above can be set according to actual needs. For example, in a match-3 game scenario, the game level objective data can consist of a basic objective and at least one additional objective. The basic objective can include the number of elements to be eliminated, while the additional objective can include the type of elements to be eliminated, time limits, move limits, etc.
[0073] The aforementioned first probability matrix contains the probability distributions required to generate the values of each variable that makes up the candidate static resource data. This first probability matrix can be understood as a two-dimensional array, where each element corresponds to a probability distribution of a variable's value. In other words, for each variable included in the candidate static resource data, there exists a probability distribution corresponding to that variable, and the value of that variable can be generated based on this probability distribution. This probability distribution corresponding to the variable describes the probability of that variable occurring across all possible values.
[0074] For example, in a match-3 game scenario, the element type of a cell can be apple, watermelon, banana, etc. In this case, for each cell in the initial map data that makes up the game level, the variable has all possible values of 1, 2, and 3. Then the probability distribution of the variable can be used to describe that the probability of the variable being 1 is 20%, the probability of the variable being 2 is 50%, and the probability of the variable being 3 is 30%.
[0075] It should be noted that the method by which the first intelligent agent generates candidate static resource data based on the first probability matrix can be as follows: generate reference static resource data based on the first probability matrix and determine the reward value of the reference static resource data. Then, based on the reward value of the reference static resource data, the first probability matrix can be adjusted in the first type to obtain the first probability matrix after the first type adjustment. Then, at least one candidate static resource data can be generated based on the first probability matrix after the first type adjustment.
[0076] There are several ways for the server to determine the reward value of the aforementioned reference static resource data. For example, it can perform regression analysis on historical reference static resource data through a preset machine learning model to predict the reward value of the aforementioned reference static resource data through the machine learning model.
[0077] For example, the server can also measure the balance of different types of elements in the initial map data of a game level by calculating the Gini coefficient of the vertical and horizontal element distribution. The closer the Gini coefficient is to 0, the more balanced the element distribution; the closer the Gini coefficient is to 1, the more unbalanced the element distribution. In match-3 games, a moderate imbalance in element distribution can increase the challenge, but excessive imbalance may make the level too difficult or unsolvable. Therefore, a reference Gini coefficient can be set. The base reward value can then be determined based on the difference between the Gini coefficient corresponding to the initial map data of the game level in the reference static resource data and the reference Gini coefficient. Furthermore, the reward value can be determined based on the base reward value and the game level objective data in the reference static resource data.
[0078] S103: Input the candidate static resource data into a preset second intelligent agent so that the second intelligent agent can simulate the player's game operation in the game level configured according to the candidate static resource data and obtain the simulation result.
[0079] In this specification, the server can input alternative static resource data into a preset second agent, so that the second agent can simulate the player's game operations in the game level configured according to the alternative static resource data and obtain simulation results.
[0080] The simulation results mentioned above may include: recorded data of the game operations performed by the simulated player in the game level configured according to the alternative static resource data, score data, completion time, and whether the game level task objective can be completed, etc.
[0081] Specifically, the server can input alternative static resource data into a preset second agent, so that the second agent can simulate the player's game operations in the game level configured according to the alternative static resource data in multiple rounds and obtain simulation results.
[0082] Each round of simulation includes at least one behavior simulation. For each behavior simulation, based on the simulation results of the previous behavior simulation, the second probability matrix used for the current behavior simulation is determined. Based on the second probability matrix, the target game operation for the current behavior simulation is determined from each candidate game operation, and the simulation result after executing the target game operation is obtained as the simulation result of this behavior simulation. This process continues until the preset behavior simulation termination condition is met, and the simulation result of this round of simulation is determined.
[0083] The behavior simulation termination condition can be set according to actual needs. For example, when the number of simulations reaches the preset maximum number of simulations, it can be considered that the preset behavior simulation termination condition has been met.
[0084] For example, if the simulation results of this behavior simulation determine that the game level task objective data in the candidate static resource data is satisfied, it can be considered as satisfying the preset behavior simulation termination condition.
[0085] In the above context, a player's single action can be determined based on the actual scenario. For example, in a match-3 game, a single action could be to swap an element up, down, left, or right. Similarly, in a Sokoban game, a single action could be to move the player character's position up, down, left, or right.
[0086] The second probability matrix mentioned above contains the probability value of each game action that the player can perform being selected.
[0087] In specific application scenarios, such as match-3 games, after a player performs a game action to eliminate at least some elements in the game level map data, new elements need to be regenerated to fill the eliminated cells. During this process, new elements can be regenerated based on a preset drop probability.
[0088] For example, the preset drop probabilities are 20% for apples, 50% for watermelons, and 30% for bananas. For each cell, after an element in that cell is eliminated, the corresponding element in that cell can be regenerated according to the preset drop probabilities.
[0089] For example, the preset drop probabilities represent the probability distribution of each element type that can be generated in each cell. For instance, cell 1 has a 20% probability of being generated as an apple, a 50% probability as a watermelon, and a 30% probability as a banana; cell 2 has a 25% probability of being generated as an apple, a 55% probability as a watermelon, and a 20% probability as a banana, and so on. For each cell, after an element in that cell is eliminated, the corresponding element can be regenerated according to the preset drop probabilities.
[0090] It should be noted that the use of a fixed preset drop rate may cause the difficulty of the game levels to fluctuate greatly, sometimes being too easy and sometimes too difficult.
[0091] Therefore, in this specification, the server can also input alternative static resource data into a preset second agent, so that the second agent can simulate the player's game operation in the game level configured according to the alternative static resource data, and adjust the dynamic generation relationship used in the simulation process to obtain the simulation result and the adjusted dynamic generation relationship corresponding to the alternative static resource data.
[0092] The aforementioned dynamic generation relationship is used to characterize the correspondence between each game action performed by the player and the map adjustment parameters.
[0093] The map adjustment parameters mentioned above are used to generate game level map data based on candidate static resource data, after each game action performed by the player. These map adjustment parameters can be determined according to the actual application scenario. For example, in a match-3 game scenario, these map adjustment parameters represent the drop probability. It can be understood that during the game, each time the player performs a game action, the server determines a new drop probability based on the player's actions and the aforementioned dynamic generation relationship.
[0094] The dynamic generation relationship can be a function mapping relationship between the game operation performed by the player each time and the map adjustment parameter, or can refer to a defined rule between the two.
[0095] For ease of understanding, the following will be described in detail for the two forms of dynamic generation relationship.
[0096] When the dynamic generation relationship is a function mapping relationship between the game operation performed by the player each time and the map adjustment parameter, the following formula can be referred to:
[0097] y = kx + b
[0098] In the above formula, x is the game operation performed by the player each time, y is the new drop probability value, k and b are influence factors contained in the function mapping relationship between the two, and k and b are used as the common generation relationship.
[0099] In actual application scenarios, in order to improve the accuracy of determining the new drop probability, the above x can also include the eliminated element type, position, and the distribution and number of remaining elements on the game level map data to calculate the new drop probability.
[0100] When the dynamic generation relationship is a defined rule between the game operation performed by the player each time and the map adjustment parameter, it can be set according to actual needs, for example: if it is determined according to the game operation performed by the player that the number of times the player continuously eliminates the same element is greater than a preset number threshold, the drop probability of the element is lowered by a specified value. For another example: if it is determined according to the game operation performed by the player that the number of times the player contacts the continuous elements in a local map area is greater than a preset number threshold, the drop probability corresponding to each cell in the image area is adjusted to make the drop probabilities of the elements in the cell consistent.
[0101] Further, the server can input the alternative static resource data to a preset second intelligent agent, so that the second intelligent agent simulates the game operation of the player in the game level configured according to the alternative static resource data for multiple rounds to obtain a simulation result.
[0102] For each round of simulation, the dynamic generation relationship used in the round of simulation is adjusted according to the simulation result of the last round of simulation to obtain a target dynamic generation relationship used in the round of simulation, and the round of simulation is performed based on the target dynamic generation relationship to obtain a simulation result.
[0103] Specifically, the server can determine, for each behavior simulation, a second probability matrix used by the behavior simulation, determine, according to the second probability matrix, a target game operation of the behavior simulation from each candidate game operation, and obtain a simulation result after the target game operation is performed as a simulation result of the behavior simulation, and determine updated game level map data according to the target game operation and the target dynamic generation relationship, and determine a second probability matrix used by the next behavior simulation according to the updated game level map data, until a preset behavior simulation termination condition is reached, and a simulation result of the round of simulation is obtained. Further, the target dynamic generation relationship can be adjusted according to the simulation result of the round of simulation to obtain the target dynamic generation relationship used in the next round of simulation.
[0104] For example, in the case where the dynamic generation relationship is a function mapping relationship between the game operation performed by the player each time and the map adjustment parameter, the server can increase or decrease at least one influence factor contained in the function mapping relationship by a specified value each time to obtain the adjusted dynamic generation relationship.
[0105] For example, in the case where the dynamic generation relationship is a limited rule between the game operation performed by the player each time and the map adjustment parameter, the server can increase or decrease at least one variable contained in the limited rule by a specified value each time to obtain the adjusted dynamic generation relationship. The variable herein can refer to a frequency threshold in the limited rule.
[0106] For example, in the case where the dynamic generation relationship is a limited rule between the game operation performed by the player each time and the map adjustment parameter, the server can also perform iterative adjustment on each limited rule by a genetic algorithm to obtain the adjusted dynamic generation relationship.
[0107] S104: Obtain target static resource data according to the simulation result and the candidate static resource data, to generate a game level according to the target static resource data.
[0108] In this specification, the server can determine whether to use the candidate static resource data as the target static resource data according to the simulation result after the game operation of the player in the game level configured according to the candidate static resource data is simulated by the second intelligent agent.
[0109] For example, when the server determines, according to the simulation result, that the difference between the number of game operations performed by the player to complete the game level task target data and the step limit contained in the game level task target data is less than a preset difference threshold, the candidate static resource data can be determined as the target static resource data.
[0110] For example, if the server determines, based on the simulation results, that the player cannot complete the target data for a game level task, then it can decide not to use the alternative static resource data as the target static resource data.
[0111] In practical application scenarios, when it is determined from the simulation results that the candidate static resource data cannot be used as the target static resource data, the server can also make a second type of adjustment to the first probability matrix based on the simulation results to obtain the first probability matrix after the second type of adjustment. Then, the candidate static resource data can be regenerated based on the first probability matrix after the second type of adjustment until the preset termination condition is met, and the target static resource data is obtained.
[0112] The termination conditions mentioned above can be set according to actual needs. For example, when it is determined that the alternative static resource data can be used as the target static resource data, it can be regarded as meeting the preset termination conditions.
[0113] For example, if the number of iterations reaches a preset threshold, it can be considered as satisfying the preset termination condition.
[0114] To facilitate understanding, the following provides a detailed explanation of the interaction process between the first and second intelligent agents, as follows: Figure 3 As shown.
[0115] Figure 3 This is a schematic diagram illustrating the interaction process between the first and second intelligent agents provided in this specification.
[0116] Combination Figure 3 As can be seen in this specification, the server can generate alternative static resource data through the first intelligent agent based on the basic configuration parameters input by the user, and then transmit the alternative static resource data to the second intelligent agent. This allows the second intelligent agent to simulate the player's game operation in the game level configured according to the alternative static resource data, and to conduct real-time testing on the alternative static resource data generated by the first intelligent agent, thereby selecting the target static resource data to be used to generate the final game level.
[0117] Furthermore, when the adjusted dynamic generation relationship is generated through the second intelligent agent, the server can also jointly generate game levels based on the target static resource data and the corresponding adjusted dynamic generation relationship after determining the target static resource data. That is, in the above data generation method, the second intelligent agent is not only used to test the static resource data generated by the first intelligent agent, but also to generate the dynamic resource data (i.e., the dynamic generation relationship) corresponding to the static resource data generated by the first intelligent agent, thereby enabling the joint generation of game levels based on both the static and dynamic resource data.
[0118] From the above process, it can be seen that the basic configuration parameters input by the user in the specification can be various, so that the basic configuration parameters input by the user may be inconsistent in format and structure, which is difficult for the first agent to process. In addition, since frequent interaction may be required between the first agent and the second agent, if the original data format is used directly, it may be difficult for the data received by different agents to be received and parsed by the current agent, thereby causing difficulty in data transmission between different agents.
[0119] Therefore, the server can also format the basic configuration parameters through a preset editor to obtain JSON format basic configuration parameters, and input the JSON format basic configuration parameters into the preset first agent. And data transmission can be performed in JSON format.
[0120] In addition, in the process of generating static resource data of the game level by the first agent and the second agent and testing, a WebSocket communication connection (that is, a communication technology for establishing a persistent connection between a client and a server, which can realize two-way real-time communication, so that the backend can timely push data changes to the front end, and the front end can immediately obtain and display data changes) can be established between the editor and the first agent and the second agent, so that the corresponding level data change process is updated and displayed in real time in the process of generating the alternative static resource data by the first agent and the real-time testing by the second agent. For example: the game level initial map data layout update contained in the alternative static resource data, the element update of each cell in the second agent testing process, the level target progress, etc.
[0121] In addition, the server can also send a request to the first agent and the second agent at specified time intervals to query whether the level data has changed, if yes, obtain the updated data and display it to the user through the editor, and if not, return an empty response.
[0122] From the above content, it can be seen that the first agent and the second agent can cooperate with each other to generate and test the game level according to the basic configuration parameters input by the user, so that the generated game level can be more balanced in difficulty design, and the level layout diversity of the generated game level can be improved.
[0123] The above is one or more embodiments of the data generation method of the specification. Based on the same idea, the specification also provides a corresponding data generation device, as shown in Figure 4 .
[0124] Figure 4A schematic diagram of a data generation apparatus provided for the present specification comprises:
[0125] The acquisition module 401 is configured to acquire a basic configuration parameter input by a user; the basic configuration parameter is used to reflect a basic running rule of a game level;
[0126] The first generation module 402 is configured to input the basic configuration parameter into a preset first agent, so that the first agent generates candidate static resource data according to the basic configuration parameter;
[0127] The simulation module 403 is configured to input the candidate static resource data into a preset second agent, so that the second agent simulates a game operation of a player in a game level configured according to the candidate static resource data to obtain a simulation result;
[0128] The second generation module 404 is configured to obtain target static resource data according to the simulation result and the candidate static resource data, so as to generate a game level according to the target static resource data.
[0129] Optionally, the first generation module 402 is specifically configured to perform format processing on the basic configuration parameter through a preset editor to obtain a basic configuration parameter in a JSON format, and input the basic configuration parameter in the JSON format into a preset first agent.
[0130] Optionally, the first generation module 402 is specifically configured to input the basic configuration parameter into a preset first agent, so that the first agent generates a first probability matrix for the basic configuration parameter; the first probability matrix contains a probability distribution required for generating a value of each variable constituting the candidate static resource data; and the candidate static resource data is generated according to the first probability matrix.
[0131] Optionally, the first generation module 402 is specifically configured to generate reference static resource data according to the first probability matrix, and determine a reward value of the reference static resource data; perform first-type adjustment on the first probability matrix according to the reward value to obtain a first-type adjusted first probability matrix; and generate at least one candidate static resource data according to the first-type adjusted first probability matrix.
[0132] Optionally, the second generation module 404 is specifically configured to perform second-type adjustment on the first probability matrix according to the simulation result to obtain a second-type adjusted first probability matrix; and regenerate candidate static resource data according to the second-type adjusted first probability matrix until a preset termination condition is met, to obtain target static resource data.
[0133] Optionally, the simulation module 403 is specifically configured to input the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data, and adjusts the dynamically generated relationship used in the simulation process to obtain a simulation result and an adjusted dynamically generated relationship corresponding to the candidate static resource data; the dynamically generated relationship is used to represent the corresponding relationship between the game operation performed by the player each time and a map adjustment parameter; the map adjustment parameter is used to generate game level map data affected by the game operation performed by the player each time according to the candidate static resource data.
[0134] The second generation module 404 is specifically configured to generate a game level according to the target static resource data and the adjusted dynamically generated relationship corresponding to the target static resource data.
[0135] Optionally, the simulation module 403 is specifically configured to input the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data, and adjusts the dynamically generated relationship used in the simulation process to obtain a simulation result and an adjusted dynamically generated relationship corresponding to the candidate static resource data; the dynamically generated relationship is used to represent the corresponding relationship between the game operation performed by the player each time and a map adjustment parameter; the map adjustment parameter is used to generate game level map data affected by the game operation performed by the player each time according to the candidate static resource data.
[0136] Optionally, the simulation module 403 is further configured to determine a second probability matrix used for each behavior simulation, determine a target game operation of the behavior simulation from each candidate game operation according to the second probability matrix, and obtain a simulation result after the target game operation is performed as the simulation result of the behavior simulation, and determine updated game level map data according to the target game operation and the target dynamically generated relationship, and determine a second probability matrix used for the next behavior simulation according to the updated game level map data, until a preset behavior simulation termination condition is reached, to obtain the simulation result of the round of simulation.
[0137] The specification also provides a computer-readable storage medium storing a computer program, and the computer program can be used to execute the above-mentioned Figure 1 The data generation method is provided.
[0138] The specification also provides Figure 5 The electronic device corresponding to the Figure 1 The schematic structural diagram of the electronic device is shown in the specification. As Figure 5At the hardware level, the electronic device includes a processor, an internal bus, a network interface, a memory, and a non-volatile memory, and can also include other hardware required by a business. The processor reads the corresponding computer program from the non-volatile memory into the memory and then runs to implement the above Figure 1 The data generation method. Of course, in addition to the software implementation, the present specification does not exclude other implementation manners, such as logic devices or a combination of software and hardware, and the like, that is, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or a logic device.
[0139] For a technical improvement, it can be obvious whether the improvement is in hardware (e.g., improvement of circuit structures of diodes, transistors, switches, etc.) or in software (e.g., improvement of method processes). However, with the development of technology, many improvements of method processes nowadays can be considered as direct improvements of hardware circuit structures. Designers almost always obtain the corresponding hardware circuit structures by programming the improved method processes into hardware circuits. Therefore, it cannot be said that an improvement of a method process cannot be implemented by a hardware entity module. For example, a programmable logic device (PLD) (e.g., a field programmable gate array (FPGA)) is an integrated circuit whose logic function is determined by user programming of the device. A designer programs a digital system "integrated" on a PLD by himself / herself, without having to ask a chip manufacturer to design and manufacture a special integrated circuit chip. Moreover, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented by "logic compiler" software, which is similar to a software compiler used when developing programs, and the original code before compilation also has to be written in a specific programming language, which is called a hardware description language (HDL), and there are many kinds of HDLs, such as ABEL (Advanced Boolean Expression Language), AHDL (Altera Hardware Description Language), Confluence, CUPL (Cornell University Programming Language), HDCal, JHDL (Java Hardware Description Language), Lava, Lola, MyHDL, PALASM, RHDL (Ruby Hardware Description Language), etc., and the most commonly used ones are VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog. It should be clear to those skilled in the art that only a little logical programming of the method processes in the above-mentioned hardware description languages and programming into integrated circuits can easily obtain hardware circuits implementing the logical method processes.
[0140] The controller can be implemented in any suitable way, for example, the controller can take the form of a microprocessor or processor and a computer readable medium storing computer readable program code, such as software or firmware, executable by the (micro)processor, logic gates, switches, an application specific integrated circuit (ASIC), a programmable logic controller and an embedded microcontroller, examples of which include but are not limited to the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20 and Silicone Labs C8051F320, the memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also know that, in addition to being implemented in pure computer readable program code, the controller can equally well be implemented to perform the same functions using logic gates, switches, an application specific integrated circuit, a programmable logic controller and an embedded microcontroller, etc. by means of a logical programming of the method steps. The controller can thus be considered as a hardware component, and the means comprised therein for performing the various functions can be considered as structures within the hardware component. Alternatively, the means for performing the various functions can even be considered as both a software module implementing the method and a structure within the hardware component.
[0141] The systems, apparatuses, modules or units illustrated by the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, the computer can be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or a combination of any of these devices.
[0142] For the sake of description, the above apparatuses are described in various units by functions respectively. Of course, the functions of each unit can be implemented in the same or multiple software and / or hardware in implementing the present specification.
[0143] Those skilled in the art will understand that the embodiments of the present specification can be provided as a method, a system or a computer program product. Therefore, the present specification can take the form of a complete hardware embodiment, a complete software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can 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.
[0144] The specification is presented with reference to flow diagrams and / or block diagrams of methods, apparatus (systems) and computer program products according to embodiments of the specification. It will be understood that each block of the flow diagrams and / or block diagrams, and combinations of blocks in the flow diagrams and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general purpose computer, special purpose computer, embedded processing element or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein.
[0145] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein.
[0146] The computer program instructions can also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer-implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flow diagrams and / or block diagrams block or blocks. Figure 1 The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein. The flow diagram and / or block diagram in the flow diagrams and / or block diagrams can represent one or more of any appropriate circuitry configured to perform the specified functions. In this regard, one or more flow diagrams and / or block diagrams in the flow diagrams and / or block diagrams can represent a device or devices configured to perform one or more of the functions described herein.
[0147] In a typical configuration, a computing device includes one or more processors (CPUs), input / output interfaces, network interfaces, and memory.
[0148] The memory can include non-persistent memory and / or persistent memory, such as flash memory, or other non-volatile memory, in the form of a computer-readable medium. The memory is an example of computer-readable media.
[0149] Computer-readable media includes permanent and non-permanent, movable and non-movable media that can be implemented by any method or technology to store information. The information can be computer-readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassette, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transmission medium that can be used to store information accessible to a computing device. According to the definition herein, computer-readable media does not include transitory media such as modulated data signals and carriers.
[0150] It should also be noted that the terms "comprising", "containing", or any other variant thereof are intended to cover non-exclusive inclusion, such that a process, method, article or apparatus that comprises a list of elements does not only include those elements, but can also include other elements not expressly listed or inherent to such process, method, article or apparatus. Without more limitations, the element defined by the statement "comprising a" does not exclude the presence of additional identical elements in the process, method, article or apparatus that includes the element.
[0151] Those skilled in the art will appreciate that embodiments of the present specification can be provided as methods, systems or computer program products. Therefore, the present specification can take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Moreover, the present specification can 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.
[0152] The present specification can be described in the general context of computer-executable instructions, such as program modules, being executed by a computer. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform particular tasks or implement particular abstract data types. The present specification can also be practiced in distributed computing environments where tasks are performed by remote processing devices that are connected through a communication network. In a distributed computing environment, program modules can be located in both local and remote computer storage media including storage devices.
[0153] The various embodiments described in this specification are described using a numbering of embodiments approach: these are each individually integrated contributions pertaining to different but related aspects of the description. Each of the various embodiments can stand on its own, and each can be combined with the subject matter of other embodiments to produce further embodiments. Where appropriate, therefore, the contents of the specification can be regarded as being incorporated by reference, including the description, drawings, claims, abstract and the like.
[0154] The above only describes the embodiments of the specification and is not intended to limit the specification. The specification can have various modifications and changes for those skilled in the art. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the specification shall be included in the scope of claims of the specification.
Claims
1. A data generating method characterized by comprising: The method comprises the following steps: obtaining a basic configuration parameter input by a user; the basic configuration parameter is used to reflect a basic running rule of a game level; inputting the basic configuration parameter into a preset first agent, so that the first agent generates candidate static resource data according to the basic configuration parameter; inputting the candidate static resource data into a preset second agent, so that the second agent simulates a game operation of a player in a game level configured according to the candidate static resource data, and obtains a simulation result; obtaining target static resource data according to the simulation result and the candidate static resource data, so as to generate a game level according to the target static resource data.
2. The method of claim 1, wherein, The step of inputting the basic configuration parameter into the preset first agent specifically comprises: formatting the basic configuration parameter through a preset editor to obtain a basic configuration parameter in JSON format, and inputting the basic configuration parameter in JSON format into the preset first agent.
3. The method of claim 1, wherein, The step of inputting the basic configuration parameter into the preset first agent, so that the first agent generates candidate static resource data according to the basic configuration parameter, specifically comprises: inputting the basic configuration parameter into the preset first agent, so that the first agent generates a first probability matrix for the basic configuration parameter; the first probability matrix contains a probability distribution required for generating a value of each variable constituting the candidate static resource data; generating candidate static resource data according to the first probability matrix.
4. The method of claim 3, wherein, The step of generating candidate static resource data according to the first probability matrix specifically comprises: generating reference static resource data according to the first probability matrix, and determining a reward value of the reference static resource data; performing a first type of adjustment on the first probability matrix according to the reward value to obtain a first type of adjusted first probability matrix; generating at least one candidate static resource data according to the first type of adjusted first probability matrix.
5. The method of claim 3 or 4, wherein, The step of obtaining target static resource data according to the simulation result and the candidate static resource data specifically comprises: performing a second type of adjustment on the first probability matrix according to the simulation result to obtain a second type of adjusted first probability matrix; regenerating candidate static resource data according to the second type of adjusted first probability matrix until a preset termination condition is met, and obtaining target static resource data.
6. The method of claim 1, wherein, The step of inputting the candidate static resource data into the preset second agent, so that the second agent simulates a game operation of a player in a game level configured according to the candidate static resource data, and obtains a simulation result, specifically comprises: input the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data, adjusts the dynamically generated relationship used in the simulation process, obtains a simulation result and the adjusted dynamically generated relationship corresponding to the candidate static resource data, and the dynamically generated relationship is used to represent the corresponding relationship between the game operation performed by the player each time and a map adjustment parameter, and the map adjustment parameter is used to generate game level map data affected by the game operation performed by the player each time according to the candidate static resource data. The step of generating the game level according to the target static resource data specifically comprises: generating the game level according to the target static resource data and the adjusted dynamically generated relationship corresponding to the target static resource data.
7. The method of claim 6, wherein, The step of inputting the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data, and obtains a simulation result specifically comprises: inputting the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data for multiple rounds, and obtains a simulation result, wherein for each round of simulation, the dynamically generated relationship used in the round of simulation is adjusted to obtain a target dynamically generated relationship used in the round of simulation, and the round of simulation is performed based on the target dynamically generated relationship to obtain a simulation result.
8. The method of claim 7, wherein, The method further comprises: for each behavior simulation, determining a second probability matrix used in the behavior simulation, determining a target game operation of the behavior simulation from each candidate game operation according to the second probability matrix, obtaining a simulation result after the target game operation is performed as a simulation result of the behavior simulation, determining updated game level map data according to the target game operation and the target dynamically generated relationship, and determining a second probability matrix used in the next behavior simulation according to the updated game level map data, until a preset behavior simulation termination condition is reached, to obtain a simulation result of the round of simulation.
9. A data generating apparatus characterized by comprising: comprise: an acquisition module configured to acquire a basic configuration parameter input by a user; the basic configuration parameter is used to reflect a basic running rule of the game level; a first generation module configured to input the basic configuration parameter into a preset first agent, so that the first agent generates candidate static resource data according to the basic configuration parameter; a simulation module configured to input the candidate static resource data into a preset second agent, so that the second agent simulates the game operation of the player in the game level configured according to the candidate static resource data, and obtains a simulation result; a second generation module configured to obtain target static resource data according to the simulation result and the candidate static resource data, so as to generate the game level according to the target static resource data.
10. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, and the computer program is executed by a processor to implement the method in any one of claims 1-8.
Citation Information
Patent Citations
Game level design method and device, storage medium and electronic equipment
CN111530081A
System and Method for Optimizing Virtual Games
US20180147491A1