A global deployment decision method, device and equipment of a virtual object and a medium

By establishing a combat database for each virtual object and granting commanders AI access permissions, and combining battlefield elements and character data for global decision-making, the problem of insufficient AI character strategy judgment in traditional turn-based games is solved, achieving more optimized AI collaboration and player experience.

CN116747524BActive Publication Date: 2026-05-01BEIJING JIJU NETWORK TECH CO LTD
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
BEIJING JIJU NETWORK TECH CO LTD
Filing Date
2023-05-23
Publication Date
2026-05-01

AI Technical Summary

Technical Problem

In traditional turn-based games, the commander AI cannot combine multiple factors to make the optimal strategic judgment for each AI character, and there is a lack of good interaction and cooperation between AI characters.

Method used

By establishing a combat database for each virtual object and granting commander AI access to these databases, and combining battlefield elements, character data, and combat objectives, global decision-making is conducted, including pre-battle deployment, in-battle analysis, and post-battle summary, to determine the optimal action for each virtual object.

Benefits of technology

It enhances the player's sense of realism and immersion, and ensures optimal action for each soldier AI through a scoring method, avoiding the rigid operation of traditional game AI and strengthening the collaborative interaction between commander AI and soldier AI.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116747524B_ABST
    Figure CN116747524B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of game artificial intelligence, and particularly relates to a global deployment decision method and device for virtual objects, equipment and medium, the method specifically comprises: determining a first virtual object set, establishing a battle database for each first virtual object in the first virtual object set, and giving a second virtual object the permission to access the battle database of each first virtual object; based on the battle database, the second virtual object respectively acquires the role data of each first virtual object, and then according to the battlefield element of the current battlefield and the role data of each first virtual object, determines a third virtual object set and the deployment arrangement of each third virtual object in the current battlefield in the third virtual object set. The present application makes global decision judgment such as pre-battle deployment, in-battle analysis and post-battle summary, so that each virtual object on the field can make the optimal action.
Need to check novelty before this filing date? Find Prior Art

Description

A method, apparatus, device, and medium for global deployment decision-making of virtual objects. Technical Field

[0001] This invention relates to the field of game artificial intelligence technology, and in particular to a method, apparatus, device and medium for global deployment decision-making of virtual objects. Background Technology

[0002] In games, machines are often used to simulate human thinking to perform game-related operations, such as participating in the game according to the rules, understanding player behavior and providing feedback. This is game artificial intelligence, or game AI. The application of game AI in games has a long history, and AI decision-making solutions such as AI behavior trees, hierarchical state machines, and finite state machines have been developed. In turn-based games, a commander AI is usually responsible for making strategic decisions regarding the actions of all AI characters on its side. However, in traditional turn-based games, the commander AI can usually only make simple strategies such as instructing all AI characters to collectively attack a specific enemy character. It cannot combine multiple factors to ensure that each AI character under the commander AI makes its own optimal strategic decision, and there is a lack of good interaction and cooperation between the commander AI and the AI ​​characters it commands. Summary of the Invention

[0003] The purpose of this invention is to provide a global deployment decision-making method, apparatus, device, and medium for virtual objects, which combines battlefield elements, virtual object role data, and combat objectives to make global decision-making judgments such as pre-battle deployment, in-battle analysis, and post-battle summary, so that each virtual object on the field can make its own optimal action, thereby solving at least one of the aforementioned existing problems.

[0004] This invention provides a method for global deployment decision-making of virtual objects, the method specifically including:

[0005] A first set of virtual objects is determined, a combat database is established for each first virtual object in the first set of virtual objects, and the second virtual object is granted permission to access the combat database of each first virtual object;

[0006] Based on the combat database, the second virtual object obtains the role data of each first virtual object. Then, based on the battlefield elements of the current battlefield and the role data of each first virtual object, the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield are determined.

[0007] The current turn action of each third virtual object is determined by summing up its movement or combat range, current grid, combat target, similar combat history data, physical factors, special game events, and the action prediction and command orders of the second virtual object.

[0008] Record the operation score of each third virtual object's current round action, and determine the next round action of each third virtual object based on the operation score, where the operation score is the amount of health lost by the combat target due to the current round action.

[0009] Furthermore, the step of enabling the second virtual object to acquire the role data of each first virtual object based on the combat database, and then determining the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield based on the battlefield elements of the current battlefield and the role data of each first virtual object, specifically includes:

[0010] Obtain the battlefield elements of the current battlefield, including the battle victory conditions, maximum number of players on the field, battlefield mechanisms, general battlefield status effects, map size, and terrain factors;

[0011] Based on the combat database, the second virtual object obtains the character data of each first virtual object, and obtains a comprehensive score of the battlefield elements based on the battlefield elements and the character data of each first virtual object.

[0012] A comprehensive character score is obtained based on each first virtual object's historical battlefield win rate, counter relationships, attribute comparison, special story relationships, and lineup relationships.

[0013] The third virtual object set and the battle position of each third virtual object in the third virtual object set are determined based on the comprehensive score of the character and the comprehensive score of the battlefield elements. The third virtual object set is a collection of several first virtual objects that will be on the field in this battle.

[0014] Furthermore, the step of obtaining a comprehensive battlefield element score based on the battlefield elements and the character data of each first virtual object specifically includes:

[0015] The battlefield victory conditions are determined based on the battle type of this battle. The win rate and appearance rate are compared with the battlefield victory conditions and the character data of each first virtual object to obtain the first battlefield element score.

[0016] Based on the role data of the battlefield mechanism and each first virtual object, the first virtual object related to the battlefield mechanism is determined, and the second battlefield element score is obtained;

