CN114832372B - High-efficiency simulation marble AI simulation method based on evaluation function - Google Patents

High-efficiency simulation marble AI simulation method based on evaluation function Download PDF

Info

Publication number
CN114832372B
CN114832372B CN202210571139.6A CN202210571139A CN114832372B CN 114832372 B CN114832372 B CN 114832372B CN 202210571139 A CN202210571139 A CN 202210571139A CN 114832372 B CN114832372 B CN 114832372B
Authority
CN
China
Prior art keywords
simulation
score
nth
evaluation function
skill
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN202210571139.6A
Other languages
Chinese (zh)
Other versions
CN114832372A (en
Inventor
余田
董沛儒
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Changyu Spacetime Network Technology Co ltd
Original Assignee
Shenzhen Changyu Spacetime Network Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Changyu Spacetime Network Technology Co ltd filed Critical Shenzhen Changyu Spacetime Network Technology Co ltd
Priority to CN202210571139.6A priority Critical patent/CN114832372B/en
Publication of CN114832372A publication Critical patent/CN114832372A/en
Application granted granted Critical
Publication of CN114832372B publication Critical patent/CN114832372B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/45Controlling the progress of the video game
    • A63F13/46Computing the game score
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/40Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment
    • A63F13/42Processing input control signals of video game devices, e.g. signals generated by the player or derived from the environment by mapping the input signals into game commands, e.g. mapping the displacement of a stylus on a touch screen to the steering angle of a virtual vehicle
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F13/00Video games, i.e. games using an electronically generated display having two or more dimensions
    • A63F13/70Game security or game management aspects
    • A63F13/79Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories
    • A63F13/798Game security or game management aspects involving player-related data, e.g. identities, accounts, preferences or play histories for assessing skills or for ranking players, e.g. for generating a hall of fame
    • AHUMAN NECESSITIES
    • A63SPORTS; GAMES; AMUSEMENTS
    • A63FCARD, BOARD, OR ROULETTE GAMES; INDOOR GAMES USING SMALL MOVING PLAYING BODIES; VIDEO GAMES; GAMES NOT OTHERWISE PROVIDED FOR
    • A63F2300/00Features of games using an electronically generated display having two or more dimensions, e.g. on a television screen, showing representations related to the game
    • A63F2300/60Methods for processing data by generating or executing the game program
    • A63F2300/61Score computation
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02TCLIMATE CHANGE MITIGATION TECHNOLOGIES RELATED TO TRANSPORTATION
    • Y02T90/00Enabling technologies or technologies with a potential or indirect contribution to GHG emissions mitigation

Abstract

The invention discloses an efficient simulation marble AI simulation method based on an evaluation function. By adopting the marble AI simulation method provided by the invention, the problem of AI simulation requirements under the conditions that a strategy result cannot be estimated and a space is infinitely solved in a complex process can be solved. The invention greatly saves the planning engineering quantity of developers for the AI process, and can flexibly regulate and control the evaluation function for the demand of simulation AI so as to lead the AI to show different behavior modes, thereby being more simulation and intelligent. Meanwhile, compared with the traditional three schemes, the technology is lower in development and maintenance cost. Furthermore, the technology has very high expansibility, and besides physical ejection games, the scheme can be suitable for AI requirements with complex and uncontrollable processes and particularly large solving space.

Description

High-efficiency simulation marble AI simulation method based on evaluation function
Technical Field
The invention relates to the technical field of game production engine software and development systems, in particular to a high-efficiency simulation marble AI simulation method based on an evaluation function.
Background
AI techniques currently used in network games are generally as follows:
FSM (Finite State Machine)
Generally, the method is used for simple AI, uses different states and state switching to describe and control the AI behavior, and has the disadvantages of difficult realization and maintenance and limited use scene for complex requirements.
Behavior Tree behavior Tree
The basic principle is to abstract the logic required to control AI into different node types, including behavior nodes, condition nodes, combination nodes, modification nodes, etc., and then organize these nodes in a tree, and when an AI decision is needed, traverse the tree from top to bottom until a eligible leaf node (behavior) is found and then execute it.
Compared with a state machine, the behavior tree has the advantages of clearer logic, better abstract packaging, more suitability for more complex AI requirements and current mainstream AI implementation mode. The disadvantage is that the performance burden is heavy due to the principle of traversing the tree, and meanwhile, after the AI requirement scale is enlarged, the complexity of the behavior tree is still very high, and the maintenance cost is also high.
GOAP
For the demand of further complexity, the complexity of the behavior tree also rises sharply, and for some more flexible application scenarios, the GOAP is a more suitable AI decision manner. The feature of GOAP is to let the AI decision system make the best solution by itself, given the goals and behaviors, rather than limiting the way state switches as in behavior trees. Meanwhile, each behavior changes the state of the world, so that the method has certain adaptivity.
Compared with a state machine and a behavior tree, the GOAP scheme relieves the energy of developers from the switching planning of states, decouples the targets and the behaviors, and has higher flexibility in AI. However, GOAP has its disadvantages, and planning by GOAP is performed at runtime, which has a certain impact on performance. Meanwhile, controllability is relatively weak, and AI behaviors outside the planning are easy to occur.
The three methods are mainstream AI implementation methods at present, and are generally used in a situation where a solution space is limited, and when the number of behavior choices of the AI is too large and a result is difficult to plan, the above-mentioned schemes cannot be well applied. Taking a pinball game project as an example, if a battle AI is to be made, the AI needs to select one transmitting direction from 360-degree directions, and a collision result after transmission is physically simulated, so that the collision result is difficult to estimate, and the situation is complicated and changeable. Since the transmit directions are continuous, the solution space is equal to infinity and cannot be planned across possibilities. None of the three conventional schemes described above achieve a very effective and efficient immersive AI.
Thus, the prior art is deficient and needs improvement.
Disclosure of Invention
The invention aims to overcome the defects of the prior art and provides an efficient simulation marble AI simulation method based on an evaluation function.
The technical scheme of the invention is as follows: the high-efficiency simulation marble AI simulation method based on the evaluation function comprises the following steps:
step 1: simulating a battlefield, and carrying out AI simulation operation;
step 2: after the AI simulation operation is finished, respectively calculating the score condition of single operation according to each numerical value generated by the operation and the weight of the numerical value by taking the result as the guide through an evaluation function;
and step 3: according to the score condition obtained in the step 2, calculating the simulation degree of the simulation, including the behavior characteristics which are planned by the developer and are close to the real operation and the behavior characteristics which are not similar to the real operation, and scoring the characteristic behaviors;
and 4, step 4: calculating or comparing and analyzing according to the weight to obtain a final score, namely the optimal solution of the simulation AI;
and 5: and applying the obtained optimal solution to AI actual operation.
Further, the specific steps of step 1 are:
step 1.1: preparing N AI battlefields, and putting into simulation operation;
step 1.2: when the AI needs to make a decision, copying the current battlefield situation into the AI battlefield;
step 1.3: the AI selects n directions from 360 degrees directions to carry out operation execution;
step 1.4: the AI manager records various data in the execution process as the calculation basis of a subsequent evaluation function;
step 1.5: and when all units of the AI battlefield stop, ending the simulation and entering the next stage.
Further, the specific steps of calculating the score in step 2 are as follows:
step 2.1: taking the current nth execution operation, including a collision score, a skill score or a reply score, and respectively calculating the score condition;
step 2.2: the nth collision score is Collide (n) = collision injury = offensive power of injured ball;
step 2.3: the nth Skill score Skill (n) = Skill effect value = effect weight × the force of attack by effect ball;
step 2.4: the nth recovery score is Heal (n) = treatment amount = treatment weight × subject's offensive power.
Further, the step 3 of simulating truth and scoring specifically comprises the following steps:
step 3.1: taking the current as the nth time of adding score, and then scoring the nth time of fidelity degree
Simulate (n) = (colloid (n) × beat addition + Skill (n) × Skill effect addition × beat addition + Heal (n)) × nth scoring weight;
step 3.2: current direction this simulation total score is total (n) = Simulate (1) + Simulate (2) +. + Simulate (n).
By adopting the scheme, the Marble AI simulation method provided by the invention can solve the problem of AI simulation requirements under the conditions that a strategy result cannot be estimated and a space is not solved infinitely in a complex process. The invention greatly saves the planning engineering quantity of developers for the AI process, and can flexibly regulate and control the evaluation function for the demand of simulation AI so as to lead the AI to show different behavior modes, thereby being more simulation and intelligent. Meanwhile, compared with the traditional three schemes, the technology is lower in development and maintenance cost. Furthermore, the technology has very high expansibility, and besides physical ejection games, the scheme can be suitable for AI requirements with complex and uncontrollable processes and particularly large solving space.
Detailed Description
The present invention will be described in detail with reference to specific examples.
The invention provides an evaluation function-based high-efficiency simulation marble AI simulation method, which comprises the following steps:
step 1: and simulating a battlefield and carrying out AI simulation operation. The method comprises the following specific steps:
step 1.1: preparing N AI battlefields, and putting into simulation operation;
step 1.2: when the AI needs to make a decision, copying the current battlefield situation into the AI battlefield;
step 1.3: the AI selects n directions from 360 degrees directions to carry out operation execution;
step 1.4: the AI manager records various data in the execution process as the calculation basis of a subsequent evaluation function;
step 1.5: and when all units of the AI battlefield stop, ending the simulation and entering the next stage.
First, N AI battlefields are prepared in advance, and when the decision is needed in the turn of AI rounds, the current actual battlefield situation is copied into the AI battlefield. The AI then selects n directions from the 360 degree directions for transmission. The simulation speed after transmission can be different from that of formal combat, so as to accelerate the simulation time. During the simulation, the AI manager records all important data, such as the number of collisions, the number of collisions at the edge of the battlefield, etc., as a basis for the calculation of the subsequent evaluation function. And when the simulation of all units in the AI battlefield is finished, entering the next stage. The AI battlefield number N and the direction number N may be adjusted freely according to the specific situation such as performance, and the larger N or N is, the more accurate the AI result is, and the smaller N or N is, the less performance consumption is.
Step 2: after the AI simulation operation is finished, the evaluation function takes the result as the guide, and the score condition of the single operation is respectively calculated according to each numerical value generated by the operation and the weight of the numerical value. The specific steps for calculating the score condition are as follows:
step 2.1: taking the current nth execution operation, including a collision score, a skill score or a reply score, and respectively calculating the score condition;
step 2.2: the nth collision score is Collide (n) = collision injury = offensive power of injured ball;
step 2.3: the nth Skill score Skill (n) = Skill effect value = effect weight × the force of attack by effect ball;
step 2.4: the nth recovery score is Heal (n) = treatment amount = treatment weight × subject's offensive power.
And step 3: and (3) calculating the simulation degree of the simulation according to the score obtained in the step (2), wherein the simulation degree comprises the behavior characteristics which are planned by the developer and approximate to the real operation and the behavior characteristics which are not planned by the real operation, and the characteristic behaviors are scored. The simulation scoring specifically comprises the following steps:
step 3.1: taking the current as the nth time, and then the nth simulation degree is scored
Simulate (n) = (colloid (n) × beat addition + Skill (n) × Skill effect addition × beat addition + Heal (n)) × nth scoring weight;
step 3.2: current direction this simulation total score is total (n) = Simulate (1) + Simulate (2) +. + Simulate (n).
And 4, step 4: and calculating or comparing and analyzing according to the weight to obtain a final score, namely the optimal solution of the simulation AI.
And 5: and applying the obtained optimal solution to the AI actual operation.
After the simulation is finished, the evaluation function is calculated according to the situation in the simulation, the direction of the optimal solution is selected, and the method is applied to AI actual operation. The evaluation function is composed of two parts, namely a result-oriented evaluation function part, the actual benefits are concerned, such as total damage to an enemy caused by the operation, total blood volume returned by the enemy, skill effect and the like, and each value has different weights so as to reflect the influence degree of the different values on the final win. And the other part of the evaluation function calculates the simulation degree of the simulation, comprises the behavior characteristics which are planned by the developer and approximate to the real operation and are not similar to the real operation, scores the characteristic behaviors, and finally calculates the final score by a weight to obtain the optimal solution of the simulation AI. The method comprises the following specific steps:
for the resulting oriented evaluation function, assume that the current is the nth collision, the nth collision score Collide (n) = collision injury × force of attack of injured ball, the nth Skill score Skill (n) = Skill effect value × effect weight = force of attack of affected ball, and the nth recovery blood volume score Heal (n) = treatment volume = treatment weight = force of attack of treated person.
In addition to the weight plus the unit attack force, the unit attack force acts as a scale for the unit strength and the degree of importance, and thus each benefit is multiplied by the unit attack force to carry the weight embodiment of AI for the target selection.
The next step is the plausibility evaluation function, which scores Simulate (n) = (Collide (n) × beat addition + Skill (n) × Skill effect addition × beat addition + Heal (n)) × the nth additive weight, assuming that it is the nth additive. When there is no beat condition, the beat is added to =1; when there is a beat condition, the beat is added to = the beat weight for the hero.
The implication of multiplying the immersive function by the nth scoring weight is that if there is unreasonable wall-strike rebound and hitting an enemy after hitting a teammate, which is not a real operation, then the AI is not favored for this choice because as n increases, the scoring weight decreases, and the overall score decreases.
Finally, the current direction simulates this time the total score = Simulate (1) + Simulate (2) +.. Simulate (n). (n = number of collision scores)
And respectively comparing the total scores of the N directions, wherein the direction with the highest score is the optimal solution of the operation of the most simulation player.
In summary, the marbles AI simulation method provided by the invention can solve the AI simulation requirement problem under the conditions that the strategy result cannot be estimated and the space is infinitely solved in the complex process. The invention greatly saves the planning engineering quantity of developers for the AI process, and can flexibly regulate and control the evaluation function for the demand of simulation AI, so that the AI can show different behavior modes and is more simulation and intelligent. Meanwhile, compared with the traditional three schemes, the technology is lower in development and maintenance cost. Furthermore, the technology has very high expansibility, and besides physical ejection games, the scheme can be suitable for AI requirements with complex and uncontrollable processes and particularly large solving space.
The present invention is not limited to the above preferred embodiments, and any modifications, equivalent substitutions and improvements made within the spirit and principle of the present invention should be included in the protection scope of the present invention.

Claims (1)

1. An efficient simulation pinball AI simulation method based on an evaluation function is characterized by comprising the following steps:
step 1: simulating a battlefield, and carrying out AI simulation operation; the method comprises the following specific steps:
step 1.1: preparing N AI battlefields, and putting into simulation operation;
step 1.2: when the AI needs to make a decision, copying the current battlefield situation into the AI battlefield;
step 1.3: the AI selects n directions from 360 degrees directions to carry out operation execution;
step 1.4: the AI manager records various data in the execution process as the calculation basis of a subsequent evaluation function;
step 1.5: when all units of the AI battlefield stop, after the simulation is finished, entering the next stage;
step 2: after the AI simulation operation is finished, respectively calculating the score condition of single operation according to each numerical value generated by the operation and the weight of the numerical value by taking the result as the guide through an evaluation function; the specific steps for calculating the score condition are as follows:
step 2.1: taking the current nth execution operation, including a collision score, a skill score or a reply score, and respectively calculating the score condition;
step 2.2: the nth collision score is Collide (n) = collision injury = offensive power of injured ball;
step 2.3: the nth Skill score Skill (n) = Skill effect value = effect weight × the force of attack by effect ball;
step 2.4: the nth recovery blood volume score is Heal (n) = treatment volume treatment weight for the offensive power of the person to be treated;
and step 3: according to the score condition obtained in the step 2, calculating the simulation degree of the simulation, including the behavior characteristics which are planned by the developer and are close to the real operation and the behavior characteristics which are not similar to the real operation, and scoring the characteristic behaviors; the simulation scoring specifically comprises the following steps:
step 3.1: taking the current as the nth time of the bonus, the nth time of the plausibility degree is scored as Simulte (n) = (colloid (n) × beat addition + Skill (n) × Skill effect addition + Heal (n)) × nth time of the bonus weight;
step 3.2: current direction this simulation total score is total (n) = Simulate (1) + Simulate (2) +. + Simulate (n);
and 4, step 4: calculating or comparing and analyzing according to the weight to obtain a final score, namely the optimal solution of the simulation AI;
and 5: and applying the obtained optimal solution to the AI actual operation.
CN202210571139.6A 2022-05-24 2022-05-24 High-efficiency simulation marble AI simulation method based on evaluation function Active CN114832372B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202210571139.6A CN114832372B (en) 2022-05-24 2022-05-24 High-efficiency simulation marble AI simulation method based on evaluation function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202210571139.6A CN114832372B (en) 2022-05-24 2022-05-24 High-efficiency simulation marble AI simulation method based on evaluation function

Publications (2)

Publication Number Publication Date
CN114832372A CN114832372A (en) 2022-08-02
CN114832372B true CN114832372B (en) 2023-02-10

Family

ID=82572392

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202210571139.6A Active CN114832372B (en) 2022-05-24 2022-05-24 High-efficiency simulation marble AI simulation method based on evaluation function

Country Status (1)

Country Link
CN (1) CN114832372B (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6347999B1 (en) * 1999-11-18 2002-02-19 Jay C. Yuan Pinball simulator game system
JP2010125115A (en) * 2008-11-28 2010-06-10 Konami Digital Entertainment Co Ltd Game device, method of controlling game device, and program
CN111054075A (en) * 2019-12-24 2020-04-24 北京像素软件科技股份有限公司 Control method and device of virtual object and electronic equipment
CN113144590A (en) * 2021-03-23 2021-07-23 苏州乐志软件科技有限公司 Artificial intelligence engine based on AI Designer

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108646589B (en) * 2018-07-11 2021-03-19 北京晶品镜像科技有限公司 Combat simulation training system and method for attacking unmanned aerial vehicle formation

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US6347999B1 (en) * 1999-11-18 2002-02-19 Jay C. Yuan Pinball simulator game system
JP2010125115A (en) * 2008-11-28 2010-06-10 Konami Digital Entertainment Co Ltd Game device, method of controlling game device, and program
CN111054075A (en) * 2019-12-24 2020-04-24 北京像素软件科技股份有限公司 Control method and device of virtual object and electronic equipment
CN113144590A (en) * 2021-03-23 2021-07-23 苏州乐志软件科技有限公司 Artificial intelligence engine based on AI Designer

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
《基于强化学习与深度强化学习的游戏AI训练》;Alex_SCY;《https://blog.csdn.net/pigpigpig64/article/details/118976302》;20210721;第1-5页 *

Also Published As

Publication number Publication date
CN114832372A (en) 2022-08-02

Similar Documents

Publication Publication Date Title
Churchill et al. Fast heuristic search for RTS game combat scenarios
Smith et al. RETALIATE: Learning winning policies in first-person shooter games
Sailer et al. Adversarial planning through strategy simulation
CN100481003C (en) Intelligent non-player roles implementing method and system in interactive game
Churchill et al. Incorporating search algorithms into RTS game agents
Hwang et al. Cooperative strategy based on adaptive Q-learning for robot soccer systems
Jaidee et al. Case-based goal-driven coordination of multiple learning agents
Weber et al. Case-based reasoning for build order in real-time strategy games
Lee et al. Showdown AI competition
Cardamone et al. Applying cooperative coevolution to compete in the 2009 torcs endurance world championship
Ponsen et al. Automatically acquiring domain knowledge for adaptive game AI using evolutionary learning
CN114832372B (en) High-efficiency simulation marble AI simulation method based on evaluation function
Neufeld et al. HTN fighter: Planning in a highly-dynamic game
Pelling et al. Two human-like imitation-learning bots with probabilistic behaviors
CN113509726A (en) Interactive model training method and device, computer equipment and storage medium
Adhikari et al. Co-evolving real-time strategy game micro
Chu et al. Combining pathfmding algorithm with Knowledge-based Monte-Carlo tree search in general video game playing
Yen et al. The art of the Chinese dark chess program DIABLE
Andrea et al. Developing battle of Etam earth game agent with finite state machine (FSM) and sugeno fuzzy
Ali et al. Evolving emergent team strategies in robotic soccer using enhanced cultural algorithms
de Albuquerque Siebra et al. Evolving the behavior of autonomous agents in strategic combat scenarios via SARSA reinforcement learning
Bangay et al. Modelling attribute dependencies in single unit game combat settings
Cheng et al. YuShan2022 Team Description Paper for RoboCup2022
Bezerra et al. Development of an autonomous agent based on reinforcement learning for a digital fighting game
Atalla et al. Improving testing of multi-unit computer players for unwanted behavior using coordination macros

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant