Data processing method and system in card game

CN121668684BActive Publication Date: 2026-09-08TUYOO GAMES +3
View PDF 2 Cites 0 Cited by

Patent Information

Application Number
CN202511653255.2
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2025-11-12
Publication Date
2026-09-08
Estimated Expiration
2045-11-12

AI Technical Summary

Technical Problem

这些方法生成的残局关卡数量有限,并且难以科学控制残局的难度梯度以符合可玩性要求,缺乏客观难度标定,导致玩家体验失衡(如新手卡关、高手无聊)等

Benefits of technology

突破了传统人工设计和简单规则过滤下残局产量低、质量不可控的瓶颈,通过“高效求解-生成-智能筛选”的流程重构,实现了海量高质量残局的自动化、精准化批量生产。首先,借助专业求解器,对随机生成的候选残局全面做解释性、趣味性、策略分散性判定,并引入偏好配置信息,实现动态难度分层与多维指标筛选,使得自动化生成的残局不仅满足基本策略玩法要求,还能在广泛难度区间内做到玩家特性的兼顾,避免人工设计产能瓶颈与传统规则过滤下的低适效率。这一闭环流程帮助平台日均可批量产出数万局多样化、策略丰富的高质量残局,实现内容池的动态更新与难度自适应,优化玩家体验的连贯性和新鲜感。

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121668684B_ABST
    Figure CN121668684B_ABST
Patent Text Reader

Abstract

The application discloses a data processing method and system in card games. The method uses a professional solver to comprehensively determine a randomly generated candidate residual game, introduces preference configuration information, realizes dynamic difficulty stratification and multi-dimensional index screening, so that the automatically generated residual game not only meets the basic strategy play requirements, but also takes into account the characteristics of players in a wide difficulty interval, avoiding the production bottleneck of artificial design and the low efficiency of traditional rule filtering. This closed-loop process can output diversified and strategy-rich high-quality residual games, realize dynamic updating and difficulty self-adaptation of the content pool, and optimize the coherence and freshness of the player experience.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of computer technology, and in particular to a data processing method and system for card games. Background Technology

[0002] Most competitive card games now offer a puzzle mode, which refers to a game mode that starts from the middle stage. Due to its short duration and high strategic requirements, puzzle modes have become a core content module of online gaming platforms.

[0003] However, online gaming platforms need to continuously generate a massive number of puzzle levels to satisfy players' demands, but existing technologies mostly use random card dealing or simple rules (such as specifying the number of cards in the landlord's hand or the number of cards in the peasants' hands) to generate puzzles. These methods generate a limited number of puzzle levels, and it is difficult to scientifically control the difficulty gradient of the puzzles to meet the requirements of playability. The lack of objective difficulty standards leads to an unbalanced player experience (such as beginners getting stuck and experienced players getting bored). Summary of the Invention

[0004] The purpose of this application is to provide a data processing method and system for card games to solve the above-mentioned technical problems.

[0005] To achieve the above objectives, the embodiments of this application adopt the following technical solutions: In a first aspect, embodiments of this application provide a data processing method for card games, including: Based on the card pattern generator and preset constraint parameters, multiple candidate endgames are generated; For each candidate endgame, a recursive iteration is performed based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame; in the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. For each candidate endgame, the difficulty score of the candidate endgame is calculated based on the preference configuration information and the solution tree corresponding to the candidate endgame, so as to obtain the difficulty index of the candidate endgame under multiple preference configuration information. Candidate endgames that meet the preset difficulty index are added to the endgame database.

[0006] Secondly, embodiments of this application provide a data processing system for card games, including a puzzle generator, a solver, and a difficulty calculator; The endgame generator is used to generate multiple candidate endgames based on preset constraint parameters from the card pattern generator.

[0007] The solver is used to respond to the call of the endgame generator, and for each candidate endgame, it performs recursive iteration based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame; in the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. The difficulty calculator is used to score the difficulty of each candidate endgame based on preference configuration information and the solution tree corresponding to the candidate endgame, and obtain the difficulty index of the candidate endgame under multiple preference configuration information.

[0008] The difficulty filter is used to add candidate endgames that meet preset conditions to the endgame database.