[0017] The third battlefield element score is obtained based on the degree of influence of the general battlefield state effect on the attributes of each first virtual object;

[0018] The degree of direct confrontation in this battle is determined based on the map size, and then the appropriate first virtual object is determined based on the character data of each first virtual object to obtain the fourth battlefield element score;

[0019] The fifth battlefield element score is obtained based on the degree of adaptation between the terrain factors and each first virtual object;

[0020] A comprehensive battlefield element score is obtained based on the maximum number of players on the field, the first battlefield element score, the second battlefield element score, the third battlefield element score, the fourth battlefield element score, and the fifth battlefield element score.

[0021] Furthermore, the step of obtaining the fifth battlefield element score based on the degree of adaptation between the terrain factors and each first virtual object specifically includes:

[0022] The total number of grids in the current battlefield and the grid type of each grid are determined based on the terrain factors.

[0023] Based on the relationship between each first virtual object and each grid and the total number of grids, a grid scoring formula is determined. The grid scoring formula satisfies y = x1 * (x2 * A + x3 * B), where y represents the score of the first virtual object on each grid in this battle, x1 represents the total number of grids on the current battlefield, x2 represents the win rate of the first virtual object stepping on a grid, x3 represents the win rate of the first virtual object appearing on a grid type that is compatible with the current grid, and A and B are weighting coefficients and represent the influence of x2 and x3 on the overall score, respectively.

[0024] The score for the fifth battlefield element is determined based on the grid scoring formula and the character data of each first virtual object.

[0025] Furthermore, the comprehensive character score is obtained based on each first virtual object's historical battlefield win rate, counter relationships, attribute comparisons, special storyline relationships, and team composition relationships, specifically including:

[0026] Based on the combat database, determine the historical battlefield win rate of each first virtual object in the current battlefield and obtain the first character score;

[0027] Based on the deployment of the battle target, identify the first virtual object in the first set of virtual objects that has a counter-relationship with the battle target, and obtain the second character score;

[0028] Compare the basic and growth attributes of each first virtual object with the battle target, then score the attributes to obtain the third character rating;

[0029] The first virtual character with a special storyline relationship is identified and receives the fourth character rating.

[0030] Obtain the lineup relationships between each first virtual object, sort them according to the benefits of the lineup relationships, and obtain the fifth character score;

[0031] A comprehensive character score is obtained based on the first character score, the second character score, the third character score, the fourth character score, and the fifth character score.

[0032] Furthermore, the process of summarizing and scoring each third virtual object's movement or combat range, current grid, combat target, similar combat history data, physical factors, special game events, and the predicted actions and commands of the second virtual object to determine the current round's action of each third virtual object specifically includes:

[0033] Determine the movement or combat range of each third virtual object, score each third virtual object based on its current grid and potential combat targets, and obtain the first action score;

[0034] Based on the combat database, obtain similar combat history data between each third virtual object and the combat target to obtain a second action score;

[0035] The first action score and the second action score are added together based on physical factors and special events in the game to obtain the third action score;

[0036] Each third virtual object obtains the second virtual object's prediction of the actions between each third virtual object and the battle target within a preset number of future rounds, and obtains a fourth action score;

[0037] The fifth action score is obtained based on the command orders of the second virtual object and the inverse values ​​of each third virtual object;

[0038] The current round action of each third virtual object is determined based on the third action score, the fourth action score, and the fifth action score.

[0039] Furthermore, the process of scoring each third virtual object based on its current grid position and potential combat targets to obtain a first action score specifically includes:

[0040] Get the current grid type of each third virtual object and the battle target that may trigger a battle action;

[0041] The sixth action score is obtained by summing the scores based on the current grid type and the number of grid types of each third virtual object.

[0042] The seventh action score is obtained based on the attributes, skills, equipment of the combat target, and the possible state effects between the combat target and each third virtual object.

[0043] The first action score is determined based on the sixth action score and the seventh action score.

[0044] The present invention also provides a global deployment decision-making device for virtual objects, the device specifically comprising:

[0045] The combat database module is used to determine a first set of virtual objects, establish a combat database for each first virtual object in the first set of virtual objects, and grant second virtual objects permission to access the combat database of each first virtual object.

[0046] The pre-battle analysis module is used to enable the second virtual object to obtain the role data of each first virtual object based on the battle database, and then determine the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield based on the battlefield elements of the current battlefield and the role data of each first virtual object.

[0047] The in-battle analysis module is used to add up scores based on each third virtual object's movement range or battle range, current grid, battle target, similar battle history data, body factors, special game events, and the second virtual object's action prediction and command orders to determine the current round action of each third virtual object;

[0048] The post-battle analysis module is used to record the operation score of each third virtual object's current round action, and determine the next round action of each third virtual object based on the operation score. The operation score is the amount of health lost by the combat target due to the current round action.

[0049] The present invention also provides a computer device, comprising: a memory and a processor, and a computer program stored in the memory, wherein when the computer program is executed on the processor, it implements a global deployment decision method for virtual objects as described in any of the above methods.

[0050] The present invention also provides a computer-readable storage medium having a computer program stored thereon, which, when executed by a processor, implements a global deployment decision method for virtual objects as described in any of the above methods.

[0051] Compared with the prior art, the present invention has at least one of the following technical effects:

[0052] 1. It enables commander AI to simulate the global decision-making behavior of players in turn-based games, making pre-battle deployments, in-battle analyses, and post-battle summaries, thereby improving the player's sense of realism.

