CN112619125B - Application method of game artificial intelligent module and electronic equipment - Google Patents

Application method of game artificial intelligent module and electronic equipment Download PDF

Info

Publication number
CN112619125B
CN112619125B CN202011628597.6A CN202011628597A CN112619125B CN 112619125 B CN112619125 B CN 112619125B CN 202011628597 A CN202011628597 A CN 202011628597A CN 112619125 B CN112619125 B CN 112619125B
Authority
CN
China
Prior art keywords
game
behavior
map
module
unit
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
CN202011628597.6A
Other languages
Chinese (zh)
Other versions
CN112619125A (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 Idreamsky Technology Co ltd
Original Assignee
Shenzhen Idreamsky 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 Idreamsky Technology Co ltd filed Critical Shenzhen Idreamsky Technology Co ltd
Priority to CN202011628597.6A priority Critical patent/CN112619125B/en
Publication of CN112619125A publication Critical patent/CN112619125A/en
Application granted granted Critical
Publication of CN112619125B publication Critical patent/CN112619125B/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/20Input arrangements for video game devices
    • A63F13/21Input arrangements for video game devices characterised by their sensors, purposes or types
    • A63F13/216Input arrangements for video game devices characterised by their sensors, purposes or types using geographical information, e.g. location of the game device or player using GPS
    • 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/77Game security or game management aspects involving data related to game devices or game servers, e.g. configuration data, software version or amount of memory
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/70Software maintenance or management
    • G06F8/76Adapting program code to run in a different environment; Porting
    • 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/6009Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content
    • A63F2300/6018Methods for processing data by generating or executing the game program for importing or creating game content, e.g. authoring tools during game development, adapting content to different platforms, use of a scripting language to create content where the game content is authored by the player, e.g. level editor or by game device at runtime, e.g. level is created from music data on CD

Landscapes

  • Engineering & Computer Science (AREA)
  • Multimedia (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Software Systems (AREA)
  • Theoretical Computer Science (AREA)
  • Radar, Positioning & Navigation (AREA)
  • Business, Economics & Management (AREA)
  • Computer Security & Cryptography (AREA)
  • General Business, Economics & Management (AREA)
  • Environmental & Geological Engineering (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)
  • Processing Or Creating Images (AREA)

Abstract

The application discloses a use method of a game artificial intelligence module and electronic equipment. The game artificial intelligence module disclosed by the application is used for realizing the intelligent function of the game unit on the map. The artificial intelligence module disclosed by the application can determine the behavior means of the game unit according to the acquired perception information, and the game unit or the map can determine the behavior of the game unit according to the behavior means, so that the game artificial intelligence module decoupled with map data is realized. Furthermore, the artificial intelligent module disclosed by the application can realize cross-map multiplexing, cross-role multiplexing and cross-game unit multiplexing, thereby reducing the workload of developers and improving the working efficiency.

Description

Application method of game artificial intelligent module and electronic equipment
Technical Field
The application relates to the field of artificial intelligence, in particular to a use method of a game artificial intelligence module and electronic equipment.
Background
With the development of computer technology and the continuous improvement of cultural demands of people, games, especially timely strategy games, are sought after by wide players due to their excellent resistance. The resistance of a game is largely dependent on the quality of the decision making behavior of the gaming unit within the game against the player's non-player character.
Currently, the industry is developing games without a separate game artificial intelligence (artificial intelligence, AI) module, but instead integrating game artificial intelligence directly into the map editor. The map editor provides a series of instructions to the developer for instructing the game units of the non-player character to execute fixed instructions such as producing a certain unit, patrol the unit along a specified path, etc.
When a developer generates a game map for game editing, logic control structures such as a timer, condition judgment and the like can be combined with the AI instruction to realize the intelligent function of the non-player character and/or the game unit, and the AI module editing of the game map is completed. When a developer edits and generates another game map for the game, an AI module needs to be manufactured for the new game map again according to a logic control structure in the new game map and by combining an AI instruction.
If a large number of game maps need to be developed for one game, even if many logic control structures in the game maps have similarity, the AI modules in the game maps need to be adjusted and modified one by one in the development process, so that great workload is required for developers, and the development efficiency is very low.
Disclosure of Invention
The application provides a use method of an artificial intelligence module for a game and electronic equipment, which enable an AI module to be multiplexed in a plurality of game maps in one game, reduce the workload of developers and improve the development efficiency.
In a first aspect, the present application provides a method of using a game artificial intelligence module, the method comprising: the electronic equipment loads a first map and a first game artificial intelligent module, wherein the first map comprises a first game unit, and the first game artificial intelligent module is used for realizing the map intelligent function; the electronic device determines a first behavior of the first game unit according to the first game artificial intelligence module; the electronic device loads a second map, the second map comprising a second game unit; the electronic device determines a second behavior of the second game unit according to the first game artificial intelligence module, wherein the first behavior is different from the second behavior.
In the embodiment, the game artificial intelligence modules realizing the game map intelligent function are independent, so that when developing different game maps, developers do not need to repeatedly adjust and modify the game artificial intelligence modules in each game map, and the workload of the developers is reduced.
With reference to some embodiments of the first aspect, in some embodiments, the electronic device determines first perception information of the first game unit according to a field of view of the first game unit; the electronic equipment determines a first behavior means of the first game unit according to the first perception information and the first game artificial intelligence module; the electronic device determines a first behavior of the first game unit according to the first behavior means.
In the above embodiment, the behavior of the game unit is determined by the perception information of the game unit, so that the intelligent function of the game unit can be realized. Compared with the traditional AI and trigger, the intelligent function of the game unit is realized, the intelligent function of the game unit is determined through the perception information of the game unit, the intelligent function of the game unit is more perfect, and the game countermeasure experience of a player can be improved.
With reference to some embodiments of the first aspect, in some embodiments, the electronic device determines second perception information of the second game unit according to a field of view of the second game unit; the electronic equipment determines a second behavior means of the second game unit according to the second perception information and the first game artificial intelligence module; the electronic device determines a second behavior of the first game unit according to the second behavior means.
In the above embodiment, the process of determining the behavior of the game unit by the perception information of the game unit can be implemented independently of the map data. The game unit makes different behaviors on different maps according to different perception information, so that cross-map multiplexing of the game artificial intelligent module is realized, and the workload of game map development is reduced.
With reference to some embodiments of the first aspect, in some embodiments, the electronic device determines a first behavior means of the first game unit according to the first perception information, the first game artificial intelligence module, and a decision parameter, where the decision parameter includes part or all of a game parameter of the first game unit.
In the above embodiments, considering that in some special cases, for example, the electronic device cannot determine the behavior of the game unit according to the sensing information, the electronic device may acquire the game parameters of the game unit for determining the behavior means of the game unit, so that the in-use robustness of the game AI module can be effectively improved.
With reference to some embodiments of the first aspect, in some embodiments, the electronic device determines a third behavior of a third game unit according to the first game artificial intelligence module, where the third game unit is a different game unit on the first map from the first game unit.
In the embodiment, the game AI module can realize multiplexing of the cross-game units, so that the workload of realizing the intelligent function of the game units in the process of developing the game map is further reduced, and the development efficiency is improved.
With reference to some embodiments of the first aspect, in some embodiments, the third gaming unit and the first gaming unit belong to different or the same non-player character.
In the embodiment, the game AI module can realize the intelligent functions of different non-player characters, realize cross-character multiplexing, further reduce the workload of realizing the intelligent functions of the game units when developing the game map, and improve the development efficiency.
With reference to some embodiments of the first aspect, in some embodiments, the first game artificial intelligence module includes a behavior tree and/or a state machine.
In the embodiment, the first game artificial intelligent module can be formed by the action tree and/or the state machine, so that the development difficulty of the game artificial intelligent module is reduced, and the development efficiency is improved.
In a second aspect, an embodiment of the present application provides an electronic device, including: one or more processors and memory; the memory is coupled to the one or more processors, the memory for storing computer program code comprising computer instructions that the one or more processors call for causing the electronic device to perform the method as described in the first aspect and any possible implementation of the first aspect.
In a third aspect, embodiments of the present application provide a chip system for application to an electronic device, the chip system comprising one or more processors for invoking computer instructions to cause the electronic device to perform a method as described in the first aspect and any possible implementation of the first aspect.
In a fourth aspect, embodiments of the present application provide a computer program product comprising instructions which, when run on an electronic device, cause the electronic device to perform a method as described in the first aspect and any possible implementation of the first aspect.
In a fifth aspect, an embodiment of the present application provides a computer readable storage medium comprising instructions which, when executed on an electronic device, cause the electronic device to perform a method as described in the first aspect and any possible implementation manner of the first aspect.
It will be appreciated that the electronic device provided in the second aspect, the chip system provided in the third aspect, the computer program product provided in the fourth aspect and the computer storage medium provided in the fifth aspect described above are all configured to perform the method provided by the embodiment of the present application. Therefore, the advantages achieved by the method can be referred to as the advantages of the corresponding method, and will not be described herein.
Drawings
FIG. 1 illustrates an exemplary schematic diagram of one class of game AI modules in an embodiment of the application.
Fig. 2 shows an exemplary schematic of a method of use of the behavior tree according to the application.
Fig. 3 shows an exemplary schematic diagram of a game AI module architecture of a behavior tree in accordance with the present application.
Fig. 4 shows an exemplary schematic diagram of a behavior tree multiplexing method according to the present application.
Fig. 5 is an exemplary schematic diagram of a prior art game map architecture.
Fig. 6 is a schematic diagram of an exemplary architecture for the intelligent function of the gaming unit 2 of fig. 5.
Fig. 7 is an exemplary schematic diagram of a scenario in the prior art with a gaming unit added.
FIG. 8 is an exemplary schematic diagram of a prior art smart function loading process for a gaming unit.
FIG. 9 is an exemplary schematic diagram of a method of using a game artificial intelligence module according to the present application
Fig. 10 is an exemplary schematic diagram of a game AI module multiplexing scenario in an embodiment of the application.
Fig. 11 is another exemplary schematic diagram of a game AI module multiplexing scenario in an embodiment of the application.
Fig. 12 is a schematic diagram of a usage method of a game AI module according to an embodiment of the present application.
Fig. 13 is a schematic diagram of another usage method of the game AI module according to an embodiment of the present application.
Fig. 14 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
Fig. 15 is a schematic block diagram of a software structure of the electronic device 100 according to the embodiment of the present application.
Fig. 16 is another schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
Detailed Description
The terminology used in the following embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the application. As used in the specification of the present application and the appended claims, the singular forms "a," "an," "the," and "the" are intended to include the plural forms as well, unless the context clearly indicates to the contrary. It should also be understood that the term "and/or" as used in this disclosure refers to and encompasses any or all possible combinations of one or more of the listed items.
The terms "first," "second," and the like, are used below for descriptive purposes only and are not to be construed as implying or implying relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include one or more such feature, and in the description of embodiments of the application, unless otherwise indicated, the meaning of "a plurality" is two or more. The terminology used in the description of the embodiments of the application herein is for the purpose of describing particular embodiments of the application only and is not intended to be limiting of the application.
For ease of understanding, related terms and related concepts related to the embodiments of the present application are described below.
(1) Game AI module:
in the embodiment of the application, the game AI module is a module for realizing the intelligent function of the game unit or a module for realizing the intelligent function of the non-player character.
Wherein the intelligent function of the game unit includes that the game unit can autonomously make at least one action without receiving an instruction of the player. Such as attacks by gaming units, escapes, etc.
Wherein the intelligent function of the non-player character comprises the non-player character controlling the game unit of the non-player character to make at least one action from a strategy level. For example, a non-player character indicates that multiple game units are moving, etc.
The intelligentized function of the game unit may be dependent upon or independent of the intelligentized function of the non-player character.
For ease of description, the intellectualization of the map is considered to include the intellectualization functions of the non-player characters and the intellectualization functions of the game units on the map.
The game AI module is a system comprising a decision model and a behavior means set. The input of the system includes perceptual information, and the system may select a decision model based on the perceptual information and determine and output at least one behavioral means from a set of behavioral means based on the decision model. The output of the game AI module is a pre-programmed means of behavior that can occur with the in-game gaming unit. The behavioral means that can occur are defined as: in the case of a game map or a game scene, the game unit may determine at least one behavior means from the perception information, and the game unit may make at least one specific behavior according to the at least one behavior means.
The game AI module may not have the self-learning feature similar to that provided by machine learning. The perceived information that can be obtained by the game AI module is limited and determined, i.e. the decision model that the game AI module can select is also limited and determined, i.e. the determinable behavioural means of the game AI is also limited and determined.
In an embodiment of the application, the game AI module is provided with an interface, and the interface is used for data interaction. The data interactions include a wide variety of data interactions, such as receiving sensory information, sending behavioral means, and the like, and are not limited herein. Correspondingly, an interface is configured on the game map, and the interface is used for data interaction. Thus, the game map may interact with the game AI module for data interaction.
In some embodiments of the application, the game unit and/or the non-player character are configured with an interface for data interaction. Therefore, the game map, the game AI module, the game unit and the non-player character can mutually interact with each other in data.
In embodiments of the present application, the game AI module may be configured to implement intelligent functionality of different game units within a single map and/or the same game unit across multiple maps and/or different game units across multiple maps.
The following describes the above related concepts in detail:
1.1 gaming units: the most basic unit in the game map is also the smallest unit in the game map responsible for executing the behavior means determined by the game AI module.
For example, the gaming units may include gaming units, terrain, items, and the like. Wherein the game units may appear as player characters or characters that are not controllable by the player characters in the game scene or game map. The character may be a soldier, a group of tanks, etc.
The game parameters are basic parameters of the game units, and are used for distinguishing different types of game units, such as buildings and scouts, which are configured with different game parameters, and thus are different game units.
The non-player character to which the game unit belongs can acquire all the game parameters of the game unit.
1.2 perception information: some or all of the game parameters of all of the game units (including the game units themselves) within the field of view of the game units and/or non-player characters.
The field of view of the game unit may take a variety of forms, and is not limited herein. For example, the field of view of the gaming unit may be the field of view of the gaming unit itself, or may be a union of the fields of view of the gaming unit and other gaming units sharing the field of view.
The field of view of the game unit may be determined in a variety of ways, and is not limited herein. For example, the position of the game unit is taken as the center of a circle, and the range covered by a sphere with radius r is taken as the visual field range of the game unit, wherein r is a positive number; or the position of the game unit as the origin, a visual distance and a visual angle are specified, and a range determined by the origin, the visual distance and the visual angle is used as the visual field range of the game unit.
The perception information can be different according to different game rules designed by the game map in the game body. For example, in a game map, the perceived information includes only the vital value of the game unit within the field of view of the game unit; alternatively, in the game map, the perceived information includes only the vital value, the offensiveness, and the offensiveness of the game unit within the visual field of the game unit.
Similarly, the field of view of a non-player character is the union of the fields of view of the game units that the non-player character controls.
Similarly, the manner in which the field of view of the non-player character is determined may be referred to as the manner in which the field of view of the game unit is determined, and will not be described in detail herein.
It should be noted that the perception information may be determined by the game AI module, determined by the game unit and/or the non-player character, or determined by the game map and then communicated to the game AI module.
It should be noted that, in order to diversify the quality of the intelligentized functions of different non-player characters, after one game AI module is developed, parameters of a decision model in the game AI module can be adjusted to realize the intelligentized functions of the non-player characters with various difficulty levels.
1.3 decision model: is a model for determining the means of behavior. The input of the model may include perceptual information. The output of the decision model is to select at least one action from the actions in the game AI module. There may be at least one decision model in one game AI module.
The decision model may be constructed by a variety of methods, not limited herein. For example, the decision model may be constructed by a behavior tree, state machine, or the like; the decision model can also be constructed by neural network, deep learning, etc. The concept of the behavior tree may refer to the content in the behavior tree (2) in term interpretation, and will not be described herein.
After the game AI module obtains the perception information and inputs the perception information into the decision model, the decision model may determine at least one behavior measure from a set of behavior measures in the game AI module.
In some embodiments of the present application, after the game AI module obtains the perception information, other inputs may be required, and the other inputs are decision parameters. In this case, the game AI module requests decision parameters from the game unit, a non-player character to which the game unit belongs, or a game map at least once, and determines a behavior means of the game unit according to the decision parameters.
It will be appreciated that the decision model is independent of the game parameters of the game units, so that different game units may use the same decision model, i.e. different game units may use the same game AI module, thus providing support for the game AI module and the game map to be independent of each other.
It will be appreciated that further, since the decision model is independent of the parameters of the game unit, different non-player characters may use the same decision model, i.e., different non-player characters may use the same game AI module, thus providing support for the game AI module and the game map to be independent of each other.
1.4 means of action: for instructing the gaming unit to make at least one specific action. Wherein, the behaviors comprise a behavior means, a behavior object, a behavior subject and the like. The behavior means are tools and methods of use applied when the behavior subject acts on the behavior object.
The gaming unit, upon acquiring the behavior means determined by the game AI module, may determine at least one behavior that may be performed. The game unit may acquire information in the game map, further acquire a behavior subject and a behavior object, and determine at least one executed behavior according to the received behavior means. Wherein the game unit obtains information in the game map, which information can be determined through an interface provided by the map or scene.
The manner in which the game unit obtains the behavior means includes a plurality of manners, for example, after the game AI module determines the behavior means, the game unit may obtain the behavior means through a map where the game unit is located, or the game unit may obtain the behavior means through a non-player character to which the game unit belongs, which is not limited herein.
The behavior means may take many forms, and are not limited herein. For example, the behavioral means may be attacks, mobile attacks, movements, patrol, run-away, use skills, etc.
The game unit may determine the behavior according to the behavior means, and the non-player character to which the game unit belongs and the game map may determine the game unit performing the behavior and the behavior performed by the game unit according to the behavior means.
It can be appreciated that since the behavior means does not involve a behavior subject, a behavior object, or the like, the behavior means may also be independent of the game parameters of the game unit, i.e., the behavior means is independent of the data on the game map, thereby also providing support for the mutual independence of the game AI module and the game map.
It will be appreciated that the behavior means is independent of the game parameters of the game units, so that different game units can use the same behavior means, providing support for multiplexing of the game AI modules. The concept of game AI module multiplexing may refer to the text description in game AI module multiplexing (3) in term interpretation, and will not be described here again.
1.5 game AI submodule:
the intelligent functions of the game unit can be divided into a plurality of different types of sub-intelligent functions according to different classification standards.
The game AI submodules are modules for realizing the sub-intelligent functions of the game unit, namely, the game AI modules can be synthesized by different types of game AI submodules, namely, the game AI modules can be considered to comprise a plurality of game AI submodules.
In the game development process, different types of game AI sub-modules can be independently developed, and in the intelligent function realization process of different maps, the intelligent function of the map can be realized by combining at least one game AI sub-module. The intelligent function of the map means that the game unit on the map has the intelligent function.
During game play, the game map may implement the intelligent functions of the intelligent non-player characters and/or game units within the map according to the game AI sub-modules.
It can be appreciated that by classifying the intelligent functions, the complexity of developing the game AI module is reduced and the workload of the developer is reduced during the game development process.
Illustratively, in instant strategy games, the game AI modules may be generally divided into class 4 game AI sub-modules:
Global AI submodule: for example, the global AI sub-module may include: and a module for realizing the intelligent functions of resources (such as gold ores, treatment marks, treasures and the like) in the map, game parameters (rich, general, barren and the like) of the topography in the map and the like. The set of behavior means corresponding to the global AI submodule may be related to a specific play within the game, and may not include behavior means of the game unit belonging to the player character or the non-player character, which is not limited herein.
Resource AI submodule: for example, the resource AI sub-module may include: a module for realizing the intelligent functions of game buildings (camping, factories, defensive towers, and the like), game units (hero, soldiers, tanks, and the like), and the like. The set of behavior means corresponding to the resource AI submodule may include the behavior means of the game unit of the non-player character, which is not limited herein.
Group AI (also referred to as general AI) submodule: for example, the population AI submodule may include: and a module for realizing intelligent functions of group states (shield lifting, attack, acceleration and the like), group movements (patrol, exploration and the like) and the like. The set of behavior means corresponding to the group AI submodule may include behavior means of game units belonging to player characters and non-player characters, which are not limited herein. The feature of the set of behavior means corresponding to the group AI is: the main body of the action means in the action means set corresponding to the group AI submodule may be a plurality of game units of the same type.
Unit AI (may also be referred to as soldier AI) submodule: for example, the unit AI submodule may include: a module for realizing the intelligent function of the behavior means (attack, escape, release skills, etc.) of a specific game unit. The set of behavior means corresponding to the unit AI submodule may include a part of behavior means belonging to the robot unit and the player unit, which is not limited herein. The behavior means set corresponding to the unit AI is characterized in that: the main body of the action means in the action means set corresponding to the unit AI submodule may be one game unit.
The game AI modules may also be categorized as: the system comprises a resource management AI sub-module and a war AI sub-module, wherein the behavior means set corresponding to the resource management AI comprises: building a game building, building a game unit, upgrading game technology, and the like, wherein the set of behavior means corresponding to the war AI comprises: specific behavior means of the gaming unit, etc.
It can be appreciated that the game AI module is divided into a plurality of game AI sub-modules, thereby reducing the development effort and workload of implementing the game AI module.
FIG. 1 illustrates an exemplary schematic diagram of one class of game AI modules in an embodiment of the application.
Illustratively, as shown in fig. 1, in a certain game map, a game AI submodule is configured, wherein the game AI submodule comprises three intelligent function types of game AI submodules, including: global AI submodule, AI submodule of robot 1, AI submodule of robot 2. Any of the AI sub-modules may be formed by a behavior tree and/or a state machine.
For example, the AI submodule is composed of a plurality of action trees, wherein the action tree corresponding to the global AI submodule is used for indicating map units in the game unit to finish actions of refreshing static resource points, refreshing dynamic resource points and the like; the behavior tree corresponding to the AI sub-module of the robot 1 is used for indicating the game unit controlled by the robot 1 to finish the behaviors of construction, production, attack and the like; the behavior tree corresponding to the AI submodule of the robot 2 is used for indicating the game unit controlled by the robot 2 to finish the behaviors of building, production, attack and the like.
(2) Behavior tree
2.1 behavior tree:
the action tree is a tree structure, and in the application, the action tree is a action means set of a tree structure of action means for controlling a game unit, namely, the action tree can be used as a minimum implementation unit of a game AI module, namely, can be used as a minimum implementation unit of a game AI sub-module.
The behavioral tree may determine at least one behavioral means based on the entered parameters. A game AI module may be implemented by at least one action tree. A game AI sub-module may be implemented by at least one action tree.
One game unit intelligence function may correspond to one or more action trees. The output of each action tree corresponds to a set of action means of at least one action means, wherein one action means is embodied as one or more specific actions in the game.
Fig. 2 shows an exemplary schematic of a method of use of the behavior tree according to the application.
As shown in FIG. 2, during game play, a loaded behavior tree may be determined according to the configuration of the game ontology, which may act as a game AI module. Data required for operation is collected for each action tree, which may be derived from static data on the game map such as location, game parameters of the game unit, etc., and dynamic data on the game map such as game map time, game parameters of the game unit, etc.
When a game AI sub-module needs to be closed or opened during game development or game running, a behavior tree corresponding to the game AI sub-module can be enabled or disabled.
2.2 structure of behavior tree:
the behavior tree includes nodes of a plurality of node types. There are a variety of classification ways for the nodes of the behavior tree, and this is not a limitation. By way of example, the node types of the nodes of the behavior tree may include: leaf Nodes (Leaf Nodes), non-Leaf Nodes (Non Leaf Nodes). By way of example, the node types of the nodes of the behavior tree may include: composite nodes (composites), decoration nodes (Decorators), condition nodes (Condition), action nodes (actions), etc. A node in the behavior tree may return the running results of the node itself to its parent node, where the running results may include: success, failure, running.
The leaf nodes are nodes without child nodes, and the non-leaf nodes are nodes with child nodes.
The composite node may be many types of nodes in the embodiments of the present application, for example, the composite node may be any one of a sequence node (sequence), a selection node (selactor), a Parallel node (Parallel), and the like. The sequence node can execute the sub-nodes according to the sequence from left to right, when all the sub-nodes return successfully, the sequence node returns successfully, when any sub-node returns failed, the sequence node returns failed, and when the sub-node returns to operate at the operation time sequence node; the selection node can execute the child nodes in a left-to-right sequence, when any child node returns success, the selection node returns success, when all the child nodes return failure, the selection node returns failure, and when the child node returns operation in operation; and the parallel nodes execute all the sub-nodes in turn, and a final return result is determined according to the return values of the sub-nodes. The composite node may be a non-leaf node.
The decoration node may be any of many types of nodes in the embodiment of the present application, for example, the decoration node may be any of an interrupt node (inter), an Inverter node (Inverter), a relay node (Repeater), and the like. The interrupt node is provided with a conditional task, and when the conditional task is true, the interrupt node returns failure; and when the conditional task is false, the interrupt node returns a return result of the child node. When the child node of the inversion node returns successfully, the inversion node fails to return; when the sub node of the inversion node fails to return, the inversion node returns to be successful; when the child node of the inversion node is running, the inversion node returns to running. The relay node may repeatedly execute the child node Num times, or the relay node may repeatedly execute the child node to know that the child node returns a specific value, or the relay node may repeatedly execute its child node all the time.
The condition node is used for executing the judgment of the specific condition, executing the child node when the specific condition is judged to be true, and returning the condition node to be successful when the child node is successful; and when the specific condition is judged to be false, the child node is not executed, and the condition node returns failure.
Fig. 3 shows an exemplary schematic diagram of a game AI architecture of a behavior tree in accordance with the present application.
The behavior tree as shown in fig. 3 includes four non-leaf nodes and four leaf nodes, wherein the child nodes of the root node are parallel nodes. The left child node of the parallel node is the sequence node 1, and the right child node of the parallel node is the sequence node 2. The left child node of the sequence node 1 is the condition 1, and the right child node of the sequence node 1 is the behavior means 1. The left child node of the sequence node 2 is condition 2, and the left child node of the sequence node 2 is behavior means 2.
There are various driving ways for the behavior tree, and the method is not limited herein. For example, the behavior tree may be event driven. In the case where the behavior tree is driven, the root node may receive awareness information for selection decisions. In the behavior tree shown in FIG. 3, the selection decision may be either condition 1 or condition 2. The behavior tree can judge the value of the condition 1 or the condition 2 according to the perception information, and can acquire parameters of which the value of the condition 1 or the condition 2 needs to be judged by requesting decision parameters, so as to judge the value of the condition 1 or the condition 2.
2.3 multiplexing of behavior trees:
the behavior tree can be used as a minimum implementation unit of the game AI, an initialized behavior tree can be divided into at least one independent subtree, other behavior trees can be directly referenced, and subtrees can also be referenced. That is, multiplexing of game AI can be achieved by multiplexing of subtrees.
The sub-tree may be divided in a plurality of ways, which are not limited herein. For example, the partitioning of the subtrees may be in terms of the functional partitioning of the subtree implementation; or the partitioning of the subtrees may be partitioned according to decision parameters required to enter the subtrees, etc.
Fig. 4 shows an exemplary schematic diagram of a behavior tree multiplexing method according to the present application.
As shown in FIG. 4, the behavior tree includes a root node, a parallel node, and left and right children of the parallel node. The left child node of the parallel node is a behavior tree 1, and the right child node is a behavior tree 2. The action tree 1 or the action tree 2 can be an action tree or a subtree of the action tree. The action tree 1 or the action tree 2 is used for participating in a game AI module for constructing a game unit, and is further used for realizing the game AI of the game unit. One behavior tree may reference other behavior trees or subtrees of other behavior trees.
It will be appreciated that multiplexing of the game AI modules may be achieved by multiplexing of sub-trees, wherein the concept of multiplexing of the game AI modules may refer to (3) content multiplexed by the game AI modules in the term explanation, which is not described herein.
2.4 data of behavior tree:
there are various ways of organizing the data of the behavior tree, and the method is not limited herein. For example, the data of the behavior tree may be based on a blackboard (blackboard); or the data of the behavior tree may be based on shared variables. The data of the behavior tree may also be stored on the node.
The behavior tree is based on the blackboard, and subtrees of the behavior tree share the blackboard of the behavior tree, wherein the blackboard is used for storing data. Among them, there are various ways of storing data in the blackboard, and the way is not limited herein. For example, data may be stored in a blackboard by way of key-value pairs. Nodes of the behavior tree may access the blackboard of the behavior tree through agreed fields, for example the fields may be (GroupID, idx).
Based on a behavior tree that shares variables, multiple nodes in the behavior tree may reference the same variable.
The blackboard and the data in the shared variable can communicate between the behavior trees, and support is provided for the behavior trees to realize subtree multiplexing.
For example, a game map includes 6 behavior trees, BT1, BT2, BT3, BT4, BT5, BT6, and each behavior tree creates a corresponding blackboard: BB1, BB2, BB3, BB4, BB5, BB6. Wherein each behavior tree may correspond to a robot, respectively. When the perception information is transferred to the game AI module, the tree that should receive the perception information is BT2, and BT2 saves the information into the corresponding blackboard BB2 or into the shared variable. When the behavior tree or the subtree of the behavior tree is in decision, the data stored in the blackboard or the data stored in the shared variable are read if the perception information is needed; when a decision parameter is in decision, the decision parameter may be required by the action tree or subtree of the action tree, then the decision parameter is requested by the action tree and the received decision parameter is stored in the blackboard or shared variable for decision.
(3) Game AI module multiplexing:
the game AI module multiplexing may include: the at least two game maps can realize the intelligent functions of the game units in the respective game maps according to the same game AI module.
The game AI module multiplexing includes a wide variety of multiplexing manners, for example, the game AI module multiplexing may be cross-map multiplexing, or the game AI module multiplexing may be cross-character multiplexing, or the game AI module multiplexing may be cross-game unit multiplexing. The game AI module multiplexing may include many multiplexing modes, and is not limited herein.
Wherein cross-map multiplexing comprises: in different game maps, the game units and/or non-player characters may implement respective intelligent functions according to the same game AI module.
For example, a campaign for a game includes a first map with game units 1 and a second map with game units 2. In the case of map switching or in the case of multiple maps coexistence, the game unit 1 determines the behavior 1 according to the behavior means 1 determined by the game AI module, and the game unit 2 determines the behavior 2 according to the behavior means 2 determined by the same game AI module. The behavior means 1 and the behavior means 2 may be the same or different. Wherein behavior 1 and behavior 2 are different.
For example, a campaign for a game includes a first map and a second map, where the non-player characters of the first map participating in the game include: robot 1, robot 2, the second map includes: and a robot 3. In the case of map switching or in the case of coexistence of multiple maps, the robot 1, the robot 2, and the robot 3 can each realize the intelligent function of the respective non-player character according to the game AI module.
Wherein the cross-role multiplexing comprises: in the same map, different player characters or non-player character controlled game units use the same game AI module to implement the intelligentized functionality of the game unit, wherein the intelligentized functionality is embodied as at least one specific behavior.
For example, two robot characters and one player character are arranged on a certain map, wherein the robot characters are a robot 1 and a robot 2 respectively, and the robot 1 controls a plurality of game units, including a game unit 1, a game unit 2 and a game unit 3; the robot 2 is controlled with a plurality of game units including a game unit 4, a game unit 5, and a game unit 6. The robot 1 and the robot 2 can determine the behavior means of the respective plurality of game units from the game AI modules, respectively. The robot 1 may determine the behavior means 1 according to the game AI module and transmit the behavior means to the game unit 1 and the game unit 2, and the game unit 1 and the game unit 2 perform the behavior 1 after receiving the behavior means 1.
Wherein multiplexing across gaming units comprises: in the same map or the same game scene, different game units use the same game AI module to realize the intelligent function of the game units, and at least one specific behavior of the different game units can be different.
For example, a map is of the same non-player character as the game unit 1 and the game unit 2, the game unit 1 determines the behavior 1 according to the behavior means 1 determined by the game AI module, and the game unit 2 determines the behavior 2 according to the behavior means 2 determined by the game AI module. The behavior means 1 and the behavior means 2 may be the same or different. Wherein behavior 1 and behavior 2 are different.
It should be noted that, in a map of a game, there may be at least one game AI module for implementing the intelligent function of the map. For a gaming unit, it may implement the intelligentized function of the gaming unit based on at least one game AI module. For at least two game units, it is possible to implement the intelligent function of the game unit in accordance with at least one game AI module.
It will be appreciated that by multiplexing the game AI modules, the workload of game developers in designing and developing games can be greatly reduced. And during subsequent updating and maintenance, the intelligent modules of the plurality of game units can be reconstructed by reconstructing the multiplexed game AI modules.
The method for realizing the intelligent function of the game unit in the prior art is first described below. In order to distinguish the intelligentized functions of the game units in the prior art from the intelligentized functions of the game units and the game AI modules related to the application, an AI editor is used for designating the modules for realizing the intelligentized functions of the traditional game units.
Currently, when developing games, the industry integrates modules for implementing the intelligent functions of the game unit directly into the map editor. The map editor contains all the sub-editors of different function types for generating a map. The map editor may include: object editor, terrain editor, campaign editor, AI editor, etc. Wherein the functions of the object editor may include: game parameters of game units in the game such as names, skills, appearance, moving speed, blood volume and the like of the game units in the game; the functions of the terrain editor may include: geographical units such as rivers, trees, sand, and the like, and the appearance of the geographical units; the functions of the campaign editor may include: map attributes in the game such as environmental sound effects, titles, map information, screen displays and the like of the map or the scene are loaded in the game; the AI editor may include: run away, patrol, pick up items, purchase items, random path, etc. of the gaming unit.
The object editor, the topography editor, the campaign editor, and the AI editor in the map editor may have various expressions, where the editor may be embodied as visual software, a tool kit, or may be embodied as an editable code module, which is not limited herein. The game developer can complete the development of the game map by using the map editor.
When developing a game map, a game developer first needs to design a game unit on the map, such as a game unit, a topography, an article, and the like. Game developers then need to develop intelligent functionality for gaming units, particularly for non-player character gaming units. The intelligent function of the game unit can be bound with the game unit or can be bound to the non-player character of the game unit, the intelligent function of the same game unit or non-player character can be the same or different, and the intelligent function of different game units or non-player characters can be the same or different.
In the prior art, an intelligent module of a game unit corresponds to a set of behaviors, and the behaviors comprise a behavior means, a behavior subject and a behavior object.
For example, in a game map, the game unit 1 uses a skill 1, wherein the skill 1 is a directional skill, and the skill 1 points to the game unit 2. The game unit 1 uses skill 1 as behavior 1 for the game unit 2, the behavior 1 including behavior means 1, behavior subject 1, behavior object 1. The behavior means 1 is a use skill 1, the behavior subject 1 is a game unit 1, and the behavior object 1 includes a skill 1 and a game unit 2.
Further, if skill 1 of game unit 1 is cancelled, the intelligent function of game unit 1 needs to be modified; or if the game unit 1 adds a skill 2, it is necessary to modify the intelligentized function of the game unit 1 and add the game unit's behavior to the skill 2 among the intelligentized functions of other game units.
It can be understood that, since the AI editor needs to configure the behavior means, the behavior object, and the behavior subject at the same time to implement the intelligentized function of the game unit, the intelligentized function of the game unit is bound to the map data, and cross-map multiplexing cannot be implemented. Further, the intelligent function of the game unit is bound to the game parameters of the game unit, and thus cross-character multiplexing and cross-game unit multiplexing cannot be achieved. In the prior art, the map file corresponding to the game map not only comprises data of game units, terrains, articles and the like in the map, but also comprises an intelligent function of the game unit.
Fig. 5 is an exemplary schematic diagram of a prior art game map architecture.
As shown in fig. 5, a game developer configures a game unit, a topography, an article, an intelligent function, and the like through a map editor. The game unit on the configuration map includes: game unit 1, game unit 2, game unit 3, game unit 4, article 1, article 2, terrain 1, terrain 2. Taking the game unit 1 as an example, the game unit can be embodied as a visual and interactive game unit in the game; the data layer is embodied as first initialization data, and the first initialization data carries the game parameters of the game unit 1 such as a model (three-dimensional model, skill animation, etc.) of the game unit 1, attributes (vital value, armor, skill, etc.) of the game unit 1, and meanwhile, the first initialization data also carries the conventional game AI of the game unit 1.
Fig. 6 is a schematic diagram of an exemplary architecture for the intelligent function of the gaming unit 2 of fig. 5.
As shown in fig. 6, the intelligent functions of the gaming unit may include perception information, decision models, and behavior.
The relevant concepts of the perception information, decision model and behavior may refer to the content of (1) game AI modules in the term interpretation, and will not be described here again.
As shown in fig. 6, the decision model portion of the intelligent function of the game unit in the prior art may include a variety of specific decision models, for example, the intelligent function of the game unit 2 includes several decision models: the decision model 1 is "if resources are currently needed, go to the location where the item 2 is located", and the decision model 2 is "if the game unit 4 is perceived, attack the game unit 4"; decision model 8: "if the blood volume is less than 30%, return to the location of the article 1", etc. Taking the decision model 1 as an example, in this case, the decision parameter required for decision is whether resources are needed, and the behavior means is movement. The behavior subject in the behavior 1 is a game unit 3, and the behavior subject is an article 2 and a position of the article 2.
After a game developer has developed a game map or scene, new game units, items, etc. may be added to the game map or scene during subsequent maintenance or upgrades to promote the quality of the game or to develop a new game map, in which case the perceived range for any of the game units in the game map increases by the new game units or items that are added. The perceived range determines the range of the set of actions that the gaming unit can implement, i.e. the range of decisions. Therefore, the game developer needs to reconstruct the intelligent function of all the game units which interact with the new game unit, so that the new game unit can successfully participate in the game.
Fig. 7 is an exemplary schematic diagram of a scenario in the prior art with a gaming unit added.
As shown in fig. 7, when the game unit 5 is added to the game map shown in fig. 5, the perceived range of any game unit is increased by the game unit 5. Therefore, the game developer needs to reconstruct the intelligent functions of the game unit 1, the game unit 2, the game unit 3, the game unit 4 and other game units, and add the intelligent functions of the game unit 5, so that the game unit 5 can interact with the existing game units to complete the normal game functions.
Alternatively, after the game developer has added the game skill 2 to the game unit 2, the game developer needs to reconstruct the intelligent function of the game unit 2 and also needs to reconstruct the intelligent function of the game unit that may be affected by the game unit 2 using the game skill 2, so that the intelligent function of the game unit 2 may instruct the game unit 2 to use the game skill 2.
It will be appreciated that in the prior art the intelligentized function of the game unit is tied to the game parameters of the game unit, and when the data of the game unit changes, the intelligentized function of the game unit involved in the game map needs to be reconstructed.
As shown in FIG. 5 above, after the game map is developed, the game developer packages all the data in the game map to generate a map file, wherein the map file may be represented as a specific file or a plurality of specific files associated with each other. Taking the game unit 2 as an example, all the corresponding data including models, game parameters, sound effects, intelligent functions and the like are stored in the game map file. For example, the storage path of each map file contains a file for realizing the map intellectualization function, and the files for realizing the map intellectualization function of different maps are different.
When a player opens the game and loads the game map shown in fig. 5, the game body needs to read and load the map file of the map, including the intelligent function of reading and loading all the game units in the game map, that is, the behavior set of all the game units in the map.
FIG. 8 is an exemplary schematic diagram of a prior art smart function loading process for a gaming unit.
As shown in fig. 8, the map file includes a model of the game unit, game parameters, intelligent functions, and the like. When the game body loads the game map, the intelligent function of the game unit needs to be loaded. In the actual game process, for a specific game unit, the game unit generally only executes part of the behaviors, and the behavior set of the part of the behaviors is a proper subset of the behavior set corresponding to the game AI.
For example, taking game unit 2 as an example, when the game body loads the map file, the game AI of game unit 2 is loaded, that is, the behavior set of game unit 2 is loaded, and the behavior set includes 75 behaviors, namely, behaviors 1 to 75. In the actual game process, the actual execution of the game unit is 39. That is, for the game unit 2 in the present game, the game body loads 36 actions for the game unit 2 that are not used in the game map.
It can be appreciated that in the prior art, after a game map is developed, in the process of developing a new game map, the intelligent function of the game unit in the new game map needs to be reconstructed, and a great deal of complicated repetitive work needs to be performed.
It can be understood that in the prior art, the intelligent function of the non-player character to which the game unit belongs is realized through the intelligent function of the game unit, which is a design idea from bottom to top. Namely, when a plurality of non-player characters exist in one map, the intelligent function of each non-player character is realized, a large number of repeated logics are required to be repeatedly developed, and a large number of repeated behaviors are required to be loaded in the game loading process. Further, when the intelligent function of the non-player character of the new game map is realized in the development of the new game map, it is necessary to develop the intelligent function of the game unit, and a lot of troublesome repetitive work is required.
To sum up, in the prior art, when designing the intelligent function of the game unit in the game map, the game unit and the behavior of the game unit that can appear in the game map need to be considered, so that the developer needs to complete the tasks such as map data configuration, scenario configuration, intelligent function configuration and the like at the same time when designing the game map, the design task is complex and difficult to maintain in the later period, and meanwhile, a great deal of repeated tasks need to be performed when developing a new game map. Further, when the game map needs to be updated, such as adding new game units and configuring game parameters of the game units, the intelligent functions of the existing game units need to be reconstructed. Still further, when loading the game map, the game body needs to load the behavior of the game unit, and the behavior of the game unit executed in the actual game is a proper subset of the intelligent function corresponding behavior set of the game unit. That is, the game body loads a part of actions that the game unit does not execute in the game map, wasting game resources. Still further, since the intelligent function of the game unit is bound to the data of the game unit, checking the running state of the intelligent function of the game unit in the game running process requires to go through checking all the game units, it is difficult to locate the game unit with the fault intelligent function, and then it is difficult to repair considering that the intelligent function of the fault game unit is related to the game parameters of other game units.
In order to solve the problems in the prior art, the application provides a using method of a game artificial intelligence module and electronic equipment. Through the game artificial intelligence module provided by the application, the binding relation between the intelligent function and the data of the game unit is decoupled, and the complexity of developing a game map by a developer is reduced. The game AI module can be reused by a developer when designing a new game map, so that a great deal of complicated work is reduced. Still further, by the game artificial intelligence module provided by the application, the quality of the intelligent function of the game unit can be effectively improved.
The following describes a method for using the game artificial intelligence module provided by the application.
FIG. 9 is an exemplary schematic diagram of a method of using a game artificial intelligence module provided by the present application.
For convenience of description, the following map is used to refer to a game map.
S501: and constructing a first map and a second map.
The first map may be constructed in various manners such as a map editor, and the manner of constructing the first map is not limited. The second map may be constructed from the first map or constructed separately. The first map and the second map are respectively used for declaring game units and non-player characters participating in a game process on the map, and the game units comprise abstract classes such as game units, terrains, resources, articles and the like. The game units on the map or game scene are deterministic, i.e. all game units participating in the game process are known.
It should be noted that the game units stated by the first map and the second map may be the same or different.
For example, a first map has items, tanks, terrain declared on it, and a second map has items, monsters, soldiers, terrain declared on it.
For example, items, tanks, terrains are declared on a first map, and by modifying the first map as a second map, the second map declares items, tanks, terrains, monsters.
S502, initializing first map data and initializing second map data.
After step S501 is completed, initialization of map data is achieved by configuring game parameters for game units in the game map.
The first map may generate the first initialization data after declaring the game map or the game units contained in the scene to the first game AI module. The first initialization data includes initializing the gaming unit, and the first initialization data may occur during game loading or during game play. Similarly, the second map generates second initialization data.
Initializing the gaming unit may include: configuring game parameters of at least one game unit, wherein the game parameters may include a perception range of the game unit, a vital value, an attack force, a movement speed, etc. Initializing the gaming unit may include initializing a gaming unit for a different non-player character. Initializing a gaming unit may include initializing different types of gaming units.
The implementation of the initialization game unit may be a concrete implementation of the abstract class in the first map module, and the implementation of the initialization game unit may be a concrete implementation by inheriting a subclass of the abstract class in the first map module.
For example, a tank is arranged in the first map, and the phantom tank is initialized data of the tank, wherein a specific implementation manner of the initialization can be some methods for realizing the tank, or parameters of the tank are configured. In a game, initialization of the gaming unit may be embodied as configuring game parameters of the gaming unit.
It should be noted that, in the case where the first map and the second map state the game units are the same, the initialized game units in the first map and the initialized game units in the second map may be different. For example, a first map and a second map each declare a tank, wherein the first map configures game parameters different from those of the second map when the tank is initialized.
It should be noted that the non-player character is not directly embodied in the game, and the initialization of the non-player character is essentially achieved by initializing the game unit of the non-player character.
S503: optionally, a second game artificial intelligence module is generated from the first game artificial intelligence module.
In some embodiments of the application, the first game artificial intelligence module may generate the second game artificial intelligence module from the first map and/or the second map declared game units.
The first game AI module can determine the range of the perception information according to the game unit stated by the first map module, further determine the set of the behavior means according to the range of the perception information, and further determine to generate the second game AI module.
For example, in the first game map, the existing game units include a game unit 1, a game unit 2, and a game unit 3. For the game unit 2, the range of the perception information of the game unit 2 is the game unit 1 and the game unit 3. For another example, the game units include game unit 1, game unit 2, and game unit 3, wherein game unit 1 has skill 1 and skill 2, and the range of the perception information of game unit 2 is game unit 1, game unit 3, and skill, wherein skill includes skill 1 and skill 2. Further, when the game unit senses the game unit 1, the game parameters of the game unit 2 may be acquired in the following manner: the game unit 1 obtains game parameters of the game unit 2 by accessing the first map.
In some embodiments of the present application, step S503 may not be performed, i.e., the first game AI module is the second game AI module.
It should be noted that the second game AI module may be generated during game loading or may be dynamically loaded during game running.
It can be understood that, compared with the prior art that the behavior set of the game unit needs to be loaded as the game AI module in the game loading process, the second artificial intelligent module provided by the application only loads the game AI module for determining the behavior means, thereby reducing the resource waste in the game loading process.
S504: the first map determines a behavior means of the game unit according to the second game artificial intelligence module, and determines a behavior of the game unit according to the behavior means.
The first map interacts with the second game AI module for perception information, and the second game AI module determines the behavior means of the first initialization data according to the perception information. The first map determines the behavior of the first initialization data according to the behavior means or determines the behavior of the first initialization data according to the behavior means by the non-player character to which the first initialization data belongs. The first map causes the first initialization data to perform the action or the action is performed by the first initialization data itself.
The concepts of the second game AI module, the perception information, and the behavior means may refer to the content of the game AI module (1) in the term explanation, which is not described herein.
There can be a variety of ways in which the first map interacts with the second game AI module, for example, the first initialization data in the first map interacts directly with the second game AI module; for example, the first initialization data in the first map interacts with the game AI via the first map, which is not limited herein. Specifically, the first map may interact with the second game AI module via an interface of the second game AI module. For example, the first game module may access a blackboard or share a variable through an interface to enable interaction with the game AI module when the second game AI module includes a behavior tree to form the game AI module.
The timing of the first map interacting with the second game AI module may be varied, for example, the first map interacting with the second game AI module at fixed intervals, or the first map interacting with the game AI module in response to user input, without limitation. The interaction process can be initiated by the first map or initiated by the second game AI module, or the interaction opportunity of the first map and the second game AI module is determined through a trigger.
The second game AI module selects a decision based on the perception information and determines a behavior measure based on the decision.
In some embodiments of the application, the second game AI selects a decision based on the awareness information and requests at least one decision parameter. Wherein the decision participation is used to determine a behavioral means from the decision. Since the second game AI module is not bound to the data of the first initialization data, a decision parameter needs to be requested for determining the behavior means.
The decision parameter interaction between the second game AI module and the first map may refer to the data interaction between the first map and the second game AI module, which is not described herein.
It can be appreciated that by requesting decision parameters to obtain more information about the first initialization data, the quality of the game AI of the first initialization data can be effectively improved, i.e. the accuracy of the behavior of the first initialization data is improved.
It should be noted that the trigger may be located in the first map or the first game AI, which is not limited by the present application.
It should be noted that, the computational load related to the rendering of the game unit in the game, the calculation involved in the decision, the determination process of the decision, and the like may be carried by any module, which is not limited by the present application.
The behavior of the game unit is determined based on the behavior means.
After the first map acquires the behavior means determined by the second game AI module, determining that the behavior subject of the behavior means is first initialization data, and determining the behavior object of the behavior means according to the perception information. After determining the behavior means, the behavior subject, the behavior object, at least one behavior may be determined for indicating the first initialization data to perform the behavior.
After the first initialization data obtain the behavior means determined by the second game AI module, the first initialization data can determine the behavior object, and the behavior subject is the first initialization data of the received behavior means. After determining the behavior means, the behavior subject, the behavior object, at least one behavior may be determined for indicating the first initialization data execution.
S505: the second map determines a behavior means of the game unit according to the second game artificial intelligence module and determines a behavior of the game unit according to the behavior means.
The interaction of the second map with the second game AI module and the interaction time of the perception information can be specifically referred to the content in S504.
Since the first initialization data and the second initialization data are different from each other only in specific data carried by the perception information for the second game AI, and do not affect the determination of the behavior means of the second game AI according to the perception information, the specific implementation of the game AI of the second initialization data can refer to the content in S504.
The behavior means of the second initialization data may be the same as or different from the behavior means of the first initialization data.
The second initialization data may determine the behavior of the second initialization data according to the game behavior means. Since the first initialization data and the second initialization data are respectively located in the first map and the second map, the behavior object of the second initialization data is different from the behavior object of the first initialization data, and the behavior of the second initialization data is different from the behavior of the first initialization data.
It can be understood that by the game AI module provided by the application, the cross-map multiplexing of the game AI module is realized, which is beneficial to reducing the workload and improving the development efficiency when game developers develop new maps; furthermore, through the game AI module, cross-role multiplexing is realized, workload is reduced, and development efficiency is improved; further, through the game AI module, multiplexing of the cross-game units is realized, workload is reduced, and development efficiency is improved.
Fig. 10 is an exemplary schematic diagram of a game AI module multiplexing scenario in an embodiment of the application.
S701: and generating a second game artificial intelligence module according to the first game artificial intelligence module and the first map.
And in the game loading process, generating a second game artificial intelligence module according to the first person game artificial intelligence module and the game unit of the first map statement. Specifically, the first map, the first game artificial intelligence module, and the second artificial intelligence module in S701 may refer to the description in S503, which is not described herein.
S702: the first map generates first initialization data.
During game loading, the first map generates first initialization data. Specifically, S702 may refer to the description in S501, which is not described herein.
S703: in the game running process, the first initialization data sends the perception information to the second game AI module; the second game AI module selects a decision according to the perception information and requests decision parameters from the first initialization data; the first initialization data sends decision parameters to the second game AI module according to the requested decision parameters; the second game AI module determines behaviors according to the decisions and the decision parameters and sends behavior means to the first initialization data; after the initialized game unit receives the behavior means, at least one specific behavior is executed according to the behavior means.
The second game AI module selects at least one decision according to the perception information after receiving the perception information sent by the first initialization data.
The second game AI module determines a selected decision according to the acquired perception information, determines decision parameters required by the decision, and requests the decision parameters from the first initialization data. After the first initialization data receives the request sent by the second game AI module, the decision parameter of the request is returned to the second game AI module. After the second game AI module obtains the decision parameters, at least one behavior means is determined according to the decision parameters and the decision, and the behavior is returned to the first initialization data or the non-player character to which the first initialization data belongs. The first initialization data or the non-player character to which the first initialization data belongs determines the specific action to be executed according to the action means, and instructs the first initialization data to execute the action.
Illustratively, taking a certain game unit 2 as an example, the sensing range is a circle with a radius r, and the range of shared sensing is not considered. From the coordinates of the game unit 2 in the game and the coordinates of other game units in the game, the distances of the game unit 2 from the other game units can be calculated. For example, the coordinates of game unit 2 are (x 2, y 2), the coordinates of game unit 3 are (x 3, y 3), and the distance is r 23 =sqrt((x2-x3) 2 +(y2-y3) 2 ) Where sqrt is the open square. When r is 23 <r, the game unit 2 perceives the game unit 3; when r is 22 When r is not less than or equal to r, the game unit 2 does not sense the game unit 3.
In the case where the game unit 2 perceives the game unit 3, the game unit 2 transmits perception information to the second game AI module. Wherein the perception information includes information of the game unit 2 and game parameters of the game unit 3.
The decision model contained in the secondary game AI module may include a wide variety and is not limited herein. For example, the decision model of the secondary game AI module may include: run, attack, recourse, etc. Illustratively, when the decision model selected in the second game AI module is an attack, the decision parameters that need to be requested may include attack scope, skill, item, etc. of game unit 2 and/or game unit 3. After the second game AI module obtains the decision parameters, the skill information of the game unit 2 is obtained, and the determining act includes: post-skill attacks are used. After determining the action means 2, the second game AI module transmits the action means 2 to the game unit 2 or to the non-player character to which the game unit 2 belongs. After the game unit 2 or the non-player character to which the game unit 2 belongs receives the action means 2, it may be determined that the game unit 2 performs the action 2, that is, attacks the game unit 3 after using the skill, according to the action means 2.
In some embodiments of the application, the second game AI may select a decision model and determine a means of behavior based on the awareness information without requesting decision parameters.
For example, taking game unit 2 as an example, when it senses game unit 3, the decision selected in the second game AI module is a movement decision, and the parameter required for the movement decision is the position information of game unit 2, and the position information of the second game unit is included in the sensing information. The second game AI module may determine that the action means is movement and send the action means to the game unit 2 or the non-player character to which the game unit 2 belongs, and may determine that the game unit 2 moves to the position of the game unit 3 according to the action means 2, wherein the position information of the game unit 3 may be acquired by the game unit 2 or the non-player character to which the game unit 2 belongs without passing through the second game AI module.
It can be understood that the first initialization data is to determine the behavior means by means of data interaction, and send the behavior means to the first initialization data or the non-player character to which the first initialization data belongs. The first initialization data or the non-player character to which the first initialization data belongs may determine a behavior subject and a behavior object associated with the behavior means according to information of the first initialization data itself, and execute the behavior determined by the behavior means. Therefore, different initialized gaming units may multiplex the second game AI, enabling cross-gaming unit use of the game AI module.
It can be appreciated that in the game development process, the intelligent function of the game unit is not required to be designed at the same time when the game unit is designed, so that the difficulty of design work is reduced. Further, when the adjustment and the reconstruction of the intelligent function of a certain game unit or a certain game unit are required, the adjustment and the reconstruction of the intelligent function of the game unit can be completed by adjusting and reconstructing the first game AI module. Similarly, the adjustment and reconstruction of the intelligent function of the non-player character can be completed by adjusting and reconstructing the first game AI module.
Fig. 11 is another exemplary schematic diagram of a game AI module multiplexing scenario in an embodiment of the application.
The first map module, the first game AI, the second game AI, and the first initialization data may refer to the descriptions in fig. 9 and 10 and the descriptions in the term interpretation (1) game AI module, and are not repeated here.
The player's secondary development of the game will add third initialization data. Wherein, secondary development of the game refers to modifying the game content of the game using unofficial map editing software. There are many forms of secondary game development, for example, a player adds a new game unit to an existing official map, a player adds a new interaction mode to an existing game unit, a player creates a map, and the like, which are not limited herein.
The third initialization data may be, for example, a new item, a new function of an existing item, a new game unit, a new terrain, or the like.
S801: the content of step S801 may refer to the text description in step S701, and will not be described here.
S802: in the game running process, the third initialization data sends the perception information to the first game AI module; the first game AI module selects a decision according to the perception information and requests first parameters from the third initialization data, wherein the first parameters comprise decision parameters and game parameters; the third initialization data sends decision parameters to the first game AI according to the requested decision parameters; the first game AI module determines a behavior means according to the decision and the game parameters and sends the behavior means to the third initialization data; after the third initialization data receives the behavior means, at least one specific behavior is executed according to the behavior means.
Illustratively, after adding a third initialization data, i.e., an initialized third game unit, such as game unit 6, to a certain game map, game unit 2 may perceive game unit 6 for an already existing first initialization data, i.e., an already initialized game unit 2. The second game AI module may receive the perception information transmitted by game unit 2.
The second game AI module may determine that the game unit 6 is third initialization data based on the perception information. Considering that the second AI module may not be able to determine the decision model based on the awareness information or that the decision model of the second module requires decision parameters to determine the means of action, the second game AI module requests game parameters from the third initialization data for further determination of the decision model or the decision parameters required by the decision model. Wherein, the decision parameter may be part or all of the game parameter of the third initialization data.
The second AI module may not determine the decision model according to the perception information or the decision model of the second AI module may need decision parameters to determine the behavior means in various cases, which are not limited herein. For example, according to rules of game ontology design, the perceived information only includes the vital values of all the game units within the field of view of the game unit, while the second AI module determines that the decision model needs to learn skill information among the game parameters of the game unit 6, etc.
For example, the second game AI module requesting the first decision parameter includes: whether the game unit 6 can be attacked, and the attack range of the game unit 6, and the sensing information acquired by the second game AI module does not have the relevant information of the game unit 6. In this case, the second game AI module requests decision parameters from the map or game unit 6, wherein the decision parameters include the game unit 6
The decision parameters requested by the second game AI module include: the attack range of the game unit 6 is 120, and the game unit 6 can be attacked. The second game AI module determining means of action includes: in-motion attacks and returns this behavior measure to the gaming unit 2. After the game unit 2 acquires the behavior means, it can acquire a behavior subject and a behavior object, thereby determining the behavior and executing the behavior.
It can be appreciated that by the first game AI module provided by the present application, cross-game unit multiplexing can be realized, wherein the game units can be generated by secondary development, workload of game development can be reduced, and secondary development enthusiasm of players for games can be improved.
The following describes an implementation method of the game AI module in the game development process.
During the game development process, the game map and the game AI module can be independently developed.
The development of the game map can be completed through a map editor, and the development of the game map can comprise the development of game units, models, sound effects, interfaces and the like. The developed game map is configured with a first interface for data interaction.
The development of the game AI module may be accomplished through a behavior tree and/or a state machine, and the development of the game AI module may include two development modes. First, develop a plurality of game AI submodules, and combine a plurality of game AI submodules into a game AI module, wherein, the second interface used for data interaction can be disposed on the game AI submodule or on the game AI module. Secondly, the game AI module is directly developed, and a second interface for data interaction can be configured on the game AI module.
The interaction process of the game AI module and the game map can be realized according to a first interface and a second interface, wherein the first interface can be a plurality of interfaces, and the second interface can be a plurality of interfaces.
For the first game AI module development, there may be different game AI sub-modules according to different classification criteria for the intelligent functions of the game units, further resulting in the synthesis of one game AI module by the different game AI sub-modules. Still further, the manner in which different game AI sub-modules are combined into one game AI module may also be different.
The game AI module may include a plurality of game AI sub-modules of the same type, such as game AI sub-module 1 and game AI sub-module 2. The game AI sub-module 2 may be determined according to the game AI sub-module 1, such as modifying a decision model in the game AI sub-module 1 and/or modifying a behavior measure set of the game AI sub-module 1, and using the modified game AI sub-module 1 as the game AI sub-module 2. Different game AI sub-modules of the same type can be selected by the game units controlled by different non-player characters, so that the intelligent functions of different non-player characters are different, and the experience of players is improved.
It can be understood that in order to realize the difference of the intelligent functions of different non-player characters, the game AI sub-modules can be increased, so that a new game AI module for realizing the intelligent functions does not need to be redeveloped, the workload of game development is reduced, and the efficiency of game development is improved.
Fig. 12 is a schematic diagram of a usage method of a game AI module according to an embodiment of the present application.
As shown in fig. 12, there are two maps, map 1 and map 2, respectively. The map 1 includes a topography, a player character (a game unit controlled by the player character), a robot 1 (a game unit controlled by the robot 1), and a robot 2 (a game unit controlled by the robot 2). The game AI module can comprise two game AI sub-modules, namely a resource AI and a soldier AI.
As shown in fig. 12 (a), the map 1 and the map 2 may implement the intelligent function of the map 1 and the intelligent function of the map 2 according to the game AI module, and specific contents may refer to the text descriptions in fig. 9 to 11, which are not repeated here.
As shown in (B) of fig. 12, the terrains in both map 1 and map 2 can realize the intelligentized function of terrains according to the resource AI; the player characters in the map 1, the robot 1 and the robot 2, and the player characters in the map 2 and the robot 1 can realize respective intelligent functions according to the individual AI.
As shown in fig. 12 (C), the terrains in both map 1 and map 2 can realize the intelligentized function of terrains according to the resource AI; the player characters in the map 1, the robot 1 and the player characters in the map 2 and the robot 1 can realize respective intelligent functions according to the soldier AI 1; the robot 2 in the map 1 can realize the intelligent function of the robot 2 according to the individual AI 2. The individual AI1 and the individual AI2 are game AI sub-modules of the same type, the decision models of the individual AI1 and the individual AI2 can be different, and the behavior means sets of the individual AI1 and the individual AI2 can be different.
During the game running, the robot 1 in the map 1 controls the game unit 7, and the robot 2 controls the game unit 8. The game unit 7 and the game unit 8 have the same game parameters, and are the same game units. When the perception information of the game AI module received by the game unit 7 is the same as the perception information of the game unit 8 received by the game AI module, the behavior performed by the game unit 7 may be different from the behavior performed by the game unit 8, since the intelligentized function of the game unit 7 is implemented by the soldier AI1 and the intelligentized function of the game unit 8.
Fig. 13 is a schematic diagram of another usage method of the game AI module according to an embodiment of the present application.
As shown in fig. 13, the game AI module may be divided into general AI, resource AI. The terrains in the map 1 and the map 2 can realize the intelligentized function of the terrains according to the resource AI; the non-player character robot 1, the robot 2 in the map 1, and the robot 3 in the map 2 can realize the intelligent function of the non-player character according to the group AI.
Wherein, after the robot 1 determines the behavior means according to the group AI, the behavior means is sent to the corresponding game unit. The gaming unit may determine the behavior of the gaming unit based on the behavior and a pre-configured fixed decision model, wherein the fixed decision model may be a decision model bound to map data.
The robot 1 determines at least one behavior means from the game AI module and transmits the behavior means to the corresponding game unit. After receiving the action means, the game unit may perform an action according to the action means, or may perform an action according to the action means and a decision model on the game unit.
Wherein the preconfigured decision model may consist of a behavior tree and/or a state machine and is based on map data, i.e. the output of the decision model is behavior.
For example, the game unit controlled by the robot 1 includes a game unit 1 and a game unit 2. The robot determines the means of action of the game unit 1 and the game unit 2 to be movement. After the game unit 1 and the game unit 2 receive the action means, respective actions such as movement of the game unit 1 to coordinates (185, 354), movement of the game unit 2 and movement to coordinates (185, 355) can be determined, respectively. During the execution of the action "game unit 1 moves to coordinates (185, 354)" by game unit 1, when game unit 3 is encountered, an attack may be made according to a pre-configured decision model. That is, in-game unit 1 appears to be in-motion to attack. Since the preconfigured decision model is bound to the map data, the action of "attacking the game unit 3" may not be determined according to the game AI module.
It can be understood that in the game development process, the game AI module can be developed aiming at the intelligent function of the non-player character, and the game AI development mode in the prior art is adopted in the intelligent function implementation of the game unit, so that the workload of game development is reduced, the intelligent function quality of the game unit and the non-player character is improved, and the player experience is further improved.
The electronic device provided by the application is described below.
In the embodiment of the application, the electronic device may be a mobile electronic device or a PC, which is not limited herein.
Fig. 14 is a schematic structural diagram of an electronic device 100 according to an embodiment of the present application.
The embodiment will be specifically described below taking the electronic device 100 as an example. It should be understood that electronic device 100 may have more or fewer components than shown, may combine two or more components, or may have a different configuration of components. The various components shown in the figures may be implemented in hardware, software, or a combination of hardware and software, including one or more signal processing and/or application specific integrated circuits.
The electronic device 100 may include: processor 110, internal memory 121, audio module 170, sensor module 180, keys 190, display 194, etc. Wherein the sensor module 180 may include a touch sensor 180K.
The structure illustrated in the embodiment of the present application does not constitute a specific limitation on the electronic apparatus 100. In other embodiments of the application, electronic device 100 may include more or fewer components than shown, or certain components may be combined, or certain components may be split, or different arrangements of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware.
A memory may also be provided in the processor 110 for storing instructions and data. In some embodiments, the memory in the processor 110 is a cache memory. The memory may hold instructions or data that the processor 110 has just used or recycled. If the processor 110 needs to reuse the instruction or data, it can be called directly from the memory. Repeated accesses are avoided and the latency of the processor 110 is reduced, thereby improving the efficiency of the system.
The electronic device 100 implements display functions through a GPU, a display screen 194, an application processor, and the like. The GPU is a microprocessor for image processing, and is connected to the display 194 and the application processor. The GPU is used to perform mathematical and geometric calculations for graphics rendering. Processor 110 may include one or more GPUs that execute program instructions to generate or change display information.
The display screen 194 is used to display images, videos, and the like. The display 194 includes a display panel. The display panel may employ a liquid crystal display (liquid crystal display, LCD), an organic light-emitting diode (OLED), an active-matrix organic light emitting diode (AMOLED), a flexible light-emitting diode (flex), a mini, a Micro-OLED, a quantum dot light-emitting diode (quantum dot light emitting diodes, QLED), or the like. In some embodiments, the electronic device 100 may include 1 or n display screens 194, n being a positive integer greater than 1.
The internal memory 121 may include one or more random access memories (random access memory, RAM) and one or more non-volatile memories (NVM).
The random access memory may include a static random-access memory (SRAM), a dynamic random-access memory (dynamic random access memory, DRAM), a synchronous dynamic random-access memory (synchronous dynamic random access memory, SDRAM), a double data rate synchronous dynamic random-access memory (double data rate synchronous dynamic random access memory, DDR SDRAM, such as fifth generation DDR SDRAM is commonly referred to as DDR5 SDRAM), etc.;
the nonvolatile memory may include a disk storage device, a flash memory (flash memory).
The FLASH memory may include NOR FLASH, NAND FLASH, 3D NAND FLASH, etc. divided according to an operation principle, may include single-level memory cells (SLC), multi-level memory cells (MLC), triple-level memory cells (TLC), quad-level memory cells (QLC), etc. divided according to a storage specification, may include universal FLASH memory (english: universal FLASH storage, UFS), embedded multimedia memory cards (embedded multi media Card, eMMC), etc. divided according to a storage specification.
The random access memory may be read directly from and written to by the processor 110, may be used to store executable programs (e.g., machine instructions) for an operating system or other on-the-fly programs, may also be used to store data for users and applications, and the like.
The nonvolatile memory may store executable programs, store data of users and applications, and the like, and may be loaded into the random access memory in advance for the processor 110 to directly read and write.
In an embodiment of the present application, the processor 110 may cause the electronic device 100 to execute the game AI module using method according to the embodiment of the present application by calling the computer instructions stored in the internal memory 121.
Fig. 15 is a schematic block diagram illustrating a software structure of the electronic device 100 according to an embodiment of the present application.
Map module 1601 is used to construct a game map and initialize the game units, non-player characters.
A perception module 1602 for determining different game units, fields of view of non-player characters, perception information, etc. in different game maps constructed by the map module 1601. Wherein the perception module may be located in the game AI module 1603 or the map module 1601.
The game AI module 1603 is used for realizing the intelligent functions of different game units and non-player characters in different game maps constructed by the drawing module 1601.
Fig. 16 is a schematic diagram illustrating another structure of an electronic device 100 according to an embodiment of the present application.
The electronic device 100 includes:
input device 201, output device 202, processor 203, and memory 204 (where the number of processors 203 in electronic device 200 may be one or more, one processor 203 is illustrated in fig. 15). In some embodiments of the application, the input device 201, the output device 202, the processor 203, and the memory 204 may be connected by a bus or other means, with the bus connection being exemplified in fig. 16.
The processor 203 invokes the operation instructions stored in the memory 204 to cause the electronic device 100 to execute the method for using the game AI module in the embodiment of the application.
As used in the above embodiments, the term "when …" may be interpreted to mean "if …" or "after …" or "in response to determination …" or "in response to detection …" depending on the context. Similarly, the phrase "at the time of determination …" or "if detected (a stated condition or event)" may be interpreted to mean "if determined …" or "in response to determination …" or "at the time of detection (a stated condition or event)" or "in response to detection (a stated condition or event)" depending on the context.
In the above embodiments, it may be implemented in whole or in part by software, hardware, firmware, or any combination thereof. When implemented in software, may be implemented in whole or in part in the form of a computer program product. The computer program product includes one or more computer instructions. When loaded and executed on a computer, produces a flow or function in accordance with embodiments of the application, in whole or in part. The computer may be a general purpose computer, a special purpose computer, a computer network, or other programmable apparatus. The computer instructions may be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another computer-readable storage medium, for example, the computer instructions may be transmitted from one website, computer, server, or data center to another website, computer, server, or data center by a wired (e.g., coaxial cable, fiber optic, digital subscriber line), or wireless (e.g., infrared, wireless, microwave, etc.). The computer readable storage medium may be any available medium that can be accessed by a computer or a data storage device such as a server, data center, etc. that contains an integration of one or more available media. The usable medium may be a magnetic medium (e.g., floppy disk, hard disk, magnetic tape), an optical medium (e.g., DVD), or a semiconductor medium (e.g., solid state disk), etc.
Those of ordinary skill in the art will appreciate that implementing all or part of the above-described method embodiments may be accomplished by a computer program to instruct related hardware, the program may be stored in a computer readable storage medium, and the program may include the above-described method embodiments when executed. And the aforementioned storage medium includes: ROM or random access memory RAM, magnetic or optical disk, etc.

Claims (8)

1. A method of using a game artificial intelligence module, comprising:
the method comprises the steps that electronic equipment loads a first map and a first game artificial intelligent module, wherein the first map comprises a first game unit, and the first game artificial intelligent module is used for realizing a map intelligent function;
the electronic device determines a first behavior set of the first game unit according to the first game artificial intelligence module;
the electronic equipment determines first perception information of a first game unit according to the visual field range of the first game unit;
the electronic equipment determines a first behavior means of the first game unit from the first behavior set according to the first perception information and the first game artificial intelligence module;
The electronic equipment determines a first behavior of the first game unit according to the first behavior means;
the electronic equipment loads a second map, the second map comprises a second game unit, the perception information in the first map is different from the perception information in the second map, the perception information comprises part or all of game parameters of all game units in the visual field range of the game unit and/or a non-player character, and the perception information is used for being acquired by the first game artificial intelligence module to determine the behavior of the game unit;
the electronic device determines a second behavior set of the second game unit according to the first game artificial intelligence module;
the electronic equipment determines second perception information of a second game unit according to the visual field range of the second game unit;
the electronic equipment determines a second behavior means of the second game unit from the second behavior set according to the second perception information and the first game artificial intelligence module;
the electronic equipment determines a second behavior of the second game unit according to the second behavior means, wherein the first behavior is different from the second behavior, and the first behavior set is different from the second behavior set.
2. The method of claim 1, wherein the electronic device determines a first behavior means of the first game unit from the first behavior set according to the first perception information and the first game artificial intelligence module, specifically comprising:
the electronic device determines a first behavior means of the first game unit from the first behavior set according to the first perception information, the first game artificial intelligence module and decision parameters, wherein the decision parameters comprise part or all of game parameters of the first game unit.
3. The method of claim 1, wherein the electronic device, upon determining the first set of behaviors of the first gaming unit from the first game artificial intelligence module, further comprises:
the electronic device determines a third behavior set of a third game unit according to the first game artificial intelligence module, wherein the third behavior set comprises third behaviors, and the third game unit is a game unit which is different from the first game unit on the first map.
4. A method according to claim 3, wherein the third gaming unit and the first gaming unit belong to different or the same non-player character.
5. The method of any one of claims 1 to 4, wherein the first game artificial intelligence module comprises a behavior tree and/or a state machine.
6. An electronic device, the electronic device comprising: one or more processors and memory;
the memory is coupled with the one or more processors, the memory is for storing computer program code, the computer program code comprising computer instructions that the one or more processors call to cause the electronic device to perform: the method of any one of claims 1 to 5.
7. A computer device comprising a memory, a processor and a computer program stored on the memory and executable on the processor, wherein execution of the computer program by the processor causes the computer device to implement the method of any one of claims 1 to 5.
8. A computer readable storage medium comprising instructions which, when run on an electronic device, cause the electronic device to perform the method of any one of claims 1 to 5.
CN202011628597.6A 2020-12-30 2020-12-30 Application method of game artificial intelligent module and electronic equipment Active CN112619125B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011628597.6A CN112619125B (en) 2020-12-30 2020-12-30 Application method of game artificial intelligent module and electronic equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011628597.6A CN112619125B (en) 2020-12-30 2020-12-30 Application method of game artificial intelligent module and electronic equipment

Publications (2)

Publication Number Publication Date
CN112619125A CN112619125A (en) 2021-04-09
CN112619125B true CN112619125B (en) 2023-10-13

Family

ID=75289872

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011628597.6A Active CN112619125B (en) 2020-12-30 2020-12-30 Application method of game artificial intelligent module and electronic equipment

Country Status (1)

Country Link
CN (1) CN112619125B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111388995B (en) * 2020-03-02 2022-07-26 腾讯科技(深圳)有限公司 Game artificial intelligence information processing method, system, device and storage medium

Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR20180034356A (en) * 2018-03-22 2018-04-04 주식회사 엔브로스 Game system and method of implementing artificial intelligence of game character by user setting
CN108553903A (en) * 2018-04-19 2018-09-21 网易(杭州)网络有限公司 Control robot player's method and device
CN109843401A (en) * 2017-10-17 2019-06-04 腾讯科技(深圳)有限公司 A kind of AI object behaviour model optimization method and device

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US10099115B2 (en) * 2012-12-06 2018-10-16 Sony Interactive Entertainment America Llc System and method for user creation of digital objects
US11679330B2 (en) * 2018-12-18 2023-06-20 Activision Publishing, Inc. Systems and methods for generating improved non-player characters

Patent Citations (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109843401A (en) * 2017-10-17 2019-06-04 腾讯科技(深圳)有限公司 A kind of AI object behaviour model optimization method and device
KR20180034356A (en) * 2018-03-22 2018-04-04 주식회사 엔브로스 Game system and method of implementing artificial intelligence of game character by user setting
CN108553903A (en) * 2018-04-19 2018-09-21 网易(杭州)网络有限公司 Control robot player's method and device

Also Published As

Publication number Publication date
CN112619125A (en) 2021-04-09

Similar Documents

Publication Publication Date Title
US8400444B2 (en) Method to render a root-less scene graph with a user controlled order of rendering
Luke Multiagent simulation and the MASON library
Begel et al. Starlogo TNG: An introduction to game development
CN112717404B (en) Virtual object movement processing method and device, electronic equipment and storage medium
CN112619125B (en) Application method of game artificial intelligent module and electronic equipment
Chover et al. A game engine designed to simplify 2D video game development
Fan et al. Black art of Java game programming
Phelps et al. Fun and Games: Multi-Language Development: Game development can teach us much about the common practice of combining multiple languages in a single project.
Beysolow II et al. Custom openai reinforcement learning environments
Narsoo et al. The Application of Design Patterns to Develop Games for Mobile Devices using Java 2 Micro Edition.
Begel Bongo--a kids' programming environment for creating video games on the Web
Araùjo et al. URNAI: A Multi-Game Toolkit for Experimenting Deep Reinforcement Learning Algorithms
Latoschik et al. Scene synchronization in close coupled world representations using SCIVE
Ramos et al. Developing a python reinforcement learning library for traffic simulation
Seo et al. Pvot: An interactive authoring tool for virtual reality
Brown et al. Quake ii as a robotic and multi-agent platform
Stemkoski Java game development with LibGDX: From beginner to professional
Трегубова et al. IMPLICATION THE CROSS-PLATFORM LOVE2D ENGINE FOR RENDERING AND ARTIFICIAL INTELLEGENCE DEVELOPMENT
Phelps et al. Games first pedagogy: Using games and virtual worlds to enhance programming education
Enfield Mathematics of Game Development: A Collection of Applied Lessons
Xu et al. An Introduction of Artificial Intelligence: Extensions of the Game Othello
Vitale Learning group behavior in games using Cultural Algorithms and the land bridge simulation example
Tarifa Mateo Entity component systems and data-oriented design
Nakamura et al. Using a didactic game engine to teach computer science
Westfalen Procedural Generation of Buildings with Wave Function Collapse and Marching Cubes

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