[0009] Thirdly, embodiments of this application provide a method for generating endgame scenarios in card games, including: Once the game begins, the first endgame that matches a real player is determined from the endgame database; Obtain the historical strategy preferences of the real players; Provide hints to real players based on their historical strategy preferences.

[0010] Fourthly, embodiments of this application provide a system for generating endgame scenarios in card games, comprising: The endgame acquisition unit is used to determine the first endgame that matches the real player from the endgame database after the game starts; A preference acquisition unit is used to acquire the historical strategy preferences of the real players. The prompting unit is used to provide prompts for the actual player's card play based on the historical strategy preferences.

[0011] Fifthly, embodiments of this application provide a computing device, including: processor; Memory used to store the processor's executable instructions; The processor is configured to execute the instructions to implement the aforementioned method.

[0012] Sixthly, embodiments of this application provide a computer-readable storage medium that, when instructions in the storage medium are executed by a processor of a computing device, enables the computing device to perform the aforementioned method.

[0013] The above-described technical solutions adopted in the embodiments of this application can achieve the following beneficial effects: Breaking through the bottlenecks of low output and uncontrollable quality of endgame puzzles under traditional manual design and simple rule filtering, this system achieves automated and precise batch production of massive amounts of high-quality endgame puzzles through a restructured "efficient solution-generation-intelligent filtering" process. First, a professional solver comprehensively assesses the interpretability, fun factor, and strategic diversity of randomly generated candidate endgame puzzles, and incorporates preference configuration information to achieve dynamic difficulty stratification and multi-dimensional index filtering. This ensures that automatically generated endgame puzzles not only meet basic strategic gameplay requirements but also cater to player characteristics across a wide difficulty range, avoiding the production capacity limitations of manual design and the low efficiency of traditional rule filtering. This closed-loop process enables the platform to produce tens of thousands of diverse and strategically rich high-quality endgame puzzles daily, achieving dynamic updates to the content pool and adaptive difficulty, optimizing the continuity and freshness of the player experience. Attached Figure Description

[0014] The accompanying drawings, which are included to provide a further understanding of this application and form part of this application, illustrate exemplary embodiments and are used to explain this application, but do not constitute an undue limitation of this application. In the drawings: Figure 1 A flowchart illustrating a data processing method for a card game provided in this application embodiment; Figure 2 A schematic diagram of a solution tree corresponding to a candidate endgame provided in an embodiment of this application; Figure 3 A flowchart illustrating a method for determining the true difficulty index of a candidate endgame, provided in an embodiment of this application; Figure 4 A flowchart illustrating a method for generating endgame scenarios in card games, provided as an embodiment of this application; Figure 5 A schematic diagram of the structure of a data processing system for a card game provided in this application embodiment; Figure 6 A schematic diagram of the structure of a system for generating endgame scenarios in card games, provided in an embodiment of this application; Figure 7 This is a schematic diagram of the structure of a computing device provided in an embodiment of this application. Detailed Implementation

[0015] To make the objectives, technical solutions, and advantages of this application clearer, the technical solutions of this application will be clearly and completely described below in conjunction with specific embodiments and corresponding drawings. Obviously, the described embodiments are only a part of the embodiments of this application, and not all of them. Based on the embodiments in this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0016] The terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such terms can be used interchangeably where appropriate; this is merely a way of distinguishing objects with the same attributes in the embodiments of this application.

[0017] Furthermore, the terms “comprising” and “having”, and any variations thereof, are intended to cover non-exclusive inclusion, such that a process, method, system, product, or apparatus that comprises a series of units is not necessarily limited to those units, but may include other units not expressly listed or inherent to those processes, methods, products, or apparatus.

[0018] It should be understood that the data processing method for card games provided in this application embodiment can be executed by a computing device. As an example, it can be executed by software in the computing device. The computing device referred to herein may include terminal devices, such as smartphones, tablets, laptops, desktop computers, smart voice interaction devices, smart home appliances, smartwatches, vehicle terminals, aircraft, etc.; or, the computing device may also include servers, such as independent physical servers, server clusters or distributed systems composed of multiple physical servers, or cloud servers providing cloud computing services.

[0019] The technical solutions provided by the various embodiments of this application are described in detail below with reference to the accompanying drawings.