[0053] 2. Based on the good collaboration and interaction between the commander AI and the soldier AI, the optimal action of each soldier AI is determined by a scoring method, which avoids the rigid operation of traditional game AI and enhances the player's immersion. Attached Figure Description

[0054] In order to more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0055] Figure 1 is a flowchart illustrating a global deployment decision-making method for virtual objects provided in an embodiment of the present invention;

[0056] Figure 2 is a flowchart illustrating step S101 provided in an embodiment of the present invention;

[0057] Figure 3 is a flowchart illustrating step S102 provided in an embodiment of the present invention;

[0058] Figure 4 is a flowchart illustrating step S103 provided in an embodiment of the present invention;

[0059] Figure 5 is a flowchart illustrating step S104 provided in an embodiment of the present invention;

[0060] Figure 6 is a schematic diagram of the structure of a global deployment decision-making device for virtual objects provided in an embodiment of the present invention;

[0061] Figure 7 is a schematic diagram of the structure of a computer device provided in an embodiment of the present invention. Detailed Implementation

[0062] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.

[0063] It should be understood that, when used in this application specification and the appended claims, the term "comprising" indicates the presence of the described features, integrals, steps, operations, elements and / or components, but does not exclude the presence or addition of one or more other features, integrals, steps, operations, elements, components and / or a collection thereof.

[0064] It should also be understood that the term “and / or” as used in this application specification and the appended claims means any combination of one or more of the associated listed items and all possible combinations, and includes such combinations.

[0065] As used in this application specification and the appended claims, the term "if" may be interpreted, depending on the context, as "when," "once," "in response to determination," or "in response to detection." Similarly, the phrase "if determined" or "if detected [the described condition or event]" may be interpreted, depending on the context, as meaning "once determined," "in response to determination," "once detected [the described condition or event]," or "in response to detection [the described condition or event]."

[0066] Furthermore, in the description of this application and the appended claims, the terms "first," "second," "third," etc., are used only to distinguish descriptions and should not be construed as indicating or implying relative importance.

[0067] References to "one embodiment" or "some embodiments" as described in this specification mean that one or more embodiments of this application include a specific feature, structure, or characteristic described in connection with that embodiment. Therefore, the phrases "in one embodiment," "in some embodiments," "in other embodiments," "in still other embodiments," etc., appearing in different parts of this specification do not necessarily refer to the same embodiment, but rather mean "one or more, but not all, embodiments," unless otherwise specifically emphasized. The terms "comprising," "including," "having," and variations thereof mean "including but not limited to," unless otherwise specifically emphasized.

[0068] In games, machines are often used to simulate human thinking to perform game-related operations, such as participating in the game according to the rules, understanding player behavior and providing feedback. This is game artificial intelligence, or game AI. The application of game AI in games has a long history, and AI decision-making solutions such as AI behavior trees, hierarchical state machines, and finite state machines have been developed. In turn-based games, a commander AI is usually responsible for making strategic decisions regarding the actions of all AI characters on its side. However, in traditional turn-based games, the commander AI can usually only make simple strategies such as instructing all AI characters to collectively attack a specific enemy character. It cannot combine multiple factors to ensure that each AI character under the commander AI makes its own optimal strategic decision, and there is a lack of good interaction and cooperation between the commander AI and the AI ​​characters it commands.

[0069] Referring to Figure 1, an embodiment of the present invention provides a method for global deployment decision of virtual objects, the method specifically including:

[0070] S101: Determine a first set of virtual objects, establish a combat database for each first virtual object in the first set of virtual objects, and grant second virtual objects the permission to access the combat database of each first virtual object.

[0071] In this embodiment, referring to FIG2, the first virtual object is a soldier AI and the second virtual object is a commander AI. Within a general database, there are several smaller databases. Each soldier AI has its own separate database. The commander AI has the authority to access the databases of each soldier AI in order to command or control them. At the same time, the commander AI also collects combat data and uploads it to the battlefield combat database. There are also different separate databases for each battlefield.

[0072] Unlike soldier AI, commander AI doesn't require a database to store its own data. It can access all relevant combat data in the game, even data for each individual soldier AI. When creating a new commander AI, access / read / write permissions for this independent unit need to be configured. Setting permission limits allows for better control over the intelligence level of each commander AI. For example, allowing the commander AI access to all soldier AI's combat data enables it to accurately analyze the strengths and weaknesses of the current soldier AI's opponent and estimate the opponent's next move. Different restrictions allow the AI ​​to better serve the game's gameplay system. For instance, in some games' PVP modes, players are sometimes matched with low-rank bots. In this case, restricting the AI's access to skill and equipment combination data can effectively simulate the behavior of novice players, better reflecting the current player's PVP experience.

[0073] S102: Based on the combat database, the second virtual object obtains the role data of each first virtual object, and then, based on the battlefield elements of the current battlefield and the role data of each first virtual object, determines the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield.

[0074] In some embodiments, the step of enabling the second virtual object to acquire the role data of each first virtual object based on the combat database, and then determining the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield based on the battlefield elements of the current battlefield and the role data of each first virtual object, specifically includes:

[0075] Obtain the battlefield elements of the current battlefield, including the battle victory conditions, maximum number of players on the field, battlefield mechanisms, general battlefield status effects, map size, and terrain factors;

[0076] Based on the combat database, the second virtual object obtains the character data of each first virtual object, and obtains a comprehensive score of the battlefield elements based on the battlefield elements and the character data of each first virtual object.

[0077] A comprehensive character score is obtained based on each first virtual object's historical battlefield win rate, counter relationships, attribute comparison, special story relationships, and lineup relationships.

