A method and device for building a card library of an online card game, and a medium

CN122537796APending Publication Date: 2026-08-11ZHEJIANG CHANGTANG NETWORK CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2026-07-16
Publication Date
2026-08-11

AI Technical Summary

Technical Problem

传统方案依据人工经验或简单数据统计分析来构建牌库,但构建效率低且牌库固定,使得AI决策推理效果不佳

Benefits of technology

[0014]As can be seen, in this application, a player style distribution model is constructed based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; the player style distribution model is used to select and train player game decision agents corresponding to each style type to determine the agent set; a lightweight neural network model is trained based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model; for the deck to be evaluated corresponding to the target deck configuration information, based on the agent set and Monte Carlo tree search algorithm... The method, the candidate card value screening model, and the card pool game win rate prediction model are used to simulate and evaluate a self-play game to determine the current card pool evaluation result; based on the current card pool evaluation result and the preset evaluation index threshold, it is determined whether the iteration termination condition is met to determine the termination judgment result; if the termination judgment result is negative, the card pool to be evaluated is updated, and the self-play game simulation and evaluation are performed again according to the updated card pool to obtain a new current card pool evaluation result; if the termination judgment result is positive, the card pool to be evaluated is determined as the target card game card pool, so that the target artificial intelligence model can call the target card game card pool to assist the player in the target game to make card playing decisions. In other words, this application first constructs a player style distribution model based on real game log data of card games in an online environment, and then uses the player style distribution model to select and train player game decision-making agents corresponding to each style type, obtaining an agent set; then, a lightweight neural network model is trained to obtain a candidate card value screening model and a deck game win rate prediction model; then, for the deck to be evaluated corresponding to the target deck configuration information, a self-play game simulation and evaluation is performed based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck game win rate prediction model to obtain the current deck evaluation result, and to determine whether the current iteration termination condition is met. If not, the deck to be evaluated is updated and the self-play game simulation and evaluation are performed again to determine the new current deck evaluation result; otherwise, if the condition is met, the target card game deck is determined so that the target artificial intelligence model can call the target card game deck to assist the player in the target game to make card-playing decisions. This approach addresses the issues present in existing solutions, enables differentiated adaptation to real players with various styles, and enhances the realism, logic, diversity, practical adaptability, flexibility, game balance, and stability of AI decision-making and reasoning, thereby improving the effectiveness of AI decision-making and reasoning.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN122537796A_ABST
    Figure CN122537796A_ABST
Patent Text Reader

Abstract

This application discloses a method, apparatus, device, and medium for constructing a deck for an online card game, relating to the field of computer technology. The method includes: training player decision-making agents of various style types using a player style distribution model constructed based on real game log data, resulting in a set of agents; training a lightweight neural network model based on a deck configuration dataset, resulting in a candidate card value screening model and a deck game win rate prediction model; for the deck to be evaluated, performing self-play simulation and evaluation based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck game win rate prediction model; if the evaluation result indicates no termination, updating the deck and re-evaluating; if termination occurs, using the deck to be evaluated as the target card game deck, so that the target AI model can call the target card game deck to assist player decision-making. This application improves the practical adaptability, flexibility, and game balance of AI decision-making reasoning.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of computer technology, and in particular to a method, apparatus, device, and medium for constructing a card library for an online card game. Background Technology

[0002] In the current development of AI (Artificial Intelligence) for card games such as Dou Dizhu, the card library, as a core foundational data module, directly determines the efficiency of AI decision-making and reasoning, the rationality of game strategies, and their adaptability to real-world scenarios. Traditional solutions rely on human experience or simple data statistical analysis to build the card library, but this is inefficient and the card library is fixed, resulting in poor AI decision-making and reasoning performance.

[0003] To address this, existing solutions rely on pure self-play reinforcement training to generate card-playing decisions. However, these solutions suffer from several drawbacks: 1) a lack of logical reasoning and game simulation, leading to inaccurate simulations of the game process using the card library; 2) a monotonous game style that deviates significantly from the behavior of real players, resulting in poor adaptability to real-world scenarios; and 3) a prominent static and fixed card library, which cannot accurately assess the card library's support capabilities, coverage, and potential biases for different player styles. Long-term use of a fixed card library can lead to rigid AI decision-making, large fluctuations in win rates, imbalances in game dynamics, and a monotonous user experience. Summary of the Invention

[0004] In view of this, the purpose of this invention is to provide a method, apparatus, device, and medium for constructing a card library for online card games, which can solve the problems existing in existing related solutions, achieve differentiated adaptation to real players of various styles, and improve the realism, logic, diversity, practical adaptability, flexibility, game balance, and stability of AI decision-making and reasoning, thereby improving the effect of AI decision-making and reasoning. The specific solution is as follows: Firstly, this application provides a method for constructing a card library for an online card game, including: A player style distribution model is constructed based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; The player style distribution model is used to select and train player game decision agents corresponding to each style type to determine the agent set. A lightweight neural network model was trained based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model. For the target deck configuration information, a self-play simulation and evaluation is performed based on the set of agents, the Monte Carlo tree search algorithm, the candidate card value screening model, and the deck game win rate prediction model to determine the current deck evaluation result. Based on the current card pool evaluation results and the preset evaluation index thresholds, determine whether the current iteration termination condition is met, and determine the termination judgment result; If the termination judgment result is negative, then the deck to be evaluated is updated, and the self-play game simulation and evaluation are performed again based on the updated deck to obtain a new evaluation result for the current deck. If the termination judgment result is yes, then the card library to be evaluated is determined as the target card game card library, so that the target artificial intelligence model can call the target card game card library to assist the player in the target game to make card playing decisions.

[0005] Optionally, the construction of the player style distribution model based on real online card game match log data includes: Collect real game log data of card games in online environment; wherein, the real game log data of card games includes the game results, the player's card playing sequence, card type combination and the timing of the player's card playing; The actual game log data of the card game is cleaned to determine the cleaned game log data. The cleaned local log data is deduplicated to determine the deduplicated local log data; The deduplicated game log data is standardized to determine the processed game log data; Player behavior features are extracted based on the processed game log data to determine the behavior feature extraction results; wherein, the behavior feature extraction results include a set of players; The behavioral feature matrix of each player in the player set is constructed using the behavioral feature extraction results; The behavioral feature matrix is ​​standardized to determine the processed matrix; The processed matrix corresponding to each player is clustered based on a preset clustering algorithm to determine the clustering result; Several style types are determined based on the clustering results; Based on the clustering results, a player style distribution model corresponding to the several style types is determined.