[0020] Please refer to Figure 1 The above is a flowchart illustrating a data processing method for card games provided in an embodiment of this application. The method includes the following steps: S102, generate multiple candidate endgames based on the card pattern generator and preset constraint parameters.

[0021] Preset constraint parameters can include various preset parameters used to constrain the initial state of the endgame, such as, but not limited to, at least one of the following: card type, hand length of both players, etc.

[0022] In practice, the card pattern generator can generate multiple candidate endgames randomly or regularly based on predetermined constraint parameters, which ensures the diversity and representativeness of the endgame samples.

[0023] S104. For each candidate endgame, perform recursive iteration based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame.

[0024] In the solution tree of this candidate endgame, non-leaf nodes represent the current state of the candidate endgame, connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. It should be noted that non-leaf nodes in the solution tree refer to nodes other than leaf nodes, and can include the root node and intermediate nodes.

[0025] For example, Figure 2 The solution tree corresponding to a candidate endgame is shown. The first-level non-leaf nodes of the solution tree are the root nodes, which represent the 0th step of the candidate endgame. The second-level non-leaf nodes represent the 1st step of the 0th step under all possible moves of the player. The third-level non-leaf nodes represent the 2nd step of the 1st step under all possible moves of the agent. The leaf nodes represent the final state of the candidate endgame under the 2nd step.

[0026] It should be noted that the zeroth move of this candidate endgame can also be called the initial move of the candidate endgame, that is, the move at the start of the game. Each move can include at least one of the following: each player's hand, the order of play, the remaining deck of cards, etc.

[0027] Each candidate endgame generated is rigorously solved by the solver to obtain the solution tree corresponding to each candidate endgame.

[0028] In one implementation, a minimax algorithm can be used for each candidate endgame to recursively calculate the next position starting from the 0th position of the candidate endgame until the final state of the candidate endgame is obtained. During the recursive calculation process, pruning algorithms (such as the Alpha-Beta pruning algorithm) can be used to simplify the computational complexity. This constructs the solution tree corresponding to the candidate endgame.

[0029] In another implementation, a non-repeating computation approach is used. First, the current state hash code is used to retrieve the current state from the cache system. If the search is successful, the cached result is returned directly; otherwise, a full solution is performed, and the result is promptly written to the cache system. This improves overall solution efficiency. The state hash code (StateHash) is a hash value that uniquely encodes the endgame state (such as hand, play order, remaining cards, etc.) in card games. It serves as the index key for the cache system, enabling cross-instance and cross-business solution space reuse, and supports parent-child node tracking to optimize subtree aggregation and difficulty calculation efficiency.

[0030] Specifically, S104 above may include the following steps: For each candidate endgame, the next step is recursively calculated starting from the 0th step of the candidate endgame until the final state of the candidate endgame is obtained. During the calculation: the current state of the candidate endgame is encoded to obtain a state hash code; based on the current state hash code, subsequent states of the current state are retrieved from the cache system, which stores hash state codes and subsequent states for different states; if no subsequent states are found, the subsequent states of the current state are calculated using a minimax algorithm, and a solution tree for the current state is built based on the calculated subsequent states; if a subsequent state is found, a solution tree for the current state is built based on the retrieved subsequent states.

[0031] The subsequent states of the current situation may include some or all of the states in the process of obtaining the final end state from the current situation, and the embodiments of this application do not limit this.

[0032] In some examples, the caching system stores a state graph, where each node represents a situation, and the connections between nodes represent relationships between different situations. For instance, if node B is a child node of node A, the connection between node A and node B indicates that the move to play is derived from the situation represented by node A. Each node in the state graph has a corresponding state hash code, which is obtained by encoding the situation represented by the node.

[0033] In this scenario, retrieving subsequent states of the current situation from the cache system based on the state hash code of the current situation can include: determining whether a target node with the same state hash code as the current situation exists in the state graph; if a target node exists, recursively querying the state graph starting from the target node to obtain subsequent states of the current situation; if no target node exists, determining that there are no subsequent states of the current situation in the cache system. In actual operation, there can be multiple state graphs.

[0034] S106, for each candidate endgame, the difficulty score of the candidate endgame is calculated based on the preference configuration information and the solution tree corresponding to the candidate endgame, so as to obtain the difficulty index of the candidate endgame under multiple preference configuration information.