[0078] The third virtual object set and the battle position of each third virtual object in the third virtual object set are determined based on the comprehensive score of the character and the comprehensive score of the battlefield elements. The third virtual object set is a collection of several first virtual objects that will be on the field in this battle.

[0079] In this embodiment, in turn-based games, especially strategy games, it is necessary to make deployment arrangements before the battle begins, analyze the combined effects of the deployed characters and their positions on different battle scenarios, analyze whether there are any counter-relationships between the enemy's deployed characters and our characters (such as racial, talent, or other attribute counter-relationships), class suppression relationships, weapon and equipment, and other combat factors, and also consider the configuration of special events, i.e., certain events in the game, such as specific story events occurring when hero A is present and enemy hero B, which can bring additional benefits to the current battle. Referring to Figure 3, the pre-battle analysis is mainly performed by the commander AI, i.e., the second virtual object in this embodiment. This analysis can be performed linearly or in parallel, i.e., analyzing battlefield-related elements and character-related elements, scoring the overall battlefield and the deployment of each character, and performing a comprehensive summation to ultimately predict the benefits of each first virtual object's deployment position. In addition, besides battlefield and character elements, new analysis variables can be added, such as weather, time, and system adaptation.

[0080] In some embodiments, obtaining a comprehensive battlefield element score based on the battlefield element and the role data of each first virtual object specifically includes:

[0081] The battlefield victory conditions are determined based on the battle type of this battle. The win rate and appearance rate are compared with the battlefield victory conditions and the character data of each first virtual object to obtain the first battlefield element score.

[0082] Based on the role data of the battlefield mechanism and each first virtual object, the first virtual object related to the battlefield mechanism is determined, and the second battlefield element score is obtained;

[0083] The third battlefield element score is obtained based on the degree of influence of the general battlefield state effect on the attributes of each first virtual object;

[0084] The degree of direct confrontation in this battle is determined based on the map size, and then the appropriate first virtual object is determined based on the character data of each first virtual object to obtain the fourth battlefield element score;

[0085] The fifth battlefield element score is obtained based on the degree of adaptation between the terrain factors and each first virtual object;

[0086] A comprehensive battlefield element score is obtained based on the maximum number of players on the field, the first battlefield element score, the second battlefield element score, the third battlefield element score, the fourth battlefield element score, and the fifth battlefield element score.

[0087] In this embodiment, a comprehensive analysis of various battlefield elements is required. For example, regarding battlefield victory conditions, the victory conditions for this battle may be an encounter, a defense, or a special battle condition such as reaching a designated location. Based on different victory conditions, the commander AI (the second virtual object) can retrieve information on all combat units that have participated in battles on this battlefield, find the win rate and appearance rate of each combat unit, and then score each combat unit (the first virtual object) that can participate in this battle based on this information. Regarding battlefield mechanisms, the positive correlation between special mechanisms on the battlefield map and characters needs to be considered; for example, a certain character might be better able to utilize or decipher a mechanism. The general battlefield status effect is the game's... The commonly used term "BUFF" in the domain refers to the fact that the general buffs applied to the battlefield will have different effects on each primary virtual object, resulting in different character attribute scores. Regarding map size, for example, the battlefield map in a strategy game may vary in size (mainly reflected in the number of grids on the map), which will affect the degree to which the entire battle leans towards direct confrontation (the smaller the map, the more obvious the direct confrontation). In terms of terrain factors, it is necessary to consider the number of certain terrains and the degree to which specific characters are adapted to the terrain. For example, when a certain terrain exists, or when a character fights other characters on a certain terrain, they will receive a high behavioral value score.

[0088] In some embodiments, obtaining the fifth battlefield element score based on the compatibility between the terrain factor and each first virtual object specifically includes:

[0089] The total number of grids in the current battlefield and the grid type of each grid are determined based on the terrain factors.

[0090] Based on the relationship between each first virtual object and each grid and the total number of grids, a grid scoring formula is determined. The grid scoring formula satisfies y = x1 * (x2 * A + x3 * B), where y represents the score of the first virtual object on each grid in this battle, x1 represents the total number of grids on the current battlefield, x2 represents the win rate of the first virtual object stepping on a grid, x3 represents the win rate of the first virtual object appearing on a grid type that is compatible with the current grid, and A and B are weighting coefficients and represent the influence of x2 and x3 on the overall score, respectively.

[0091] The score for the fifth battlefield element is determined based on the grid scoring formula and the character data of each first virtual object.

[0092] In this embodiment, the scoring of the fit between terrain factors and each first virtual object will use different mathematical algorithms due to the different design requirements of each project. One such algorithm is listed here. Assuming the game in which the AI ​​performs terrain analysis is a turn-based strategy game, since the terrain in a turn-based strategy game is divided into individual grids, and characters gain different attribute benefits when standing on different grids, the final behavioral benefit score obtained by the soldier AI will vary. In short, for a certain type of terrain, the position of a combat unit on a grid will affect the outcome of a single battle. Considering the game's need to macroscopically consider the relationship between the terrain and the character's win rate, the grid scoring formula can be derived as y = x1*(x2*A + x3*B). The weight relationship between A and B determines the impact of the two events—the win rate of the first virtual object standing on a grid and the win rate of the first virtual object appearing with the grid type that fits the current grid—on the overall integer. When A is greater than B, it means that the impact of the event of the first virtual object standing on a grid is greater than the event of the first virtual object appearing with the grid type that fits the current grid; conversely, the latter event has a greater impact than the former.