[0006] Optionally, the step of selecting and training player game decision-making agents corresponding to each style type using the player style distribution model to determine the agent set includes: The player percentage corresponding to each style type is determined based on the player style distribution model. Select the player match decision-making agent corresponding to each of the aforementioned style types based on the player percentages; Based on the player style distribution model, determine the behavioral feature set corresponding to each style type; The player game decision-making agent is trained by minimizing the loss function and the behavioral feature set using gradient descent, so as to determine the trained target player game decision-making agent. A set of agents is determined based on the target player's game decision-making agent corresponding to each style type.

[0007] Optionally, the step of training a lightweight neural network model based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model includes: Obtain the labeled candidate card value dataset; A lightweight neural network model is trained based on the candidate card value dataset to determine the candidate card value screening model; the candidate card value screening model is used to identify and screen candidate cards, which are cards to be used. Obtain the deck configuration dataset and historical game database; A lightweight neural network model is trained based on the deck configuration dataset and the historical game database to determine the deck game win rate prediction model; the deck game win rate prediction model is used to predict the win rate of card game games under the corresponding deck configuration.

[0008] Optionally, for the target deck configuration information corresponding to the deck to be evaluated, self-play simulation and evaluation are performed based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck game win rate prediction model to determine the current deck evaluation result, including: For the target deck configuration information, the decision nodes to be expanded are selected based on the set of agents and the Monte Carlo tree search algorithm. The candidate card value screening model is invoked, and the current candidate card screening result corresponding to the decision node to be expanded is determined by using the current simulated game situation features and the candidate card value screening model; wherein, the current simulated game situation features include card type matrix, number of remaining cards, and playing history; The game win rate prediction model of the card library is invoked, and the game win rate prediction result of the current game corresponding to the decision node to be expanded is determined by using the game win rate prediction model of the card library, the target card library configuration information and the current simulated game situation characteristics; Simulations are conducted based on the current candidate card selection results and the current game win rate prediction results to determine the simulation results; Backtracking is performed based on the simulation results until the preset iterative search depth is met, thus completing the self-game simulation operation and obtaining the target card-playing decision; the target card-playing decision is the decision node with the most visits and the best return. During the execution of the self-play simulation operation, the performance of the deck to be evaluated is evaluated based on the preset deck evaluation index to determine the current deck evaluation result; the preset deck evaluation index includes search complexity, card playing strategy entropy, agent game win rate, key card game hit rate, and card playing decision reasoning time.

[0009] Optionally, the step of determining whether the iteration termination condition is met based on the current card pool evaluation result and a preset evaluation index threshold, in order to determine the termination judgment result, includes: Determine whether the search branch factor value in the current card pool evaluation result is greater than a preset factor value to determine the first indicator judgment result; wherein, the search branch factor value is a value used to quantify the search complexity; Determine whether the card-playing strategy entropy in the current card pool evaluation result is greater than a preset strategy entropy threshold to determine the second indicator judgment result; Determine whether the agent's win rate in the current deck evaluation result is greater than a preset win rate threshold to determine the third indicator judgment result; Determine whether the hit rate of the key hand in the current hand evaluation result is greater than the preset hit rate threshold to determine the result of the fourth indicator; Determine whether the time consumed by the card-playing decision reasoning in the current card pool evaluation result is greater than a preset time threshold, in order to determine the judgment result of the fifth indicator; Based on the judgment results of the first indicator, the second indicator, the third indicator, the fourth indicator, and the fifth indicator, a termination judgment result is determined.

[0010] Optionally, updating the card pool to be evaluated includes: The current deck evaluation results are analyzed to obtain the analysis results; Based on the analysis results, determine the feature vectors or label set used to characterize the performance of the deck; The current deck update strategy is determined based on the feature vector or tag set; The current deck update strategy is used to update the deck to be evaluated in order to determine the updated deck.

[0011] Secondly, this application provides a deck-building apparatus for an online card game, comprising: The style model construction module is used to construct a player style distribution model based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; The agent training module is used to select and train player game decision agents corresponding to each style type using the player style distribution model, so as to determine the agent set; The lightweight model training module is used to train a lightweight neural network model based on the deck configuration dataset, historical game database, and labeled candidate card value dataset, in order to determine the candidate card value screening model and the deck game win rate prediction model. The deck evaluation result determination module is used to perform self-play simulation and evaluation of the deck to be evaluated based on the set of agents, the Monte Carlo tree search algorithm, the candidate card value screening model and the deck game win rate prediction model to determine the current deck evaluation result. The termination judgment module is used to determine whether the current iteration termination condition is met based on the current card pool evaluation result and the preset evaluation index threshold, so as to determine the termination judgment result. The deck update module is used to update the deck to be evaluated if the termination judgment result is negative, and to re-perform the self-play simulation and evaluation based on the updated deck to obtain a new current deck evaluation result. The target deck determination module is used to determine the deck to be evaluated as the target card game deck if the termination judgment result is yes, so as to call the target card game deck based on the target artificial intelligence model to assist the player in the target game to make card playing decisions.

[0012] Thirdly, this application provides an electronic device, comprising: Memory, used to store computer programs; A processor is used to execute the computer program to implement the steps of the aforementioned method for constructing a card library for an online card game.

[0013] Fourthly, this application provides a computer-readable storage medium for storing a computer program, which, when executed by a processor, implements the steps of the aforementioned method for constructing a card library for an online card game.

[0014] As can be seen, in this application, a player style distribution model is constructed based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; the player style distribution model is used to select and train player game decision agents corresponding to each style type to determine the agent set; a lightweight neural network model is trained based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model; for the deck to be evaluated corresponding to the target deck configuration information, based on the agent set and Monte Carlo tree search algorithm... The method, the candidate card value screening model, and the card pool game win rate prediction model are used to simulate and evaluate a self-play game to determine the current card pool evaluation result; based on the current card pool evaluation result and the preset evaluation index threshold, it is determined whether the iteration termination condition is met to determine the termination judgment result; if the termination judgment result is negative, the card pool to be evaluated is updated, and the self-play game simulation and evaluation are performed again according to the updated card pool to obtain a new current card pool evaluation result; if the termination judgment result is positive, the card pool to be evaluated is determined as the target card game card pool, so that the target artificial intelligence model can call the target card game card pool to assist the player in the target game to make card playing decisions. In other words, this application first constructs a player style distribution model based on real game log data of card games in an online environment, and then uses the player style distribution model to select and train player game decision-making agents corresponding to each style type, obtaining an agent set; then, a lightweight neural network model is trained to obtain a candidate card value screening model and a deck game win rate prediction model; then, for the deck to be evaluated corresponding to the target deck configuration information, a self-play game simulation and evaluation is performed based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck game win rate prediction model to obtain the current deck evaluation result, and to determine whether the current iteration termination condition is met. If not, the deck to be evaluated is updated and the self-play game simulation and evaluation are performed again to determine the new current deck evaluation result; otherwise, if the condition is met, the target card game deck is determined so that the target artificial intelligence model can call the target card game deck to assist the player in the target game to make card-playing decisions. This approach addresses the issues present in existing solutions, enables differentiated adaptation to real players with various styles, and enhances the realism, logic, diversity, practical adaptability, flexibility, game balance, and stability of AI decision-making and reasoning, thereby improving the effectiveness of AI decision-making and reasoning. Attached Figure Description

[0015] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on the provided drawings without creative effort.

[0016] Figure 1 A flowchart of a card library construction method for an online card game provided in this application; Figure 2 This application provides a flowchart of a specific method for constructing a card library for an online card game; Figure 3 A schematic diagram of an agent training process provided in this application; Figure 4 A flowchart illustrating the optimization of the Monte Carlo tree search algorithm for a candidate card value screening model and a card pool game win rate prediction model provided in this application; Figure 5 A schematic diagram of a deck-building device for an online card game provided in this application; Figure 6 This application provides a structural diagram of an electronic device. Detailed Implementation

[0017] The technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of the present invention, and not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of the present invention.

[0018] Existing solutions generate card-playing decisions through pure self-play reinforcement training, but these solutions have several drawbacks: 1) lack logical reasoning and game simulation, making it easy to distort the simulation of the game process using the card library; 2) have a single game style, which deviates significantly from the behavior of real players and has poor adaptability to actual combat; and 3) have significant defects due to the static and fixed card library: it is impossible to accurately judge the card library's support capability, coverage, and potential bias for players of different styles. Long-term use of a fixed card library will lead to rigid AI decision-making, large fluctuations in win rate, imbalance in game balance, and monotonous user experience.

[0019] To address this, this application provides a deck construction scheme for online card games, which can solve the problems existing in the existing related schemes, achieve differentiated adaptation to real players of various styles, and improve the authenticity, logic, diversity, practical adaptability, flexibility, game balance and stability of AI decision-making and reasoning, thereby improving the effect of AI decision-making and reasoning.

[0020] See Figure 1 As shown in the figure, an embodiment of the present invention discloses a method for constructing a card library for an online card game, including: Step S11: Construct a player style distribution model based on real game log data of card games in the online environment; wherein, the player style distribution model is used to reflect the game behavior distribution characteristics of real player groups of different style types.

[0021] In this embodiment, combined with Figure 2 As shown, the first step is to characterize the distribution of player behavior based on real online game data, specifically: collecting real game log data of card games in an online environment; wherein, the real game log data of card games includes game win / loss results, player card-playing sequences, card combinations, and player card-playing timing; cleaning the real game log data of card games to determine the cleaned game log data; deduplicating the cleaned game log data to determine the deduplicated game log data; standardizing the deduplicated game log data to determine the processed game log data; extracting player behavior features based on the processed game log data to determine the behavior feature extraction results; wherein, the behavior feature extraction results include a player set; constructing a behavior feature matrix for each player in the player set using the behavior feature extraction results; standardizing the behavior feature matrix to determine the processed matrix; clustering the processed matrix corresponding to each player based on a preset clustering algorithm to determine the clustering results; determining several style types based on the clustering results; and determining the player style distribution model corresponding to the several style types based on the clustering results.

[0022] Understandably, regarding the construction of the player style distribution model, taking the card game Dou Dizhu as an example, this embodiment collects massive amounts of real Dou Dizhu game log data from the target online environment. The data dimensions include core behavioral characteristics such as player card-playing sequences, card combinations, win / loss results, card-playing timing, risk selection, and card-building paths. The collected data undergoes cleaning, deduplication, and standardization preprocessing to remove invalid games and abnormal data. Based on the preprocessed dataset, clustering algorithms and behavioral feature analysis methods are used to construct a player style distribution model, classifying players into several typical style types, such as conservative, aggressive, balanced, conservative, and risky. This accurately depicts the strategy preferences, risk tolerance, card-playing patterns, and card-building paths corresponding to each style, fully reflecting the behavioral distribution characteristics of the real player group in the current online environment.

[0023] Furthermore, regarding the extraction of player behavioral features, this embodiment collects M valid game data from N players in real online game logs, extracts the core behavioral feature vector for each player, and constructs a feature matrix. Let the player set be... Each player The behavioral feature vector is ,in, k The feature matrix is ​​represented as follows: (The feature dimensions cover eight core dimensions, including aggressiveness coefficient, risk preference coefficient, similarity of card-making paths, and accuracy of key card decisions.) To eliminate the influence of dimensions, the feature matrix can be standardized using the Z-score standardization formula: .in, For the first j The mean of the dimensional features, For the first j Standard deviation of dimensional features These are the standardized eigenvalues, and the processed matrix can be obtained from the standardized eigenvalues.

[0024] Regarding player style clustering, this embodiment employs an improved K-means clustering algorithm to cluster the standardized feature matrix, thereby classifying player style types and addressing the clustering bias problem caused by the random initial cluster centers in traditional K-means clustering. The clustering process is as follows: 1) Determine the number of clusters K The optimal profile coefficient method is used to calculate the optimal profile coefficient. K The formula for the contour coefficient is: ,in For the sample i The average distance to samples in the same cluster, For the sample i The average distance to the nearest heterogeneous sample, The closer the value is to 1, the better the clustering effect. 2) Initialize cluster centers The density peak method is used to select the initial center to avoid random initialization bias. 3) Calculate the Euclidean distance between each player's feature vector and each cluster center, using the following formula: ,in The cluster center for the style of player class m; 4) Players Divide the data into the nearest cluster, update each cluster center to the mean of all samples within that cluster, and iterate until the cluster centers converge (convergence condition: ...). , The preset convergence threshold is set to 0.001. 5) After clustering is completed, we get K Typical player styles, constructing a player style distribution model ,in Let m be the feature set of the style class m. The percentage of players in style m .

[0025] Step S12: Select and train the player game decision-making agent corresponding to each style type using the player style distribution model to determine the agent set.

[0026] In this embodiment, combined with Figure 3 As shown, after completing the modeling of real player styles, a differentiated multi-style agent set will be constructed using the obtained player style distribution model. That is: the player proportion corresponding to each style type is determined based on the player style distribution model; player game decision agents corresponding to each style type are selected according to the player proportion; behavioral feature sets corresponding to each style type are determined based on the player style distribution model; the player game decision agents are trained by minimizing the loss function and the behavioral feature sets using the gradient descent method to determine the trained target player game decision agents; and an agent set is determined based on the target player game decision agents corresponding to each style type.

[0027] Understandably, regarding the construction of the agent set, this embodiment, based on the player style distribution model generated in step S11, selects and trains corresponding multi-style agents according to the proportion and characteristics of each type of player style, forming a standardized agent set. Each agent in this agent set corresponds to a type of real player style, completely replicating the behavioral logic of the corresponding type of player in terms of strategy selection, risk propensity, card-making path, and card-playing habits. This ensures that the agent set can comprehensively cover the behavioral diversity of the real player group and avoid evaluation bias caused by single-style agents.

[0028] Furthermore, regarding multi-style agent training, this embodiment uses a player style distribution model. By style proportion A certain number of agents are selected for training, each agent corresponding to a style category. The training objective is to make the agent's behavioral features correlate with the corresponding style cluster. The feature bias is minimized, and the loss function formula is: .in, T To train the number of games played, For the first m Style-based agents in the first t The sequence of actions in a game. This is the mapping function from behavior sequences to feature vectors. For the first m The feature mean vectors of style clusters are used. Gradient descent is employed to minimize the loss function and update the agent parameters. The updated formula is: .in, The learning rate (values ​​from 0.001 to 0.01). For the loss function with respect to parameters The gradient. After training, a multi-style agent ensemble is formed. Used for deck performance evaluation.

[0029] In this way, by constructing a multi-style intelligent agent evaluation system based on real player behavior, it is possible to achieve differentiated adaptation of the card library to real players of different styles, thereby improving the AI's adaptability to actual combat.

[0030] Step S13: Train a lightweight neural network model based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model.

[0031] In this embodiment, combined with Figure 2 As shown, two types of dedicated small-scale neural network models will be trained simultaneously to assist in optimizing the subsequent MCTS (Monte Carlo Tree Search, a heuristic search algorithm based on random simulation) process, thus solving the problem of low efficiency in traditional MCTS. Specifically: A labeled candidate card value dataset is obtained; a lightweight neural network model is trained based on the candidate card value dataset to determine the candidate card value filtering model; the candidate card value filtering model is used to identify and filter candidate cards, which are the cards to be used; a deck configuration dataset and a historical game database are obtained; a lightweight neural network model is trained based on the deck configuration dataset and the historical game database to determine the deck game win rate prediction model; the deck game win rate prediction model is used to predict the win rate of card game games under the corresponding deck configuration.

[0032] It's important to understand that, regarding the candidate card value filtering model in this embodiment, a lightweight neural network model is trained using a pre-labeled candidate card value dataset. This model is used to quickly identify and filter high-value candidate cards, eliminating low-value and low-win-rate invalid candidate card nodes. In the position expansion stage of the MCTS search, this model can be called to perform pre-pruning, preventing MCTS from making invalid explorations of low-value nodes, compressing the number of search branches, and reducing search complexity.

[0033] Regarding the deck-based game win rate prediction model, this embodiment utilizes historical game data and a deck configuration dataset to train a dedicated neural network model for win rate prediction. This model is used to predict the game balance and win rate trends under different deck configurations in advance. During the MCTS simulation phase, this model is invoked to filter out overly unbalanced game scenarios, avoiding wasting computational power and time on meaningless unbalanced simulations, and further improving the overall inference efficiency of MCTS.

[0034] This approach enhances the realism of deck-based game simulations and the logical consistency of AI decision-making, reducing decision-making bias. On one hand, a candidate card value screening model pre-prunes the MCTS search branch, eliminating low-value and invalid candidate cards and guiding the search to focus on logically optimal card combinations. On the other hand, a game win rate prediction model filters out overly unbalanced game scenarios, ensuring that the MCTS simulation process closely follows the reasonable deduction logic of real games. Simultaneously, relying on the MCTS search process, a complete game deduction is achieved, avoiding convergence of decision-making values. This makes the deck's support for AI decision-making more logical, significantly improving the realism of deck-based game simulations and narrowing the gap with the decision-making logic of real players.

[0035] Step S14: For the target deck configuration information corresponding to the deck to be evaluated, perform self-play simulation and evaluation based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model and deck game win rate prediction model to determine the current deck evaluation result.

[0036] In this embodiment, for the card library configuration corresponding to the card library to be generated or updated and optimized, the agent set constructed in step S12 is driven to conduct a self-play game. During the agent's MCTS inference decision-making process, the current card library to be evaluated is forcibly called to complete the situation expansion, game simulation, and prior probability guidance. That is: for the card library to be evaluated corresponding to the target card library configuration information, the decision node to be expanded is selected based on the agent set and the Monte Carlo tree search algorithm; the candidate card value screening model is called, and the current candidate card screening result corresponding to the decision node to be expanded is determined using the current simulated game situation features and the candidate card value screening model; wherein, the current simulated game situation features include card type matrix, remaining card count, and playing history; the card library game win rate prediction model is called, and the current game win rate prediction model, the target card library configuration information, and the current simulated game situation features are used to determine the current game win rate corresponding to the decision node to be expanded. The simulation results are determined by: predicting the win rate of the current candidate cards and the current game win rate; performing a simulation based on the current candidate card selection results and the current game win rate prediction results; backtracking based on the simulation results until a preset iterative search depth is met to complete the self-game simulation operation and obtain the target card-playing decision; the target card-playing decision is the decision node with the most visits and the best return; during the execution of the self-game simulation operation, the performance of the card library to be evaluated is evaluated based on preset card library evaluation indicators to determine the current card library evaluation results; the preset card library evaluation indicators include search complexity, card-playing strategy entropy, agent game win rate, key game hit rate, and card-playing decision reasoning time.

[0037] It is important to understand that this embodiment collects multi-dimensional core evaluation metrics in real time during the self-game and MCTS search process to comprehensively quantify the card pool performance. Specific metrics include, but are not limited to: MCTS search depth, search branch factor, node value distribution, policy entropy, agent win rate / reward, key hand hit rate, style consistency, inference time, and computing power utilization. The core metrics and simplified quantitative formulas are shown below: 1) Search branching factor (used to quantify search complexity): ,in V For the set of MCTS search tree nodes, For nodes v The number of child nodes, | V | represents the total number of nodes in the search tree. The smaller the value, the more concise the search branches, and the higher the search efficiency guided by the deck.

[0038] 2) Strategy Entropy (i.e., card-playing strategy entropy, used to quantify decision-making diversity and reflect real player behavior): ,in Select the first agent i The probability of different card-playing strategies. n The total number of card-playing strategies. The closer the value is to ln n This indicates that the more diverse the decision-making supported by the deck, the better it can suit players of different styles.

[0039] 3) Key hand hit rate (used to quantify deck fit): ,in This represents the number of times the agent's decisions in key hands conform to the corresponding style characteristics. The total number of key hands is the key number of hands. The higher the hit rate, the more adaptable the deck is to different player styles.

[0040] 4) Agent win rate (used to quantify deck balance): ,in For the first m The number of wins by style-based agents The total number of games played by this type of intelligent agent shows that the win rates of various types are close to equilibrium, indicating that the deck has excellent balance.

[0041] 5) Reasoning time (i.e., the time spent reasoning for playing a card, used to quantify the efficiency of the card pool): ,in For the first MCTS inference time in game-to-game G The shorter the time taken for the total number of games, the stronger the card pool's ability to adapt to real-time decision-making requirements.

[0042] Other core evaluation metrics (MCTS search depth, node value distribution, style consistency, computing power utilization, etc.) can be quantified as needed based on the above formula logic to fully cover the card pool performance evaluation requirements.

[0043] Furthermore, regarding lightweight network-assisted optimization of MCTS search, combined with... Figure 4 As shown, the following implementation steps may exist in this embodiment: (1) Algorithm Basics: MCTS Native Four-Step Process. The core process of MCTS constructs a search tree through four iterative steps. The core formula is the UCT (Upper Confidence Bound for Trees, a game tree search algorithm based on Monte Carlo tree search) selection formula, used to select nodes to be expanded: in, v For the current node, Q ( v ) is a node v The cumulative profit value, N ( v ) is a node v Number of visits, parent ( v ) is a node v The parent node, C The exploration coefficient (ranging from 0.5 to 2.0, used to balance exploration and utilization).

[0044] (2) High-value candidate card screening neural network: A candidate card value screening model is constructed using a 3-layer lightweight CNN (Convolutional Neural Network). The input is the current game situation features (including card type matrix, number of remaining cards, playing history, etc.), and the output is the value score of each candidate card, which is used for pre-pruning in the MCTS expansion stage.

[0045] a) Input layer: Status feature matrix ,in S This is the current hand matrix (1×54 dimensions, 0 indicates no such card, 1 indicates the card is present). R This is a matrix of remaining cards (1×3 dimensions, representing the remaining cards for each of the three players). H The matrix represents the card-playing history of the last 3 rounds (3×54 dimensions). b) Network structure: Convolutional layer 1 (3×3 convolutional kernels, 16 output channels), pooling layer (2×2), convolutional layer 2 (3×3 convolutional kernels, 32 output channels), pooling layer (2×2), fully connected layer (its output dimension is the number of candidate cards M). c) Output layer: Employs the Sigmoid activation function to output the value score of each candidate card. The scoring range is [0, 1], and the formula is: .in, For the first i The feature vectors of each candidate card W This is the weight matrix of the fully connected layer. b For bias terms, Use the Sigmoid activation function; d) Pruning strategy: Setting a value threshold (Values ​​range from 0.3 to 0.5), exclude Low-value candidate cards are discarded, and only the remaining high-value candidate cards are retained to participate in MCTS expansion, thus reducing the number of search branches.

[0046] (3) Pre-evaluation neural network for game win rate: A two-layer lightweight MLP (Multi-Layer Perceptron) is used to construct a game win rate prediction model for the deck. The input is the current deck configuration and game characteristics, and the output is the game win rate under the current situation. This is used to filter invalid scenarios in the MCTS simulation stage.

[0047] a) Input layer: Feature vectors ,in The current deck value characteristics (1×10 dimensions). The current agent's style features (1×8 dimensions). The remaining card type distribution characteristics (1×13 dimensions); b) Network structure: Fully connected layer 1 (input dimension 31, output dimension 16), ReLU activation function, fully connected layer 2 (input dimension 16, output dimension 1). c) Output layer: Employs the Sigmoid activation function to output the game win rate. The formula is: .in, This is the weight matrix of the fully connected layer. For bias terms; d) Filtering strategy: Set a win rate threshold range (Possible values) ), filter out (A losing game) and In unbalanced scenarios where a winning hand is certain, avoid unnecessary simulations that consume computing power.

[0048] (4) Dual-network assisted MCTS pruning optimization algorithm: The above two lightweight neural networks are embedded into the MCTS search process to form the optimized MCTS algorithm. The steps are as follows: 1) Selection: Select the node to be expanded using the UCT formula; 2) Expansion: Call the candidate card value screening model to calculate the value score of each candidate card, eliminate low-value candidate cards, and only expand the high-value candidate card nodes; 3) Simulation: The game win rate prediction model of the card library is called to calculate the win rate of the current simulation scenario, filter out unbalanced scenarios, and only simulate and deduce balanced scenarios. This step is executed in parallel with step 2). 4) Backtracking: Propagate the simulation results (win rate, profit) backwards to update the nodes. Q ( v )and N ( v Iterate until the preset number of searches or search depth is reached; 5) Decision Output: Select the node with the most visits and the highest returns as the optimal card-playing decision, simulating the optimal decision of a real player. The formula for improving search efficiency is: .in, Compared to the time-consuming traditional MCTS search, The optimized MCTS search time is achieved through dual-network parallel assistance. To improve search efficiency (as verified by experiments), ≥40%

[0049] This approach significantly improves search efficiency by simultaneously training two types of lightweight neural network models and embedding them into the MCTS search process: the candidate card value screening model performs pre-pruning in the MCTS expansion stage, compressing the number of search branches and reducing search complexity; the game win rate prediction model filters out invalid and imbalanced scenarios in the MCTS simulation stage, reducing meaningless computational consumption. Experiments have verified that while reducing computational power consumption, the AI ​​can quickly make card-playing decisions, perfectly adapting to the real-time requirements of game scenarios.

[0050] Step S15: Based on the current card pool evaluation results and the preset evaluation index threshold, determine whether the current iteration termination condition is met, so as to determine the termination judgment result.

[0051] In this embodiment, combined with Figure 2As shown, based on the multi-dimensional evaluation indicators in the current deck evaluation results, the deck is ultimately filtered, layered, combined, or incrementally updated to generate a highly adaptable and high-performance AI-specific deck. Specifically: First, the search branch factor value in the current deck evaluation results is determined to be greater than a preset factor value to determine the first indicator judgment result; wherein the search branch factor value is a value used to quantify search complexity. Second, the card-playing strategy entropy in the current deck evaluation results is determined to be greater than a preset strategy entropy threshold to determine the second indicator judgment result. Third, the agent's game win rate in the current deck evaluation results is determined to be greater than a preset win rate threshold to determine the third indicator judgment result. Fourth, the key card game hit rate in the current deck evaluation results is determined to be greater than a preset hit rate threshold to determine the fourth indicator judgment result. Fifth, the card-playing decision reasoning time in the current deck evaluation results is determined to be greater than a preset time threshold to determine the fifth indicator judgment result. Finally, based on the first, second, third, fourth, and fifth indicator judgment results, a termination judgment result is determined. Understandably, in addition to the five key indicators mentioned above, other indicators in the current card pool evaluation results will also be analyzed and judged accordingly.

