Card game method, device, computer device and storage medium
By jointly training subnetworks for deck building and card-playing strategies within the same target neural network, the problem of deck rationality and strategy matching in AI battles is solved, achieving more effective AI battle strategies and resource utilization.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-10-20
- Publication Date
- 2026-03-17
AI Technical Summary
Existing AI-powered battle solutions often result in poorly rational deck building during the deck-building phase, and the card-playing strategies are not well-matched with the decks, leading to a poor interactive experience.
The first sub-network used for deck building and the second sub-network used for card playing strategy are jointly deployed in the same target neural network. By jointly training the two sub-networks, the correlation between the two sub-networks is improved, ensuring that there is a correlation between the outputs, and thus achieving accurate and reasonable deck building and card playing strategies.
Generate more effective AI battle strategies, improve the efficiency of AI resource utilization, ensure the rationality and accuracy of deck and card playing strategies, and enhance the game interaction effect.
Smart Images

Figure CN115581923B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of computer technology, and more specifically, to a card battle method, apparatus, computer device, and storage medium. Background Technology
[0002] In turn-based online card battle games, the player's battle process can usually be divided into two stages. The first stage is the deck-building stage, in which the player selects a target number of cards from a large number of candidate cards to form a deck to enter the second stage, the battle stage. The battle stage is played in a turn-based manner. In each battle round, the player can draw cards from the deck and formulate a card-playing strategy based on the card attributes and game mechanics (such as using cards to attack the opponent, equipping cards, etc.) in order to strive for victory in the game.
[0003] To provide players with a better gaming experience, an Artificial Intelligence (AI) battle strategy has been proposed. This involves using different AI algorithms to battle against online players at different stages of the game. For example, the AI battle strategy can be applied to situations such as player disconnection, AI challenges, and reward matches.
[0004] However, existing AI battle solutions suffer from poor deck composition during the deck-building phase. During the battle phase, there are issues such as mismatch between the planned card-playing strategy and the selected deck, resulting in an unreasonable strategy and poor interactive experience. Therefore, how to generate more effective AI battle strategies to make more efficient use of AI resources is a problem worth studying. Summary of the Invention
[0005] This disclosure provides at least one card battle method, apparatus, computer device, and storage medium.
[0006] In a first aspect, the present disclosure provides a card battle method, including:
[0007] In response to the current game being in the deck-building phase, each candidate card and each target card in the already constructed deck are input into the first sub-network of the target neural network to obtain target selection action information; the target selection action information is used to indicate the card selected from the candidate cards to be added to the already constructed deck;
[0008] In response to the current game being in the battle phase, for any battle round, the first completed deck built in the deck-building phase and the battle situation information in the battle round are input into the second sub-network of the target neural network to obtain the target card-playing strategy in the battle round, and play cards according to the target card-playing strategy.
[0009] The battle situation information is used to characterize various information that can affect the battle outcome; the target neural network is obtained by jointly training the first sub-network and the second sub-network.
[0010] In one possible implementation, the target neural network further includes a third sub-network;
[0011] After inputting each candidate card and each target card in the constructed deck into the first sub-network of the target neural network, the method further includes:
[0012] Using the first sub-network, a first feature extraction process is performed on each target card included in the constructed card deck to obtain a first extracted feature. Based on the first extracted feature, a first target feature is determined to characterize each target card included in the constructed card deck.
[0013] Using the third sub-network, the first target value corresponding to the currently constructed card deck is determined based on the first target feature, and the first target value is displayed.
[0014] In one possible implementation, after inputting the first completed deck built during the deck-building phase and the battle situation information during the battle round into the second sub-network of the target neural network, the method further includes:
[0015] For any of the aforementioned battle rounds, the second sub-network is used to perform second feature extraction processing on each target card in the first completed deck to obtain the second extracted features;
[0016] Based on the battle situation information and the second extracted features, the battle features for this battle round are determined;
[0017] Using the third sub-network, based on the battle characteristics and the second target characteristics used to characterize each target card in the first completed deck, the second target value in the current battle round is determined and displayed.
[0018] In one possible implementation, the target neural network is trained using the following steps:
[0019] For any game in multiple game matches, during the card-building stage, each candidate card sample and each target card sample in the constructed sample card deck are input into the first sub-network of the neural network to be trained to obtain predicted selection action information; the predicted selection action information is used to indicate the card sample selected from the candidate card samples to be added to the constructed sample card deck.
[0020] During the battle phase, for any battle round in the game, the second completed deck built during the deck-building phase and the battle situation information of the battle round are input into the second sub-network of the neural network to be trained to determine the predicted card-playing strategy for the battle round.
[0021] Based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games, target loss information is determined, and the target loss information is used to iteratively train the neural network to be trained until the training cutoff condition is met, thereby obtaining the target neural network used for deck building and determining card-playing strategies.
[0022] In one possible implementation, each candidate card sample and each target card sample in the constructed sample card set are input into the first sub-network of the neural network to be trained to obtain predicted selection action information, including:
[0023] Each candidate card sample and each target card sample in the constructed sample card group are input into the first sub-network. The first sub-network is used to perform third feature extraction processing on each candidate card sample to obtain the third extracted features.
[0024] The fourth feature extraction process is performed on each target card sample included in the constructed sample card group to obtain the fourth extracted feature;
[0025] Based on the third and fourth extraction features, determine the card samples to be selected from the candidate card samples at the current time;
[0026] Based on each of the fourth extracted features, a correlation feature with a preset feature length is generated; the correlation feature is used to characterize the correlation between each target card sample included in the constructed sample card set;
[0027] The predicted selection action information is determined based on the third extracted feature and the associated feature of the card sample to be selected.
[0028] In one possible implementation, the predicted selection action information is determined based on the third extracted feature and the associated feature of the card sample to be selected, including:
[0029] Using an attention mechanism, a target feature map is generated based on the third extracted feature and the associated feature of the card sample to be selected;
[0030] The target feature map is classified to determine the probability of each card sample to be selected as a card sample to be added to the constructed sample card group;
[0031] The predicted selection action information is determined based on the probability corresponding to each of the selected card samples.
[0032] In one possible implementation, the method further includes:
[0033] Based on the association features, a third target feature is determined to characterize each target card sample included in the constructed sample card set;
[0034] Using the third sub-network in the neural network to be trained, the first prediction value corresponding to the currently constructed sample card group is determined based on the third target feature;
[0035] The step of determining target loss information based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games includes:
[0036] The first loss information is determined based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games.
[0037] The second loss information is determined based on the first predicted value corresponding to each of the plurality of game matches and the match result;
[0038] The target loss information is determined based on the first loss information and the second loss information.
[0039] In one possible implementation, the second completed deck built during the deck-building phase and the battle situation information during the battle round are input into the second sub-network of the neural network to be trained to determine the predicted card-playing strategy for the battle round, including:
[0040] For any of the aforementioned battle rounds, the second completed deck and the battle situation information of the aforementioned battle round are input into the second sub-network. Using the second sub-network, the fifth feature extraction process is performed on each target card sample in the completed deck to obtain the fifth extracted feature.
[0041] Based on the battle situation information, determine the visible card samples in the current battle round, and perform sixth feature extraction processing on each of the visible card samples to obtain the sixth extracted feature;
[0042] Based on the aforementioned battle situation information, determine the state features that characterize the battle status information in the current battle round;
[0043] Based on the fifth extracted feature, the sixth extracted feature, and the state feature, the predicted card-playing strategy for the current round of the battle is determined.
[0044] In one possible implementation, determining the predicted card-playing strategy for the current round of the game based on the fifth extracted feature, the sixth extracted feature, and the state feature includes:
[0045] The fifth extracted feature, the sixth extracted feature, and the state feature are combined to obtain the battle features;
[0046] Based on the processing results obtained after performing fully connected processing and classification processing on the aforementioned battle features, the predicted card-playing strategy for the current battle round is determined.
[0047] In one possible implementation, the method further includes:
[0048] Based on the aforementioned battle characteristics and the fourth target characteristics used to characterize each target card sample in the second completed deck, determine the second predicted value for the current battle round;
[0049] Determining the target loss information based on the first loss information and the second loss information includes:
[0050] The third loss information is determined based on the second predicted value corresponding to each of the plurality of game games and the battle result after playing cards according to the predicted card-playing strategy;
[0051] The target loss information is determined based on the first loss information, the second loss information, and the third loss information.
[0052] Secondly, this disclosure also provides a card battle device, comprising:
[0053] The first battle module is used to respond to the current game being in the deck-building phase by inputting each candidate card and each target card in the constructed deck into the first sub-network of the target neural network to obtain target selection action information; the target selection action information is used to indicate the card selected from the candidate cards to be added to the constructed deck.
[0054] The second battle module is used to respond to the current game being in the battle phase. For any battle round, the first completed deck built in the deck-building phase and the battle situation information in the battle round are input into the second sub-network of the target neural network to obtain the target card-playing strategy in the battle round, and play cards according to the target card-playing strategy.
[0055] The battle situation information is used to characterize various information that can affect the battle outcome; the target neural network is obtained by jointly training the first sub-network and the second sub-network.
[0056] Thirdly, an optional implementation of this disclosure also provides a computer device, a processor, and a memory, wherein the memory stores machine-readable instructions executable by the processor, and the processor is configured to execute the machine-readable instructions stored in the memory. When the machine-readable instructions are executed by the processor, the steps of the first aspect above, or any possible implementation of the first aspect, are performed.
[0057] Fourthly, an optional implementation of this disclosure also provides a computer-readable storage medium storing a computer program that, when run, performs the steps of the first aspect or any possible implementation of the first aspect.
[0058] For a description of the effects of the aforementioned card battle device, computer equipment, and computer-readable storage medium, please refer to the explanation of the card battle method above; it will not be repeated here.
[0059] The card battle method, apparatus, computer equipment, and storage medium provided in this disclosure, by jointly deploying a first sub-network for deck building and a second sub-network for formulating card-playing strategies in the same target neural network, can achieve joint training between the first and second sub-networks during training, improving the correlation between the two sub-networks. Since the second sub-network relies on the first completed deck built by the first sub-network when determining its card-playing strategy, a correlation between the outputs of the second and first sub-networks can be guaranteed. Because both the jointly trained first and second sub-networks have reliable prediction accuracy, during game battles, the first sub-network in the trained target neural network can obtain accurate and reasonable action selection information, thereby selecting a reasonable and accurate deck. Based on this, the second sub-network in the trained target neural network, along with the first completed deck built by the first sub-network, can determine an accurate and reasonable card-playing strategy, allowing for more strategic card play in battle interactions.
[0060] In other words, the card battle scheme provided in this embodiment can generate more effective AI battle strategies, thereby achieving more effective utilization of AI resources.
[0061] Furthermore, in the embodiments of this disclosure, when training the neural network to be trained, since the second sub-network needs to rely on the second completed deck built based on the first sub-network when determining its card-playing strategy, there is a correlation between the output of the second sub-network and the output of the first sub-network. Based on the action selection information output by the first sub-network, the card-playing strategy output by the second sub-network that is related to the second completed deck, and the battle result after playing cards according to the card-playing strategy, the target loss information is determined. This fully considers the impact of the outputs of the two sub-networks on the battle result, thus determining reasonable target loss information. Iterative training of the neural network to be trained using this reasonable target loss information not only enables mutual supervision and cooperation between the first and second sub-networks during training, preventing their outputs from deviating from each other and achieving collaborative updates between the two sub-networks to achieve joint optimization, but also improves the accuracy of the action selection information output by the first sub-network, resulting in a reasonable and accurate deck, and improves the rationality of the card-playing strategy output by the second sub-network, achieving reasonable card play.
[0062] To make the above-mentioned objects, features and advantages of this disclosure more apparent and understandable, preferred embodiments are described below in detail with reference to the accompanying drawings. Attached Figure Description
[0063] To more clearly illustrate the technical solutions of the embodiments of this disclosure, the accompanying drawings used in the embodiments will be briefly described below. These drawings are incorporated in and constitute a part of this specification. They illustrate embodiments conforming to this disclosure and, together with the specification, serve to explain the technical solutions of this disclosure. It should be understood that the following drawings only show some embodiments of this disclosure and should not be considered as limiting the scope. Those skilled in the art can obtain other related drawings based on these drawings without creative effort.
[0064] Figure 1 A flowchart of a card battle method provided by an embodiment of this disclosure is shown;
[0065] Figure 2 A flowchart of a neural network training method provided by an embodiment of this disclosure is shown;
[0066] Figure 3 A schematic diagram of the structure of a first sub-network provided in an embodiment of this disclosure is shown;
[0067] Figure 4 A schematic diagram of the structure of a second sub-network provided in an embodiment of this disclosure is shown;
[0068] Figure 5A schematic diagram of the structure of a third sub-network provided in an embodiment of this disclosure is shown;
[0069] Figure 6 This illustration shows a schematic diagram of the structure of a neural network to be trained provided in an embodiment of the present disclosure;
[0070] Figure 7 A schematic diagram of a card battle device provided in an embodiment of this disclosure is shown;
[0071] Figure 8 A schematic diagram of the structure of a computer device provided in an embodiment of this disclosure is shown. Detailed Implementation
[0072] To make the objectives, technical solutions, and advantages of the embodiments of this disclosure clearer, the technical solutions of the embodiments of this disclosure will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only a part of the embodiments of this disclosure, and not all of them. The components of the embodiments of this disclosure described and shown herein can generally be arranged and designed in various different configurations. Therefore, the following detailed description of the embodiments of this disclosure is not intended to limit the scope of the claimed disclosure, but merely represents selected embodiments of this disclosure. All other embodiments obtained by those skilled in the art based on the embodiments of this disclosure without inventive effort are within the scope of protection of this disclosure.
[0073] Furthermore, the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments described herein can be implemented in a sequence other than that illustrated or described herein.
[0074] In this article, "multiple or several" refers to two or more. "And / or" describes the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A alone, A and B simultaneously, or B alone. The character " / " generally indicates that the preceding and following related objects have an "or" relationship.
[0075] Research has revealed that existing AI-powered battle strategies typically design algorithms for each game stage separately. For example, algorithms for the deck-building stage often employ non-gradient numerical optimization algorithms, such as genetic algorithms (using genetics, mutation, and pruning of suboptimal samples to learn which card combinations produce better decks), Bayesian confidence optimization algorithms (using Bayesian posterior probability updates to learn which cards should be included in the deck), and experience-based rule and user data mining algorithms (using cost-effectiveness curve algorithms to generate decks that conform to patterns; some experience-based algorithm parameters can be further mined, learned, and adjusted from user data). For the battle stage, reinforcement learning algorithms (such as Q-network algorithms and policy gradient algorithms) and tree search algorithms (such as breadth-first search, depth-first search, and Monte Carlo tree search algorithms) are used. However, regardless of the algorithm used, because the algorithms for each game stage are designed separately, the design process ignores the correlation between the two game stages. Thus, well-designed algorithms for the deck-building phase will have problems such as poor deck composition and low strength (e.g., cards in the deck cannot be used synergistically during the battle phase). Well-designed algorithms for the battle phase will have problems such as the designed card-playing strategy not matching the deck (or having a low matching degree) and the strategy being unreasonable.
[0076] Based on the above research, this disclosure provides a card battle scheme. By jointly deploying a first sub-network for deck building and a second sub-network for developing card-playing strategies within the same target neural network, joint training of the first and second sub-networks can be achieved during training, improving the correlation between the two sub-networks. Since the second sub-network relies on the first completed deck built by the first sub-network when determining its card-playing strategy, a correlation between the outputs of the second and first sub-networks can be guaranteed. Because both the jointly trained first and second sub-networks have reliable prediction accuracy, during gameplay, the first sub-network in the trained target neural network can obtain accurate and reasonable action selection information, thereby selecting a reasonable and accurate deck. Based on this, the second sub-network in the trained target neural network, along with the first completed deck built by the first sub-network, can determine an accurate and reasonable card-playing strategy, allowing for more strategic card play in battle.
[0077] The shortcomings of the above solutions are the result of the inventor's practical experience and careful research. Therefore, the discovery process of the above problems and the solutions proposed in this disclosure below should be considered as the inventor's contribution to this disclosure.
[0078] It should be noted that similar labels and letters in the following figures indicate similar items. Therefore, once an item is defined in one figure, it does not need to be further defined and explained in subsequent figures.
[0079] To facilitate understanding of this embodiment, a card battle method disclosed in this disclosure will first be described in detail. The card battle method provided in this disclosure is generally executed by a terminal device or other processing device with certain computing power. The terminal device can be a user equipment (UE), mobile device, user terminal, terminal, personal digital assistant device (PDA), handheld device, computer device, etc. In some possible implementations, the card battle method can be implemented by the processor calling computer-readable instructions stored in the memory.
[0080] The card battle method provided in this embodiment will be described below using a computer device as the execution subject.
[0081] like Figure 1 The flowchart shown is a card battle method provided in this embodiment of the disclosure, which may include the following steps:
[0082] S101: In response to the current game being in the deck-building phase, each candidate card and each target card in the constructed deck are input into the first sub-network of the target neural network to obtain target selection action information; the target selection action information is used to indicate the cards selected from the candidate cards to be added to the constructed deck.
[0083] Here, candidate cards refer to all selectable cards in the target card-based battle game deployed by the target neural network. The constructed deck refers to the deck built during the current game's deck-building phase, at the current time, and includes cards called target cards. At the beginning of the current game, the constructed deck can be empty. Then, based on the target selection action information output by the first sub-network, the constructed deck is updated to obtain a new constructed deck. The constructed deck at the end of the deck-building phase can be called the first completed deck, which can include the target number of target cards.
[0084] For example, during an AI battle against a real player, in the deck-building phase of the current game, each candidate card and each target card in the constructed deck can be input into the first sub-network of the target neural network. The first sub-network in the target neural network processes the input information to obtain target selection action information. After multiple processing steps by the first sub-network, a first completed deck containing the target number of target cards can be obtained. After obtaining the first completed deck, the AI battle can enter the second phase, the battle phase, and proceed to execute S102 as described below.
[0085] S102: In response to the current game being in the battle phase, for any battle round, the first completed deck built in the deck-building phase and the battle situation information in the battle round are input into the second sub-network of the target neural network to obtain the target card-playing strategy in the battle round, and play cards according to the target card-playing strategy; the battle situation information is used to represent various information that can affect the battle result; the target neural network is obtained by jointly training the first sub-network and the second sub-network.
[0086] Here, the target neural network is the neural network obtained by training the neural network to be trained using the steps in the neural network training methods provided in the embodiments below. It includes a first sub-network for deck building during the deck-building phase, a second sub-network for determining card-playing strategies during the battle phase, and a third sub-network for predicting value information. The first and second sub-networks can be jointly trained according to the steps in the neural network training methods provided in the embodiments below. For the specific network structures of the first, second, and third sub-networks, and detailed descriptions of the three sub-networks, please refer to the descriptions of the training embodiments below.
[0087] The first completed deck refers to the deck built during the deck-building phase, specifically a constructed deck that includes the target number of target cards. For example, a constructed deck including 30 target cards. The target number can be set according to the game rules corresponding to the target card game, and this embodiment does not impose a specific limitation. For example, the target number can be 30, 40, 50, etc.
[0088] Battle situation information is used to represent all observable information that can affect the outcome of the battle in the current round. For example, battle situation information may include the player's / opponent's health, the number of remaining drawable cards, the cards in the player's hand, the cards that the player / opponent has equipped, the synergy information between the player's / opponent's cards, combo skills, the current round number, etc.
[0089] In its implementation, S102 allows for the input of target cards from the first completed deck and information about the current battle situation into the second sub-network of the target neural network for any given round. The second sub-network then processes the input information to output the target playing strategy for that round. Furthermore, players can play according to the target playing strategy output by the second sub-network, thus enabling AI-based battles against real players.
[0090] In this way, by jointly deploying the first sub-network used for deck building and the second sub-network used for developing card-playing strategies within the same target neural network, joint training of the first and second sub-networks can be achieved during training, improving the correlation between the two sub-networks. Since the second sub-network relies on the first completed deck built by the first sub-network when determining its card-playing strategy, a correlation between the outputs of the second and first sub-networks can be guaranteed. Because both the jointly trained first and second sub-networks have reliable prediction accuracy, during gameplay, the first sub-network in the trained target neural network can obtain accurate and reasonable action selection information, thereby selecting a reasonable and accurate deck. Based on this, the second sub-network in the trained target neural network, along with the first completed deck built by the first sub-network, can determine an accurate and reasonable card-playing strategy, allowing for more strategic card play in gameplay.
[0091] In one embodiment, the target neural network may further include a third sub-network for predicting value information. After inputting each candidate card and each target card in the constructed deck into the first sub-network of the target neural network, the first sub-network may be used to perform a first feature extraction process on each target card in the constructed deck to obtain a first extracted feature, and based on the first extracted feature, a first target feature for characterizing each target card in the constructed deck is determined.
[0092] Here, the first extracted feature is the feature extracted from the target cards included in the constructed deck at the current time to represent that target card. The number of the first extracted features is the same as the number of target cards included in the constructed deck at the current time. The first target feature is used to represent each target card included in the constructed deck at the current time.
[0093] In specific implementation, the card feature embedding layer (represented by `card_emb`) in the first sub-network can be used to extract the first feature of each target card in the currently constructed deck, obtaining the first extracted feature corresponding to each target card. Then, the association feature embedding layer (represented by `ctx_emb`) in the first sub-network can be used to combine the various first extracted features, resulting in an association feature with a preset feature length. Finally, convolutional layers and / or fully connected layers in the first sub-network can be used to perform convolutional and / or fully connected processing on the obtained association feature, thereby obtaining the first target feature. The association feature is used to characterize the relationships between the target cards in the currently constructed deck. For example, the relationships between card encoding features, card attribute features, and card skill features.
[0094] Then, the third sub-network in the target neural network can be used to determine the first target value corresponding to the currently constructed deck based on the first target features, and the first target value can be displayed. For example, if the first target value is represented by the game win rate, the game win rate corresponding to the first target value can be displayed.
[0095] Here, the currently constructed deck refers to the deck constructed at the current time. The first target value is used to characterize the deck value information of the constructed deck at the current time. For example, the first target value can be represented in the form of game win rate, which indicates the probability of winning a game using the constructed deck built at the current time.
[0096] For example, a fully connected network layer in the third sub-network can be used to perform fully connected processing on the first target feature. Based on the result of the fully connected processing, the first target value corresponding to the currently constructed deck can be determined. Then, the determined first target value can be displayed in real time, and an AI battle log can be generated based on the determined first target value for each battle round, allowing players to adjust their game strategy according to the generated AI log.
[0097] Optionally, the first objective value may not be displayed, or even the output of the first objective value may not be utilized using the third sub-network. In specific implementation, the need to determine the first objective value and whether to display it can be set according to the actual battle requirements; this disclosure does not impose specific limitations on the embodiments.
[0098] It should be noted that the application scenarios of the card battle method provided in this disclosure include, but are not limited to: scenarios of playing against real players (also known as human-computer battles), scenarios of assisting players in battles, and scenarios of playing against other machines. For example, in scenarios of assisting players in battles, when a player enters the deck-building phase, the first sub-network determines target selection action information based on the user's already built deck and all candidate cards, and displays the target selection action information output by the first sub-network to the player, allowing the player to select cards based on the selection action information to obtain a reasonable deck. Simultaneously, the first target value output by the third sub-network can be displayed to the player in real time, allowing the player to adjust their deck-building strategy based on the displayed first target value, thus providing intelligent assistance to the player in the game. When players enter the battle phase, the second sub-network determines the target card-playing strategy based on the player's deck and real-time battle situation information, and recommends the target card-playing strategy output by the second sub-network to the player so that the player can play the battle according to the recommended target card-playing strategy. At the same time, the second target value (value information output during the battle phase) output by the third sub-network can be displayed to the player in real time, so that the player can adjust the battle strategy according to the displayed second target value, which plays a role in intelligently assisting the player in the game.
[0099] In another embodiment, after inputting the information on the first completed deck and the battle situation in the battle round into the second sub-network of the target neural network, for any battle round, the second sub-network can be used to perform second feature extraction processing on each target card in the first completed deck to obtain the second extracted features.
[0100] Here, the second extracted feature is the feature extracted from each target card in the first completed deck, used to characterize that target card. One target card corresponds to one second extracted feature. For example, when a target number of cards in a deck is specified, the second extracted feature can be the target number of cards, and can include the extracted feature corresponding to each target card in the target number of target cards.
[0101] In practice, for any round of the battle, the card_emb network layer in the second sub-network can be used to perform second feature extraction processing on each target card in the first completed deck, so as to obtain the second extracted feature corresponding to each target card.
[0102] Then, based on the battle situation information and the second extracted features, the battle characteristics in that battle round can be determined.
[0103] For example, the visible card selection network layer (represented by `visible_cards`) in the second sub-network can be used first to analyze the battle situation information and extract the visible cards for the current battle round. Then, the `card_emb` network layer in the second sub-network can be used to perform seventh feature extraction processing on each visible card, obtaining the seventh extracted features corresponding to each visible card sample. Simultaneously, the state information extraction network layer (represented by `info_emb`) in the second sub-network can be used to extract battle state information from the battle situation information and generate state features to represent the battle state information. Finally, the merging network layer (represented by `concat`) in the second sub-network can be used to merge the second extracted features, the seventh extracted features, and the state features into a single battle feature. This battle feature is a feature that represents the battle situation in the current battle round and the various target cards in the constructed deck.
[0104] Then, the third sub-network can be used to determine the value of the second objective in the current round of the game based on the game characteristics and the second objective characteristics used to characterize each objective card in the first completed deck, and then display the value of the second objective.
[0105] For example, the second objective value can be represented by game win rate and strategic gain. Game win rate indicates the win rate in the current round, and strategic gain indicates the player's gains up to the current round. For example, strategic gain may include information such as the amount of health the player can deplete by the current round or the player can recover health by the current round. The second objective feature is used to represent each objective card in the first completed deck. For example, given a specified number of objective cards in the deck, the second objective feature used by the third sub-network when determining the second objective value for any given round is always the feature representing the number of objective cards in the first completed deck.
[0106] For example, for any round in the battle phase, a third sub-network can be used to perform fully connected processing on the second target feature and the battle features in that round, and the value of the second target in the current round can be determined based on the result of the fully connected processing.
[0107] Afterwards, the value of the second objective can be displayed in real time, and an AI battle log can be generated based on the value of the first objective corresponding to the current game and the value of the second objective corresponding to each round of the current game. This allows other players to adjust their game strategies based on the generated AI log.
[0108] Optionally, the second objective value may not be displayed, or even the output of the second objective value may not be utilized using the third sub-network. In specific implementation, the decision on whether to determine the second objective value and whether to display it can be set according to the actual battle requirements; this disclosure does not impose specific limitations on the embodiments.
[0109] Furthermore, since the target neural network in this embodiment is an integrated network that integrates the first sub-network, the second network, and the third sub-network, it only needs to be deployed once to enable the use of the functions of the three sub-networks. Compared with the prior art, which requires each sub-network to be deployed as an independent module, this effectively reduces the complexity of deployment.
[0110] Furthermore, after deploying the target neural network to the server corresponding to any target card game, the sub-networks within the target neural network can be selected and used based on the player's chosen battle mode. For example, at the start of each game, if there is a need to directly reuse the first completed deck built in the previous game, the first sub-network can be skipped from deck building in the current game, and the second sub-network can be used directly to determine the target card-playing strategy based on the first completed deck built in the previous game. Alternatively, if the player needs assistance in building a deck, the target selection action information output by the first sub-network can be displayed to the player during the deck-building phase. After the player has built their deck, the second sub-network is not used to recommend a target card-playing strategy. Or, if the player needs to obtain value information during the deck-building phase, the first sub-network can be used to determine the first target feature based on the player's currently built deck and candidate cards, and this first target feature can be input into the third sub-network. The third sub-network can then determine the first target value of the player's currently built deck based on the first target feature and display this first target value to the player. Alternatively, when players need to obtain value information during the battle phase, the first sub-network can be used to determine the second target feature based on the player's first completed deck and candidate cards; the second sub-network can be used to determine the battle feature based on the player's first completed deck and the battle situation information in the current battle round; and the second target feature and battle feature can be input into the third sub-network so that the third sub-network outputs the second target value in the current battle round and displays the second target value to the player.
[0111] Furthermore, the target neural network provided in this disclosure can be trained according to the steps in the neural network training methods provided in the following embodiments. For example... Figure 2 The flowchart shown is a representation of a neural network training method provided in this disclosure, which may include the following steps:
[0112] S201: For any game in multiple game matches, during the deck building phase, each candidate card sample and each target card sample in the constructed sample deck are input into the first sub-network of the neural network to be trained to obtain the predicted selection action information; the predicted selection action information is used to indicate the card sample selected from the candidate card samples to be added to the constructed sample deck.
[0113] It should be noted that during the training of the neural network to be trained, a self-play method (also known as machine-to-machine battle) can be used to collect training data through game matches. Here, the self-play method means that in a game, both sides use the neural network to be trained to construct sample card decks and determine their card-playing strategies.
[0114] Optionally, training data can also be collected during the training process through human-computer interaction (i.e., the machine playing against a real player). Here, the training data collected during human-computer interaction can be the output data of the machine that has deployed the neural network to be trained (i.e., the predicted action selection information output by the neural network to be trained, the predicted card-playing strategy mentioned below, and the corresponding game results of the machine where the neural network to be trained is located).
[0115] For S201, a game match is a card battle game played by two opposing sides. A game match can include two phases: a deck-building phase and a battle phase.
[0116] Candidate card samples refer to all available card samples in a card battle game. Typically, there may be hundreds or thousands of candidate card samples. This disclosure does not specifically limit the number of candidate card samples; the number of candidate card samples can be determined according to the actual card battle game being used.
[0117] The constructed sample deck refers to the deck built at the current time during the deck-building phase of a specific game. At the beginning of a game, the constructed sample deck can be empty. The target card samples are the individual card samples selected from the candidate card samples included in the constructed sample deck. For the deck-building phase, the target number of target card samples in the deck to be built can usually be specified in advance. When the number of card samples in the constructed sample deck built using the first sub-network reaches the target number, the second completed deck is obtained and enters the battle phase.
[0118] The neural network to be trained is a neural network whose parameters have not yet been adjusted. Through iterative training of the neural network to be trained, the target neural network mentioned above can be obtained. The first sub-network is the network used to build the deck during the deck-building stage.
[0119] It should be noted that different types of card battle games have different rules for constructing card decks. For example, some card battle games construct sample card decks according to the single-draw principle, that is, one card sample is drawn from the candidate cards at a time, and the constructed sample card deck is continuously enriched by the selected card samples until a second completed card deck containing the target number of target card samples is constructed. Other card battle games construct sample card decks according to the one-time draw principle, that is, the target number of card samples are selected from the candidate cards at a time to form a second completed card deck. For card battle games that use the one-time draw principle, the neural network training method provided in this disclosure embodiment will also transform the one-time draw principle into the single-draw principle for constructing sample card decks.
[0120] For example, multiple game matches can be conducted using a self-play method. Specifically, for any game match among multiple matches, during the deck-building phase, each candidate card sample and each target card sample in the constructed sample deck are input into the first sub-network of the neural network to be trained. The first sub-network processes each candidate card sample and each target card sample in the constructed sample deck to output predicted selection action information. Then, based on the predicted selection action information, the constructed sample deck can be updated. Then, it is determined whether the number of target card samples in the constructed sample deck is equal to the target number. If so, a second completed deck can be obtained and the following step S202 is executed. If not, the step of inputting each candidate card sample and each target card sample in the constructed sample deck into the first sub-network of the neural network to be trained is returned until a second completed deck including the target number of target card samples is obtained. In this way, the first sub-network can be used to construct the deck.
[0121] S202: During the battle phase, for any battle round in the game, the second completed deck built during the deck-building phase and the battle situation information of the battle round are input into the second sub-network of the neural network to be trained to determine the predicted card-playing strategy for the battle round.
[0122] Here, the second completed deck refers to the sample deck constructed during the deck-building phase. Specifically, it can be a constructed sample deck that includes the target number of target card samples. A game can be divided into multiple rounds. In each round, both players can draw cards, play cards, and equip cards. For each player, the card samples drawn are all from the second completed deck constructed by that player based on S201. For example, if the target number is 30, and player 1 has constructed a second completed deck 1 based on S201, the card samples drawn by player 1 are all from the second completed deck 1.
[0123] Battle situation information is used to represent all observable information that can affect the battle situation in the current battle round. For example, battle situation information may include the player's / opponent's health, the number of remaining drawable cards, the cards in the player's hand, the cards that the player / opponent has equipped, the synergy information between the player's / opponent's cards, combo skills, the current round number, etc.
[0124] The second subnetwork is used during the gameplay phase to determine the card-playing strategy in each round. The card-playing strategy instructs how to use the card samples in hand during the current round. For example, the strategy could be which card sample to use to attack the opponent, which card sample to equip, or which card samples to combine. The predicted card-playing strategy is the strategy output by the second subnetwork during the training phase.
[0125] For example, after entering the battle phase, for any battle round in the game, the battle situation information for that round can be determined. Then, the target card sample from the second completed deck and the battle situation information for that round are input into the second sub-network. The second sub-network processes the input target card sample from the second completed deck and the battle situation information to output the predicted card-playing strategy for that round.
[0126] S203: Based on the predicted action information, predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each game in multiple game sessions, determine the target loss information, and use the target loss information to iteratively train the neural network to be trained until the training cutoff condition is met, thus obtaining the target neural network.
[0127] Here, the target loss information is used to characterize the loss incurred by the neural network under training when constructing a deck and determining a card-playing strategy during game battles. Battle results can specifically include victory, defeat, or a draw. Training cutoff conditions can include reaching a preset number of iterations and / or the prediction accuracy of the neural network under training reaching a preset accuracy.
[0128] In practice, for each game match, the predicted action selection information, predicted card-playing strategy, and the result of playing cards according to the predicted strategy output by the neural networks used by both sides can be collected separately. Then, the predicted action selection information and predicted card-playing strategy output by the neural network indicating a victory can be used as positive samples, and the predicted action selection information and predicted card-playing strategy output by the neural network indicating a defeat can be used as negative samples. After collecting a large amount of training data corresponding to each game match, a large number of positive and negative samples can be obtained.
[0129] Next, positive and negative samples can be used to determine the target loss information of the neural network to be trained using reinforcement learning. Then, the gradient signal can be determined based on the target loss information. Using the determined gradient signal, the neural network to be trained is iteratively trained using backpropagation until the training cutoff condition is met, resulting in the target neural network used for deck building and determining card-playing strategies. Using reinforcement learning to update the parameters of the neural network to be trained enables unsupervised network training, improving the flexibility of network training.
[0130] Thus, since the second sub-network relies on the second completed deck built upon the first sub-network when determining its card-playing strategy, there is a correlation between the outputs of the second and first sub-networks. By determining the target loss information based on the action selection information output by the first sub-network, the card-playing strategy output by the second sub-network that is correlated with the second completed deck, and the battle result after playing according to the card-playing strategy, the impact of the outputs of both sub-networks on the battle result can be fully considered, resulting in reasonable target loss information. Further iterative training of the neural network under training using this reasonable target loss information not only enables mutual supervision and cooperation between the first and second sub-networks during training, preventing their outputs from deviating from each other and achieving collaborative updates, thus achieving joint optimization of the two sub-networks, but also improves the accuracy of the action selection information output by the first sub-network, resulting in a reasonable and accurate deck, and improves the rationality of the card-playing strategy output by the second sub-network, achieving reasonable card play.
[0131] In one embodiment, the step of determining the predicted action selection information for the first sub-network in S201 above can be implemented according to the following steps:
[0132] S201-1: Input each candidate card sample and each target card sample in the constructed sample card group into the first sub-network, and use the first sub-network to perform third feature extraction processing on each candidate card sample to obtain the third extracted features.
[0133] S201-2: Perform fourth feature extraction processing on each target card sample included in the constructed sample card group to obtain the fourth extracted feature.
[0134] For example, the first sub-network may include a card feature embedding network layer (denoted by card_emb) for extracting features from the card samples. The third extracted feature is the feature extracted from the candidate card samples to represent the candidate card samples. The fourth extracted feature is the feature extracted from the target card samples to represent the target card samples.
[0135] In practical implementation, the `card_emb` in the first sub-network can be used to perform third feature extraction processing on each candidate card sample, obtaining the third extracted feature corresponding to each candidate card sample. Simultaneously, the `card_emb` in the first sub-network can be used to perform fourth feature extraction processing on the target number of target card samples included in the constructed sample card set, obtaining the fourth extracted feature corresponding to each target card sample. The `card_emb` used for extracting the third and fourth extracted features can be a shared network layer within the first sub-network.
[0136] S201-3: Based on the third and fourth extraction features, determine the card samples to be selected from the candidate card samples at the current time.
[0137] S201-4: Generate associated features with preset feature lengths based on each of the fourth extracted features.
[0138] Here, the card sample to be selected is the card sample that may be selected from the candidate card samples and added to the constructed sample card group.
[0139] For example, the network layer (which can be represented by available_cards) can be determined using the card samples to be selected in the first sub-network, and feature processing can be performed on the third and fourth extracted features to determine the card samples to be selected at the current time.
[0140] Simultaneously, the association features in the first sub-network can be embedded into the network layer (denoted as ctx_emb) to combine the features of each fourth extracted feature, resulting in an association feature (denoted as context) with a preset feature length. That is, each fourth extracted feature is converted into a fixed-length feature representation. Here, the association feature is used to characterize the associations between the target card samples included in the constructed sample card set (such as encoding feature association, attribute feature association, skill feature association, etc.).
[0141] S201-5: Determine the predicted selection action information based on the third extracted feature and association feature of the card sample to be selected.
[0142] In practice, the first sub-network can perform convolution processing on the third extracted features and associated features of each card sample to be selected. Then, based on the result of the convolution processing, a card sample that can be selected and added to the constructed sample card group is determined from the card samples to be selected, which is to obtain the predicted selection action information.
[0143] In one embodiment, S201-5 described above can be implemented according to the following steps:
[0144] S201-5-1: Using an attention mechanism, a target feature map is generated based on the third extracted feature and associated feature of the card sample to be selected.
[0145] In practice, the third extracted features and associated features of each card sample to be selected can be input into the attention network layer (represented by attention) in the first sub-network. The attention network layer uses the attention mechanism to generate attention features for the third extracted features and associated features of each card sample to be selected, thereby obtaining the target feature map.
[0146] S201-5-2: Classify the target feature map to determine the probability of each card sample to be selected as a card sample to be added to the constructed sample card group.
[0147] Here, the first sub-network may also include a classification network layer (denoted by softmax) connected to the attention network layer.
[0148] In practice, the target feature map output by the attention network layer can be input into the softmax network layer. The softmax network layer can then classify the feature map to determine the probability of each card sample to be selected as a card sample to be added to the constructed sample card group.
[0149] S201-5-3: Determine the predicted selection action information based on the probability corresponding to each card sample to be selected.
[0150] In practice, based on the probability corresponding to each card sample to be selected, the card sample with the highest probability can be selected from the sample of cards to be selected. That is, the card sample to be added can be determined as the card sample to be added to the constructed sample card deck, thus obtaining the selection action information.
[0151] In one embodiment, after obtaining the association features using the ctx_emb network layer, a third target feature can be determined based on the association features to characterize each target card sample included in the constructed sample card set.
[0152] Here, the third target feature is used to characterize each target card included in the constructed sample card set, and can be represented by cb_emb.
[0153] For example, the associated features output by the ctx_emb network layer can be directly used as the third target feature, or the convolutional and / or fully connected layers in the first sub-network can be used to perform convolutional and / or fully connected processing on the associated features output by the ctx_emb network layer to obtain the third target feature.
[0154] Then, the third target feature can be input into the third sub-network in the neural network to be trained, and the third sub-network can be used to determine the first prediction value corresponding to the currently constructed sample card group based on the third target feature.
[0155] Here, the first predictive value can be represented by the game win rate, which indicates the win rate when playing against a target card sample in the currently constructed sample deck.
[0156] The third subnetwork can be a value function subnetwork (denoted by V_net) within the neural network to be trained, used to output predicted value information at different game stages. For example, during the deck-building stage, the third subnetwork can output a first predicted value matching the target card samples in the currently constructed sample deck. During the battle stage, the third subnetwork can determine a second predicted value for the current battle round.
[0157] like Figure 3 The diagram shown is a schematic representation of the structure of a first sub-network provided in an embodiment of this disclosure. Here, `card_set` represents candidate card samples, `selected_cards` represents the constructed sample card set at the current time, `cb_action` represents the predicted selection action information, and `cb_emb` represents the third target feature. For example, after inputting each candidate card sample and each target card sample from the constructed sample card set into the first sub-network of the neural network to be trained, the input information can be processed using the various network layers in the first sub-network to determine the selection action information `cb_action` and the third target feature `cb_emb`. For... Figure 3 The two modules placed in gray (i.e., the two card_emb layers in the first sub-network) indicate that they are modules that share parameters, and are consistent with the following text. Figure 4 The grayed-out modules are also network modules that share parameters.
[0158] During the card assembly stage, the third target feature can be input into the third sub-network, and the third sub-network can be used to process the third target feature to output the first prediction value.
[0159] Furthermore, after obtaining the first predicted value, the third subnetwork can be used to determine the target loss information based on the first predicted value. Specifically, the steps for determining the target loss information can be implemented as follows:
[0160] Step 1: Based on the predicted action information, predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each game in multiple game sessions, determine the first loss information.
[0161] Here, the first loss information is used to characterize the joint loss of the first sub-network when outputting the predicted action selection information and the second sub-network when outputting the predicted card playing strategy.
[0162] In practice, for each game in multiple game matches, the predicted action selection information output by the first sub-network of the neural network to be trained for each opponent in that game match, the predicted card-playing strategy output by the second sub-network in each round of the match, and the corresponding match result for that opponent can be collected. Then, reinforcement learning can be used to determine the first loss information corresponding to the first and second sub-networks based on the predicted action selection information, predicted card-playing strategies, and match results for each of the multiple game matches.
[0163] Step 2: Determine the second loss information based on the first predicted value and the battle result for each game in multiple game matches.
[0164] Here, the second loss information is used to characterize the loss of the first sub-network when outputting predicted action selection information and the loss of the third sub-network when outputting value information. During the card assembly phase, whenever the first sub-network outputs a predicted action selection information, the third sub-network can output a corresponding first predicted value.
[0165] In practical implementation, for each game in multiple game matches, after obtaining the match result, for the neural network to be trained used by each opponent in that match, the first prediction value output by the third sub-network of the neural network to be trained can be collected. Then, using the third sub-network, based on the first prediction value and the match result, reinforcement learning can be used to determine the second loss information. Subsequently, using the second loss information, the first and third sub-networks can be iteratively trained through backpropagation, thereby improving the prediction accuracy of the first and third sub-networks.
[0166] Step 3: Determine the target loss information based on the first loss information and the second loss information.
[0167] For example, the first loss information and the second loss information can be merged to obtain the target loss information. Then, the target loss information can be used to iteratively train the neural network to be trained.
[0168] Alternatively, the first loss information can be directly used to iteratively train the first and second sub-networks, and the second loss information can be used to iteratively train the first and third sub-networks. After iterative training using training data from multiple game sessions, a trained target neural network can be obtained.
[0169] In one embodiment, the step of determining the predicted card-playing strategy for each round of the game using the second sub-network in S202 can be implemented according to the following steps:
[0170] S202-1: For any battle round, input the second completed deck and the battle situation information of the battle round into the second sub-network. Using the second sub-network, perform fifth feature extraction processing on each target card sample in the second completed deck to obtain the fifth extracted feature.
[0171] For example, the second sub-network may also include a card feature embedding network layer (denoted by card_emb) for feature extraction of card samples. In specific implementations, the card_emb network layer in the second sub-network and the card_emb network layer in the first sub-network may be shared network layers. The second completed deck is the constructed sample deck that is built using the first sub-network during the deck building stage, and includes the target number of target card samples.
[0172] The fifth extracted feature is the characteristic extracted from each target card sample in the second completed deck, used to characterize that target card sample. One target card sample corresponds to one fifth extracted feature. For example, when a target number of card samples in a deck is specified, the number of fifth extracted features is the target number.
[0173] In practice, for any round in a game, each target card sample from the second completed deck can be input into the card_emb network layer in the second sub-network. The card_emb network layer then performs fifth feature extraction processing on each target card sample, thereby obtaining the fifth extracted features corresponding to each target card sample. For example, the number of fifth extracted features can always be the target number.
[0174] S202-2: Based on the battle situation information, determine the visible card samples in the current battle round, and perform sixth feature extraction processing on each visible card sample to obtain the sixth extracted feature.
[0175] For example, the visible card sample can specifically refer to the card sample in one's own hand during the current round of the battle, or the card sample that one's own / opponent's team has equipped. The sixth extracted feature is the feature extracted from the visible card sample to characterize the visible card sample.
[0176] In practice, the visible card selection network layer (represented by visible_cards) in the second sub-network can be used to analyze the battle situation information and extract the visible card samples for the current battle round. Then, the card_emb network layer in the second sub-network can be used to perform sixth feature extraction processing on each visible card sample, obtaining the sixth extracted features corresponding to each visible card sample.
[0177] S202-3: Based on the battle situation information, determine the state features that represent the battle status information in the current battle round.
[0178] For example, battle status information may specifically include the player's / opponent's health status (e.g., player's / opponent's HP) in the current battle round, the number of remaining drawable cards, the current round number, synergy information between player's / opponent's cards, and combo skills. Status features are features used to characterize battle status information in the current battle round.
[0179] In practice, the state information extraction network layer (represented by info_emb) in the second sub-network can be used to extract the battle state information from the battle situation information and generate state features to characterize the battle state information.
[0180] S202-4: Based on the fifth extracted feature, the sixth extracted feature, and the state feature, determine the predicted card-playing strategy for the current round of the battle.
[0181] For example, convolutional network layers and / or fully connected layers in the second sub-network can be used to perform convolutional and / or fully connected processing on the fifth extracted features, the sixth extracted features, and the state features, and the predicted card-playing strategy can be determined based on the processing results.
[0182] In one embodiment, S202-4 described above can be implemented according to the following steps:
[0183] S202-4-1: Combine the fifth extracted feature, the sixth extracted feature, and the state feature to obtain the battle feature.
[0184] For example, the combination function in the merging network layer (denoted by concat) in the second sub-network can be used to merge the fifth extracted feature, the sixth extracted feature, and the state feature into a single battle feature. This battle feature is a characteristic representing the battle situation in the current battle round and the various target card samples in the second completed deck. Alternatively, it can be understood as representing all the information available in the current battle round.
[0185] S202-4-2: Based on the processing results obtained after performing fully connected processing and classification processing on the battle features in sequence, determine the predicted card-playing strategy for the current battle round.
[0186] For example, after obtaining the battle features, the fully connected layer in the feature processing layer (represented by fc_softmax) of the second sub-network can be used to process the battle features fully, resulting in fully connected features. Then, the softmax function in the fc_softmax network layer can be used to classify the fully connected features, resulting in a classification result. Based on the classification result, the predicted card-playing strategy for the current battle round is determined. Alternatively, before inputting the battle features into the fully connected layer, one or more convolutional layers can be used to convolve the battle features, resulting in convolutional features. Then, the convolutional battle features can be processed with fully connected layers and classified sequentially to obtain the predicted card-playing strategy for the current battle round. Alternatively, the fully connected layers in the fc_softmax network layer can include several layers. After obtaining the battle features, multiple fully connected layers can be used to process the battle features fully, and then the softmax function can be used to classify the fully connected features output by the last fully connected layer, resulting in a classification result, which can then be used to determine the predicted card-playing strategy for the current battle round.
[0187] Furthermore, after the concat network layer outputs the battle features for the current round, these features can be input into a third sub-network, allowing the third sub-network to calculate loss information based on these features. For example... Figure 4 The diagram shows a structural schematic of a second sub-network provided in an embodiment of this disclosure. Here, `selected_cards` represents the constructed sample card deck updated based on selection action information. Specifically, the `selected_cards` input to the second sub-network can be a target number of target card samples included in the second completed card deck. `obs` represents the battle situation information in the current battle round, `bt_action` represents the predicted card-playing strategy for the current battle round, and `bt_emb` represents the battle features. For example, for any battle round, after inputting the battle situation information and the second completed card deck into the second sub-network, the input information can be processed using various network layers in the second sub-network to determine the predicted card-playing strategy `bt_action` and the battle features `bt_emb`.
[0188] Furthermore, after inputting the battle features into the third sub-network, the third sub-network can be used to determine the second predictive value for the current battle round based on the battle features and the fourth target features used to characterize each target card sample in the second completed deck.
[0189] Here, the second predictive value can be represented by game win rate and strategic gains. Game win rate indicates the probability of winning the match in the current round, while strategic gains indicate the player's gains up to the current round. For example, strategic gains can include information such as the amount of health the player can deplete by the current round and whether the player can recover health by the current round. The fourth target feature is used to represent each target card sample in the second completed deck.
[0190] For example, for any round in the battle phase, the third sub-network can be used to perform fully connected processing on the fourth target feature and the battle features in that round, and the second prediction value in the current round can be determined based on the result of the fully connected processing.
[0191] like Figure 5 The diagram shown is a schematic representation of a third sub-network provided in an embodiment of this disclosure. Wherein, Figure 5 In this context, `bt_emb` represents the battle feature output by the second sub-network, `cb_emb` represents the target feature output by the first sub-network (i.e., the third or fourth target feature mentioned above), and `phase_mask` represents the current game phase, which can be divided into the card-building phase and the battle phase. The gate network layer (i.e., gating) is used to determine the processing scheme based on `phase_mask`. Specifically, when `phase_mask` indicates that the current phase is the card-building phase, the processing scheme determined by `gating` is to determine the first prediction value based on the third target feature; when `phase_mask` indicates that the current phase is the battle phase, the processing scheme determined by `gating` is to determine the second prediction value based on the fourth target feature and the battle feature. The `fc` network layer, which is the fully connected network layer, is used in the card-building phase to perform fully connected processing on the third target feature according to the processing scheme determined by `gating` to determine the first prediction value; in the battle phase, it is used to perform fully connected processing on the fourth target feature and the battle feature according to the processing scheme determined by `gating` to determine the second prediction value. Value represents the predicted value of the output. Specifically, Value represents the first predicted value during the deck-building phase and the second predicted value during the battle phase.
[0192] Furthermore, after determining the second predicted value, for step three above, the third loss information can be determined based on the second predicted value corresponding to each game in multiple game matches and the battle results after playing cards according to the predicted card-playing strategy.
[0193] Here, the second loss information is used to characterize the loss when the second sub-network outputs the predicted card-playing strategy. In specific implementation, for each game in multiple game matches, after collecting the second prediction value and the match result for each round in that game match, the third sub-network can be used to determine the third loss information based on the second prediction value and the match result corresponding to each of the multiple game matches using reinforcement learning.
[0194] Then, the target loss information can be determined based on the first loss information, the second loss information, and the third loss information.
[0195] For example, the first loss information, the second loss information, and the third loss information can be combined into the target loss information, and the target loss information can be used to iteratively train the neural network to be trained in order to obtain the target neural network.
[0196] For example, after obtaining training data corresponding to multiple game matches (specifically including match results, predicted action selection information, predicted card-playing strategies, first prediction value, and second prediction value), a third sub-network can be used to construct target loss information using reinforcement learning. Then, the third sub-network can simultaneously influence the second sub-network (which can be represented by `bt_net`) and the first sub-network (which can be represented by `cb_net`) through error backpropagation. Since these two sub-networks share a network layer with shared parameters (i.e., the `card_emb` layer), when updating the parameters of the neural network under training using the target loss information, the two sub-networks can be updated collaboratively without deviating from or becoming out of sync, achieving joint training of the two sub-networks. Thus, through joint training, the decks currently learned by the first sub-network can be better understood by the downstream second sub-network, allowing it to train matching card-playing strategies. As the second sub-network becomes stronger, it can in turn incentivize the first sub-network to boldly select more skill-intensive card samples to build its deck. Based on this, a first sub-network capable of constructing a reasonable deck and a second sub-network capable of formulating a card-playing strategy that matches the deck can be trained, thus obtaining a target neural network with reliable prediction accuracy.
[0197] like Figure 6The diagram shown is a schematic representation of the structure of a neural network to be trained according to an embodiment of this disclosure. The structure of the neural network to be trained is also the structure of the target neural network. `cb_net` represents the first sub-network, `bt_net` represents the second sub-network, `V_net` represents the third sub-network, `card_set` represents candidate card samples, `selected_cards` represents target card samples in the currently constructed sample card deck, `cb_action` represents the predicted selection action information output by the first sub-network, `cb_emb` represents the target feature output by the first sub-network (representing the third target feature in the card-building stage and the fourth target feature in the battle stage), `obs` represents the battle situation information in the current battle round, `bt_emb` represents the battle feature, `bt_action` represents the predicted card-playing strategy in the current battle round, `phase_mask` represents the current game stage, and `Value` represents the output predicted value. For example, according to the neural network training methods provided in the above embodiments, the neural network is trained... Figure 6 The neural network to be trained shown is trained to obtain a target neural network with reliable prediction accuracy. Then, the target neural network can be used to realize AI battles for card battle games.
[0198] Specifically, after training the target neural network, it can be applied. For example, the target neural network can be deployed to the server corresponding to any card-based battle game, and then used for AI battles. This could be used for human-computer battles against real players, to continue battles for disconnected (or auto-play) players, or for use in bonus game battles. The steps for applying the target neural network can be found in S101 and S102 above.
[0199] Those skilled in the art will understand that, in the above-described method of the specific implementation, the order in which each step is written does not imply a strict execution order and does not constitute any limitation on the implementation process. The specific execution order of each step should be determined by its function and possible internal logic.
[0200] Based on the same inventive concept, this disclosure also provides a card battle device corresponding to the card battle method. Since the principle of the device in this disclosure for solving the problem is similar to the card battle method described above in this disclosure, the implementation of the device can refer to the implementation of the method, and the repeated parts will not be described again.
[0201] like Figure 7 The diagram shown is a schematic representation of a card battle device provided in this embodiment of the present disclosure, comprising:
[0202] The first battle module 701 is used to respond to the current game being in the deck-building stage by inputting each candidate card and each target card in the constructed deck into the first sub-network of the target neural network to obtain target selection action information; the target selection action information is used to indicate the card selected from the candidate cards to be added to the constructed deck.
[0203] The second battle module 702 is used to respond to the current game being in the battle phase, and for any battle round, input the first completed deck built in the deck-building phase and the battle situation information in the battle round into the second sub-network of the target neural network to obtain the target card-playing strategy in the battle round, and play cards according to the target card-playing strategy.
[0204] The battle situation information is used to characterize various information that can affect the battle outcome; the target neural network is obtained by jointly training the first sub-network and the second sub-network.
[0205] In one possible implementation, the target neural network further includes a third sub-network; the device further includes a determining module 703.
[0206] The first battle module 701, after inputting each candidate card and each target card in the constructed deck into the first sub-network of the target neural network, is further used for:
[0207] Using the first sub-network, a first feature extraction process is performed on each target card included in the constructed card deck to obtain a first extracted feature. Based on the first extracted feature, a first target feature is determined to characterize each target card included in the constructed card deck.
[0208] The determining module 703 is used to utilize the third sub-network to determine the first target value corresponding to the currently constructed card deck based on the first target feature, and to display the first target value.
[0209] In one possible implementation, the second battle module 702, after inputting the first completed deck built during the deck-building phase and the battle situation information during the battle round into the second sub-network of the target neural network, is further configured to:
[0210] For any of the aforementioned battle rounds, the second sub-network is used to perform second feature extraction processing on each target card in the first completed deck to obtain the second extracted features;
[0211] Based on the battle situation information and the second extracted features, the battle features for this battle round are determined;
[0212] The determining module 703 is further configured to utilize the third sub-network to determine the second target value in the current battle round based on the battle characteristics and the second target characteristics used to characterize each target card in the first completed deck, and to display the second target value.
[0213] In one possible implementation, the apparatus further includes a training module 704 for training the target neural network using the following steps:
[0214] For any game in multiple game matches, during the card-building stage, each candidate card sample and each target card sample in the constructed sample card deck are input into the first sub-network of the neural network to be trained to obtain predicted selection action information; the predicted selection action information is used to indicate the card sample selected from the candidate card samples to be added to the constructed sample card deck.
[0215] During the battle phase, for any battle round in the game, the second completed deck built during the deck-building phase and the battle situation information of the battle round are input into the second sub-network of the neural network to be trained to determine the predicted card-playing strategy for the battle round.
[0216] Based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games, target loss information is determined, and the target loss information is used to iteratively train the neural network to be trained until the training cutoff condition is met, thereby obtaining the target neural network used for deck building and determining card-playing strategies.
[0217] In one possible implementation, the training module 704, when inputting each candidate card sample and each target card sample in the constructed sample card set into the first sub-network of the neural network to be trained to obtain the predicted selection action information, is used for:
[0218] Each candidate card sample and each target card sample in the constructed sample card group are input into the first sub-network. The first sub-network is used to perform third feature extraction processing on each candidate card sample to obtain the third extracted features.
[0219] The fourth feature extraction process is performed on each target card sample included in the constructed sample card group to obtain the fourth extracted feature;
[0220] Based on the third and fourth extraction features, determine the card samples to be selected from the candidate card samples at the current time;
[0221] Based on each of the fourth extracted features, a correlation feature with a preset feature length is generated; the correlation feature is used to characterize the correlation between each target card sample included in the constructed sample card set;
[0222] The predicted selection action information is determined based on the third extracted feature and the associated feature of the card sample to be selected.
[0223] In one possible implementation, the training module 704, when determining the predicted selection action information based on the third extracted feature and the associated feature of the card sample to be selected, is configured to:
[0224] Using an attention mechanism, a target feature map is generated based on the third extracted feature and the associated feature of the card sample to be selected;
[0225] The target feature map is classified to determine the probability of each card sample to be selected as a card sample to be added to the constructed sample card group;
[0226] The predicted selection action information is determined based on the probability corresponding to each of the selected card samples.
[0227] In one possible implementation, the training module 704 is further configured to:
[0228] Based on the association features, a third target feature is determined to characterize each target card sample included in the constructed sample card set;
[0229] Using the third sub-network in the neural network to be trained, the first prediction value corresponding to the currently constructed sample card group is determined based on the third target feature;
[0230] And when determining target loss information based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games, it is used for:
[0231] The first loss information is determined based on the predicted action selection information, the predicted card-playing strategy, and the battle result after playing cards according to the predicted card-playing strategy for each of the multiple game games.
[0232] The second loss information is determined based on the first predicted value corresponding to each of the plurality of game matches and the match result;
[0233] The target loss information is determined based on the first loss information and the second loss information.
[0234] In one possible implementation, the training module 704, when inputting the second completed deck built during the deck-building phase and the battle situation information during the battle round into the second sub-network of the neural network to be trained, and determining the predicted card-playing strategy for the battle round, is used to:
[0235] For any of the aforementioned battle rounds, the second completed deck and the battle situation information of the aforementioned battle round are input into the second sub-network. Using the second sub-network, the fifth feature extraction process is performed on each target card sample in the completed deck to obtain the fifth extracted feature.
[0236] Based on the battle situation information, determine the visible card samples in the current battle round, and perform sixth feature extraction processing on each of the visible card samples to obtain the sixth extracted feature;
[0237] Based on the aforementioned battle situation information, determine the state features that characterize the battle status information in the current battle round;
[0238] Based on the fifth extracted feature, the sixth extracted feature, and the state feature, the predicted card-playing strategy for the current round of the battle is determined.
[0239] In one possible implementation, the trained module 704, when determining the predicted card-playing strategy for the current round based on the fifth extracted feature, the sixth extracted feature, and the state feature, is used to:
[0240] The fifth extracted feature, the sixth extracted feature, and the state feature are combined to obtain the battle features;
[0241] Based on the processing results obtained after performing fully connected processing and classification processing on the aforementioned battle features, the predicted card-playing strategy for the current battle round is determined.
[0242] In one possible implementation, the training module is further configured to:
[0243] Based on the aforementioned battle characteristics and the fourth target characteristics used to characterize each target card sample in the second completed deck, determine the second predicted value for the current battle round;
[0244] And, when determining the target loss information based on the first loss information and the second loss information, it is used for:
[0245] The third loss information is determined based on the second predicted value corresponding to each of the plurality of game games and the battle result after playing cards according to the predicted card-playing strategy;
[0246] The target loss information is determined based on the first loss information, the second loss information, and the third loss information.
[0247] The processing flow of each module in the device and the interaction flow between each module can be referred to the relevant descriptions in the above method embodiments, and will not be detailed here.
[0248] Based on the same technical concept, embodiments of this application also provide a computer device. (Refer to...) Figure 8 The diagram shown is a structural schematic of a computer device provided in an embodiment of this application, comprising:
[0249] The system includes a processor 81, a memory 82, and a bus 83. The memory 82 stores machine-readable instructions executable by the processor 81. The processor 81 executes these machine-readable instructions, performing the following steps: S101: In response to the current game being in the deck-building phase, each candidate card and each target card in the constructed deck are input into the first sub-network of the target neural network to obtain target selection action information. This target selection action information indicates which cards to add to the constructed deck from the candidate cards. S102: In response to the current game being in the battle phase, for any battle round, the first completed deck constructed during the deck-building phase and the battle situation information for that round are input into the second sub-network of the target neural network to obtain the target card-playing strategy for that round, and cards are played according to the target card-playing strategy. The battle situation information represents various information that can affect the battle outcome. The target neural network is obtained by jointly training the first and second sub-networks.
[0250] The aforementioned memory 82 includes a main memory 821 and an external memory 822. The main memory 821, also known as internal memory, is used to temporarily store the computational data in the processor 81, as well as the data exchanged with external memory such as a hard disk. The processor 81 exchanges data with the external memory 822 through the main memory 821. When the computer device is running, the processor 81 and the memory 82 communicate through the bus 83, so that the processor 81 executes the execution instructions mentioned in the above method embodiments.
[0251] This disclosure also provides a computer-readable storage medium storing a computer program, which, when executed by a processor, performs the steps of the card battle method described in the above-described method embodiments. The storage medium can be a volatile or non-volatile computer-readable storage medium.
[0252] The computer program product of the card battle method provided in this disclosure includes a computer-readable storage medium storing program code. The instructions included in the program code can be used to execute the steps of the card battle method described in the above method embodiments. For details, please refer to the above method embodiments, which will not be repeated here.
[0253] The computer program product can be implemented specifically through hardware, software, or a combination thereof. In one alternative embodiment, the computer program product is specifically embodied in a computer storage medium; in another alternative embodiment, the computer program product is specifically embodied in a software product, such as a software development kit (SDK), etc.
[0254] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the device described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here. In the several embodiments provided in this disclosure, it should be understood that the disclosed device and method can be implemented in other ways. The device embodiments described above are merely illustrative. For example, the division of units is only a logical functional division; in actual implementation, there may be other division methods. Furthermore, multiple units or components may be combined, or some features may be ignored or not executed. Another point is that the displayed or discussed mutual coupling or direct coupling or communication connection may be through some communication interfaces; the indirect coupling or communication connection of devices or units may be electrical, mechanical, or other forms.
[0255] The units described as separate components may or may not be physically separate. The components shown as units may or may not be physical units; that is, they may be located in one place or distributed across multiple network units. Some or all of the units can be selected to achieve the purpose of this embodiment according to actual needs.
[0256] In addition, the functional units in the various embodiments of this disclosure can be integrated into one processing unit, or each unit can exist physically separately, or two or more units can be integrated into one unit.
[0257] If the aforementioned functions are implemented as software functional units and sold or used as independent products, they can be stored in a processor-executable, non-volatile, computer-readable storage medium. Based on this understanding, the technical solution of this disclosure, in essence, or the part that contributes to the prior art, or a portion of the technical solution, can be embodied in the form of a software product. This computer software product is stored in a storage medium and includes several instructions to cause a computer device (which may be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods described in the various embodiments of this disclosure. The aforementioned storage medium includes various media capable of storing program code, such as USB flash drives, portable hard drives, read-only memory (ROM), random access memory (RAM), magnetic disks, or optical disks.
[0258] If the technical solution of this application involves personal information, the product using this technical solution has clearly informed the user of the personal information processing rules and obtained the user's voluntary consent before processing the personal information. If the technical solution of this application involves sensitive personal information, the product using this technical solution has obtained the user's separate consent before processing the sensitive personal information, and also meets the requirement of "express consent". For example, at personal information collection devices such as cameras, clear and prominent signs are set up to inform users that they have entered the scope of personal information collection and that personal information will be collected. If an individual voluntarily enters the collection scope, it is deemed that they have agreed to the collection of their personal information; or on the personal information processing device, with clear signs / information informing users of the personal information processing rules, authorization is obtained from the user through pop-up information or by asking the user to upload their personal information; wherein, the personal information processing rules may include information such as the personal information processor, the purpose of personal information processing, the processing method, and the types of personal information processed.
[0259] Finally, it should be noted that the above-described embodiments are merely specific implementations of this disclosure, used to illustrate the technical solutions of this disclosure, and not to limit it. The protection scope of this disclosure is not limited thereto. Although this disclosure has been described in detail with reference to the foregoing embodiments, those skilled in the art should understand that any person skilled in the art can still modify or easily conceive of changes to the technical solutions described in the foregoing embodiments, or make equivalent substitutions for some of the technical features, within the scope of the technology disclosed in this disclosure. Such modifications, changes, or substitutions do not cause the essence of the corresponding technical solutions to deviate from the spirit and scope of the technical solutions of the embodiments of this disclosure, and should all be covered within the protection scope of this disclosure. Therefore, the protection scope of this disclosure should be determined by the protection scope of the claims.
Claims
1. A card battle method characterized by, The method comprises the following steps: in response to the current game session being in the deck building phase, inputting each candidate card and each target card in the built deck into a first subnetwork in a target neural network to obtain target selection action information; the target selection action information is used to indicate the card selected from the candidate cards to join the built deck; in response to the current game session being in the battle phase, for any battle round, inputting a first completed deck built in the deck building phase and battle situation information under the battle round into a second subnetwork in the target neural network to obtain a target card playing strategy under the battle round, and playing cards according to the target card playing strategy; the battle situation information is used to represent various information that can affect the battle result; the target neural network is obtained by jointly training the first subnetwork and the second subnetwork, the target neural network further comprises a third subnetwork; after inputting each candidate card and each target card in the built deck into the first subnetwork in the target neural network, the method further comprises: using the first subnetwork, performing first feature extraction processing on each target card included in the built deck respectively to obtain first extracted features, and determining first target features used to represent each target card included in the built deck based on the first extracted features; using the third subnetwork, determining a first target value corresponding to the built deck currently built according to the first target features, and displaying the first target value.
2. The method of claim 1, wherein, after inputting the first completed deck built in the deck building phase and the battle situation information under the battle round into the second subnetwork in the target neural network, the method further comprises: for any battle round, using the second subnetwork, performing second feature extraction processing on each target card in the first completed deck respectively to obtain second extracted features; determining battle features under the battle round based on the battle situation information and the second extracted features; using the third subnetwork, determining a second target value under the current battle round according to the battle features and second target features used to represent each target card in the first completed deck, and displaying the second target value.
3. The method according to any one of claims 1 to 2, characterized in that, The target neural network is obtained by training the following steps: for any game session in a plurality of game sessions, in the deck building phase, inputting each candidate card sample and each target card sample in the built sample deck into a first subnetwork in a neural network to be trained to obtain predicted selection action information; the predicted selection action information is used to indicate the card sample selected from the candidate card sample to join the built sample deck; in the battle phase, for any battle round in the game session, inputting a second completed deck built in the deck building phase and battle situation information under the battle round into a second subnetwork in the neural network to be trained to determine a predicted card playing strategy under the battle round; According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy.
4. The method of claim 3, wherein, The method further comprises: According to the association feature, a third target feature used for representing the target card samples included in the constructed sample card set is determined. According to the third target feature, a first predicted value corresponding to the constructed sample card set is determined by using a third subnetwork in the to-be-trained neural network. According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy. According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy. According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy.
5. The method of claim 4, wherein, According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy. According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy. According to the predicted selection action information, the predicted card playing strategy, and the battle result after playing cards according to the predicted card playing strategy corresponding to each of the multiple game sessions, target loss information is determined, and the target loss information is used for iterative training of the to-be-trained neural network until a training stop condition is met, so as to obtain the target neural network for card set construction and determination of a card playing strategy. 6. The method of claim 4, wherein, 7. The method of claim 6, wherein, The second completed card group constructed in the card grouping phase and the battle situation information under the battle round are input into a second sub-network in the to-be-trained neural network, and a predicted discarding strategy under the battle round is determined, including: For any battle round, the second completed card group and the battle situation information under the battle round are input into the second sub-network, and fifth feature extraction processing is performed on each target card sample in the completed card group respectively by using the second sub-network to obtain fifth extracted features; According to the battle situation information, each visible card sample under the current battle round is determined, and sixth feature extraction processing is performed on each visible card sample to obtain sixth extracted features; According to the battle situation information, state features representing the battle state information under the current battle round are determined; According to the fifth extracted features, the sixth extracted features, and the state features, a predicted discarding strategy under the current battle round is determined.
8. The method of claim 7, wherein, According to the fifth extracted features, the sixth extracted features, and the state features, a predicted discarding strategy under the current battle round is determined, including: The fifth extracted features, the sixth extracted features, and the state features are combined to obtain battle features; According to the processing results obtained by sequentially performing full connection processing and classification processing on the battle features, a predicted discarding strategy under the current battle round is determined.
9. The method of claim 8, wherein, The method further includes: According to the battle features and fourth target features representing each target card sample in the second completed card group, a second predicted value under the current battle round is determined; According to the first loss information and the second loss information, the target loss information is determined, including: According to the second predicted value corresponding to each game session in the plurality of game sessions and the battle result after discarding according to the predicted discarding strategy, third loss information is determined; According to the first loss information, the second loss information, and the third loss information, the target loss information is determined.
10. A card battling device, characterized by, including: The first battle module is configured to, in response to the current game session being in a card grouping phase, input each candidate card and each target card in a constructed card group into a first sub-network in a target neural network to obtain target selection action information; the target selection action information is used to indicate a card selected from the candidate cards to be added to the constructed card group; The second battle module is configured to, in response to the current game session being in a battle phase, for any battle round, input a first completed card group constructed in the card grouping phase and battle situation information under the battle round into a second sub-network in the target neural network to obtain a target discarding strategy under the battle round, and discard according to the target discarding strategy; The battle situation information is used to represent various information that can affect the battle result; the target neural network is obtained by jointly training the first sub-network and the second sub-network, The card battle device further includes a determination module, and the target neural network further includes a third sub-network; After inputting each candidate card and each target card in the constructed card group into a first sub-network in a target neural network: The first battle module utilizes the first sub-network to perform first feature extraction processing on each target card included in the constructed card group respectively, to obtain first extracted features, and determines first target features for representing each target card included in the constructed card group based on the first extracted features; The determination module utilizes the third sub-network to determine a first target value corresponding to the constructed card group according to the first target features, and displays the first target value.
11. A computer device, comprising: Comprise: A processor and a memory, the memory stores machine readable instructions executable by the processor, the processor is used for executing the machine readable instructions stored in the memory, when the machine readable instructions are executed by the processor, the processor executes the steps of the card battle method in any one of claims 1 to 9.
12. A computer-readable storage medium, characterized in that, The computer readable storage medium stores a computer program, when the computer program is run by a computer device, the computer device executes the steps of the card battle method in any one of claims 1 to 9.
Citation Information
Patent Citations
A noise robust face recognition method based on a cascade deep convolutional neural network
CN109948573A