[0093] In some embodiments, obtaining a character's comprehensive score based on each first virtual object's historical battlefield win rate, counter-relationships, attribute comparisons, special storyline relationships, and team composition relationships specifically includes:

[0094] Based on the combat database, determine the historical battlefield win rate of each first virtual object in the current battlefield and obtain the first character score;

[0095] Based on the deployment of the battle target, identify the first virtual object in the first set of virtual objects that has a counter-relationship with the battle target, and obtain the second character score;

[0096] Compare the basic and growth attributes of each first virtual object with the battle target, then score the attributes to obtain the third character rating;

[0097] The first virtual character with a special storyline relationship is identified and receives the fourth character rating.

[0098] Obtain the lineup relationships between each first virtual object, sort them according to the benefits of the lineup relationships, and obtain the fifth character score;

[0099] A comprehensive character score is obtained based on the first character score, the second character score, the third character score, the fourth character score, and the fifth character score.

[0100] In this embodiment, the character-related elements of each first virtual object are analyzed, such as: historical battlefield win rate: the historical battlefield win rate of each first virtual object based on the victory conditions of the current battlefield; counter-relationship: whether there is a counter-relationship between each first virtual object and the combat target, the number of counter-relationships, and the comprehensive score of various mathematical relationships generated by the win rate; attribute comparison: the final attribute score of the combat unit's own basic attributes and growth system attributes, and the mathematical relationship score generated by comparing the advantages and disadvantages and the ranking of the enemy combat units; special plot relationships: the impact score of the special plot relationships between certain combat characters on the outcome of this battle.

[0101] In addition to these factors, there's the concept of team composition. Team composition is a classic and common gameplay element in turn-based games. It involves grouping different combat units together to create new synergies and achieve higher returns. For example, the damage dealt by B when A is present will be far more valuable than when B is paired with characters other than A. The AI ​​commander in turn-based games can be given a "team score" based on team composition. This means that combinations of A, B, and C can gain extra team score, allowing the AI ​​to consider these combinations when selecting characters for battle. Because team composition is a flexible concept and new combinations emerge with each game update, a team composition determined by combining AI-ratinged characters with previously used team compositions is more practical. Mathematical algorithms can be used to influence the weighting of these two choices to achieve the designer's intended purpose. Furthermore, the choice of deployment position also affects the score. Traditional turn-based or strategy games often include deployment position selection, which determines a character's initial position, speed of entering combat, and action order.

[0102] S103: Based on the movement range or combat range of each third virtual object, the current grid, the combat target, similar combat history data, body factors, special game events, and the action prediction and command orders of the second virtual object, a combined score is calculated to determine the current turn action of each third virtual object.

[0103] In some embodiments, determining the current turn action of each third virtual object by summing up its score based on the movement or combat range, current grid, combat target, similar combat history data, physical factors, special game events, and the predicted actions and commands of the second virtual object, specifically includes:

[0104] Determine the movement or combat range of each third virtual object, score each third virtual object based on its current grid and potential combat targets, and obtain the first action score;

[0105] Based on the combat database, obtain similar combat history data between each third virtual object and the combat target to obtain a second action score;

[0106] The first action score and the second action score are added together based on physical factors and special events in the game to obtain the third action score;

[0107] Each third virtual object obtains the second virtual object's prediction of the actions between each third virtual object and the battle target within a preset number of future rounds, and obtains a fourth action score;

[0108] The fifth action score is obtained based on the command orders of the second virtual object and the inverse values ​​of each third virtual object;

[0109] The current round action of each third virtual object is determined based on the third action score, the fourth action score, and the fifth action score.

[0110] Specifically, the process of scoring each third virtual object based on its current grid position and potential combat targets to obtain a first action score includes:

[0111] Get the current grid type of each third virtual object and the battle target that may trigger a battle action;

[0112] The sixth action score is obtained by summing the scores based on the current grid type and the number of grid types of each third virtual object.

[0113] The seventh action score is obtained based on the attributes, skills, equipment of the combat target, and the possible state effects between the combat target and each third virtual object.

[0114] The first action score is determined based on the sixth action score and the seventh action score.

[0115] In this embodiment, during the turn-based game's combat, each third virtual object can perform actions such as attacking and defending within its own combat turn. Simultaneously, the second virtual object and each third virtual object also cooperate and interact during combat. Referring to Figure 4, the third virtual object, acting as the soldier AI, first performs analysis, using itself as a reference frame to determine the distance that can be moved and engaged in combat during this operation. Then, in the turn-based game, since the movement of combat units is based on grids, corresponding scores need to be configured according to the different environmental conditions of each grid. Grid types include: empty grids (grids with no function but only movement); attack grids (grids where attack actions can be performed); skill attack grids (grids where skill attack actions can be performed); attacked grids (grids that will be attacked by enemies); terrain grids (grids with terrain effects); movement grids (grids that can dodge enemy attacks); and escape grids (grids that are far away from all enemies). Furthermore, the AI ​​analyzes the grid by layering grid states. For example, a grid might be both an attacking grid and a target of enemy attacks. The final score for this grid is obtained by adding the attacking and targeted grid states together. There can be multiple layers of grid state layering, not limited to the two layers illustrated in the example.

[0116] Next, we need to conduct a combat target analysis, which involves analyzing and evaluating the hostile combat units that may engage in combat, including their attributes, skills, equipment, combat targets, and the possible state effects between each third virtual object.