[0052] Step S16: If the termination judgment result is negative, then update the deck to be evaluated, and re-perform the self-play simulation and evaluation based on the updated deck to obtain a new current deck evaluation result.

[0053] In this embodiment, the card pool to be evaluated is updated by performing a comprehensive performance analysis of the evaluation metrics. That is, the current card pool evaluation results are analyzed to obtain the analysis results; based on the analysis results, feature vectors or label sets used to characterize the card pool performance are determined; based on the feature vectors or label sets, the current card pool update strategy is determined; and the current card pool update strategy is used to update the card pool to be evaluated to determine the updated card pool.

[0054] It's important to understand that by analyzing evaluation metrics, feature vectors or label sets are generated to characterize deck performance, accurately depicting core attributes such as the deck's support for different player styles, global coverage, potential strategy bias, and impact on inference efficiency. When performing automated optimization operations on the deck based on the evaluation results, optimizations include high-value card selection, redundant low-value card removal, card type stratification, deck combinations of different styles, and incremental addition of candidate cards to complete one round of deck iteration. This continues until all evaluation metrics of the deck reach corresponding thresholds, generating a standardized AI deck tailored to a specific player style or compatible with multiple styles—the target card game deck.

[0055] Step S17: If the termination judgment result is yes, then the card library to be evaluated is determined as the target card game card library, so that the target artificial intelligence model can call the target card game card library to assist the player in the target game to make card playing decisions.

[0056] In this embodiment, if the current evaluation indicators reach the corresponding thresholds, the current card library to be evaluated is determined as the target card game card library, and the target artificial intelligence model can then call this card library for game interaction.

[0057] In this way, this embodiment establishes a dynamic evaluation and iterative optimization mechanism for the deck, thereby solving the defects of static deck fixation and ensuring the flexibility, game balance and long-term stability of AI decision-making and reasoning.

[0058] Therefore, in this embodiment, a player style distribution model is first constructed based on real game log data of card games in an online environment. This model is then used to select and train player decision-making agents for each style type, resulting in an agent set. Next, a lightweight neural network model is trained to obtain a candidate card value screening model and a deck-based game win rate prediction model. Then, for the deck to be evaluated corresponding to the target deck configuration information, a self-play simulation and evaluation is performed based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck-based game win rate prediction model to obtain the current deck evaluation result. It is then determined whether the iteration termination condition is met. If not, the deck to be evaluated is updated, and the self-play simulation and evaluation are performed again to determine a new current deck evaluation result. Conversely, if the condition is met, the target card game deck is determined so that the target AI model can call upon the target card game deck to assist players in making card-playing decisions in the target game. This approach addresses the issues present in existing solutions, enables differentiated adaptation to real players with various styles, and enhances the realism, logic, diversity, practical adaptability, flexibility, game balance, and stability of AI decision-making and reasoning, thereby improving the effectiveness of AI decision-making and reasoning.

[0059] See Figure 5 As shown in the figure, this application also discloses a deck building device for online card games, including: Style model construction module 11 is used to construct a player style distribution model based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; The agent training module 12 is used to select and train player game decision agents corresponding to each style type using the player style distribution model, so as to determine the agent set; The lightweight model training module 13 is used to train a lightweight neural network model based on the deck configuration dataset, historical game database and labeled candidate card value dataset, so as to determine the candidate card value screening model and the deck game win rate prediction model. The deck evaluation result determination module 14 is used to perform self-play simulation and evaluation of the deck to be evaluated based on the set of agents, the Monte Carlo tree search algorithm, the candidate card value screening model and the deck game win rate prediction model to determine the current deck evaluation result. Termination judgment module 15 is used to determine whether the current iteration termination condition is met based on the current card pool evaluation result and the preset evaluation index threshold, so as to determine the termination judgment result. The deck update module 16 is used to update the deck to be evaluated if the termination judgment result is negative, and to re-perform the self-play simulation and evaluation based on the updated deck to obtain a new current deck evaluation result. The target deck determination module 17 is used to determine the deck to be evaluated as the target card game deck if the termination judgment result is yes, so as to call the target card game deck based on the target artificial intelligence model to assist the player in the target game to make card playing decisions.

[0060] In some specific embodiments, the style model construction module 11 can be used to: collect real game log data of card games in an online environment; wherein the real game log data of card games includes game win / loss results, player card-playing sequences, card type combinations, and player card-playing timing; clean the real game log data of card games to determine cleaned game log data; perform deduplication processing on the cleaned game log data to determine deduplicated game log data; perform standardization processing on the deduplicated game log data to determine processed game log data; extract player behavior features based on the processed game log data to determine behavior feature extraction results; wherein the behavior feature extraction results include a player set; construct a behavior feature matrix for each player in the player set using the behavior feature extraction results; perform standardization processing on the behavior feature matrix to determine the processed matrix; cluster the processed matrix corresponding to each player based on a preset clustering algorithm to determine the clustering results; determine several style types based on the clustering results; and determine player style distribution models corresponding to the several style types based on the clustering results.

[0061] In some specific embodiments, the agent training module 12 can be used to: determine the proportion of players corresponding to each style type based on the player style distribution model; select player game decision agents corresponding to each style type according to the player proportion; determine the behavioral feature set corresponding to each style type based on the player style distribution model; train the player game decision agents by minimizing the loss function and the behavioral feature set using the gradient descent method to determine the trained target player game decision agents; and determine an agent set based on the target player game decision agents corresponding to each style type.

[0062] In some specific embodiments, the lightweight model training module 13 can be used to: acquire a labeled candidate card value dataset; train a lightweight neural network model based on the candidate card value dataset to determine a candidate card value screening model; the candidate card value screening model is used to identify and screen candidate cards, which are cards to be used; acquire a card library configuration dataset and a historical game database; train a lightweight neural network model based on the card library configuration dataset and the historical game database to determine a card library game win rate prediction model; the card library game win rate prediction model is used to predict the win rate of card game games under the corresponding card library configuration.