[0035] In one implementation, the preference configuration information may include multiple strategy preferences, each with a corresponding difficulty assessment rule. Strategy preferences reflect the preferred card-playing strategy. The design of multiple strategy preferences can fully consider player habits, agent design requirements, and diverse strategic objectives; this application embodiment does not limit this. For example, taking the game of Dou Dizhu (a popular Chinese card game), the aforementioned multiple strategy preferences may include, but are not limited to: prioritizing offense, keeping high-value cards for defense, playing pairs first, splitting cards to avoid danger, and maximizing the probability of a comeback.

[0036] Accordingly, such as Figure 3 As shown, the above S106 may include the following steps: S1062. For each candidate endgame, the solution tree corresponding to the candidate endgame is traversed using the depth-first search (DFS) method. During the traversal, starting from the last node of the solution tree, the difficulty index of the nodes of the solution tree under the current strategy preference is recursively calculated until the difficulty index of the root node of the solution tree is obtained, which is the difficulty index of the endgame under the current strategy preference.

[0037] Specifically, for each candidate endgame, the difficulty index of that candidate endgame under each strategy preference is obtained as follows: Based on the propagation formula The solution tree for the endgame is traversed using Depth-First Search (DFS), ensuring that the difficulty of all child nodes has been calculated using this formula before processing the parent node. Those skilled in the art will understand that when calculating the difficulty F(TN) of a node, the propagation formula only aggregates the difficulties F(c) of its direct children. This is because the algorithm is recursive; the influence of all deeper-level nodes is first included in their respective parent nodes and then indirectly propagated upwards layer by layer.

[0038] In the above formula, during the Depth-First Search (DFS) traversal, the current state is marked as TN, and the legal actions correspond to multiple subsequent child nodes: TN1, TN2... TNn (in the above propagation formula, these child nodes are uniformly represented by c, and their difficulty indices are uniformly represented by F(c)). The state of each child node will also continue to unfold. Each child node will have its corresponding difficulty index calculated and normalized to F(TNn). Finally, the difficulty index F(r) of the root node is calculated by weighting its own difficulty and the difficulty indices of all child nodes.

[0039] Here, V(TN) is the Transformed Minimax Value of the current node, representing the difficulty of the current state (TN) itself. Its value is recalculated using Minimax logic under the guidance of the current policy preference. The current policy preference itself does not change the structure of the solution tree, but it affects the value of V(TN), and these values ​​are subsequently propagated upwards from the last node. Understandably, in an exact solution configuration, the game state value V(TN) of a node is the objective Minimax value V0. * (TN), unaffected by preferences; under the policy preference configuration, the game state value V(TN) of a node is the current policy preference P. k The evaluation value V below Pk(TN), and varies with different strategy preferences.

[0040] Furthermore, V(TN) is standardized to the [0,1] interval.

[0041] Furthermore, the depth reduction coefficient of the current game value V(TN) is confirmed to reflect the impact of different levels of sub-states on difficulty aggregation. In one feasible implementation, the depth reduction coefficient is... α is a coefficient, which indicates that as the depth d increases, the influence of the current game value V(TN) gradually decreases, reflecting the influence of different levels of sub-situations on the aggregation of difficulty.

[0042] Furthermore, when considering the F(c) value of the child node c in the current situation, the weighted average difficulty of the child node is calculated; the impact of the difficulty propagation of the child node on its parent node is determined by the child node weight w. c And F(c) determines it. Wherein, the child node weight w c Defined as the result of the softmax normalization of the game state value of the child node.

[0043] In this step, the Depth-First Search (DFS) method is used to calculate the solution tree. After traversal, the difficulty index of the root node under the given strategy preference is the difficulty index of the candidate endgame under that strategy preference. Therefore, the difficulty index of the root node under a given strategy preference is a comprehensive score, combining the difficulty of the root node itself and the difficulty of all its child nodes (positional changes).

[0044] S1064 calculates the first difficulty index by weighting the difficulty index of the current endgame under different strategy preferences.

[0045] In this step, for each policy preference P k By calculating the difficulty index F under this strategy preference Pk (TN), and according to its weight w Pk A weighted average is then applied to obtain the first difficulty index for this endgame. This means that strategy preferences influence the evaluation value of each child node, and this is reflected in the difficulty index calculation through aggregated weights.