[0117] Regarding attributes, each attribute is assigned a different score based on its perceived value in the game. For example, each point of attack power is worth 2 points, and each point of defense power is worth 1.5 points. A clear score is assigned by examining all attributes on a character. However, simply comparing attribute scores is generally inaccurate. For instance, assassins have lower health attributes while tanks have relatively higher ones. Assessing a character's performance solely based on scores is unreasonable. This is where the attribute weighting in the soldier AI's physical factors comes into play. While examining all attributes, this approach lacks universality. Game designers can extract key attributes for comparison based on their specific project needs, resulting in more focused and accurate score comparisons.

[0118] In terms of skills, the system analyzes the target's skill status (such as whether the release conditions are met, whether skill cooldowns are being processed, etc.) to estimate the probability that the enemy will use a certain skill in this battle and its impact on the soldier AI's behavior score. The probability of skill release and the score can be viewed as a simple mathematical expectation (release probability * score) for calculation. Designers can also use other mathematical relationships to link them according to their own needs.

[0119] In terms of equipment, analyze the target's additional conditions besides equipment attributes, such as the status effects and skill effects that the equipment comes with.

[0120] Regarding the potential status effects between the combat target and each third virtual object, i.e., buffs and other status effects, the analysis focuses on the target's effects beyond attribute increases and debuffs. For example, when the target attacks an enemy, it may inflict a burning effect, causing additional damage. Buff effect data is generally retrieved by the commander AI from the game database, rather than directly from the target. This is because retrieving the game configuration data is faster, more intuitive, and more specific, allowing access to the corresponding buff configuration for each item.

[0121] Based on the attribute analysis of the combat target, similar historical combat data between each third virtual object and the combat target can be retrieved to view past wins and losses, and how the basic analysis scores compare. The win / loss rate, the difference in basic analysis scores, and the probability of the combat occurrence are calculated into a score according to a certain mathematical relationship for the soldier AI to refer to. However, the soldier AI will only retrieve its own combat database to look for similar combat records. As needed, game designers can also consider having the commander AI retrieve more combat data from the soldier AI to help the current soldier AI analyze the battle situation.

[0122] The above process combines the score analysis of the grid and the score analysis of the combat unit to obtain the score generated by the AI's different actions on each grid. Then, it is necessary to consider the influence of physical factors and special game events on the score. The different physical factors of the soldier AI will affect the behavioral value score generated by different actions, thus causing the behavioral score of the AI's selected actions to change. The physical factors of the soldier AI include personality factors, attribute comparison weights, intelligence level, action strategy, and rebellious factors.

[0123] The commander AI will estimate the battle trend in the next round after performing a certain action and calculate the result as a value score based on a specific mathematical relationship for the soldier AI to reference. For example, the commander AI will tell soldier A where B will stand in the next round if A chooses to attack B this round, and what the win rate is in previous battles when this trend occurs. The higher the intelligence level, the further forward the commander AI and soldier AI will estimate the next round (no longer limited to predicting only the next round, but possibly the next three rounds or more). Based on the final score, the soldier AI tells the commander AI that it will restrict its choice of a certain action according to its own intelligence level.

[0124] In addition, the decision on whether or not to intervene with the commander AI can be made based on game design requirements, plot requirements, and the impact of the commander AI's actions on the overall battle damage. However, due to the rebellious nature of the soldier AI, it may reject the commander AI's decision by altering the scores generated by the commands.

[0125] Ultimately, each third virtual object, acting as a soldier AI, performs the corresponding operation and then records its own combat performance.

[0126] S104: Record the operation score of each third virtual object's current round action, and determine the next round action of each third virtual object based on the operation score, where the operation score is the amount of health lost by the combat target due to the current round action.

[0127] In this embodiment, referring to Figure 5, after each round, each third virtual object records its own combat situation, i.e., the operation score obtained in this operation. This can integrate the combat units, resources, battlefield mechanisms, and other elements in the entire battle into a large economic model. The essence of the battle between the two sides is to compete for the opponent's resources, and the person who ultimately obtains all of the opponent's resources will win. Each of our third virtual objects launches attacks on some or all combat targets based on the utilized battlefield resources. Then, the reduced health of all combat target characters attacked by the third virtual object set in this round is counted, and the reduced health in this round is converted into operation score. Based on the operation score, the progress of the current round's action in this battle is determined. Then, based on the progress, the process of step S103 is repeated to analyze the actions of each third virtual object in the next round.

[0128] Referring to Figure 6, this embodiment of the invention also provides a global deployment decision-making device 6 for virtual objects, characterized in that the device 6 specifically includes:

[0129] The combat database module 601 is used to determine a first set of virtual objects, establish a combat database for each first virtual object in the first set of virtual objects, and grant second virtual objects the permission to access the combat database of each first virtual object.

[0130] The pre-battle analysis module 602 is used to enable the second virtual object to obtain the role data of each first virtual object based on the battle database, and then determine the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield based on the battlefield elements of the current battlefield and the role data of each first virtual object.

[0131] The battle analysis module 603 is used to perform a combined score based on the movement range or battle range of each third virtual object, the current grid, the battle target, similar battle history data, body factors, special game events, and the action prediction and command orders of the second virtual object, and to determine the current round action of each third virtual object;

[0132] The post-battle analysis module 604 is used to record the operation score of each third virtual object's current round action, and determine the next round action of each third virtual object based on the operation score. The operation score is the amount of health lost by the combat target due to the current round action.

[0133] It is understood that the content of the global deployment decision method embodiment of the virtual object shown in Figure 1 is applicable to the global deployment decision device embodiment of the virtual object. The specific functions implemented by the global deployment decision device embodiment of the virtual object are the same as those of the global deployment decision method embodiment of the virtual object shown in Figure 1, and the beneficial effects achieved are also the same as those achieved by the global deployment decision method embodiment of the virtual object shown in Figure 1.