[0063] In some specific embodiments, the card pool evaluation result determination module 14 can be specifically used to: select decision nodes to be expanded based on the agent set and Monte Carlo tree search algorithm for the card pool to be evaluated corresponding to the target card pool configuration information; call the candidate card value screening model, and determine the current candidate card screening result corresponding to the decision node to be expanded using the current simulated game situation features and the candidate card value screening model; wherein, the current simulated game situation features include card type matrix, remaining card count, and playing history; call the card pool game win rate prediction model, and determine the current candidate card screening result corresponding to the decision node to be expanded using the card pool game win rate prediction model, the target card pool configuration information, and the current simulated game situation features. The current game win rate prediction result corresponding to the decision node to be expanded; simulation is performed based on the current candidate card selection result and the current game win rate prediction result to determine the simulation result; backtracking is performed based on the simulation result until the preset iteration search depth is met to complete the self-game simulation operation and obtain the target card decision; the target card decision is the decision node with the most visits and the best return; during the execution of the self-game simulation operation, the performance of the card library to be evaluated is evaluated based on the preset card library evaluation index to determine the current card library evaluation result; the preset card library evaluation index includes search complexity, card strategy entropy, agent game win rate, key card hit rate and card decision reasoning time.

[0064] In some specific embodiments, the termination judgment module 15 can be specifically used to: determine whether the search branch factor value in the current card pool evaluation result is greater than a preset factor value to determine a first indicator judgment result; wherein, the search branch factor value is a value used to quantify search complexity; determine whether the card-playing strategy entropy in the current card pool evaluation result is greater than a preset strategy entropy threshold to determine a second indicator judgment result; determine whether the agent's game win rate in the current card pool evaluation result is greater than a preset win rate threshold to determine a third indicator judgment result; determine whether the key card game hit rate in the current card pool evaluation result is greater than a preset hit rate threshold to determine a fourth indicator judgment result; determine whether the card-playing decision reasoning time in the current card pool evaluation result is greater than a preset time threshold to determine a fifth indicator judgment result; and determine a termination judgment result based on the first indicator judgment result, the second indicator judgment result, the third indicator judgment result, the fourth indicator judgment result, and the fifth indicator judgment result.

[0065] In some specific embodiments, the deck update module 16 can be used to: parse the current deck evaluation result to obtain the analysis result; determine the feature vector or label set used to characterize the deck performance based on the analysis result; determine the current deck update strategy based on the feature vector or label set; and update the deck to be evaluated using the current deck update strategy to determine the updated deck.

[0066] Furthermore, embodiments of this application also disclose an electronic device, Figure 6 This is a structural diagram of an electronic device 20 according to an exemplary embodiment. The content of the diagram should not be construed as limiting the scope of this application.

[0067] Figure 6 This is a schematic diagram of the structure of an electronic device 20 provided in an embodiment of this application. Specifically, the electronic device 20 may include: at least one processor 21, at least one memory 22, a power supply 23, a communication interface 24, an input / output interface 25, and a communication bus 26. The memory 22 stores a computer program, which is loaded and executed by the processor 21 to implement the relevant steps in the card library construction method for online card games disclosed in any of the foregoing embodiments. Alternatively, the electronic device 20 in this embodiment may specifically be an electronic computer.

[0068] In this embodiment, the power supply 23 is used to provide operating voltage for each hardware device on the electronic device 20; the communication interface 24 can create a data transmission channel between the electronic device 20 and external devices, and the communication protocol it follows can be any communication protocol applicable to the technical solution of this application, and is not specifically limited here; the input / output interface 25 is used to acquire external input data or output data to the outside world, and its specific interface type can be selected according to specific application needs, and is not specifically limited here.

[0069] In addition, the memory 22, as a carrier for resource storage, can be a read-only memory, random access memory, disk or optical disk, etc. The resources stored thereon can include operating system 221, computer program 222, etc., and the storage method can be temporary storage or permanent storage.

[0070] The operating system 221 is used to manage and control the various hardware devices on the electronic device 20 and the computer program 222, which may be Windows Server, Netware, Unix, Linux, etc. In addition to including a computer program capable of performing the card library construction method for an online card game executed by the electronic device 20 as disclosed in any of the foregoing embodiments, the computer program 222 may further include computer programs capable of performing other specific tasks.

[0071] Furthermore, this application also discloses a computer-readable storage medium for storing a computer program; wherein, when the computer program is executed by a processor, it implements the aforementioned method for constructing a card library for an online card game. Specific steps of this method can be found in the corresponding content disclosed in the foregoing embodiments, and will not be repeated here.

[0072] The various embodiments in this specification are described in a progressive manner, with each embodiment focusing on its differences from other embodiments. Similar or identical parts between embodiments can be referred to interchangeably. For the apparatus disclosed in the embodiments, since it corresponds to the method disclosed in the embodiments, the description is relatively simple; relevant parts can be referred to in the method section.

[0073] Those skilled in the art will further recognize that the units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementation should not be considered beyond the scope of this application.

[0074] The steps of the methods or algorithms described in conjunction with the embodiments disclosed herein can be implemented directly by hardware, a software module executed by a processor, or a combination of both. The software module can be located in random access memory (RAM), main memory, read-only memory (ROM), electrically programmable ROM, electrically erasable programmable ROM, registers, hard disk, removable disk, CD-ROM, or any other form of storage medium known in the art.

[0075] Finally, it should be noted that in this document, relational terms such as "first" and "second" are used only to distinguish one entity or operation from another, and do not necessarily require or imply any such actual relationship or order between these entities or operations. Furthermore, the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitations, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0076] The technical solutions provided in this application have been described in detail above. Specific examples have been used to illustrate the principles and implementation methods of this application. The descriptions of the above embodiments are only for the purpose of helping to understand the methods and core ideas of this application. At the same time, for those skilled in the art, there will be changes in the specific implementation methods and application scope based on the ideas of this application. Therefore, the content of this specification should not be construed as a limitation of this application.

Claims

1. A method for constructing a card library for an online card game, characterized by, include: A player style distribution model is constructed based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; The player style distribution model is used to select and train player game decision agents corresponding to each style type to determine the agent set. A lightweight neural network model was trained based on the deck configuration dataset, historical game database, and labeled candidate card value dataset to determine the candidate card value screening model and the deck game win rate prediction model. For the target deck configuration information, a self-play simulation and evaluation is performed based on the set of agents, the Monte Carlo tree search algorithm, the candidate card value screening model, and the deck game win rate prediction model to determine the current deck evaluation result. Based on the current card pool evaluation results and the preset evaluation index thresholds, determine whether the current iteration termination condition is met, and determine the termination judgment result; If the termination judgment result is negative, then the deck to be evaluated is updated, and the self-play game simulation and evaluation are performed again based on the updated deck to obtain a new evaluation result for the current deck. If the termination judgment result is yes, then the card library to be evaluated is determined as the target card game card library, so that the target artificial intelligence model can call the target card game card library to assist the player in the target game to make card playing decisions.