[0046] S1066, based on the pre-established regression prediction model and the first difficulty index, yields the true difficulty index of this endgame.

[0047] The first difficulty index obtained from the root node under all strategy preferences is input into the regression prediction model for prediction, and then mapped to the true difficulty index of the candidate endgame by combining it with real player data. This process achieves the innovative ability to reliably bind multidimensional theoretical difficulty with real-world experience.

[0048] The regression prediction model can be trained as follows: by invoking multiple types of intelligent agents (with diverse preference models) to simulate level completion, the success rate and critical path count under different strategy preferences are output. Combined with real player data, high-dimensional features are trained to obtain the regression prediction model, effectively mapping multi-dimensional preference difficulty parameters to the probability of success. Based on the regression prediction model, accurate predictions of the success rate and complexity of each candidate puzzle in different player groups can be achieved. This mechanism not only significantly enriches the dimensions of difficulty definition but also ensures that the final selection of different types of puzzles considers both the theoretical solution difficulty and the real challenge in actual gameplay, providing comprehensive data support for product development and Artificial Intelligence (AI) research.

[0049] It is evident that by utilizing a depth-first traversal approach to solve candidate endgame puzzles, combined with the action partial order specified for each strategy preference, the theoretical difficulty level is organically integrated with practical strategies, providing high-dimensional raw data for subsequent accurate endgame selection. Secondly, this implementation method overcomes the limitation of previous methods that relied on single-indicator difficulty assessments (such as optimal move count or simple win-win scenarios) to fail to depict the actual success rate by establishing a triple mapping of "strategy preference - action difficulty - historical performance." Furthermore, the difficulty assessment system based on a weighted fusion of behavioral simulation and machine learning can scientifically analyze the strategic traps and challenges of endgame puzzles, and dynamically allocate levels to suitable player groups, effectively addressing structural experience imbalances such as beginners getting stuck. It also supports automatic optimization of content pool difficulty and tiered operational recommendations, promoting both personalization and fairness.

[0050] S108 adds candidate endgames that meet the preset difficulty index conditions to the endgame database.

[0051] The preset conditions can be set according to actual needs, such as the difficulty index being within a difficulty range that matches the player's level, etc., but this application embodiment does not limit this.

[0052] like Figure 4 As shown, in another embodiment of this application, a method for generating endgame scenarios in card games is provided, using the aforementioned endgame database, including: S202: After the game starts, the first endgame is determined from the endgame game library to match the real player.

[0053] The first type of endgame can be understood as an endgame in the endgame game library whose difficulty level matches that of real players.

[0054] S204, obtain the historical strategy preferences of real players.

[0055] The historical strategy preferences of real players can be obtained from the player's user profile. User profiling is a common technical solution in this field and will not be elaborated on here.

[0056] S206 provides hints to real players regarding their card-playing strategies based on their historical strategic preferences.

[0057] In this step, a set of possible moves for the current situation is obtained. Each possible move is scored based on the player's historical strategy preferences, and the move with the highest score is selected as the play suggestion. Each strategy preference has a corresponding scoring function. The scoring function is used to evaluate the score of each possible move under that strategy preference.

[0058] Specifically, based on the current endgame situation, a set of possible moves under historical strategy preferences is obtained; for each possible move in the set, the score of the possible move is determined based on the scoring function corresponding to the historical strategy preferences; the possible move with the highest score is selected from the set of possible moves as the move suggestion scheme.

[0059] Specifically, in mathematical modeling, let the set of possible moves for the current situation under a certain strategic preference be denoted as . Each strategy preference It is formalized into a scoring function This scoring function assigns a score to each possible card play. Therefore, the preference definition's priority relation can be written as: for any ,like This is considered to be in the policy preference. Preferred At Furthermore, the card-playing strategy can be expressed as: That is, in the set of available cards. In the middle, choose in the scoring function Play the card with the highest score. This mathematical characterization not only ensures the flexibility of the preference model but also facilitates subsequent multi-dimensional analysis and algorithm implementation.