[0134] It should be noted that the information interaction and execution process between the above-mentioned devices are based on the same concept as the method embodiments of the present invention. For details on their specific functions and technical effects, please refer to the method embodiments section, which will not be repeated here.

[0135] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the above-described division of functional units and modules is merely an example. In practical applications, the above functions can be assigned to different functional units and modules as needed, that is, the internal structure of the device can be divided into different functional units or modules to complete all or part of the functions described above. The functional units and modules in the embodiments can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit. The integrated unit can be implemented in hardware or as a software functional unit. Furthermore, the specific names of the functional units and modules are only for easy differentiation and are not intended to limit the scope of protection of this application. The specific working process of the units and modules in the above system can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.

[0136] Referring to FIG7, an embodiment of the present invention also provides a computer device 7, including: a memory 702 and a processor 701, and a computer program 703 stored on the memory 702. When the computer program 703 is executed on the processor 701, it implements the global deployment decision method for virtual objects as described in any of the above methods.

[0137] The computer device 7 can be a desktop computer, laptop, handheld computer, or cloud server, etc. The computer device 7 may include, but is not limited to, a processor 701 and a memory 702. Those skilled in the art will understand that Figure 7 is merely an example of the computer device 7 and does not constitute a limitation on the computer device 7. It may include more or fewer components than shown, or combine certain components, or different components, such as input / output devices, network access devices, etc.

[0138] The processor 701 may be a Central Processing Unit (CPU), or it may be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. A general-purpose processor may be a microprocessor or any conventional processor.

[0139] In some embodiments, the memory 702 may be an internal storage unit of the computer device 7, such as a hard disk or memory of the computer device 7. In other embodiments, the memory 702 may be an external storage device of the computer device 7, such as a plug-in hard disk, smart media card (SMC), secure digital (SD) card, flash card, etc., equipped on the computer device 7. Further, the memory 702 may include both internal and external storage units of the computer device 7. The memory 702 is used to store the operating system, applications, bootloader, data, and other programs, such as the program code of the computer program. The memory 702 can also be used to temporarily store data that has been output or will be output.

[0140] This invention also provides a computer-readable storage medium storing a computer program thereon, which, when executed by a processor, implements a global deployment decision method for virtual objects as described in any of the above methods.

[0141] In this embodiment, if the integrated unit is implemented as a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include at least: any entity or device capable of carrying computer program code to a photographing device / terminal device, a recording medium, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium. Examples include USB flash drives, portable hard drives, magnetic disks, or optical disks. In some jurisdictions, according to legislation and patent practice, computer-readable media cannot be electrical carrier signals or telecommunication signals.

[0142] In the above embodiments, the descriptions of each embodiment have different focuses. For parts that are not described in detail or recorded in a certain embodiment, please refer to the relevant descriptions of other embodiments.

[0143] Those skilled in the art will recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, or a combination of computer software and electronic hardware. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0144] In the embodiments disclosed in this application, it should be understood that the disclosed devices / terminal equipment and methods can be implemented in other ways. For example, the device / terminal equipment embodiments described above are merely illustrative. For instance, the division of modules or units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple units or components may be combined or integrated into another system, or some features may be ignored or not executed. Furthermore, the displayed or discussed mutual coupling or direct coupling or communication connection may be through some interfaces; the indirect coupling or communication connection between devices or units may be electrical, mechanical, or other forms.

[0145] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.

Claims

1. A global deployment decision-making method for virtual objects based on artificial intelligence, characterized in that, The method specifically includes: determining a first set of virtual objects; establishing a combat database for each first virtual object in the first set of virtual objects; granting a second virtual object access to the combat database of each first virtual object; the first virtual object being a soldier AI and the second virtual object being a commander AI; based on the combat database, enabling the second virtual object to acquire the role data of each first virtual object; then, based on the battlefield elements of the current battlefield and the role data of each first virtual object, determining a third set of virtual objects and the deployment arrangement of each third virtual object in the current battlefield; the third virtual object being the first virtual object that will be deployed in this battle; performing a combined score based on the movement range or combat range of each third virtual object, current grid, combat target, similar combat history data, body factors, special game events, and the action prediction and command orders of the second virtual object to determine the current round action of each third virtual object; recording the operation score of the current round action of each third virtual object; and determining the next round action of each third virtual object based on the operation score, where the operation score is the reduction of the combat target's health caused by the current round action.

2. The method according to claim 1, characterized in that, The process involves, based on the combat database, enabling the second virtual object to acquire the character data of each first virtual object, and then, based on the battlefield elements of the current battlefield and the character data of each first virtual object, determining the third virtual object set and the deployment arrangement of each third virtual object in the third virtual object set on the current battlefield. Specifically, this includes: acquiring the battlefield elements of the current battlefield, including battlefield victory conditions, maximum number of players, battlefield mechanisms, general battlefield status effects, map size, and terrain factors; enabling the second virtual object to acquire the character data of each first virtual object based on the combat database, obtaining a comprehensive battlefield element score based on the battlefield elements and the character data of each first virtual object; obtaining a comprehensive character score based on each first virtual object's historical battlefield win rate, counter-relationships, attribute comparisons, special storyline relationships, and lineup relationships; and determining the third virtual object set and the deployment position of each third virtual object in the third virtual object set based on the comprehensive character score and the comprehensive battlefield element score. The third virtual object set is a collection of several first virtual objects that will be deployed in this battle.