2. The method of claim 1, wherein, The player style distribution model is constructed based on real game log data from online card games, including: Collect real game log data of card games in online environment; wherein, the real game log data of card games includes the game results, the player's card playing sequence, card type combination and the timing of the player's card playing; The actual game log data of the card game is cleaned to determine the cleaned game log data. The cleaned local log data is deduplicated to determine the deduplicated local log data; The deduplicated game log data is standardized to determine the processed game log data; Player behavior features are extracted based on the processed game log data to determine the behavior feature extraction results; wherein, the behavior feature extraction results include a set of players; The behavioral feature matrix of each player in the player set is constructed using the behavioral feature extraction results; The behavioral feature matrix is ​​standardized to determine the processed matrix; The processed matrix corresponding to each player is clustered based on a preset clustering algorithm to determine the clustering result; Several style types are determined based on the clustering results; Based on the clustering results, a player style distribution model corresponding to the several style types is determined.

3. The method of claim 1, wherein, The step of selecting and training player game decision-making agents corresponding to each style type using the player style distribution model to determine the agent set includes: The player percentage corresponding to each style type is determined based on the player style distribution model. Select the player match decision-making agent corresponding to each of the aforementioned style types based on the player percentages; Based on the player style distribution model, determine the behavioral feature set corresponding to each style type; The player game decision-making agent is trained by minimizing the loss function and the behavioral feature set using gradient descent, so as to determine the trained target player game decision-making agent. A set of agents is determined based on the target player's game decision-making agent corresponding to each style type.

4. The method of claim 1, wherein, The lightweight neural network model trained based on the deck configuration dataset, historical game database, and labeled candidate card value dataset is used to determine the candidate card value screening model and the deck game win rate prediction model, including: Obtain the labeled candidate card value dataset; A lightweight neural network model is trained based on the candidate card value dataset to determine the candidate card value screening model; the candidate card value screening model is used to identify and screen candidate cards, which are cards to be used. Obtain the deck configuration dataset and historical game database; A lightweight neural network model is trained based on the deck configuration dataset and the historical game database to determine the deck game win rate prediction model; the deck game win rate prediction model is used to predict the win rate of card game games under the corresponding deck configuration.

5. The method of claim 1, wherein, The evaluation of the target deck, corresponding to the configuration information of the target deck, involves self-play simulation and evaluation based on the agent set, Monte Carlo tree search algorithm, candidate card value screening model, and deck game win rate prediction model, to determine the current deck evaluation result, including: For the target deck configuration information, the decision nodes to be expanded are selected based on the set of agents and the Monte Carlo tree search algorithm. The candidate card value screening model is invoked, and the current candidate card screening result corresponding to the decision node to be expanded is determined by using the current simulated game situation features and the candidate card value screening model; wherein, the current simulated game situation features include card type matrix, number of remaining cards, and playing history; The game win rate prediction model of the card library is invoked, and the game win rate prediction result of the current game corresponding to the decision node to be expanded is determined by using the game win rate prediction model of the card library, the target card library configuration information and the current simulated game situation characteristics; Simulations are conducted based on the current candidate card selection results and the current game win rate prediction results to determine the simulation results; Backtracking is performed based on the simulation results until the preset iterative search depth is met, thus completing the self-game simulation operation and obtaining the target card-playing decision; the target card-playing decision is the decision node with the most visits and the best return. During the execution of the self-play simulation operation, the performance of the deck to be evaluated is evaluated based on the preset deck evaluation index to determine the current deck evaluation result; the preset deck evaluation index includes search complexity, card playing strategy entropy, agent game win rate, key card game hit rate, and card playing decision reasoning time.

6. The method of claim 5, wherein, The step of determining whether the iteration termination condition is met based on the current deck evaluation result and a preset evaluation index threshold, in order to determine the termination judgment result, includes: Determine whether the search branch factor value in the current card pool evaluation result is greater than a preset factor value to determine the first indicator judgment result; wherein, the search branch factor value is a value used to quantify the search complexity; Determine whether the card-playing strategy entropy in the current card pool evaluation result is greater than a preset strategy entropy threshold to determine the second indicator judgment result; Determine whether the agent's win rate in the current deck evaluation result is greater than a preset win rate threshold to determine the third indicator judgment result; Determine whether the hit rate of the key hand in the current hand evaluation result is greater than the preset hit rate threshold to determine the result of the fourth indicator; Determine whether the time consumed by the card-playing decision reasoning in the current card pool evaluation result is greater than a preset time threshold, in order to determine the judgment result of the fifth indicator; Based on the judgment results of the first indicator, the second indicator, the third indicator, the fourth indicator, and the fifth indicator, a termination judgment result is determined.

7. The method of claim 1 to 6, wherein, The updating of the card pool to be evaluated includes: The current deck evaluation results are analyzed to obtain the analysis results; Based on the analysis results, determine the feature vectors or label set used to characterize the performance of the deck; The current deck update strategy is determined based on the feature vector or tag set; The current deck update strategy is used to update the deck to be evaluated in order to determine the updated deck.

8. A deck-building device for an online card game, characterized in that, include: The style model construction module is used to construct a player style distribution model based on real game log data of card games in an online environment; wherein, the player style distribution model is used to reflect the distribution characteristics of game behavior of real player groups of different style types; The agent training module is used to select and train player game decision agents corresponding to each style type using the player style distribution model, so as to determine the agent set; The lightweight model training module is used to train a lightweight neural network model based on the deck configuration dataset, historical game database, and labeled candidate card value dataset, in order to determine the candidate card value screening model and the deck game win rate prediction model. The deck evaluation result determination module is used to perform self-play simulation and evaluation of the deck to be evaluated based on the set of agents, the Monte Carlo tree search algorithm, the candidate card value screening model and the deck game win rate prediction model to determine the current deck evaluation result. The termination judgment module is used to determine whether the current iteration termination condition is met based on the current card pool evaluation result and the preset evaluation index threshold, so as to determine the termination judgment result. The deck update module is used to update the deck to be evaluated if the termination judgment result is negative, and to re-perform the self-play simulation and evaluation based on the updated deck to obtain a new current deck evaluation result. The target deck determination module is used to determine the deck to be evaluated as the target card game deck if the termination judgment result is yes, so as to call the target card game deck based on the target artificial intelligence model to assist the player in the target game to make card playing decisions.

9. An electronic device, characterized in that, include: Memory, used to store computer programs; A processor for executing the computer program to implement the deck building method for an online card game as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, Used to store computer programs, which, when executed by a processor, implement the card library construction method for an online card game as described in any one of claims 1 to 7.