[0060] In the above embodiments of this application, the bottlenecks of low output and uncontrollable quality of endgame puzzles under traditional manual design and simple rule filtering are overcome. Through a process reconstruction of "efficient solution-generation-intelligent filtering," the automated and precise batch production of massive amounts of high-quality endgame puzzles is achieved. First, a professional solver is used to comprehensively assess the interpretability, fun factor, and strategic diversity of randomly generated candidate endgame puzzles. Preference configuration information is introduced to achieve dynamic difficulty stratification and multi-dimensional index filtering. This ensures that the automatically generated endgame puzzles not only meet basic strategic gameplay requirements but also cater to both novice and expert players across a wide difficulty range, avoiding the production capacity bottlenecks of manual design and the low efficiency of traditional rule filtering. This closed-loop process helps the platform produce tens of thousands of diverse and strategically rich high-quality endgame puzzles daily, enabling dynamic updates to the content pool and adaptive difficulty, thus optimizing the continuity and freshness of the player experience.

[0061] Furthermore, the solution tree obtained during the endgame problem-solving process is not merely static data for "one-off" difficulty analysis; it is also a "decision map" containing all possibilities and the optimal path, which can be used as play suggestions in actual gameplay. In a real game, once the endgame is determined, the backend, based on the solution tree and the current player's historical style preferences, calls upon a preference strategy matching that player's style to provide play suggestions, further enhancing the user experience.

[0062] The foregoing has described specific embodiments of this specification. Other embodiments are within the scope of the appended claims. In some cases, the actions or steps recited in the claims may be performed in a different order than that shown in the embodiments and may still achieve the desired result. Furthermore, the processes depicted in the drawings do not necessarily require the specific or sequential order shown to achieve the desired result. In some embodiments, multitasking and parallel processing are possible or may be advantageous.

[0063] Corresponding to the above method embodiments, this application also provides a data processing system for card games. Figure 5 This is a schematic diagram of the structure of a data processing system for a card game provided in an embodiment of this application. The data processing system for the card game includes: a puzzle generator, a solver, a difficulty calculator, and a difficulty filter.

[0064] The endgame generator is used to generate multiple candidate endgames based on the card pattern generator and preset constraint parameters.

[0065] The solver is used to respond to the call of the endgame generator. For each candidate endgame, it performs recursive iteration based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame. In the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. The difficulty calculator is used to score the difficulty of each candidate endgame based on preference configuration information and the corresponding solution tree, and to obtain the difficulty index of the candidate endgame under multiple preference configuration information.

[0066] The difficulty filter is used to add candidate endgames that meet preset difficulty criteria to the endgame database.

[0067] like Figure 6 As shown, corresponding to the above method embodiments, this application embodiment also provides a system for generating endgame scenarios in card games, using the aforementioned endgame database. The system includes: The endgame acquisition unit is used to determine the first endgame that matches the real player from the endgame database after the game starts; A preference acquisition unit is used to acquire the historical strategy preferences of the real players. The prompting unit is used to provide prompts for the actual player's card play based on the historical strategy preferences.

[0068] Figure 7 This is a schematic diagram of the structure of a computing device provided in one embodiment of this application. Please refer to it. Figure 7 At the hardware level, the computing device includes a processor, and optionally also an internal bus, network interface, and memory. The memory may include main memory, such as high-speed random-access memory (RAM), or non-volatile memory, such as at least one disk drive. Of course, the computing device may also include other hardware required for other business operations.

[0069] The processor, network interface, and memory can be interconnected via an internal bus, which can be an ISA (Industry Standard Architecture) bus, a PCI (Peripheral Component Interconnect) bus, or an EISA (Extended Industry Standard Architecture) bus, etc. This bus can be divided into address bus, data bus, control bus, etc. For ease of representation, Figure 7The symbol is represented by a single double-headed arrow, but this does not mean that there is only one bus or one type of bus.

[0070] Memory is used to store programs. Specifically, programs may include program code, which includes computer operation instructions. Memory may include main memory and non-volatile memory, and provides instructions and data to the processor.

[0071] The processor reads the corresponding computer program from non-volatile memory into main memory and then runs it, forming a data processing device for the card game at the logical level. The processor executes the program stored in memory and specifically performs the methods described above.

