Game map generation method, system and device based on artificial intelligence simulation
By adjusting the density value and iterating terrain aggregation based on the template map, a diverse game map that meets the needs of game users is generated, solving the problem of disconnected areas and improving the gaming experience.
Patent Information
- Application Number
- CN202510726426.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-06-03
- Publication Date
- 2025-09-05
- Estimated Expiration
- 2045-06-03
AI Technical Summary
Existing randomly generated game maps may have non-connected areas, which may prevent game users from interacting with certain areas and affect the gaming experience.
Generate a base map based on the template map, adjust the game road pixels and non-road pixels through density values, perform terrain aggregation iterations, simulate game tasks to obtain game duration, and adjust density values to generate a game map that meets the requirements.
Generate diverse game maps, avoid disconnected areas, improve game continuity and fun, and meet the actual needs of game users.
Smart Images

Figure CN120227651B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of image processing technology, and in particular to a method, system and device for generating a game map based on artificial intelligence simulation. Background Art
[0002] In current game systems such as role-playing games, fixed game levels are generally not set to ensure the flexibility and fun of the game and to encourage players to repeatedly enter the game system to perform tasks. Instead, the game terrain and levels are randomly generated as the players operate in the game. However, existing randomly generated game maps may have disconnected areas, resulting in some areas of the game map being invalid. Game users cannot interact with monster treasure chests in invalid areas, resulting in a poor experience for game users in this part of the map (for example, they cannot obtain certain achievements, etc.). Summary of the Invention
[0003] The embodiments of the present invention provide a method, system, and device for generating a game map based on artificial intelligence simulation, which realizes the generation of diversified game maps while avoiding the generation of non-connected game maps.
[0004] An embodiment of the present invention provides, on one hand, a method for generating a game map based on artificial intelligence simulation, comprising:
[0005] Generate a base map based on the template map, wherein the base map includes game road pixel points and non-road pixel points;
[0006] Setting a density value for adjusting the game road, and randomly adjusting a first game road pixel point and a second non-road pixel point in an edge area of the game road in the base map according to the density value to obtain an adjusted map;
[0007] Performing terrain aggregation iteration on the game roads in the adjusted map to generate an initial game map in the shape of a cave;
[0008] The execution of a game task is simulated in the initial game map, and the game duration of the execution of the game task is obtained. The density value is adjusted according to the game duration to re-randomly adjust the pixel points until the game duration of the generated game map after adjustment is within the set range.
[0009] An embodiment of the present invention provides, on one hand, a game map generation system based on artificial intelligence simulation, comprising:
[0010] A basic map unit, configured to generate a basic map based on a template map, wherein the basic map includes game road pixel points and non-road pixel points;
[0011] a random adjustment unit, configured to set a density value for adjusting the game road, and to randomly adjust the first game road pixel point and the second non-road pixel point in the edge area of the game road in the base map according to the density value, to obtain an adjusted map;
[0012] A terrain iteration unit, configured to perform terrain aggregation iteration on the game roads in the adjusted map to generate an initial game map in the shape of a cave;
[0013] The density value adjustment unit is used to simulate the execution of game tasks in the initial game map and obtain the game time of executing the game tasks, and adjust the density value according to the game time to re-randomly adjust the pixel points until the game time of the game map generated after adjustment is within the set range.
[0014] Another aspect of the present invention provides a terminal device, including a processor and a memory;
[0015] The memory is used to store multiple computer programs, and the computer programs are used to be loaded by the processor and executed as described in one aspect of an embodiment of the present invention. The processor is used to implement each computer program in the multiple computer programs.
[0016] It can be seen that in the game map generation method of the present application, on the basis of the preset template map, the initial game map can be generated through random adjustment based on the density value and terrain aggregation iteration. In this way, not only can a variety of game maps be randomly generated and provided to game players by setting a variety of template maps in the game system, but also the non-connected areas of the game maps generated before and after can be avoided by purposefully reading the template map; further, in this embodiment, after the initial game map is generated, it is necessary to obtain the actual game time of executing the game tasks in the initial game map, and adjust the density value according to the game time to readjust the complexity of the game road. In this way, the actual use of the generated initial game map can guide the readjustment of the game road, so that the generated game map is more in line with the actual needs of the game users. BRIEF DESCRIPTION OF THE DRAWINGS
[0017] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the following briefly introduces the drawings required for use in the embodiments or the description of the prior art. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying any creative work.
[0018] Figure 1 Schematic diagram of a method for generating a game map based on artificial intelligence simulation provided by an embodiment of the present invention;
[0019] Figure 2 This is a flowchart of a method for generating a game map based on artificial intelligence simulation provided by an embodiment of the present invention;
[0020] Figure 3 is a schematic diagram of pixel amplification in an embodiment of the present invention;
[0021] Figure 4 is a schematic diagram of selecting the edge area of a game road in an embodiment of the present invention;
[0022] Figure 5 This is a flowchart of a method for generating a game map based on artificial intelligence simulation provided by an application embodiment of the present invention;
[0023] Figure 6a is a schematic diagram of an adjusted map obtained in an embodiment of the present invention;
[0024] Figure 6b is a schematic diagram of a map after terrain aggregation iteration in an embodiment of the present invention;
[0025] Figure 6c is a schematic diagram of an initial game map generated in an embodiment of the present invention;
[0026] Figure 7 This is a schematic diagram of the logical structure of a game map generation system based on artificial intelligence simulation provided by an embodiment of the present invention;
[0027] Figure 8 This is a schematic diagram of the logical structure of a terminal device provided by an embodiment of the present invention. DETAILED DESCRIPTION
[0028] The following will clearly and completely describe the technical solutions in the embodiments of the present invention in conjunction with the accompanying drawings. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. All other embodiments obtained by ordinary technicians in this field based on the embodiments of the present invention without making any creative efforts shall fall within the scope of protection of the present invention.
[0029] The terms "first," "second," "third," "fourth," and so forth (if any) in the description and claims of the present invention and in the accompanying drawings are used to distinguish similar objects and are not necessarily used to describe a particular order or precedence. It should be understood that the terms used in this manner are interchangeable where appropriate, so that the embodiments of the present invention described herein can, for example, be implemented in an order other than that illustrated or described herein. In addition, the terms "including" and "having," as well as any variations thereof, are intended to cover non-exclusive inclusions. For example, a process, method, system, product, or apparatus that includes a series of steps or elements is not necessarily limited to those steps or elements expressly listed, but may include other steps or elements not expressly listed or inherent to such process, method, product, or apparatus.
[0030] The embodiment of the present invention provides a method for generating a game map based on artificial intelligence simulation, which is mainly a method for randomly generating a game map, and is mainly executed by a game system, such as Figure 1 As shown, this can be achieved by the following methods:
[0031] A basic map is generated based on a template map, wherein the basic map includes game road pixel points and non-road pixel points; a density value for adjusting the game road is set, and a first game road pixel point and a second non-road pixel point in an edge area of the game road in the basic map are randomly adjusted according to the density value to obtain an adjusted map; terrain aggregation iteration is performed on the game road in the adjusted map to generate an initial game map in a cave shape; a game task is simulated in the initial game map, and a game duration of the game task is obtained, and the density value is adjusted according to the game duration to re-randomly adjust the pixel points until the game duration of the generated game map after adjustment is within the set range.
[0032] Among them, the present application generates a game map based on a template map, which not only diversifies the generated game map through the diversity of the template map; it also avoids the non-connected areas of the game maps generated before and after by purposefully reading the template map. For example, the exit position of the currently loaded map corresponds to the entrance position of the template map to be read, so that the game maps generated before and after are connected, avoiding the non-connected areas of the game maps generated before and after.
[0033] Among them, the game system that executes the method of the present application may include a game terminal, or include a game terminal and a game server that interact with each other, which is not specifically limited here.
[0034] In the process of executing the method of the present application, the generation of the basic map, the random adjustment of pixel points and the terrain aggregation iteration process can all be implemented using different machine learning sub-models respectively, so that these machine learning sub-models constitute a complete game map generation model; or only the more important steps such as the terrain aggregation iteration operation are implemented using the machine learning model. Furthermore, in the process of generating the game map, by first generating the initial game map, and then based on the actual situation of executing the game tasks in the initial game map, such as the game time, as feedback, the density value in the process of generating the game map is adjusted, and the effect of generating the game map is continuously readjusted. This is a process of training a game map generation model based on artificial intelligence (AI), which is mainly to enable the game map generation model to generate diversified game maps with appropriate complexity.
[0035] Artificial intelligence (AI) refers to the theories, methods, techniques, and application systems that use digital computers or machines controlled by digital computers to simulate, extend, and expand human intelligence, to perceive the environment, acquire knowledge, and use that knowledge to achieve optimal results. In other words, AI is a comprehensive technology within computer science that seeks to understand the essence of intelligence and produce new intelligent machines that can respond in a manner similar to human intelligence. AI also encompasses the study of the design principles and implementation methods of various intelligent machines, enabling them to possess the capabilities of perception, reasoning, and decision-making.
[0036] Artificial intelligence (AI) technology is a comprehensive discipline encompassing a wide range of fields, encompassing both hardware and software technologies. Foundational AI technologies generally include sensors, specialized AI chips, cloud computing, distributed storage, big data processing, operating / interaction systems, and mechatronics. AI software technologies primarily encompass computer vision, speech processing, natural language processing, machine learning, and / or deep learning.
[0037] In one embodiment of the present invention, a method for generating a game map based on artificial intelligence simulation is provided, as shown in the flowchart. Figure 2 Shown, including:
[0038] Step 101: Generate a basic map based on a template map, where the basic map includes game road pixel points and non-road pixel points.
[0039] It is understood that in order to generate diverse game maps in this embodiment, it is necessary to pre-install diverse template maps in the game system and generate game maps based on these template maps in real time, thereby achieving the purpose of generating diverse game maps. The diversity of the template maps pre-installed in the game system is primarily reflected in the diversity of game roads within the template maps. Each template map includes both game road pixels and non-road pixels. Game road pixels are pixels whose terrain attributes are game roads and correspond to game roads. Non-road pixels are pixels whose terrain attributes are non-roads and correspond to obstacles during the game. The shapes of game roads vary between different template maps, thus providing players with a richer game terrain map and enhancing the fun of the game.
[0040] When initiating the process of this embodiment, when generating a base map, in one case, a template map can be read, and the base map can be obtained by directly enlarging the pixels of the read template map. Specifically, each pixel in the template map is enlarged to the same multiple.
[0041] For example Figure 3 In the template map shown, terrain attribute 0 corresponds to non-road pixels, and terrain attribute 1 corresponds to game road pixels. Taking the pixels in the square box in the figure as an example, each pixel in the square box is enlarged to a 4*4 pixel matrix.
[0042] In other cases, multiple (more than one) template maps can also be read. In this way, multiple template maps can be spliced first, for example, the game roads in multiple template maps can be connected to form a template map of a new game road, and then the template map of the new game road can be pixel-enlarged to form a basic map.
[0043] It should be noted that the game map is loaded and displayed in real time on the game terminal based on the user's operations in the game map. In this way, when any game map needs to be loaded, the process of generating the game map can be initiated. In the process of generating the game map, when reading the template map, a template map can be read randomly, or the template map can be read according to the current actually loaded map, so that the currently loaded map and the template map can be connected, ensuring that the entrances and exits of the currently loaded map and the template map can be connected, so that the continuity before and after the game is achieved, and avoiding non-connected areas before and after the game map.
[0044] Specifically, a template map can be read based on the exit position of the currently loaded map. The entry position of the template map corresponds to the exit position of the currently loaded map. For example, if the exit position of the currently loaded map is leaving from the lower right corner, the entry position in the read template map needs to enter the template map from the upper side or upper left corner of the template map.
[0045] Step 102: Set a density value for adjusting the game road, and randomly adjust the first game road pixel point and the second non-road pixel point in the edge area of the game road in the basic map according to the density value to obtain an adjusted map.
[0046] The density value here is mainly used to adjust a benchmark value for each pixel point in the edge area of the game road in the base map. After adjusting the base map with density values of different sizes, the final adjusted game roads can have different widths. Generally speaking, in actual applications, game maps with wider game roads have higher complexity in executing game tasks, and game players stay in the game for longer periods of time. In this way, game maps of different complexities can be generated by using density values of different sizes.
[0047] Specifically, during random adjustment, multiple rows (e.g., 4 to 6 rows) of pixels along the edge of the game road can be selected as the pixels for random adjustment. These pixels include the first game road pixels and the second non-road pixels. For each of these pixels, a random number is first assigned. If the random number is less than the aforementioned density value, the pixel is set as a non-road pixel. If the random number is greater than or equal to the aforementioned density value, the pixel is set as a game road pixel. In this way, the higher the density value, the narrower the generated road will be, and vice versa.
[0048] For example Figure 4 In the base map shown, terrain attribute 0 corresponds to non-road pixels, and terrain attribute 1 corresponds to game road pixels. Thus, four rows of pixels along the edge of the game road are selected as pixels along the edge of the game road for random adjustment. Two rows of game road pixels and two rows of non-road pixels can be selected along the edge of the game road.
[0049] Since the exit and entrance of the base map need to be spliced with other maps, the exit and entrance areas of the base map will not be set as the edge areas of the game road.
[0050] Step 103: Perform terrain aggregation iteration on the game roads in the adjusted map to generate an initial game map in the shape of a cave.
[0051] Since the pixels at the edge of the game road are randomly adjusted in step 102, the positions of some game road pixels and non-road pixels in the adjusted map are relatively discrete. The terrain aggregation iteration here mainly aggregates the game road pixels and non-road pixels in the adjusted map to form a smoother game road. Specifically, multiple strategies can be used for multiple rounds of iterations, including but not limited to the following aggregation strategies, to aggregate pixels with the same terrain attributes:
[0052] Traverse the pixels in the adjusted map and sample the surrounding pixels (usually 8 pixels) of each pixel in the adjusted map. If more than half of the surrounding pixels have different terrain attributes from the current pixel, set the terrain attribute of the current pixel to the terrain attribute of more than half of the pixels. For example, if the current pixel is a game road pixel and more than half of the surrounding pixels are non-road pixels, set the current pixel to a non-road pixel.
[0053] Furthermore, in order to make the game road more tortuous and avoid the edges of the game road being too smooth, the following strategies can be adopted in the process of terrain aggregation iteration, but are not limited to:
[0054] If, during multiple rounds (e.g., two rounds) of terrain aggregation iterations, there are no pixels of another terrain attribute surrounding a pixel of a certain terrain attribute in the edge area of the game road, the pixel of the certain terrain attribute is set to a pixel of the other terrain attribute. For example: if, during multiple rounds of terrain aggregation iterations, there are no non-road pixels surrounding a pixel of a certain game road, the pixel of the game road can be directly set to a non-road pixel. In order to avoid the appearance of many small non-road pixels on the game road after the final iteration, the operation of "setting the pixel of a certain terrain attribute to the pixel of another terrain attribute" will not be placed in the last iteration process, so as to effectively improve the quality of the generated map.
[0055] Furthermore, during the terrain aggregation iteration process, game task objects can also be set in the game road, such as randomly setting rewards or hidden levels in the closed end area of the game road.
[0056] It should be noted that when selecting the number of iterations for terrain aggregation, a larger number of iterations, such as 3 to 5 iterations, is generally not used. If the number of terrain aggregation iterations is larger, the edges of the game roads will be smoother.
[0057] Step 104, simulate the execution of the game task in the initial game map, and obtain the game time of executing the game task, adjust the density value set in the above step 102 according to the game time, and re-randomly adjust the pixel points until the game time of the game map generated after adjustment is within the set range.
[0058] Specifically, the game system can simulate actual game users performing game tasks in the initial game map and obtain the game duration. Here, the game duration can refer to the average game duration of different game users performing game tasks in the initial game map, or it can refer to the average game duration of the same game user repeatedly entering the initial game map to perform game tasks, and there is no specific limitation here. The benchmark value for random pixel adjustment here is adjusted, that is, the density value set above, and its main purpose is to ensure that the game duration of the game map generated after adjustment is within a certain set range, such as between a minimum threshold and a maximum threshold.
[0059] Specifically, when adjusting the density value, if the game duration is long and greater than a certain maximum threshold, it means that the initial game map generated in the above step is relatively complex. The density value set in the above step 102 can be increased to re-randomly adjust the pixel points to make the game road narrower and simplify the complexity of the game road; if the game duration is short and less than a certain minimum threshold, it means that the initial game map generated in the above step is relatively simple. The density value set in the above step 102 can be reduced to re-randomly adjust the pixel points to make the game road wider and increase the complexity of the game road.
[0060] It should be noted that in this embodiment, the game duration is used as a parameter to measure the complexity of the generated initial game map. In specific applications, other parameters presented when executing game tasks in the initial game map can also be used to measure the complexity of the initial game map, thereby adjusting the density value of the above setting based on other parameters. No specific restrictions are made here.
[0061] Furthermore, in order to implement the game generation method of this embodiment, multiple template maps can be preset in the game system in advance. Specifically, multiple template maps can be drawn first, each template map includes game road pixel points and non-road pixel points, and the game roads in different template maps are different, and then multiple template maps are stored.
[0062] It can be seen that in the method of this embodiment, on the basis of the preset template map, an initial game map can be generated through random adjustment based on the density value and terrain aggregation iteration. In this way, a variety of game maps can be randomly generated and provided to game players by setting a variety of template maps in the game system. At the same time, the non-connected areas of the game maps generated before and after can be avoided by purposefully reading the template map. Furthermore, in this embodiment, after the initial game map is generated, it is necessary to obtain the actual game time of executing the game tasks in the initial game map, and adjust the density value according to the game time to readjust the complexity of the game road. In this way, the actual use of the generated initial game map can guide the readjustment of the game road, so that the generated game map is more in line with the actual needs of the game users.
[0063] The following is a specific application example to illustrate the game map generation method in this embodiment. Figure 5 Shown, including:
[0064] Step 201 , read a template map in the game system, and amplify the pixels of the read template map to generate a basic map, which includes game road pixel points and non-road pixel points.
[0065] Step 202: Set the density value for adjusting the game road.
[0066] Step 203: For any pixel point among the first game road pixel point and the second non-road pixel point in the edge area of the game road in the basic map, a random value is given. If the random value is less than the density value set above, the pixel point is set as a non-road pixel point. If the random value is greater than or equal to the density value, the pixel point is set as a game road pixel point.
[0067] For example Figure 6a As shown in FIG. 1 , after randomly adjusting each pixel point in the edge area, an adjusted map is obtained. In the adjusted map, relatively discrete game road pixel points and non-road pixel points appear at the edge of the game road.
[0068] In step 204, terrain aggregation iteration is performed on the game roads in the adjusted map. During the terrain aggregation iteration, the smoother pixel points on the edge of the game roads are set as pixel points of another terrain attribute in consecutive rounds of terrain aggregation iteration. After the iteration is completed, the objects of the game tasks are set in the game roads, so that the initial game map in the shape of a cave can be generated.
[0069] The terrain aggregation iteration mainly traverses each pixel in the adjusted map. If more than half of the pixels around the current pixel have different terrain attributes from the current pixel, the terrain attribute of the current pixel is set to the terrain attribute of more than half of the pixels.
[0070] For example Figure 6b Shown is the above Figure 6a The map obtained after terrain aggregation iteration of the adjusted map shown in . It can be seen that after terrain aggregation iteration, the pixels with the same terrain attributes in the edge area of the game road are aggregated, making the edge area smoother. Figure 6c This is the final initial game map. The adjusted map is obtained by randomly adjusting each pixel point. In the adjusted map, relatively discrete game road pixels and non-road pixels appear at the edges of the game roads.
[0071] Step 205, when executing the game task in the initial game map, obtain the game time for executing the game task, adjust the density value set in the above step 202 according to the game time, and return to execute step 203 based on the adjusted density value until the game time for generating the game map after adjustment is within the set range.
[0072] In this way, the actual usage of the generated initial game map can guide the readjustment of the game path, so that the generated game map is more in line with the actual needs of game users.
[0073] The embodiment of the present invention also provides a game map generation system based on artificial intelligence simulation, the structural diagram of which is shown as follows: Figure 7 Specifically, it may include:
[0074] The basic map unit 10 is used to generate a basic map based on the template map, wherein the basic map includes game road pixel points and non-road pixel points.
[0075] Specifically, the basic map unit 10 can read a preset template map and amplify the pixels of the read template map to obtain the basic map.
[0076] The random adjustment unit 11 is used to set a density value for adjusting the game road, and randomly adjust the first game road pixel point and the second non-road pixel point in the edge area of the game road in the basic map generated by the above-mentioned basic map unit 10 according to the density value to obtain an adjusted map.
[0077] The random adjustment unit 11 is specifically used to give a random value to any pixel point among the first game road pixel point and the second non-road pixel point; if the random value is less than the density value, the any pixel point is set as a non-road pixel point; if the random value is greater than or equal to the density value, the any pixel point is set as a road pixel point.
[0078] The terrain iteration unit 12 is used to perform terrain aggregation iteration on the game roads in the adjusted map obtained by the random adjustment unit 11 to generate an initial game map in the shape of a cave.
[0079] The terrain iteration unit 12 is specifically used to traverse the pixel points in the adjusted map. If more than half of the pixels around the current pixel point have different terrain attributes from the current pixel point, the terrain attribute of the current pixel point is set to the terrain attribute of more than half of the pixels around the current pixel point.
[0080] Furthermore, the terrain iteration unit 12 is also used to set the pixel point of a certain terrain attribute to the pixel point of another terrain attribute if there are no pixel points of another terrain attribute around the pixel point of a certain terrain attribute in the edge area of the game road in multiple consecutive rounds of terrain aggregation iterations.
[0081] The density value adjustment unit 13 is used to simulate the execution of game tasks in the initial game map obtained by the terrain iteration unit 12, and obtain the game time of executing the game tasks, and adjust the density value according to the game time to re-randomly adjust the pixel points until the game time of the game map generated after adjustment is within the set range.
[0082] The density value adjustment unit 13 is specifically used to increase the density value to re-randomly adjust the pixel points if the game duration is greater than a maximum threshold; and to reduce the density value to re-randomly adjust the pixel points if the game duration is less than a minimum threshold.
[0083] Furthermore, the system of this embodiment may further include:
[0084] The template unit 14 is configured to draw a plurality of template maps, each template map including game road pixels and non-road pixels, with different game roads in different template maps; and store the plurality of template maps. Thus, the base map unit 10 directly reads at least one template map from the template maps stored in the template unit 14.
[0085] In the system of this embodiment, based on a preset template map, an initial game map can be generated through random adjustment based on density values and terrain aggregation iterations. In this way, by setting up a variety of template maps in the game system, a variety of game maps can be randomly generated and provided to game players. At the same time, the template maps can be read purposefully to avoid non-connected areas of the game maps generated before and after. Furthermore, in this embodiment, after the initial game map is generated, it is necessary to obtain the actual game time of executing the game tasks in the initial game map, and adjust the density value according to the game time to readjust the complexity of the game road. In this way, the actual use of the generated initial game map can guide the readjustment of the game road, so that the generated game map is more in line with the actual needs of the game users.
[0086] The embodiment of the present invention further provides a terminal device, the structural diagram of which is shown in FIG. Figure 8 As shown, the terminal device may vary significantly due to configuration or performance differences. It may include one or more central processing units (CPUs) 20 (e.g., one or more processors), memory 21, and one or more storage media 22 (e.g., one or more mass storage devices) storing application programs 221 or data 222. The memory 21 and storage media 22 may be either transient or persistent storage. The programs stored in the storage media 22 may include one or more modules (not shown), each of which may include a series of instructions for operating on the terminal device. Furthermore, the CPU 20 may be configured to communicate with the storage medium 22 to execute the series of instructions stored in the storage medium 22 on the terminal device.
[0087] Specifically, the application 221 stored in the storage medium 22 includes a game map generation application, and this application may include the base map unit 10, random adjustment unit 11, terrain iteration unit 12, density value adjustment unit 13, and template unit 14 of the game map generation system described above, which are not described in detail here. Furthermore, the central processing unit 20 can be configured to communicate with the storage medium 22 and execute a series of operations corresponding to the game map generation application stored in the storage medium 22 on the terminal device.
[0088] The terminal device may also include one or more power supplies 23, one or more wired or wireless network interfaces 24, one or more input and output interfaces 25, and / or one or more operating systems 223, such as Windows Server™, Mac OS X™, Unix™, Linux™, FreeBSD™, etc.
[0089] The steps performed by the gaming system in the above method embodiment can be based on the Figure 8 The structure of the terminal device shown.
[0090] Furthermore, another aspect of an embodiment of the present invention also provides a computer-readable storage medium, which stores multiple computer programs, and the computer programs are suitable for being loaded by a processor and executed by the game map generation method based on artificial intelligence simulation as performed by the above-mentioned game system.
[0091] Another aspect of the present invention provides a terminal device, including a processor and a memory;
[0092] The memory is used to store multiple computer programs, which are used to be loaded by the processor and executed by the game map generation method based on artificial intelligence simulation as performed by the above-mentioned game system; the processor is used to implement each computer program in the multiple computer programs.
[0093] Those skilled in the art will understand that all or part of the steps in the various methods of the above embodiments can be completed by instructing related hardware through a program, and the program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), magnetic disk or optical disk, etc.
[0094] The above is a detailed introduction to the game map generation method, system and device based on artificial intelligence simulation provided by the embodiments of the present invention. Specific examples are used in this article to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core ideas. At the same time, for those skilled in the art, according to the ideas of the present invention, there will be changes in the specific implementation methods and application scopes. In summary, the contents of this specification should not be understood as limiting the present invention.
Claims
1. A method for generating a game map based on artificial intelligence simulation, characterized in that: include: Generate a base map based on the template map, wherein the base map includes game road pixel points and non-road pixel points; Selecting multiple rows of pixel points at the edge of a game road as pixel points in an edge area of the game road for random adjustment; wherein the pixel points include non-road pixel points and game road pixel points; Set the density value for game road adjustment. The density value is a reference value for adjusting each pixel point in the edge area of the game road in the base map. A random value is given to any pixel point in the first game road pixel point and the second non-road pixel point in the edge area of the game road in the base map. If the random value is less than the density value, any pixel point is set as a non-road pixel point; if the random value is greater than or equal to the density value, any pixel point is set as a game road pixel point, and an adjusted map is obtained, in which relatively discrete game road pixels and non-road pixels appear at the edge of the game road in the adjusted map; Performing terrain aggregation iteration on the game roads in the adjusted map to generate an initial game map in the shape of a cave; The execution of a game task is simulated in the initial game map, and the game duration of the execution of the game task is obtained. The density value is adjusted according to the game duration to re-randomly adjust the pixel points until the game duration of the generated game map after adjustment is within the set range.
2. The method according to claim 1, wherein The generating of the base map based on the template map includes: Read the preset template map; The pixels of the read template map are enlarged to obtain the basic map.
3. The method according to claim 1, wherein The iterative terrain aggregation of the game roads in the adjusted map specifically includes: Traversing the pixels in the adjusted map, if more than half of the pixels surrounding the current pixel have different terrain attributes from the current pixel, setting the terrain attribute of the current pixel to the terrain attribute of more than half of the pixels.
4. The method according to claim 3, wherein Before generating the initial game map in the shape of a cave, the process further includes: If, in multiple consecutive rounds of terrain aggregation iterations, there are no pixels of another terrain attribute surrounding a pixel of a certain terrain attribute in the edge area of the game road, the pixel of the certain terrain attribute is set to a pixel of the other terrain attribute.
5. The method according to claim 4, wherein The number of terrain aggregation iterations is 3-5, wherein the step of setting the pixel points of a certain terrain attribute to the pixel points of another terrain attribute is not placed in the last iteration process.
6. The method according to any one of claims 1 to 5, characterized in that The adjusting the density value according to the game duration specifically includes: If the game duration is greater than a certain maximum threshold, increase the density value to re-randomly adjust the pixels; If the game duration is less than a minimum threshold, the density value is reduced to re-perform random adjustment of the pixels.
7. The method according to any one of claims 1 to 5, characterized in that The method further comprises: Draw multiple template maps, each template map includes game road pixels and non-road pixels, and the game roads in different template maps are different; The plurality of template maps are stored.
8. A game map generation system based on artificial intelligence simulation, characterized in that: include: A basic map unit, configured to generate a basic map based on a template map, wherein the basic map includes game road pixel points and non-road pixel points; Selecting multiple rows of pixel points at the edge of a game road as pixel points in an edge area of the game road for random adjustment; wherein the pixel points include non-road pixel points and game road pixel points; A random adjustment unit is configured to set a density value for adjusting the game road. The density value is a reference value for adjusting each pixel point in the edge area of the game road in the base map. A random value is assigned to any pixel point between the first game road pixel point and the second non-road pixel point. If the random value is less than the density value, the pixel point is set as a non-road pixel point. If the random value is greater than or equal to the density value, the pixel point is set as a game road pixel point. An adjusted map is obtained in which relatively discrete game road pixels and non-road pixels appear at the edge of the game road in the adjusted map. A terrain iteration unit, configured to perform terrain aggregation iteration on the game roads in the adjusted map to generate an initial game map in the shape of a cave; The density value adjustment unit is used to simulate the execution of game tasks in the initial game map and obtain the game time of executing the game tasks, and adjust the density value according to the game time to re-randomly adjust the pixel points until the game time of the game map generated after adjustment is within the set range.
9. A terminal device, characterized in that: including processor and memory; The memory is used to store multiple computer programs, and the computer programs are used to be loaded by the processor and executed by the game map generation method based on artificial intelligence simulation as described in any one of claims 1 to 7; the processor is used to implement each computer program in the multiple computer programs.
Citation Information
Patent Citations
Map generation method and device, computer equipment and storage medium
CN116212395A
Game processing method and device, electronic equipment, storage medium and program product
CN120019841A