3. The method according to claim 2, characterized in that, The process of obtaining a comprehensive battlefield element score based on the battlefield elements and the role data of each first virtual object specifically includes: determining the battlefield victory conditions based on the battle type of the current battle; comparing the win rate and appearance rate based on the battlefield victory conditions and the role data of each first virtual object to obtain a first battlefield element score; determining the first virtual object related to the battlefield mechanism based on the battlefield mechanism and the role data of each first virtual object to obtain a second battlefield element score; obtaining a third battlefield element score based on the degree of influence of the general battlefield status effect on the attributes of each first virtual object; determining the degree of direct confrontation tendency of the current battle based on the map size, and then determining a suitable first virtual object based on the role data of each first virtual object to obtain a fourth battlefield element score; obtaining a fifth battlefield element score based on the compatibility between the terrain factor and each first virtual object; and obtaining a comprehensive battlefield element score based on the maximum number of players, the first battlefield element score, the second battlefield element score, the third battlefield element score, the fourth battlefield element score, and the fifth battlefield element score.

4. The method according to claim 3, characterized in that, The step of obtaining a fifth battlefield element score based on the compatibility between the terrain factors and each first virtual object specifically includes: determining the total number of grids in the current battlefield and the grid type of each grid based on the terrain factors; and determining a grid scoring formula based on the relationship between each first virtual object and each grid, and the total number of grids, wherein the grid scoring formula satisfies... Where y represents the score of the first virtual object on each grid in this battle. This indicates the total number of grid cells in the current battlefield. This represents the win rate of the first virtual object landing on a square. This represents the win rate of the first virtual object that fits the current grid type, where A and B are weighting coefficients and respectively represent... and Impact on overall score; determine the score of the fifth battlefield element based on the grid scoring formula and the role data of each first virtual object.

5. The method according to claim 2, characterized in that, The process of obtaining a comprehensive character score based on the historical battlefield win rate, counter-relationships, attribute comparisons, special storyline relationships, and team composition relationships of each first virtual object specifically includes: determining the historical battlefield win rate of each first virtual object in the current battlefield based on the combat database to obtain a first character score; determining the first virtual object in the set that has a counter-relationship with the combat target based on the deployment of the combat target to obtain a second character score; comparing the basic attributes and growth attributes of each first virtual object with the combat target, and then scoring the attributes to obtain a third character score; determining the first virtual object with a special storyline relationship to obtain a fourth character score; obtaining the team composition relationships between each first virtual object, sorting them according to the benefits of the team composition relationships to obtain a fifth character score; and obtaining a comprehensive character score based on the first character score, the second character score, the third character score, the fourth character score, and the fifth character score.

6. The method according to claim 1, characterized in that, The process of determining the current round action of each third virtual object by summing its scores based on the movement or combat range, current grid, combat target, similar combat history data, physical factors, special game events, and the action prediction and command commands of the second virtual object, specifically includes: determining the movement or combat range of each third virtual object; scoring each third virtual object based on its current grid and the combat target that generated the combat action to obtain a first action score; obtaining similar combat history data between each third virtual object and the combat target from the combat database to obtain a second action score; summing the first action score and the second action score based on physical factors and special game events to obtain a third action score; enabling each third virtual object to obtain the second virtual object's action predictions between each third virtual object and the combat target within a preset number of future rounds to obtain a fourth action score; obtaining a fifth action score based on the command commands of the second virtual object and the counter-value of each third virtual object; and determining the current round action of each third virtual object based on the third action score, the fourth action score, and the fifth action score.

7. The method according to claim 6, characterized in that, The process of scoring each third virtual object's current grid and the combat target that generates the combat action to obtain a first action score specifically includes: obtaining the grid type of each third virtual object's current grid and the combat target that generates the combat action; summing the scores based on the grid type and the number of grid types of each third virtual object's current grid to obtain a sixth action score; obtaining a seventh action score based on the attributes, skills, equipment of the combat target, and the status effects between the combat target and each third virtual object; and determining the first action score based on the sixth action score and the seventh action score.

8. A global deployment decision-making device for virtual objects based on artificial intelligence, characterized in that, The device specifically includes: a combat database module, used to determine a first set of virtual objects, establish a combat database for each first virtual object in the first set of virtual objects, and grant second virtual objects access to the combat database of each first virtual object, wherein the first virtual objects are soldier AIs and the second virtual objects are commander AIs; a pre-battle analysis module, used to enable the second virtual objects to obtain the role data of each first virtual object based on the combat database, and then determine a third set of virtual objects and the deployment arrangement of each third virtual object in the current battlefield based on the battlefield elements of the current battlefield and the role data of each first virtual object, wherein the third virtual objects are the first virtual objects that will be deployed in this battle; a mid-battle analysis module, used to perform a summative score based on the movement range or combat range of each third virtual object, the current grid, the combat target, similar combat history data, body factors, special game events, and the action prediction and command orders of the second virtual objects, to determine the current round action of each third virtual object; and a post-battle analysis module, used to record the operation score of the current round action of each third virtual object, and determine the next round action of each third virtual object based on the operation score, wherein the operation score is the reduction of the combat target's health caused by the current round action.

9. A computer device, characterized in that, include: A memory and a processor, and a computer program stored in the memory, which, when executed on the processor, implements a global deployment decision method for virtual objects based on artificial intelligence as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, It stores a computer program, which, when executed by a processor, implements the global deployment decision method for virtual objects based on artificial intelligence as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Object matching method and device, storage medium, computer program product and electronic equipment

    CN113713379A

  • Decision model training method and device, computer equipment and storage medium

    CN114404976A