[0072] The above is as stated in this application. Figure 1 The illustrated embodiment discloses a method executed by a data processing device in a card game, or as described in this application. Figure 4 The method for generating endgame positions in card games disclosed in the illustrated embodiments can be applied to or implemented by a processor. The processor may be an integrated circuit chip with signal processing capabilities. During implementation, each step of the above method can be completed by integrated logic circuits in the processor's hardware or by instructions in software form. The processor can be a general-purpose processor, including a Central Processing Unit (CPU), a Network Processor (NP), etc.; it can also be a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), a Field-Programmable Gate Array (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, or discrete hardware components. It can implement or execute the methods, steps, and logic block diagrams disclosed in the embodiments of this application. The general-purpose processor can be a microprocessor or any conventional processor. The steps of the methods disclosed in the embodiments of this application can be directly manifested as execution by a hardware decoding processor, or execution by a combination of hardware and software modules in the decoding processor. The software module can reside in a mature storage medium in the field, such as random access memory, flash memory, read-only memory, programmable read-only memory, electrically erasable programmable memory, or registers. This storage medium is located in memory, and the processor reads information from the memory and, in conjunction with its hardware, completes the steps of the above method.

[0073] This computing device can also perform Figure 1 The method, and implement the data processing device in card games. Figure 1In addition to the functions of the embodiments shown, the computing device may also perform... Figure 4 The method, and the device for generating endgame puzzles in card games. Figure 4 The functions of the embodiments shown are not described in detail here.

[0074] Of course, in addition to software implementation, the computing device of this application does not exclude other implementation methods, such as logic devices or a combination of hardware and software, etc. In other words, the execution subject of the following processing flow is not limited to each logic unit, but can also be hardware or logic devices.

[0075] This application also proposes a computer-readable storage medium that stores one or more programs, the programs including instructions that, when executed by a computing device comprising multiple applications, enable the computing device to perform... Figure 1 , Figure 4 The method of the illustrated embodiment is specifically used to perform the above method.

[0076] In summary, the above description is merely a preferred embodiment of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of protection of this application.

[0077] The systems, devices, modules, or units described in the above embodiments can be implemented by computer chips or entities, or by products with certain functions. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, laptop computer, cellular phone, camera phone, smartphone, personal digital assistant, media player, navigation device, email device, game console, tablet computer, wearable device, or any combination of these devices.

[0078] Computer-readable media includes both permanent and non-permanent, removable and non-removable media that can store information using any method or technology. Information can be computer-readable instructions, data structures, modules of programs, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technologies, CD-ROM, digital versatile optical disc (DVD) or other optical storage, magnetic tape, magnetic disk storage or other magnetic storage devices, or any other non-transferable medium that can be used to store information accessible by a computing device. As defined herein, computer-readable media does not include transient computer-readable media, such as modulated data signals and carrier waves.

[0079] It should also be noted that 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.

[0080] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to interchangeably. Each embodiment focuses on describing the differences from other embodiments. In particular, the system embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions in the method embodiments.

Claims

1. A method for generating endgame scenarios in card games, characterized in that, include: Once the game starts, the first endgame that matches the real player is determined from the endgame database. Obtain the historical strategy preferences of the real players; Provide hints to real players based on their historical strategy preferences; The provision of hints to real players based on their historical strategy preferences includes: Obtain the set of possible moves for the current situation, score each possible move according to the historical strategy preference, and select the move with the highest score as the move suggestion scheme; wherein, each strategy preference has a corresponding scoring function, which is used to evaluate the score of each possible move under the strategy preference; The endgame database is obtained in the following way: The hand pattern generator generates multiple candidate endgames based on preset constraint parameters; For each candidate endgame, a recursive iteration is performed based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame; in the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. For each candidate endgame, the solution tree of the candidate endgame is traversed using a depth-first traversal. During traversal, the difficulty index of the solution tree under each strategy preference is recursively calculated based on the preference configuration information, thereby obtaining the difficulty index of the candidate endgame under each strategy preference. The difficulty index of the candidate endgame under each strategy preference is weighted and calculated to obtain the first difficulty index; Based on the pre-established regression prediction model and the first difficulty index, the true difficulty index of the candidate endgame is obtained. Candidate endgames that meet the preset difficulty index are added to the endgame database.

