Game behavior action prediction method and device, equipment and medium
Generating diversified AI robot behaviors through the game behavior prediction neural network solves the game experience problem caused by the single action of the existing AI robot, realizes efficient and low-cost game behavior generation, and adapts to the existing technology framework.
Patent Information
- Application Number
- CN202310296183.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-20
AI Technical Summary
Existing AI robots only have a small number of actions in the game, resulting in a monotonous game experience and easy recognition by players, which reduces the fun of the game.
The game behavior prediction neural network is used, including multiple feature extraction sub-networks, weight decision-making sub-networks and action prediction sub-networks, to generate various styles and types of game behavior actions through observed state data, without any manual intervention.
It achieves diversified game behavior generation, improves game effects, reduces labor costs, and is no different from traditional reinforcement learning AI training. It has the implementation value of being highly compatible with existing frameworks.
Smart Images

Figure CN118662905A
Abstract
Description
Technical Field
[0001] The present application relates to the field of game technology, and in particular to a method, device, equipment and medium for predicting game behavior actions. Background Art
[0002] At present, AI (Artificial Intelligence) technology has been widely used in games, such as AI robots in games, which greatly enriches the playability of games. AI robots in existing technologies have reached the level of professional players and are very competitive.
[0003] However, one point that cannot be ignored is that AI robots in the existing technology usually only have a small number of action behaviors, which makes it easy for players to identify them after a small number of games, thereby causing a monotonous gaming experience and greatly reducing the gaming fun of players. Summary of the invention
[0004] The present application provides a method, device, equipment and medium for predicting game behavior actions. Specifically, the technical solution provided by the present application is as follows:
[0005] On the one hand, the present application provides a game behavior action prediction method, which is applied to a game behavior prediction neural network; the game behavior prediction neural network includes at least a plurality of feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork; the game behavior action prediction method includes:
[0006] Obtaining observation state data of the target virtual object in the current game scene; wherein the observation state data is used to characterize the game state of the target virtual object in the current game scene;
[0007] Inputting the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0008] Inputting the observed state data into the weight decision subnetwork to obtain feature weights for multiple intermediate observed feature data;
[0009] Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0010] The target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
[0011] On the other hand, the present application provides a game behavior action prediction device, which is applied to a game behavior prediction neural network; the game behavior prediction neural network includes at least a plurality of feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork; the game behavior action prediction device includes:
[0012] A data acquisition unit, used to acquire observation state data of a target virtual object in a current game scene; wherein the observation state data is used to characterize a game state of the target virtual object in the current game scene;
[0013] A feature extraction unit, used for inputting the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0014] A weight decision unit, used for inputting the observation state data into the weight decision subnetwork to obtain feature weights for a plurality of intermediate observation feature data;
[0015] A feature fusion unit, configured to determine target observation feature data based on a plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0016] The action prediction unit is used to input the target observation feature data into the action prediction sub-network to predict the target game behavior action of the target virtual object in the current game scene.
[0017] On the other hand, the present application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the above-mentioned game behavior action prediction method is implemented when the processor executes the computer program.
[0018] On the other hand, the present application also provides a computer-readable storage medium, which stores computer instructions, and when the computer instructions are executed by a processor, the above-mentioned game behavior action prediction method is implemented.
[0019] The beneficial effects of this application are as follows:
[0020] The present application obtains multiple intermediate observation feature data by utilizing multiple feature extraction subnetworks, and obtains feature weights of multiple intermediate observation feature data by utilizing a weight decision subnetwork. Multiple intermediate observation feature data and feature weights of multiple intermediate observation feature data can be utilized to fuse multiple different target observation feature data, thereby generating multiple styles and types of game behavior actions based on multiple different target observation feature data, thereby meeting game requirements and improving game effects. Moreover, the entire process does not require any human intervention, greatly reducing labor costs. In addition, there is no difference in computing performance from traditional reinforcement learning AI training, so it can be efficiently compatible with existing training and application frameworks, and has a high landing value.
[0021] Other features and advantages of the present application will be described in the subsequent description, and in part, will become apparent from the description, or will be understood by practicing the present application. The purpose and other advantages of the present application can be realized and obtained by the structures specifically pointed out in the written description, claims, and drawings. BRIEF DESCRIPTION OF THE DRAWINGS
[0022] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0023] Figure 1 A schematic diagram of a process of predicting a game behavior action in an embodiment of the present application;
[0024] Figure 2 This is a schematic diagram of the composition structure of the gaming behavior prediction neural network in the embodiment of the present application;
[0025] Figure 3 Another flowchart of the method for predicting game behavior actions in an embodiment of the present application;
[0026] Figure 4 This is a functional structure diagram of a game behavior action prediction device in an embodiment of the present application;
[0027] Figure 5 Schematic diagram of the hardware structure of the electronic device in the embodiment of the present application. DETAILED DESCRIPTION
[0028] In order to make the purpose, technical solutions and beneficial effects of the present application clearer, the technical solutions in the embodiments of the present application will be clearly and completely described below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.
[0029] In order to facilitate those skilled in the art to better understand the present application, the technical terms involved in the present application are briefly introduced below.
[0030] The game behavior prediction neural network is a neural network model for predicting game behavior actions, which is obtained by training based on different observation state data samples of different target virtual objects (such as AI robots) in different game scenes and game behavior action samples corresponding to different observation state data samples. In the present application, the game behavior prediction neural network can be but is not limited to any one of the neural networks such as supervised learning neural network, unsupervised learning neural network, hybrid learning neural network, associative learning neural network, and optimal learning neural network. The game behavior prediction neural network is mainly composed of a state preprocessing subnetwork, multiple feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork; wherein the state preprocessing subnetwork is respectively connected to multiple parallel feature extraction subnetworks, and the multiple parallel feature extraction subnetworks are respectively connected to the action prediction subnetwork, and the weight decision subnetwork is connected between the multiple feature extraction subnetworks and the action prediction subnetwork.
[0031] An associated virtual object is a virtual object that is associated with a target virtual object in a game scene. In the present application, the associated virtual object includes but is not limited to an NPC (Non Player Character), a friendly virtual character, an enemy virtual character, etc.
[0032] Observation status data refers to status data observable in the game scene. In the present application, the observation status data includes but is not limited to at least one of the object status data of the target virtual object, the object status data of the associated virtual objects of the target virtual object, and the scene status data of the game scene. Among them, the object status data of the target virtual object includes but is not limited to at least one of the position, orientation, category, blood volume, moves, skill CD status, movable range, etc. of the target virtual object, the object status data of the associated virtual objects includes but is not limited to at least one of the number, position, orientation, category, blood volume, moves, skill CD status, movable range, etc. of the associated virtual objects, and the scene status data of the game scene includes but is not limited to at least one of entrances and exits, buildings, rivers, obstacles, etc.
[0033] The following describes in detail the game behavior action prediction method provided in the embodiment of the present application in combination with multiple specific application examples.
[0034] The game behavior action prediction method provided in the embodiment of the present application can be run on a local terminal device or a server. When the game behavior action prediction method is run on a server, the method can be implemented and executed based on a cloud interaction system, wherein the cloud interaction system includes a server and a client device.
[0035] In an optional implementation, various cloud applications, such as cloud games, can be run under the cloud interaction system. Taking cloud games as an example, cloud games refer to a game mode based on cloud computing. In the operation mode of cloud games, the operating body of the game program and the main body of the game screen presentation are separated. The storage and operation of the game behavior action prediction method are completed on the cloud game server. The role of the client device is used for receiving and sending data and presenting the game screen. For example, the client device can be a display device with data transmission function close to the user side, such as a mobile terminal, a TV, a computer, a handheld computer, etc.; but the cloud game server in the cloud is used for information processing. When playing the game, the player operates the client device to send an operation instruction to the cloud game server. The cloud game server runs the game according to the operation instruction, encodes and compresses the game screen and other data, returns it to the client device through the network, and finally decodes and outputs the game screen through the client device.
[0036] In an optional embodiment, taking a game as an example, a local terminal device stores a game program and is used to present a game screen. The local terminal device is used to interact with the player through a graphical user interface, that is, the game program is downloaded and installed and run by an electronic device in a conventional manner. The local terminal device may provide the graphical user interface to the player in a variety of ways, such as rendering and displaying it on a display screen of the terminal, or providing it to the player through a holographic projection. For example, the local terminal device may include a display screen and a processor, the display screen is used to present a graphical user interface, the graphical user interface includes at least a game screen, and the processor is used to run the game, generate a graphical user interface, and control the display of the graphical user interface on the display screen.
[0037] In a possible implementation, the game screen displays at least part of the game scene and the game behavior actions between the target virtual object (e.g., AI robot) and the associated virtual objects such as NPC (Non-Player Character), friendly virtual character, and enemy virtual character in the game scene. The target game behavior action of the target virtual object can be predicted by the game behavior action prediction method provided in the embodiment of the present application through the game behavior prediction neural network. For details, see Figure 1As shown, the general process of the game behavior action prediction method provided in the embodiment of the present application is as follows:
[0038] Step 101: Obtain observation state data of a target virtual object in a current game scene; wherein the observation state data is used to characterize a game state of the target virtual object in the current game scene.
[0039] In a specific implementation, at least one of the object state data of the target virtual object, the object state data of the associated virtual objects of the target virtual object, and the scene state data of the current game scene can be obtained as the observation state data. For example, at least one of the position, orientation, category, blood volume, moves, skill CD status, movable range, etc. of the target virtual object in the current game scene is obtained as the object state data of the target virtual object; at least one of the number, position, orientation, category, blood volume, moves, skill CD status, movable range, etc. of the associated virtual objects of the target virtual objects such as NPCs, friendly virtual characters, and enemy virtual characters in the current game scene is obtained as the object state data of the associated virtual objects of the target virtual object; and at least one of the entrances and exits, buildings, rivers, obstacles, etc. in the current game scene is obtained as the scene state data of the current game scene; and at least one of the object state data of the target virtual object, the object state data of the associated virtual objects of the target virtual object, and the scene state data of the current game scene is used as the observation state data.
[0040] Step 102: Input the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different.
[0041] In a specific implementation, in one possible implementation, the observed state data can be directly input into multiple feature extraction subnetworks to obtain multiple intermediate observed feature data. In another possible implementation, the observed state data can also be first input into a state preprocessing subnetwork to obtain initial observed feature data, and then the initial observed feature data can be input into multiple feature extraction subnetworks to obtain multiple intermediate observed feature data. For example, the observed state data is input into a state preprocessing subnetwork for preprocessing operations such as vector calculation to obtain initial observed feature data, and then the initial observed feature data is input into multiple feature extraction subnetworks to obtain multiple intermediate observed feature data.
[0042] Step 103: Input the observed state data into the weight decision subnetwork to obtain feature weights for multiple intermediate observed feature data.
[0043] In a specific implementation, in one embodiment, the observation state data input into the weight decision subnetwork may be the same as the observation state data input into the multiple feature extraction subnetworks, that is, all the observation state data may be input into the weight decision subnetwork for weight calculation to obtain feature weights corresponding to multiple intermediate observation feature data. In another embodiment, the observation state data input into the weight decision subnetwork may be different from the observation state data input into the multiple feature extraction subnetworks, that is, part of the observation state data may be input into the weight decision subnetwork for weight calculation to obtain feature weights corresponding to multiple intermediate observation feature data. For example, specified observation state data or random observation state data in the observation state data may be input into the weight decision subnetwork for weight calculation to obtain feature weights corresponding to multiple intermediate observation feature data.
[0044] Step 104: Determine target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data.
[0045] In a specific implementation, in a possible implementation manner, a weighted summation process may be performed on a plurality of intermediate observation feature data based on feature weights of the plurality of intermediate observation feature data to obtain target observation feature data. In another possible implementation, based on the feature weights of multiple intermediate observation feature data, intermediate observation feature data that meet the activation conditions are selected from multiple intermediate observation feature data as the observation feature data to be fused, and then, based on the feature weights of each observation feature data to be fused, weighted summation is performed on each observation feature data to be fused to obtain the target observation feature data; specifically, in one embodiment, based on the feature weights of multiple intermediate observation feature data, intermediate observation feature data with feature weights not less than a weight threshold are selected from multiple intermediate observation feature data as the observation feature data to be fused; in another embodiment, based on the feature weights of multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2, for example, M intermediate observation feature data with the highest weights are selected from N intermediate observation feature data as the observation feature data to be fused, and based on the feature weights of the M observation feature data to be fused, weighted summation is performed on the M observation feature data to be fused to obtain the target observation feature data, wherein M and N are both positive integers and M is less than N.
[0046] Step 105: Input the target observation feature data into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
[0047] In actual applications, after inputting the target observation feature data into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene, the target virtual object can also be controlled to perform the target game behavior action in the current game scene.
[0048] In the present application, see Figure 2 As shown in FIG. 1 , the game behavior prediction neural network is divided into four neural network modules, namely, a data preprocessing module composed of a state preprocessing subnetwork, a plurality of expert modules composed of feature extraction subnetworks, an expert selection module composed of a weight decision subnetwork, and an action generation module composed of an action prediction subnetwork. In actual applications, the observed state data of the target virtual object in the current game scene is sequentially passed through the data preprocessing neural network module, the plurality of expert modules, and the action generation module to predict the target game behavior action to be executed, and the expert selection module controls whether the plurality of expert modules participate in the calculation of the subsequent action generation module based on the observed state data of the target virtual object in the current game scene. For details, refer to FIG. Figure 3 As shown, the game behavior action prediction process based on the game behavior prediction neural network is as follows:
[0049] Step 301: Input the observation state data o of the target virtual object in the current game scene into the data preprocessing module to obtain initial observation feature data s.
[0050] Step 302: Input the initial observation feature data s into n expert modules to obtain n intermediate observation feature data out expert ; Where n represents the number of expert modules, and n is a positive integer greater than 1.
[0051] Step 303: Input the observation state data o' (o' and o may be the same or different) of the target virtual object in the current game scene into the expert selection module to obtain n intermediate observation feature data out expert The feature weight w is
[0052] Step 304: Based on n intermediate observation feature data out expert The feature weight w of each intermediate observation feature data out expert Perform weighted summation to obtain the target observation feature data out mixed .
[0053] In practical applications, we can use n intermediate observation feature data out expert The feature weight w is For each intermediate observation feature data out expert Perform weighted summation to obtain the target observation feature data out mixed, and considering the computing resources and actual effect, only n intermediate observation feature data out can be retained expert The intermediate observation feature data out that meets the activation conditions expert Perform weighted summation to obtain the target observation feature data out mixed For example, retain the m intermediate observation feature data out with the highest feature weight w expert To activate and perform weighted summation to obtain the target observation feature data out mixed .
[0054] Step 305: Output the target observation feature data mixed The action generation module is input to predict the target game behavior action a of the target virtual object in the current game scene.
[0055] Step 306: Control the target virtual object to perform target game behavior action a in the current game scene.
[0056] At this point, for each observation state data, the expert selection module will control the activation of subsequent expert modules, so that different observation state data can be processed by different expert modules. Since different expert modules face different input samples, the overall training samples used in training will be different, which will allow different expert modules to generate feature data that can generate game behavior actions of different behavior styles to meet game requirements. Moreover, although there are multiple expert modules, only a small part of them will be activated each time they are calculated, without bringing too much additional computing overhead, and the computing efficiency is relatively high. In addition, the entire process does not require any human intervention, which greatly reduces the labor cost. Multiple styles of game AI can be generated through one training, which is an efficient end-to-end multi-style game AI generation method.
[0057] Based on the above embodiments, the present application provides a game behavior action prediction device, which is applied to a game behavior prediction neural network; the game behavior prediction neural network includes at least a plurality of feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork. Figure 4 As shown, the game behavior action prediction device 400 provided in the embodiment of the present application at least includes:
[0058] The data acquisition unit 401 is used to acquire the observed state data of the target virtual object in the current game scene; wherein the observed state data is used to characterize the game state of the target virtual object in the current game scene;
[0059] A feature extraction unit 402 is used to input the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0060] A weight decision unit 403, used for inputting the observation state data into the weight decision subnetwork to obtain feature weights for a plurality of intermediate observation feature data;
[0061] A feature fusion unit 404, configured to determine target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0062] The action prediction unit 405 is used to input the target observation feature data into the action prediction sub-network to predict the target game behavior action of the target virtual object in the current game scene.
[0063] In a possible implementation, when acquiring the observation state data of the target virtual object in the current game scene, the data acquisition unit 401 is specifically used to:
[0064] At least one of the object state data of the target virtual object, the object state data of the associated virtual object of the target virtual object, and the scene state data of the current game scene is acquired as the observation state data.
[0065] In a possible implementation, the game behavior prediction neural network further includes a state preprocessing subnetwork; when the observed state data is input into a plurality of feature extraction subnetworks to obtain a plurality of intermediate observed feature data, the feature extraction unit 402 is specifically used to:
[0066] Input the observed state data into the state preprocessing subnetwork to obtain initial observed feature data;
[0067] The initial observation feature data is input into multiple feature extraction sub-networks to obtain multiple intermediate observation feature data.
[0068] In a possible implementation, when determining the target observation feature data based on the plurality of intermediate observation feature data and the feature weights corresponding to the plurality of intermediate observation feature data, the feature fusion unit 404 is specifically configured to:
[0069] Based on the feature weights of the plurality of intermediate observation feature data, a weighted sum process is performed on the plurality of intermediate observation feature data to obtain the target observation feature data.
[0070] In a possible implementation, when determining the target observation feature data based on the plurality of intermediate observation feature data and the feature weights corresponding to the plurality of intermediate observation feature data, the feature fusion unit 404 is specifically configured to:
[0071] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data satisfying the activation condition is selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0072] Based on the feature weights of each observation feature data to be fused, weighted sum processing is performed on each observation feature data to be fused to obtain the target observation feature data.
[0073] In a possible implementation, based on the feature weights of the plurality of intermediate observation feature data, when selecting the intermediate observation feature data that meets the activation condition as the observation feature data to be fused from the plurality of intermediate observation feature data, the feature fusion unit 404 is specifically used to:
[0074] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data whose feature weights are not less than a weight threshold are selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0075] or;
[0076] Based on the feature weights of multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from the multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2.
[0077] In a possible implementation, the game behavior action prediction device 400 provided in the embodiment of the present application further includes:
[0078] The action execution unit 406 is used to control the target virtual object to execute the target game behavior action in the current game scene.
[0079] It should be noted that the principle of solving the technical problem by the game behavior action prediction device 400 provided in the embodiment of the present application is similar to the game behavior action prediction method provided in the embodiment of the present application. Therefore, the implementation of the game behavior action prediction device 400 provided in the embodiment of the present application can refer to the implementation of the game behavior action prediction method provided in the embodiment of the present application, and the repeated parts will not be repeated.
[0080] After introducing the game behavior action prediction method and device provided in the embodiment of the present application, the electronic device provided in the embodiment of the present application is briefly introduced next.
[0081] See also Figure 5As shown, the electronic device 500 provided in the embodiment of the present application at least includes a processor 501, a memory 502, and a computer program stored in the memory 502 and executable on the processor 501. When the processor 501 executes the computer program, the game behavior action prediction method provided in the embodiment of the present application is implemented. For example, when the processor 501 executes the computer program, the game behavior action of the target virtual object in the current game scene is predicted through the game behavior prediction neural network; wherein the game behavior prediction neural network includes at least a plurality of feature extraction subnetworks, a weight decision subnetwork, and an action prediction subnetwork. Specifically, when the processor 501 executes the computer program, the following steps can be implemented:
[0082] Obtaining observation state data of the target virtual object in the current game scene; wherein the observation state data is used to characterize the game state of the target virtual object in the current game scene;
[0083] Inputting the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0084] Inputting the observed state data into the weight decision subnetwork to obtain feature weights for multiple intermediate observed feature data;
[0085] Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0086] The target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
[0087] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may be specifically implemented:
[0088] At least one of the object state data of the target virtual object, the object state data of the associated virtual object of the target virtual object, and the scene state data of the current game scene is acquired as the observation state data.
[0089] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may be specifically implemented:
[0090] Input the observed state data into the state preprocessing subnetwork to obtain initial observed feature data;
[0091] The initial observation feature data is input into multiple feature extraction sub-networks to obtain multiple intermediate observation feature data.
[0092] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may be specifically implemented:
[0093] Based on the feature weights of the plurality of intermediate observation feature data, a weighted sum process is performed on the plurality of intermediate observation feature data to obtain the target observation feature data.
[0094] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may be specifically implemented:
[0095] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data satisfying the activation condition is selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0096] Based on the feature weights of each observation feature data to be fused, weighted sum processing is performed on each observation feature data to be fused to obtain the target observation feature data.
[0097] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may be specifically implemented:
[0098] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data whose feature weights are not less than a weight threshold are selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0099] or;
[0100] Based on the feature weights of multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from the multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2.
[0101] In a possible implementation manner, when the processor 501 executes the computer program, the following steps may also be implemented:
[0102] Control the target virtual object to perform the target game behavior action in the current game scene.
[0103] In a possible implementation, the electronic device 500 provided in the embodiment of the present application may further include a bus 503 connecting different components (including the processor 501 and the memory 502). The bus 503 represents one or more of several types of bus structures, including a memory bus, a peripheral bus, a local bus, etc.
[0104] In a possible implementation, the memory 502 may include a readable medium in the form of a volatile memory, such as a RAM (Random Access Memory) 5021 and / or a cache memory 5022, and may further include a ROM (Read Only Memory) 5023. The memory 502 may also include a program tool 5025 having a group (at least one) of program modules 5024, and the program modules 5024 include but are not limited to: an operating subsystem, one or more application programs, other program modules, and program data, each of which or a certain combination may include the implementation of a network environment.
[0105] In a possible implementation, the electronic device 500 may also communicate with one or more external devices 504 (e.g., keyboard, remote control, etc.), and may also communicate with one or more devices that enable a user to interact with the electronic device 500 (e.g., mobile phone, computer, etc.), and / or communicate with any device that enables the electronic device 500 to communicate with one or more other electronic devices 500 (e.g., router, modem, etc.). Such communication may be performed through an I / O (Input / Output) interface 505. Furthermore, the electronic device 500 may also communicate with one or more networks (e.g., LAN (Local Area Network), WAN (Wide Area Network) and / or public networks, such as the Internet) through a network adapter 506. Figure 5 As shown, the network adapter 506 communicates with other modules of the electronic device 500 via the bus 503. It should be understood that although Figure 5 Not shown, other hardware and / or software modules may be used in conjunction with the electronic device 500, including but not limited to: microcode, device drivers, redundant processors, external disk drive arrays, RAID (Redundant Arrays of Independent Disks) subsystems, tape drives, and data backup storage subsystems.
[0106] It should be noted that Figure 5 The electronic device 500 shown is merely an example and should not bring any limitation to the functions and scope of use of the embodiments of the present application.
[0107] The computer-readable storage medium provided in the embodiment of the present application is introduced below. The computer-readable storage medium provided in the embodiment of the present application stores computer instructions, and when the computer instructions are executed by the processor, the game behavior action prediction method provided in the embodiment of the present application is implemented. For example, when the computer instructions are executed by the processor, the target game behavior action of the target virtual object in the current game scene is predicted through the game behavior prediction neural network; wherein the game behavior prediction neural network includes at least multiple feature extraction subnetworks, weight decision subnetworks and action prediction subnetworks. Specifically, when the computer instructions are executed by the processor, the following steps can be implemented:
[0108] Obtaining observation state data of the target virtual object in the current game scene; wherein the observation state data is used to characterize the game state of the target virtual object in the current game scene;
[0109] Inputting the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0110] Inputting the observed state data into the weight decision subnetwork to obtain feature weights for multiple intermediate observed feature data;
[0111] Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0112] The target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
[0113] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may be implemented:
[0114] At least one of the object state data of the target virtual object, the object state data of the associated virtual object of the target virtual object, and the scene state data of the current game scene is acquired as the observation state data.
[0115] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may be implemented:
[0116] Input the observed state data into the state preprocessing subnetwork to obtain initial observed feature data;
[0117] The initial observation feature data is input into multiple feature extraction sub-networks to obtain multiple intermediate observation feature data.
[0118] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may be implemented:
[0119] Based on the feature weights of the plurality of intermediate observation feature data, a weighted sum process is performed on the plurality of intermediate observation feature data to obtain the target observation feature data.
[0120] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may be implemented:
[0121] Based on the first observed state data, initial observed feature data is obtained using a state preprocessing subnetwork;
[0122] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data satisfying the activation condition is selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0123] Based on the feature weights of each observation feature data to be fused, weighted sum processing is performed on each observation feature data to be fused to obtain the target observation feature data.
[0124] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may be implemented:
[0125] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data whose feature weights are not less than a weight threshold are selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0126] or;
[0127] Based on the feature weights of multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from the multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2.
[0128] In a possible implementation manner, when the computer instruction is executed by a processor, the following steps may also be implemented:
[0129] Control the target virtual object to perform the target game behavior action in the current game scene.
[0130] In addition, the game behavior action prediction method provided in the embodiment of the present application can also be implemented as a computer program product, which includes a program code. When the program code is run on a processor, it implements the game behavior action prediction method provided in the embodiment of the present application. For example, when the program code is run on a processor, it predicts the target game behavior action of the target virtual object in the current game scene through a game behavior prediction neural network; wherein the game behavior prediction neural network includes at least a plurality of feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork. Specifically, when the program code is run on a processor, the following steps can be implemented:
[0131] Obtaining observation state data of the target virtual object in the current game scene; wherein the observation state data is used to characterize the game state of the target virtual object in the current game scene;
[0132] Inputting the observed state data into a plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different;
[0133] Inputting the observed state data into the weight decision subnetwork to obtain feature weights for multiple intermediate observed feature data;
[0134] Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data;
[0135] The target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
[0136] In a possible implementation manner, the program code may specifically implement the following steps when running on a processor:
[0137] At least one of the object state data of the target virtual object, the object state data of the associated virtual object of the target virtual object, and the scene state data of the current game scene is acquired as the observation state data.
[0138] In a possible implementation manner, the program code may specifically implement the following steps when running on a processor:
[0139] Input the observed state data into the state preprocessing subnetwork to obtain initial observed feature data;
[0140] The initial observation feature data is input into multiple feature extraction sub-networks to obtain multiple intermediate observation feature data.
[0141] In a possible implementation manner, when the program code is executed on a processor, the following steps may be specifically implemented:
[0142] Based on the feature weights of the plurality of intermediate observation feature data, a weighted sum process is performed on the plurality of intermediate observation feature data to obtain the target observation feature data.
[0143] In a possible implementation manner, the program code may specifically implement the following steps when running on a processor:
[0144] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data satisfying the activation condition is selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0145] Based on the feature weights of each observation feature data to be fused, weighted sum processing is performed on each observation feature data to be fused to obtain the target observation feature data.
[0146] In a possible implementation manner, the program code may specifically implement the following steps when running on a processor:
[0147] Based on the feature weights of the plurality of intermediate observation feature data, the intermediate observation feature data whose feature weights are not less than a weight threshold are selected from the plurality of intermediate observation feature data as the observation feature data to be fused;
[0148] or;
[0149] Based on the feature weights of multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from the multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2.
[0150] In a possible implementation manner, the program code may further implement the following steps when running on a processor:
[0151] Control the target virtual object to perform the target game behavior action in the current game scene.
[0152] The computer program product provided in the embodiments of the present application may adopt any combination of one or more readable storage media, wherein the readable storage medium may be, but is not limited to, an electrical, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus or device, or any combination of the above. Specifically, more specific examples of readable storage media (a non-exhaustive list) include: an electrical connection with one or more wires, a portable disk, a hard disk, RAM, ROM, EPROM (Erasable Programmable Read Only Memory), optical fiber, CD-ROM (Compact Disc Read-Only Memory), an optical storage device, a magnetic storage device, or any suitable combination of the above.
[0153] The computer program product provided in the embodiment of the present application may adopt a CD-ROM and include program code, and may also be run on electronic devices such as the aforementioned local terminal device, server, etc. However, the computer program product provided in the embodiment of the present application is not limited thereto. In the embodiment of the present application, the readable storage medium may be any tangible medium containing or storing program code, and the program code may be used by or in combination with an instruction execution system, apparatus, or device.
[0154] It should be noted that, although several units or subunits of the device are mentioned in the above detailed description, this division is merely exemplary and not mandatory. In fact, according to the embodiments of the present application, the features and functions of two or more units described above can be embodied in one unit. Conversely, the features and functions of one unit described above can be further divided into multiple units to be embodied.
[0155] In addition, although the operations of the method of the present application are described in a specific order in the drawings, this does not require or imply that the operations must be performed in this specific order, or that all the operations shown must be performed to achieve the desired results. Additionally or alternatively, some steps may be omitted, multiple steps may be combined into one step, and / or one step may be decomposed into multiple steps.
[0156] Although the preferred embodiments of the present application have been described, those skilled in the art may make additional changes and modifications to these embodiments once they are aware of the basic creative concepts. Therefore, the appended claims are intended to be interpreted as including the preferred embodiments and all changes and modifications falling within the scope of the present application.
[0157] Obviously, those skilled in the art can make various changes and modifications to the embodiments of the present application without departing from the spirit and scope of the embodiments of the present application. Thus, if these modifications and variations of the embodiments of the present application fall within the scope of the claims of the present application and their equivalents, the present application is also intended to include these modifications and variations.
Claims
1. A method for predicting game behavior, characterized in that: Applied to a game behavior prediction neural network; the game behavior prediction neural network at least includes multiple feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork; the game behavior action prediction method includes: Acquire observation state data of the target virtual object in the current game scene; wherein the observation state data is used to characterize the game state of the target virtual object in the current game scene; Inputting the observed state data into the multiple feature extraction sub-networks to obtain multiple intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different; Inputting the observed state data into the weight decision subnetwork to obtain feature weights for the plurality of intermediate observed feature data; Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data; The target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene.
2. The game behavior action prediction method according to claim 1, characterized in that: Get the observation status data of the target virtual object in the current game scene, including: At least one of the object state data of the target virtual object, the object state data of the associated virtual object of the target virtual object, and the scene state data of the current game scene is acquired as the observation state data.
3. The game behavior action prediction method according to claim 1, characterized in that: The game behavior prediction neural network also includes a state preprocessing subnetwork; Inputting the observed state data into the plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data, comprising: Inputting the observed state data into the state preprocessing subnetwork to obtain initial observed feature data; The initial observation feature data is input into the plurality of feature extraction sub-networks to obtain the plurality of intermediate observation feature data.
4. The game behavior action prediction method according to claim 1, characterized in that: Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data includes: Based on the feature weights of the plurality of intermediate observation feature data, weighted sum processing is performed on the plurality of intermediate observation feature data to obtain the target observation feature data.
5. The game behavior action prediction method according to claim 1, characterized in that: Determining target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data includes: Based on the feature weights of the plurality of intermediate observation feature data, selecting the intermediate observation feature data that meets the activation condition from the plurality of intermediate observation feature data as the observation feature data to be fused; Based on the feature weights of each of the observation feature data to be fused, weighted sum processing is performed on the each of the observation feature data to be fused to obtain the target observation feature data.
6. The game behavior action prediction method according to claim 1, characterized in that: Based on the feature weights of the plurality of intermediate observation feature data, selecting the intermediate observation feature data that meets the activation condition from the plurality of intermediate observation feature data as the observation feature data to be fused includes: Based on the feature weights of the plurality of intermediate observation feature data, selecting intermediate observation feature data whose feature weights are not less than a weight threshold from the plurality of intermediate observation feature data as the observation feature data to be fused; or; Based on the feature weights of the multiple intermediate observation feature data, K intermediate observation feature data with the highest feature weights are selected from the multiple intermediate observation feature data as the observation feature data to be fused; wherein K is a positive integer greater than 2.
7. The game behavior action prediction method according to claim 1, characterized in that: After the target observation feature data is input into the action prediction subnetwork to predict the target game behavior action of the target virtual object in the current game scene, the method further includes: The target virtual object is controlled to perform the target game behavior action in the current game scene.
8. A game action prediction device, characterized in that: Applied to a gaming behavior prediction neural network; the gaming behavior prediction neural network comprises at least a plurality of feature extraction subnetworks, a weight decision subnetwork and an action prediction subnetwork; the gaming behavior action prediction device comprises: A data acquisition unit, used to acquire observation state data of a target virtual object in a current game scene; wherein the observation state data is used to characterize a game state of the target virtual object in the current game scene; A feature extraction unit, used for inputting the observed state data into the plurality of feature extraction sub-networks to obtain a plurality of intermediate observed feature data; wherein the neural network parameters of different feature extraction sub-networks are different; A weight decision unit, used for inputting the observation state data into the weight decision subnetwork to obtain feature weights for the plurality of intermediate observation feature data; a feature fusion unit, configured to determine target observation feature data based on the plurality of intermediate observation feature data and feature weights corresponding to the plurality of intermediate observation feature data; An action prediction unit is used to input the target observation feature data into the action prediction sub-network to predict the target game behavior action of the target virtual object in the current game scene.
9. An electronic device, characterized in that: include: A memory, a processor, and a computer program stored in the memory and executable on the processor, wherein the processor implements the game behavior action prediction method as described in any one of claims 1 to 7 when executing the computer program.
10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores computer instructions, and when the computer instructions are executed by a processor, the game behavior action prediction method according to any one of claims 1 to 7 is implemented.
