A data generation method and device, a storage medium and an electronic device
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- 广州三七极耀网络科技有限公司
- Filing Date
- 2025-07-18
- Publication Date
- 2026-08-07
AI Technical Summary
这种设计方式不仅效率低下,而且难以保证关卡的平衡性和趣味性
Smart Images

Figure CN120900221B_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] Based on the simulation results and the candidate static resource data, target static resource data is obtained, and game levels are generated based on the target static resource data.
[0011] Optionally, the step of inputting the basic configuration parameters into a preset first intelligent agent specifically includes:
[0012] The basic configuration parameters are formatted using a preset editor to obtain JSON-formatted basic configuration parameters, and then the JSON-formatted basic configuration parameters are input into a preset first intelligent agent.
[0013] Optionally, the step of inputting the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates candidate static resource data according to the basic configuration parameters, specifically includes:
[0014] The basic configuration parameters are input into a preset first agent, so that the first agent generates a first probability matrix for the basic configuration parameters; the first probability matrix contains the probability distribution required to generate the value of each variable that makes up the candidate static resource data;
[0015] Based on the first probability matrix, candidate static resource data is generated.
[0016] Optionally, the step of generating candidate static resource data based on the first probability matrix specifically includes:
[0017] Based on the first probability matrix, reference static resource data is generated, and the reward value of the reference static resource data is determined.
[0018] Based on the reward value, the first probability matrix is adjusted in the first type to obtain the first probability matrix after the first type of adjustment.
[0019] Based on the first probability matrix adjusted according to the first type, at least one candidate static resource data is generated.
[0020] Optionally, the step of obtaining the target static resource data based on the simulation results and the candidate static resource data specifically includes:
[0021] Based on the simulation results, the first probability matrix is adjusted in a second manner to obtain the first probability matrix after the second adjustment.
[0022] Based on the first probability matrix adjusted according to the second type, candidate static resource data is regenerated until the preset termination condition is met, and the target static resource data is obtained.
[0023] Optionally, the step of inputting the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operations in a game level configured according to the candidate static resource data, and obtain simulation results, specifically includes:
[0024] The candidate static resource data is input into a preset second agent, which simulates the player's game actions in a game level configured according to the candidate static resource data. The agent adjusts the dynamic generation relationships used in the simulation to obtain the simulation results and the adjusted dynamic generation relationships corresponding to the candidate static resource data. The dynamic generation relationships characterize the correspondence between each game action performed by the player and the map adjustment parameters. The map adjustment parameters are used to generate game level map data influenced by each game action performed by the player, based on the candidate static resource data.
[0025] The step of generating game levels based on the target static resource data specifically includes:
[0026] Game levels are generated based on the target static resource data and the adjusted dynamic generation relationship corresponding to the target static resource data.
[0027] Optionally, the step of inputting the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operations in a game level configured according to the candidate static resource data, and obtain simulation results, specifically includes:
[0028] The candidate static resource data is input into a preset second agent, so that the second agent performs multiple rounds of simulation of the player's game operations in the game level configured according to the candidate static resource data, and obtains simulation results; wherein, for each round of simulation, the dynamic generation relationship used in that round of simulation is adjusted to obtain the target dynamic generation relationship used in that round of simulation, and the round of simulation is performed based on the target dynamic generation relationship to obtain simulation results.
[0029] Optionally, the method further includes:
[0030] For each behavior simulation, a second probability matrix is determined for that behavior simulation. Based on the second probability matrix, the target game operation for that 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. Based on the target game operation and the target dynamic generation relationship, the updated game level map data is determined, and based on the updated game level map data, the second probability matrix for the next behavior simulation is determined, until the preset behavior simulation termination condition is reached, and the simulation result of this round of simulation is obtained.
[0031] This specification provides a data generation apparatus, including:
[0032] The acquisition module is used to acquire basic configuration parameters input by the user; these basic configuration parameters reflect the basic operating rules of the game levels.
[0033] The first generation module is used to input the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates alternative static resource data according to the basic configuration parameters.
[0034] The simulation module is used to input the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operations in the game level configured according to the candidate static resource data and obtain simulation results.
[0035] The second generation module is used to obtain target static resource data based on the simulation results and the candidate static resource data, so as to generate game levels based on the target static resource data.
[0036] This specification provides a computer-readable storage medium storing a computer application that, when executed by a processor, implements the above-described data generation method.
[0037] The above-mentioned technical solutions adopted in this specification can achieve the following beneficial effects:
[0038] In the data generation method provided in this specification, the basic configuration parameters input by the user to reflect the basic operating rules of the game level are first obtained. The obtained basic configuration parameters are then input into a preset first intelligent agent, which generates candidate static resource data based on the basic configuration parameters. The candidate static resource data is then input into a preset second intelligent agent, which simulates the player's game operations in the game level configured according to the candidate static resource data, obtains the simulation results, and obtains the target static resource data based on the simulation results and the candidate static resource data. The game level is then generated based on 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] Traditional manual design methods suffer from systemic flaws in controlling level quality, primarily manifested in three dimensions: First, the design process heavily relies on subjective judgment based on individual experience, with different designers exhibiting 40%-60% differences in their understanding of the "reasonable difficulty curve." A case study from a well-known studio shows that the same level might be rated 3 stars or 4.5 stars (out of 5 stars) by different designers. This subjectivity results in a standard deviation of up to 1.2 stars in level difficulty, creating a significant gap in the user experience.
[0050] Secondly, the iterative mechanism lacks quantitative support. Designers typically rely on intuition to distribute elements and set obstacles, while manually adjusting levels requires an average of 7.3 modifications to achieve basic balance, with each modification consuming 2-3 hours per level. More seriously, this experience-driven design makes it difficult to build an effective KPI system, resulting in 85% of adjustment decisions lacking data support.
[0051] Furthermore, the testing and verification process suffers from structural problems. Traditional manual testing relies on subjective feedback from a limited sample (usually no more than 20 people), while the actual strategy choices of players exhibit a long-tail distribution. In some games, the diversity of player strategies exceeds the design expectation by 3.8 times, making it difficult for manual testing to cover all possibilities.
[0052] The aforementioned issues in game level design and testing are often directly reflected in user behavior data. Levels with quality fluctuations exceeding 15% have a churn rate 2.4 times higher than stable levels. Particularly when three consecutive levels exceed the user's ability threshold, the next-week retention rate drops sharply by 11.7 percentage points. This reveals a non-linear relationship between level quality and user engagement; design flaws in a single game level can severely disrupt the continuity of the game experience through a cumulative effect. Therefore, improving the quality of designed game levels is of paramount importance.
[0053] Figure 1 This is a flowchart illustrating a data generation method provided in this specification, including the following steps:
[0054] S101: Obtain the basic configuration parameters input by the user; the basic configuration parameters are used to reflect the basic operating rules of the game level.
[0055] In this manual, when users need to generate game levels, they can enter the preset level editor to input the basic configuration parameters for the game level to be generated. This allows the business platform to obtain the basic configuration parameters input by the user and generate the game level based on these 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 intelligent agent, so that the second intelligent 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 termination conditions for the behavior simulation 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 conditions have 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 aforementioned dynamic generation relationship can refer to the functional mapping relationship between each game action performed by the player and the map adjustment parameters, or it can refer to the limiting rules between the two.
[0095] To facilitate understanding, the following sections will provide detailed explanations of these two forms of dynamic generation relationships.
[0096] When the aforementioned dynamic generation relationship is a functional mapping between each game action performed by the player and map adjustment parameters, the following formula can be used as a reference:
[0097] y = kx + b
[0098] In the above formula, x is the game action performed by the player each time, y is the new drop probability value, and k and b are the influencing factors used to characterize the functional mapping relationship between the two. k and b together serve as the common generation relationship mentioned above.
[0099] In practical applications, to improve the accuracy of determining the new drop probability, the aforementioned x may also include: the type and location of the eliminated element, as well as the distribution and quantity of the remaining elements on the game level map data, to calculate the new drop probability.
[0100] When the aforementioned dynamic generation relationship serves as a constraint between each player's game action and map adjustment parameters, it can be set according to actual needs. For example, if, based on the player's game actions, it is determined that the number of times the player consecutively eliminates the same element exceeds a preset threshold, then the drop probability of that element is lowered by a specified value. As another example, if, based on the player's game actions, it is determined that the number of times the player consecutively eliminates the same element in a certain local map area exceeds a preset threshold, then for each cell in that image area, the drop probability of that cell is adjusted to ensure that the drop probabilities of all elements in that cell are consistent.
[0101] Furthermore, the server can input alternative static resource data into a pre-defined 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.
[0102] Specifically, for each round of simulation, the dynamic generation relationship used in the current round of simulation is adjusted based on the simulation results of the previous round to obtain the target dynamic generation relationship used in the current round of simulation. The simulation is then performed based on the target dynamic generation relationship to obtain the simulation results.
[0103] Specifically, for each behavior simulation, the server can determine the second probability matrix used in that simulation. Based on the second probability matrix, it can determine the target game operation from among the candidate game operations, and obtain the simulation result after executing the target game operation, which serves as the simulation result for this behavior simulation. Furthermore, based on the target game operation and the target dynamic generation relationship, it can determine the updated game level map data, and based on the updated game level map data, determine the second probability matrix used in the next behavior simulation, until a preset behavior simulation termination condition is reached, thus obtaining the simulation result for that round. Then, based on the simulation result of this round, the aforementioned target dynamic generation relationship can be adjusted to obtain the target dynamic generation relationship used in the next round of simulation.
[0104] There are several ways for the server to adjust the aforementioned target dynamic generation relationship. For example, if the dynamic generation relationship is a function mapping relationship between the game operation performed by the player and the map adjustment parameters, the server can increase or decrease at least one influencing 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 scenario described above where the dynamic generation relationship is defined by the rules governing each game action performed by the player and the map adjustment parameters, the server can increase or decrease at least one variable included in the rules by a specified value each time to obtain the adjusted dynamic generation relationship. Here, the variable can refer to the number of times a variable is selected from the rules.
[0106] For example, in the case where the dynamic generation relationship is defined by the rules governing the game actions performed by the player and the map adjustment parameters, the server can also use a genetic algorithm to iteratively adjust each set of rules to obtain the adjusted dynamic generation relationship.
[0107] S104: Based on the simulation results and the candidate static resource data, obtain the target static resource data, and generate game levels based on the target static resource data.
[0108] In this specification, after the server simulates the player's game operations in a game level configured according to the alternative static resource data through a second intelligent agent, it can determine whether to use the alternative static resource data as the target static resource data based on the simulation results.
[0109] For example, when the server determines, based on the simulation results, that the difference between the number of game operations performed by the player to complete the target data of the game level task and the step limit contained in the target data of the game level task is less than a preset difference threshold, then it can determine to use the candidate static resource data 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] As can be seen from the above process, there can be multiple basic configuration parameters input by the user in this specification. This can lead to inconsistencies in the format and structure of the user-input basic configuration parameters, making them difficult for the first intelligent agent to process. Furthermore, since frequent interactions may be required between the first and second intelligent agents, using the original data format directly could result in data received by different agents being difficult for the current agent to receive and parse, thus causing difficulties in data transmission between different intelligent agents.
[0119] Therefore, the server can also format the basic configuration parameters using a preset editor to obtain JSON-formatted basic configuration parameters, and then input these JSON-formatted basic configuration parameters into the preset first intelligent agent. Data can also be transmitted in JSON format.
[0120] In addition, during the generation and testing of static resource data for game levels by the first and second intelligent agents, a WebSocket communication connection can be established between the editor and the first and second intelligent agents (i.e., a communication technology that establishes a persistent connection between the client and the server, enabling bidirectional real-time communication, allowing the backend to push data changes to the frontend in a timely manner, and the frontend to obtain and display the data changes instantly). This allows for real-time updates and displays of the corresponding level data changes during the generation of candidate static resource data by the first intelligent agent and the real-time testing by the second intelligent agent. For example, the candidate static resource data may include updates to the initial map layout of the game level, updates to elements in each cell during the second intelligent agent's testing, and the level's target progress.
[0121] In addition, the server can also send requests to the first and second agents at specified time intervals to check whether the level data has changed. If so, the server will obtain the updated data and display it to the user through the editor; otherwise, it will return an empty response.
[0122] As can be seen from the above, game levels can be generated and tested by the cooperation between the first and second intelligent agents based on the basic configuration parameters input by the user. This can make the generated game levels more balanced in terms of difficulty design and improve the diversity of the level layout.
[0123] The above describes one or more implementation methods for data generation in this specification. Based on the same approach, this specification also provides corresponding data generation devices, such as... Figure 4 As shown.
[0124] Figure 4A schematic diagram of a data generation apparatus provided in this specification includes:
[0125] The acquisition module 401 is used to acquire basic configuration parameters input by the user; the basic configuration parameters are used to reflect the basic operating rules of the game level.
[0126] The first generation module 402 is used to input the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates alternative static resource data according to the basic configuration parameters.
[0127] The simulation module 403 is used to input the alternative 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 alternative static resource data and obtain the simulation result.
[0128] The second generation module 404 is used to obtain target static resource data based on the simulation results and the candidate static resource data, so as to generate game levels based on the target static resource data.
[0129] Optionally, the first generation module 402 is specifically used to format the basic configuration parameters using a preset editor to obtain basic configuration parameters in JSON format, and input the basic configuration parameters in JSON format into a preset first intelligent agent.
[0130] Optionally, the first generation module 402 is specifically used to input the basic configuration parameters into a preset first agent, so that the first agent generates a first probability matrix for the basic configuration parameters; the first probability matrix contains the probability distribution required to generate the value of each variable constituting the candidate static resource data; and generates candidate static resource data according to the first probability matrix.
[0131] Optionally, the first generation module 402 is specifically configured to: generate reference static resource data based on the first probability matrix, and determine the reward value of the reference static resource data; perform a first type of adjustment on the first probability matrix based on the reward value to obtain a first type of adjusted first probability matrix; and generate at least one candidate static resource data based on the first type of adjusted first probability matrix.
[0132] Optionally, the second generation module 404 is specifically used to: perform a second type of adjustment on the first probability matrix according to the simulation results to obtain a second type of adjusted first probability matrix; and regenerate candidate static resource data according to the second type of 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 used to input the candidate static resource data into a preset second agent, so that the second agent simulates the player's game operations in the game level configured according to the candidate static resource data, and adjusts the dynamic generation relationship used in the simulation process to obtain the simulation result and the adjusted dynamic generation relationship corresponding to the candidate static resource data; the dynamic generation relationship is used to characterize the correspondence between each game operation performed by the player and the map adjustment parameters; the map adjustment parameters are used to generate game level map data after being affected by each game operation performed by the player according to the candidate static resource data;
[0134] The second generation module 404 is specifically used to generate game levels based on the target static resource data and the adjusted dynamic generation relationship corresponding to the target static resource data.
[0135] Optionally, the simulation module 403 is specifically used to input the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent performs multiple rounds of simulation of the player's game operations in the game level configured according to the candidate static resource data, and obtains simulation results; wherein, for each round of simulation, the dynamic generation relationship used in that round of simulation is adjusted to obtain the target dynamic generation relationship used in that round of simulation, and the round of simulation is performed based on the target dynamic generation relationship to obtain simulation results.
[0136] Optionally, the simulation module 403 is further configured to: determine a second probability matrix for each behavior simulation; determine the target game operation for the behavior simulation from each candidate game operation based on the second probability matrix, and obtain the simulation result after executing the target game operation as the simulation result of this behavior simulation; determine the updated game level map data based on the target game operation and the target dynamic generation relationship, and determine the second probability matrix for the next behavior simulation based on the updated game level map data, until a preset behavior simulation termination condition is reached, and obtain the simulation result of this round of simulation.
[0137] This specification also provides a computer-readable storage medium storing a computer program that can be used to execute the above-described... Figure 1 This provides a data generation method.
[0138] This instruction manual also provides Figure 5 One of the corresponding Figure 1 A schematic diagram of the structure of an electronic device. (e.g.) Figure 5At the hardware level, the electronic device includes a processor, internal bus, network interface, memory, and non-volatile memory, and may also include other hardware required for the business operations. The processor reads the corresponding computer program from the non-volatile memory into memory and then runs it to achieve the above-mentioned functions. Figure 1 The data generation method described above. Of course, in addition to software implementation, this specification does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. That is to say, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.
[0139] Improvements in a technology can be clearly distinguished as either hardware improvements (e.g., improvements to the circuit structure of diodes, transistors, switches, etc.) or software improvements (improvements to the methodology). However, with technological advancements, many improvements to the methodology can now be considered direct improvements to the hardware circuit structure. Designers almost always obtain the corresponding hardware circuit structure by programming the improved methodology into the hardware circuit. Therefore, it cannot be said that an improvement in methodology cannot be implemented using hardware physical modules. For example, a Programmable Logic Device (PLD) (such as a Field Programmable Gate Array (FPGA)) is such an integrated circuit whose logic function is determined by the user programming the device. Designers can program and "integrate" a digital system onto a PLD themselves, without needing chip manufacturers to design and manufacture dedicated integrated circuit chips. Furthermore, nowadays, instead of manually manufacturing integrated circuit chips, this programming is mostly implemented using "logic compiler" software. Similar to the software compiler used in program development, the original code before compilation must be written in a specific programming language, called a Hardware Description Language (HDL). There are many 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, and RHDL (Ruby Hardware Description Language). Currently, VHDL (Very-High-Speed Integrated Circuit Hardware Description Language) and Verilog are the most commonly used. Those skilled in the art should understand that by simply performing some logic programming on the method flow using one of these hardware description languages and programming it into an integrated circuit, the hardware circuit implementing the logical method flow can be easily obtained.
[0140] The controller can be implemented in any suitable manner. For example, it can take the form of a microprocessor or processor and a computer-readable medium storing computer-readable program code (e.g., software or firmware) executable by the (micro)processor, logic gates, switches, application-specific integrated circuits (ASICs), programmable logic controllers, and embedded microcontrollers. Examples of controllers include, but are not limited to, the following microcontrollers: ARC 625D, Atmel AT91SAM, Microchip PIC18F26K20, and Silicon Labs C8051F320. A memory controller can also be implemented as part of the control logic of the memory. Those skilled in the art will also recognize that, in addition to implementing the controller in purely computer-readable program code form, the same functionality can be achieved by logically programming the method steps to make the controller take the form of logic gates, switches, application-specific integrated circuits, programmable logic controllers, and embedded microcontrollers. Therefore, such a controller can be considered a hardware component, and the means included therein for implementing various functions can also be considered as structures within the hardware component. Alternatively, the means for implementing various functions can be considered as both software modules implementing the method and structures within the hardware component.
[0141] The systems, devices, modules, or units described in 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, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.
[0142] For ease of description, the above devices are described in terms of function, divided into various units. Of course, in implementing this specification, the functions of each unit can be implemented in one or more software and / or hardware components.
[0143] Those skilled in the art will understand that embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0144] This specification is described with reference to flowchart illustrations and / or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of this specification. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations 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 processor, 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 a machine for implementing the flowchart illustrations and / or block diagrams. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.
[0145] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.
[0146] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.
[0147] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.
[0148] Memory may include non-persistent storage in computer-readable media, such as random access memory (RAM) and / or non-volatile memory, such as read-only memory (ROM) or flash RAM. Memory is an example of computer-readable media.
[0149] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, 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, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.
[0150] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.
[0151] Those skilled in the art will understand that the embodiments of this specification can be provided as methods, systems, or computer program products. Therefore, this specification may take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this specification may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.
[0152] This specification can be described in the general context of computer-executable instructions that are executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc., that perform a specific task or implement a specific abstract data type. This specification can also be practiced in distributed computing environments, where tasks are performed by remote processing devices connected via a communication network. In distributed computing environments, program modules can reside in local and remote computer storage media, including storage devices.
[0153] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.
[0154] The above description is merely an embodiment of this specification and is not intended to limit this specification. Various modifications and variations can be made to this specification by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this specification should be included within the scope of the claims of this specification.
Claims
1. A data generation method, characterized in that, include: Obtain basic configuration parameters input by the user; The basic configuration parameters are used to reflect the basic operating rules of the game levels; The basic configuration parameters are input into a preset first agent, so that the first agent generates candidate static resource data based on the basic configuration parameters. This includes: inputting the basic configuration parameters into the preset first agent, so that the first agent generates a first probability matrix for the basic configuration parameters; the first probability matrix contains the probability distribution required to generate the value of each variable constituting the candidate static resource data; generating reference static resource data based on the first probability matrix, and determining the reward value of the reference static resource data; performing a first type of adjustment on the first probability matrix based on the reward value to obtain a first type of adjusted first probability matrix; and generating at least one candidate static resource data based on the first type of adjusted first probability matrix. 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; Based on the simulation results and the candidate static resource data, target static resource data is obtained to generate game levels. This includes: inputting the candidate static resource data into a preset second agent, which simulates the player's game actions in a game level configured according to the candidate static resource data, and adjusts the dynamic generation relationships used during the simulation to obtain simulation results and the adjusted dynamic generation relationships corresponding to the candidate static resource data; the dynamic generation relationships characterize the correspondence between each game action performed by the player and map adjustment parameters; the map adjustment parameters are used to generate game level map data influenced by each game action performed by the player based on the candidate static resource data; and generating game levels based on the target static resource data and the adjusted dynamic generation relationships corresponding to the target static resource data.
2. The method as described in claim 1, characterized in that, The step of inputting the basic configuration parameters into the preset first intelligent agent specifically includes: The basic configuration parameters are formatted using a preset editor to obtain JSON-formatted basic configuration parameters, and then the JSON-formatted basic configuration parameters are input into a preset first intelligent agent.
3. The method as described in claim 1, characterized in that, The step of obtaining the target static resource data based on the simulation results and the candidate static resource data specifically includes: Based on the simulation results, the first probability matrix is adjusted in a second manner to obtain the first probability matrix after the second adjustment. Based on the first probability matrix adjusted according to the second type, candidate static resource data is regenerated until the preset termination condition is met, and the target static resource data is obtained.
4. The method as described in claim 3, characterized in that, The step of inputting the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operations in a game level configured according to the candidate static resource data, and obtain simulation results, specifically includes: The candidate static resource data is input into a preset second agent, so that the second agent performs multiple rounds of simulation of the player's game operations in the game level configured according to the candidate static resource data, and obtains simulation results; wherein, for each round of simulation, the dynamic generation relationship used in that round of simulation is adjusted to obtain the target dynamic generation relationship used in that round of simulation, and the round of simulation is performed based on the target dynamic generation relationship to obtain simulation results.
5. The method as described in claim 4, characterized in that, The method further includes: For each behavior simulation, a second probability matrix is determined for that behavior simulation. Based on the second probability matrix, the target game operation for that 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. Based on the target game operation and the target dynamic generation relationship, the updated game level map data is determined, and based on the updated game level map data, the second probability matrix for the next behavior simulation is determined, until the preset behavior simulation termination condition is reached, and the simulation result of this round of simulation is obtained.
6. A data generation apparatus, characterized in that, The apparatus is used to perform the method as described in claim 1, the apparatus comprising: The acquisition module is used to acquire basic configuration parameters input by the user; these basic configuration parameters reflect the basic operating rules of the game levels. The first generation module is used to input the basic configuration parameters into a preset first intelligent agent, so that the first intelligent agent generates alternative static resource data according to the basic configuration parameters. The simulation module is used to input the candidate static resource data into a preset second intelligent agent, so that the second intelligent agent can simulate the player's game operations in the game level configured according to the candidate static resource data and obtain simulation results. The second generation module is used to obtain target static resource data based on the simulation results and the candidate static resource data, so as to generate game levels based on the target static resource data.
7. A computer-readable storage medium, characterized in that, The storage medium stores a computer program, which, when executed by a processor, implements the method described in any one of claims 1 to 5.
Citation Information
Patent Citations
Game level design method and device, storage medium and electronic equipment
CN111530081A
System and Method for Optimizing Virtual Games
US20180147491A1