2. The method according to claim 1, characterized in that, The step of recursively iterating for each candidate endgame to obtain the solution tree corresponding to the candidate endgame includes: The current state of the candidate endgame is encoded to obtain the state hash code of the current state; Based on the state hash code of the current situation, the subsequent situations of the current situation are retrieved in the cache system, which stores the hash state codes of different situations and their subsequent situations. If no subsequent situation is found for the current situation, then based on the current situation, the card play calculation is performed using the minimax algorithm to obtain the subsequent situation for the current situation, and a solution tree for the current situation is built based on the subsequent situation calculated by the card play. If a subsequent state of the current state is retrieved, a solution tree for the current state is built based on the retrieved subsequent state.

3. The method according to claim 1, characterized in that, The difficulty index of the solution tree under each strategy preference is recursively calculated based on preference configuration information, including: The difficulty index of the candidate endgame under each strategy preference is obtained as follows: Based on the propagation formula A depth-first traversal is initiated for the solution tree of the candidate endgame to ensure that the difficulty of all its child nodes has been calculated using the propagation formula before the parent node is processed. Where F(TN) is the difficulty of the current node, and V(TN) is the game state value of the current node, representing the difficulty of the current state (TN) itself. Let α be the depth reduction coefficient of V(TN), and let α be a coefficient. The depth reduction coefficient indicates that as the depth of the solution tree d increases, the influence of the current game value V(TN) gradually decreases. F(c) represents the difficulty of the child nodes of the current node, w c The weight of the child node is w. c The normalized result is the game state value of the child node.

4. The method according to claim 3, characterized in that, The method also includes: The V(TN) is calculated using Minimax logic under the guidance of the current policy preference and is standardized to the [0,1] interval.

5. A system for generating endgame scenarios in card games, characterized in that, include: The endgame acquisition unit is used to determine the first endgame that matches the real player from the endgame database after the game starts; A preference acquisition unit is used to acquire the historical strategy preferences of the real players. The prompting unit is used to provide prompts for the actual player's card play based on the historical strategy preferences; The provision of hints to real players based on their historical strategy preferences includes: Obtain the set of possible moves for the current situation, score each possible move according to the historical strategy preference, and select the move with the highest score as the move suggestion scheme; wherein, each strategy preference has a corresponding scoring function, which is used to evaluate the score of each possible move under the strategy preference; The endgame database is obtained in the following way: The hand pattern generator generates multiple candidate endgames based on preset constraint parameters; For each candidate endgame, a recursive iteration is performed based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame; in the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. For each candidate endgame, the solution tree of the candidate endgame is traversed using a depth-first traversal. During traversal, the difficulty index of the solution tree under each strategy preference is recursively calculated based on the preference configuration information, thereby obtaining the difficulty index of the candidate endgame under each strategy preference. The difficulty index of the candidate endgame under each strategy preference is weighted and calculated to obtain the first difficulty index; Based on the pre-established regression prediction model and the first difficulty index, the true difficulty index of the candidate endgame is obtained. Candidate endgames that meet the preset difficulty index are added to the endgame database.

6. The system for generating endgame scenarios in card games according to claim 5, characterized in that, The system for generating endgame puzzles in card games also includes a data processing system for card games, which includes: an endgame generator, a solver, a difficulty calculator, and a difficulty filter; The endgame generator is used to generate multiple candidate endgames based on the card pattern generator and preset constraint parameters. The solver is used to respond to the call of the endgame generator, and for each candidate endgame, it performs recursive iteration based on the candidate endgame to obtain the solution tree corresponding to the candidate endgame; in the solution tree, non-leaf nodes represent the current state of the candidate endgame, the connections between nodes represent possible moves, and leaf nodes represent the final state of the candidate endgame. The difficulty calculator is used to score the difficulty of each candidate endgame based on preference configuration information and the solution tree corresponding to the candidate endgame, and to obtain the difficulty index of the candidate endgame under multiple preference configuration information. The difficulty filter is used to add candidate endgames that meet preset conditions to the endgame database.

7. A computing device, comprising a memory, a processor, and computer instructions stored in the memory and executable on the processor, characterized in that, When the processor executes the computer instructions, it implements the method according to any one of claims 1-4.

8. A computer-readable storage medium storing computer instructions, characterized in that, When executed by a processor, the computer instructions implement the method of any one of claims 1-4.

Citation Information

Patent Citations

  • Method for automatically generating chess endgame based on machine game technology

    CN106339582A

  • Computer-aided online card games using multiple online player preferences

    US20130178262A1