Parallel imperfect information game strategy generation method, device, electronic device and storage medium

By parallelizing the imperfect information game strategy generation method, using non-complete recall clustering and MCCFR algorithm to iteratively generate strategies in the abstract feature space, and using the hash algorithm of feature strings for distributed storage, it solves the problem of large-scale problems of existing algorithms. The problems of high overhead and slow convergence in games of scale and depth enable more efficient strategy generation and training.

CN113779870BActive Publication Date: 2024-08-23TSINGHUA UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202110975035.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-08-24
Publication Date
2024-08-23
Estimated Expiration
2041-08-24

AI Technical Summary

Technical Problem

Existing imperfect information game algorithms have high algorithm overhead when faced with large-scale game problems. They increase exponentially with the number of game players, and the strategy updates are not obvious as the depth of the game deepens. The convergence speed is slow and it is easy to fall into local optimality.

Method used

A parallel imperfect information game strategy generation method is adopted, the feature space is compressed through a non-complete recall clustering method, the MCCFR algorithm is used to iteratively generate a blueprint strategy in the abstract feature space, and the hash algorithm of the feature string is used for distributed storage. and update, combined with the overall expected return to replace the regret value and interval update, to improve the convergence speed of the algorithm.

Benefits of technology

It improves the robustness and convergence speed of the strategy, shortens the algorithm training time, avoids local optimal traps, and is suitable for handling large-scale and deep game problems.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN113779870B
    Figure CN113779870B
Patent Text Reader

Abstract

The present application belongs to the field of machine learning technology, and specifically, relates to a parallel imperfect information game strategy generation method, device, electronic device and storage medium. The method includes: using a non-complete recall clustering method to compress the original feature space of the imperfect information game to obtain an abstract feature space; using the MCCFR minimization method to iteratively generate a blueprint strategy through self-game in the abstract feature space; using a hash algorithm of a feature string to distribute and update the blueprint strategy. The method uses non-complete recall to abstract the feature space and improve the robustness of the strategy; based on the MCCFR algorithm, the overall expected return is used instead of the regret value for interval update, and the final strategy is generated using the sampling action frequency. The feature mapping and parallel framework are combined to improve the convergence speed of the algorithm and shorten the algorithm training time.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application belongs to the field of machine learning technology, and specifically, relates to a parallel imperfect information game strategy generation method, device, electronic device and storage medium. Background Art

[0002] Game theory has long been one of the important application scenarios in the field of artificial intelligence. With the rapid development of reinforcement learning and deep learning, many perfect information game problems have been solved in the past decade. Drawing on their successful experience, the exploration of imperfect information game problems has also made significant progress.

[0003] Compared with perfect information games, the incomplete knowledge of state information in imperfect information games makes many traditional iteration and search algorithms no longer applicable. How to reasonably utilize the invisible features of some information and avoid falling into the dilemma of circular reasoning in strategy exploration has always been the focus of research on imperfect information games, and many algorithms have been derived on this basis. Among them, the counterfactual regret minimization algorithm (hereinafter referred to as CFR) is the most widely used method for generating approximate Nash equilibrium strategies through self-game training. CFR approximates the Nash equilibrium strategy of generalized games through repeated self-games between two regret minimization algorithms, but the game tree needs to be fully traversed during each iteration, resulting in a high algorithm complexity. Summary of the invention

[0004] The present disclosure aims to solve one of the technical problems in the related art at least to a certain extent. Based on the inventor's recognition and understanding of the following facts and problems: the counterfactual regret minimization algorithm based on the Monte Carlo sampling idea (hereinafter referred to as MCCFR) minimizes the traversal overhead by reasonably selecting the sampling strategy, but there are problems of large variance and slow convergence speed. The improved CFR+ algorithm optimizes the calculation of the average strategy and improves the convergence efficiency of the algorithm. In addition, the CFR-D algorithm combined with the online sub-game solution and the CFR-like algorithm using deep neural network for regret value calculation have outstanding performance in solving large-scale imperfect information game problems. However, the above strategy generation method still has the following shortcomings: when facing large-scale game problems, the algorithm overhead is large, and it grows exponentially with the number of game players; as the game depth deepens, the arrival probability tends to zero, resulting in unclear strategy updates and slow convergence speed; the sampling update variance is large, which makes the final strategy easy to fall into local optimality, etc.

[0005] In view of this, the present disclosure proposes a parallel imperfect information game strategy generation method, device, electronic device and storage medium to solve the technical problems in the related art.

[0006] According to a first aspect of the present disclosure, a parallel imperfect information game strategy generation method is proposed, comprising the following steps:

[0007] According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space;

[0008] Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space;

[0009] The blueprint strategy is distributedly stored and updated using the hash algorithm of the feature string.

[0010] The advantages of the above parallel imperfect information game strategy generation method are that it uses non-complete recall to abstract the feature space and improve the robustness of the strategy; based on the MCCFR algorithm, it uses the overall expected return instead of the regret value for interval updating, uses the sampling action frequency to generate the final strategy, and combines feature mapping and parallel framework to improve the algorithm convergence speed and shorten the algorithm training time.

[0011] Optionally, the incomplete recall clustering method is used to compress the original feature space of the imperfect information game to obtain an abstract feature space, including:

[0012] (1) During initialization, the current game is set to have a total of l rounds, and the game tree for abstract clustering has a total of l layers. The clustering algorithm for each layer in the game tree is M k (k=1,…,l), the number of clusters in the kth layer of the game tree is C k , M is the clustering algorithm;

[0013] (2) Using the metric function D l , calculate the original feature space of the lth layer of the game tree and get the clustering result A l , the clustering result A l The mean of the i-th class is recorded as And calculate the clustering result A l The distance between the i-th class and the j-th class

[0014] (3) Let the current level of the game tree n = l-1, and calculate the value of each node x in this level of the game tree. n The potential histogram H n (x n ) The i-th element in the potential histogram represents the n-th layer node x n In the next layer, clustering result A n+1 The probability of belonging to the i-th class in the cluster is calculated by using the histogram ground motion distance as the metric function and the clustering algorithm M n , calculate the clustering result A of the current layer n n ;

[0015] (4) Repeat step (3) until n = 1, and obtain the clustering results of all layers of the game tree A = (A1, ..., A l ), which is the incomplete recall compression feature, and establishes the mapping relationship F(·) between the compressed abstract feature space and the original feature space.

[0016] Optionally, the using of the MCCFR minimization method to iteratively generate a blueprint strategy through self-game in the abstract feature space includes:

[0017] (1) Setting a blueprint strategy. When initialized, the blueprint strategy is a random strategy. Setting a repeatable game, where the number of game players involved is P;

[0018] (2) inputting the blueprint strategy into the game, generating samples through self-game, and using the MCCFR minimization algorithm based on external sampling to calculate the regret value of the samples generated by the self-game in the abstract feature space by replacing the counterfactual return in the original MCCFR algorithm with the overall expected return;

[0019] Assuming that the action taken by the game player in this sample is a, we can get the current player p in the abstract information set I p The overall regret value about a is given below;

[0020] (3) updating the blueprint strategy of the current game player p in the next iteration round according to the regret value calculation method;

[0021] (4) Use interval updating and parallel Monte Carlo sampling methods to alternately update the strategies of different game players and set the regret value change threshold R switch and the strategy update threshold T switch , every time after the strategy iteration of the game player p, if the cumulative overall regret value change exceeds the threshold and the cumulative number of updates reaches the threshold, switch to another player p' and repeat (2) to (3) to update the strategy for player p'.

[0022] (5) Action sampling is used to replace the arrival probability weighting in the original MCCFR algorithm to calculate the final output blueprint strategy. After each round of strategy update iteration, a new game environment is created, the current round of real-time strategy is input, and K simulated games are performed. The number of times each action a is selected under different abstract information sets I is recorded in each game, and the blueprint strategy output after T rounds of iteration is obtained.

[0023] Optionally, the distributed storage and update of the blueprint strategy using a hash algorithm of the characteristic string includes:

[0024] (1) According to the abstract feature space and mapping relationship obtained by the incomplete recall clustering method, character encoding is performed on the original feature space, that is, the original features are converted into fixed-length hexadecimal strings using the MD5 hash algorithm, and key-value mapping is used in the string space to assign a fixed number to each original feature;

[0025] (2) Distributedly storing the regret value and the blueprint strategy according to the assigned fixed number;

[0026] (3) Set a threshold for the number of blueprint strategy updates. For each blueprint strategy in distributed storage, save the current blueprint strategy whenever the number of updates reaches the threshold, and perform a simulation confrontation test with the last saved blueprint strategy until the benefit of the current blueprint strategy is not significantly improved in the simulation confrontation, thus generating an imperfect information game strategy.

[0027] According to a second aspect of the present disclosure, a parallelized imperfect information game strategy generation device is proposed, comprising:

[0028] The space compression module is used to compress the original feature space of the imperfect information game according to the incomplete recall clustering method to obtain the abstract feature space;

[0029] The self-game module uses the MCCFR minimization method to iteratively generate a blueprint strategy through self-game in the abstract feature space;

[0030] The computing module uses the hash algorithm of the characteristic string to distribute and update the blueprint strategy.

[0031] According to a third aspect of the present disclosure, an electronic device is provided, comprising:

[0032] A memory for storing instructions executable by the processor;

[0033] A processor configured to execute:

[0034] According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space;

[0035] Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space;

[0036] The blueprint strategy is distributedly stored and updated using the hash algorithm of the feature string.

[0037] According to a fourth aspect of the present disclosure, a computer-readable storage medium is provided, on which a computer program is stored, wherein the computer program is used to cause the computer to execute:

[0038] According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space;

[0039] Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space;

[0040] The blueprint strategy is distributedly stored and updated using the hash algorithm of the feature string.

[0041] According to the embodiments of the present disclosure, non-complete recall is used for feature space abstraction to improve the robustness of the strategy; based on the MCCFR algorithm, the overall expected return is used instead of the regret value for interval updating, and the final strategy is generated using the sampling action frequency. Combined with feature mapping and a parallel framework, the algorithm convergence speed is improved and the algorithm training time is shortened.

[0042] Additional aspects and advantages of the present disclosure will be given in part in the following description and in part will be obvious from the following description or learned through practice of the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0043] In order to more clearly illustrate the embodiments of the present disclosure or the technical solutions in the prior art, the drawings required for use in the embodiments or the prior art descriptions are briefly introduced below. Obviously, the drawings described below are only some embodiments of the present disclosure, and for ordinary technicians in this field, other drawings can be obtained based on these drawings without creative work.

[0044] The above and / or additional aspects and advantages of the present disclosure will become apparent and easily understood from the following description of the embodiments in conjunction with the accompanying drawings, in which:

[0045] Figure 1 The present invention is a flowchart of a method for generating a strategy for a game of imperfect information according to an embodiment of the present invention.

[0046] Figure 2 The figure is a specific flowchart according to an embodiment of the present disclosure.

[0047] Figure 3 It is a schematic block diagram of a device for generating a strategy for a game of imperfect information according to an embodiment of the present disclosure.

[0048] Figure 4 The figure is a training process image according to one embodiment of the present disclosure.

[0049] Figure 5 An image is shown for showing the training result according to one embodiment of the present disclosure. DETAILED DESCRIPTION

[0050] The following will be combined with the drawings in the embodiments of the present application to clearly and completely describe the technical solutions in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without making creative work are within the scope of protection of this application.

[0051] Figure 1 FIG. 1 is a schematic flow chart of a parallel imperfect information game strategy generation method according to an embodiment of the present disclosure. The parallel imperfect information game strategy generation method of this embodiment can be applied to user devices, such as mobile phones, tablet computers, etc.

[0052] like Figure 1 and Figure 2 As shown, the parallel imperfect information game strategy generation method may include the following steps:

[0053] In the step, the original feature space of the imperfect information game is compressed according to the incomplete recall clustering method to obtain the abstract feature space.

[0054] In one embodiment, the non-complete recall clustering method is used to compress the original feature space of the imperfect information game to obtain an abstract feature space, including:

[0055] (1) During initialization, the current game is set to have a total of l rounds, and the game tree for abstract clustering has a total of l layers. The clustering algorithm for each layer in the game tree is M k (k=1,…,l), the number of clusters at the kth level in the game tree is C k , M is a clustering algorithm (e.g., the nearest neighbor clustering algorithm k-means);

[0056] (2) Using the metric function D l , calculate the original feature space of the lth layer of the game tree and get the clustering result A l , the clustering result A l The mean of the i-th class is recorded as And calculate the clustering result A l The distance between the i-th class and the j-th class

[0057] (3) Let the current level of the game tree n = l-1, and calculate the value of each node x in this level of the game tree. n The potential histogram H n (x n ), potential histogram H n (x n ) is a one-dimensional vector, the length of which is the number of clusters in the n+1th layer of the game tree is C n+1, the i-th element in the potential histogram represents the n-th layer node x n In the next layer, clustering result A n+1 The probability of belonging to the i-th class in the dataset is calculated by using the histogram Earth Mover's Distance (EMD) as the metric function and the clustering algorithm M n , calculate the clustering result A of the current layer n n ;

[0058] (4) Repeat step (3) until n = 1, and obtain the clustering results of all layers of the game tree A = (A1, ..., A l ), which is the incomplete recall compression feature, and establishes the mapping relationship F(·) between the compressed abstract feature space and the original feature space.

[0059] In one embodiment, a non-complete recall clustering method is used, and the histogram EMD is used as the metric function. The unexpected technical effects produced are mainly as follows: compared with the traditional complete recall abstract method, non-complete recall requires that when clustering the current round information set of a certain game player, the information obtained at the previous decision point (such as the opponent's historical actions) can be ignored. In the imperfect information game problem, non-complete recall clustering can blur the historical trajectory, so that the game player can forget his or his opponent's historical actions to a certain extent, which helps to reduce the possibility of his own strategy being affected by the opponent's fraudulent behavior and improve the robustness of the strategy.

[0060] In step 2, the MCCFR minimization method is used to iteratively generate a blueprint strategy through self-game in the abstract feature space.

[0061] In one embodiment, the method of iteratively generating a blueprint strategy by self-game in the abstract feature space using the MCCFR minimization method includes:

[0062] (1) Setting a blueprint strategy. When initialized, the blueprint strategy is a random strategy. Setting a repeatable game, where the number of game players involved is P;

[0063] (2) The blueprint strategy is input into the game, samples are generated through self-game, and the MCCFR minimization algorithm based on external sampling is used to calculate the regret value of the samples generated by the self-game in the abstract feature space by replacing the counterfactual return in the original MCCFR algorithm with the overall expected return. The calculation formula is as follows:

[0064]

[0065] Among them, T is the current iteration round, p is the current game player, I pis the abstract feature of the sample generated by the current game player under the mapping relationship F(·), that is, the abstract information set, σ T is the blueprint strategy for the current iteration round, Abstract information set I p The blueprint strategy σ T The approximate access probability under For the blueprint strategy σ T Next player p is in the abstract information set I p Approximate return expectations on ;

[0066] Assuming that the action taken by the game player in this sample is a, we can get the current player p in the abstract information set I p The overall regret value for a is:

[0067]

[0068] (3) According to the regret value calculation method, update the blueprint strategy σ of the current game player p in the next iteration round T+1 T+1 , the calculation formula is as follows:

[0069]

[0070] Among them, R T (a|I p ) is the overall regret value, A is all optional actions, and |A| is the number of all optional actions.

[0071] (4) Use interval updating and parallel Monte Carlo sampling methods to alternately update the strategies of different game players and set the regret value change threshold R switch and the strategy update threshold T switch , every time after the strategy iteration of the game player p, if the cumulative overall regret value change exceeds the threshold and the cumulative number of updates reaches the threshold, switch to another player p' and repeat (2) to (3) to update the strategy for player p'.

[0072] (5) Action sampling is used to replace the arrival probability weighting in the original MCCFR algorithm to calculate the final output blueprint strategy. After each round of strategy update iteration, a new game environment is created, the current round of real-time strategy is input, and K simulated games are performed. The number of times each action a is selected under different abstract information sets I is recorded in each game, that is, the action frequency f(a|t, σ t , I), then the blueprint strategy output after T rounds of iterations is:

[0073]

[0074] In one embodiment, the overall expected return replaces the counterfactual return in the original MCCFR algorithm to calculate the regret value of the sample generated by the self-game, the interval update and parallel Monte Carlo sampling methods are used to alternately update the strategies of different game players, and the action sampling is used to replace the arrival probability weighting in the original MCCFR algorithm to calculate the blueprint strategy of the final output, and the unexpected technical effects produced include:

[0075] A. As the scale of the game problem increases and the depth of the game tree deepens, the original MCCFR algorithm will not traverse all possible actions, and for the abstract information set I p The access probability of will continue to decrease with the increase of exploration depth, resulting in the corresponding counterfactual return and the overall regret value R T (a|I p ) is constantly decreasing, which results in a situation where the value is too low and the convergence speed decreases when updating the overall regret value. However, sampling the overall expected return instead of the counterfactual return, that is, not considering the arrival probability of the information set, can prevent the numerical update amplitude from suddenly dropping to zero during the policy iteration process, significantly improving the speed of policy convergence and preventing the update from stagnating.

[0076] B. The original MCCFR algorithm is not reliable in updating the regret value in a single iteration, so it is often necessary to increase the number of iterations to ensure that the update of the regret value meets expectations. Using interval updates and parallel Monte Carlo sampling methods to alternately update the strategies of different game players can significantly reduce the randomness of the original MCCFR algorithm that only samples the actions of random events once. Under the premise of ensuring that the time overhead of a single iteration of the algorithm remains basically unchanged, the algorithm increases the degree of traversal of the game tree, making it more suitable for dealing with game problems with a high degree of discreteness of random event actions, and improving the performance of the algorithm's final generated strategy.

[0077] Action sampling is used instead of the arrival probability weighting in the original MCCFR algorithm to calculate the final output blueprint strategy. Compared with the original algorithm based on averaging the arrival probability and regret value, it reduces the deviation of the final generated strategy that may be caused by the abnormal overall regret value in a certain round of strategy iteration, and improves the stability and robustness of the algorithm.

[0078] In step 3, the blueprint strategy is distributedly stored and updated using a hash algorithm of the feature string.

[0079] In one embodiment, the distributed storage and update of the blueprint strategy using a hash algorithm of a characteristic string includes:

[0080] (1) According to the abstract feature space and mapping relationship obtained by the incomplete recall clustering method, character encoding is performed on the original feature space, that is, the original features are converted into fixed-length hexadecimal strings using the MD5 hash algorithm, and key-value mapping is used in the string space to assign a fixed number to each original feature;

[0081] (2) Distributedly storing the regret value and the blueprint strategy according to the assigned fixed number;

[0082] (3) Set a threshold for the number of blueprint strategy updates. For each blueprint strategy in distributed storage, save the current blueprint strategy whenever the number of updates reaches the threshold, and perform a simulation confrontation test with the last saved blueprint strategy until the benefit of the current blueprint strategy is not significantly improved in the simulation confrontation, thus generating an imperfect information game strategy.

[0083] Corresponding to the above-mentioned parallel imperfect information game strategy generation method, the present disclosure also proposes a parallel imperfect information game strategy generation device.

[0084] Figure 3 The figure shows a schematic block diagram of a parallel imperfect information game strategy generation device, comprising:

[0085] The space compression module is used to compress the original feature space of the imperfect information game according to the incomplete recall clustering method to obtain the abstract feature space;

[0086] The self-game module uses the MCCFR minimization method to iteratively generate a blueprint strategy through self-game in the abstract feature space;

[0087] The computing module uses the hash algorithm of the characteristic string to distribute and update the blueprint strategy.

[0088] The embodiment of the present disclosure further provides an electronic device, including:

[0089] a memory for storing instructions executable by the processor; and

[0090] A processor configured to execute:

[0091] According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space;

[0092] Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space;

[0093] The blueprint strategy is distributedly stored and updated using the hash algorithm of the feature string.

[0094] The embodiment of the present disclosure further provides a computer-readable storage medium, on which a computer program is stored, wherein the computer program is used to cause the computer to execute:

[0095] According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space;

[0096] Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space;

[0097] The blueprint strategy is distributedly stored and updated using the hash algorithm of the feature string.

[0098] It should be noted that in the embodiments of the present disclosure, the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field programmable gate arrays (FPGA) or other programmable logic devices, discrete gates or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or the processor may be any conventional processor, etc. The memory may be used to store the computer program and / or module, and the processor implements various functions of the automobile parts picture data set making device by running or executing the computer program and / or module stored in the memory and calling the data stored in the memory. The memory may mainly include a program storage area and a data storage area, wherein the program storage area may store an operating system, an application required for at least one function (such as a sound playback function, an image playback function, etc.), etc.; the data storage area may store data created according to the use of the mobile phone (such as audio data, a phone book, etc.), etc. In addition, the memory may include a high-speed random access memory, and may also include a non-volatile memory, such as a hard disk, a memory, a plug-in hard disk, a smart memory card (Sma rt Med ia Car rd, SMC), a secure digital (Secure Digital, SD) card, a flash card (Flash Card), at least one disk storage device, a flash memory device, or other volatile solid-state storage devices. If the module / unit of the construction device of the stable operation domain of the wind power system is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the present disclosure implements all or part of the processes in the above-mentioned embodiment method, and can also be completed by instructing related hardware through a computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by a processor, the steps of each of the above-mentioned method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in source code form, object code form, executable file or some intermediate form, etc. The computer-readable medium may include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disk, computer memory, read-only memory (ROM), random access memory (RAM), electrical carrier signal, telecommunication signal and software distribution medium, etc.It should be noted that the device embodiments described above are merely schematic, wherein the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the scheme of this embodiment. In addition, in the accompanying drawings of the device embodiments provided by the present disclosure, the connection relationship between the modules indicates that there is a communication connection between them, which may be specifically implemented as one or more communication buses or signal lines. A person of ordinary skill in the art may understand and implement it without paying any creative effort.

[0099] The parallel imperfect information game strategy generation method of the invention is described in detail below through specific embodiments.

[0100] Take two-player unlimited Texas Hold'em as an example. This game problem is a typical two-player zero-sum imperfect information non-cooperative dynamic game. The traditional CFR algorithm has a very slow iteration speed on this problem and is difficult to converge to an approximate Nash equilibrium strategy. For this problem, the total number of layers of the constructed game tree is l=4. When calculating the abstract feature space, the final number of clusters of the first layer of the game tree is set to C1=169, and the final number of clusters of the other three layers is C2=C3=C4=200; the clustering algorithm M4 of the last layer uses the k-means algorithm, and the distance metric function D4 is the Euclidean distance of the hand strength expectation (EHS) distribution. The clustering algorithms of the other three layers are all k-means algorithms, and the distance metric function uses the histogram EMD. The self-game iterative blueprint strategy algorithm sets 200 parallel simulation environments, the number of distributed memories for regret value storage is 10, and the threshold value R of the change amplitude of the regret value of the game player is set switch =200000, strategy update times threshold T switch =100.

[0101] Figure 4 The training process of the above algorithm and the original MCCFR algorithm in a two-player no-limit Texas Hold'em environment is compared. It can be found that the parallelized imperfect information strategy generation algorithm is superior to the original MCCFR algorithm in both convergence speed and the performance of the final convergent strategy.

[0102] Figure 5 This is the online battle record between the strategy generated by the algorithm and Slumbot, the champion of the 2017 International Poker AI Championship. It can be found that as the number of iterations increases, the strategy performance gradually stabilizes and is better than Slumbot.

[0103] Although the embodiments of the present disclosure have been shown and described above, it is to be understood that the above embodiments are illustrative and are not to be construed as limitations of the present disclosure. A person skilled in the art may change, modify, replace and vary the above embodiments within the scope of the present disclosure.

Claims

1. A parallel imperfect information game strategy generation method, characterized in that: The following steps are involved: According to the incomplete recall clustering method, the original feature space of the imperfect information game is compressed to obtain the abstract feature space; Using the MCCFR minimization method, a blueprint strategy is iteratively generated through self-game in the abstract feature space; Use the hash algorithm of the characteristic string to distribute and update the blueprint strategy; The MCCFR minimization method is used to iteratively generate a blueprint strategy through self-game in the abstract feature space, including: (1) Setting a blueprint strategy. When initialized, the blueprint strategy is a random strategy. Setting a repeatable game, where the number of game players involved is P; (2) inputting the blueprint strategy into the game, generating samples through self-game, and using the MCCFR minimization algorithm based on external sampling to calculate the regret value of the samples generated by the self-game in the abstract feature space by replacing the counterfactual return in the original MCCFR algorithm with the overall expected return; Assuming that the action taken by the game player in this sample is a, we can get the current player p in the abstract information set I p The overall regret value about a is given below; (3) updating the blueprint strategy of the current game player p in the next iteration round according to the regret value calculation method; (4) Use interval update and parallel Monte Carlo sampling methods to alternately update the strategies of different game players, set the regret value change amplitude threshold and strategy update number threshold, and each time the strategy of game player p is iterated, if the cumulative overall regret value change amplitude exceeds the threshold and the cumulative update number reaches the threshold, switch to another player p′ and repeat (2) to (3) to update the strategy of player p′; (5) Action sampling is used to replace the arrival probability weighting in the original MCCFR algorithm to calculate the final output blueprint strategy. After each round of strategy update iteration, a new game environment is created, the current round of real-time strategy is input and K simulated games are performed. The number of times each action a is selected under different abstract information sets I is recorded in each game, and the blueprint strategy is output after T rounds of iteration.

2. The parallel imperfect information game strategy generation method according to claim 1, characterized in that: The non-complete recall clustering method is used to compress the original feature space of the imperfect information game to obtain an abstract feature space, including: (1) During initialization, the current game is set to have a total of l rounds, and the game tree for abstract clustering has a total of l layers. The clustering algorithm for each layer in the game tree is M k (k=1,…,l), the number of clusters in the kth layer of the game tree is C k , M is the clustering algorithm; (2) Using the metric function D l , calculate the original feature space of the lth layer of the game tree and get the clustering result A l , the clustering result A l The mean of the i-th class is recorded as And calculate the clustering result A l The distance between the i-th class and the j-th class (3) Let the current level of the game tree n = l-1, and calculate the value of each node x in this level of the game tree. n The potential histogram H n (x n ), the i-th element in the potential histogram represents the n-th layer node x n In the next layer, clustering result A n+1 The probability of belonging to the i-th class in the cluster is calculated by using the histogram ground motion distance as the metric function and the clustering algorithm M n , calculate the clustering result A of the current layer n n ; (4) Repeat step (3) until n = 1, and obtain the clustering results of all layers of the game tree A = (A1, ..., A l ), which is the incomplete recall compression feature, and establishes the mapping relationship F(·) between the compressed abstract feature space and the original feature space.

3. The parallel imperfect information game strategy generation method according to claim 1, characterized in that: The method of utilizing the hash algorithm of the characteristic string to distribute and update the blueprint strategy includes: (1) According to the abstract feature space and mapping relationship obtained by the incomplete recall clustering method, character encoding is performed on the original feature space, that is, the original features are converted into fixed-length hexadecimal strings using the MD5 hash algorithm, and key-value mapping is used in the string space to assign a fixed number to each original feature; (2) Distributedly storing the regret value and the blueprint strategy according to the assigned fixed number; (3) Set a threshold for the number of blueprint strategy updates. For each blueprint strategy in distributed storage, save the current blueprint strategy whenever the number of updates reaches the threshold, and perform a simulation confrontation test with the last saved blueprint strategy until the benefit of the current blueprint strategy is not significantly improved in the simulation confrontation, thus generating an imperfect information game strategy.

4. A parallel imperfect information game strategy generation device, characterized in that: include: The space compression module is used to compress the original feature space of the imperfect information game according to the incomplete recall clustering method to obtain the abstract feature space; The self-game module uses the MCCFR minimization method to iteratively generate a blueprint strategy through self-game in the abstract feature space; The calculation module uses the hash algorithm of the characteristic string to perform distributed storage and update of the blueprint strategy; The self-game module is further used to (1) set a blueprint strategy, which is a random strategy when initialized, and set a repeatable game game, where the number of game players included in the game is P; (2) inputting the blueprint strategy into the game, generating samples through self-game, and using the MCCFR minimization algorithm based on external sampling to calculate the regret value of the samples generated by the self-game in the abstract feature space by replacing the counterfactual return in the original MCCFR algorithm with the overall expected return; Assuming that the action taken by the game player in this sample is a, we can get the current player p in the abstract information set I p The overall regret value about a is given below; (3) updating the blueprint strategy of the current game player p in the next iteration round according to the regret value calculation method; (4) Use interval update and parallel Monte Carlo sampling methods to alternately update the strategies of different game players, set the regret value change amplitude threshold and strategy update number threshold, and each time the strategy of game player p is iterated, if the cumulative overall regret value change amplitude exceeds the threshold and the cumulative update number reaches the threshold, switch to another player p′ and repeat (2) to (3) to update the strategy of player p′; (5) Action sampling is used to replace the arrival probability weighting in the original MCCFR algorithm to calculate the final output blueprint strategy. After each round of strategy update iteration, a new game environment is created, the current round of real-time strategy is input and K simulated games are performed. The number of times each action a is selected under different abstract information sets I is recorded in each game, and the blueprint strategy is output after T rounds of iteration.

5. An electronic device, characterized in that: include: A memory for storing instructions executable by the processor; A processor, wherein the processor is configured to execute any parallelized imperfect information game strategy generation method of claims 1-3.

6. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which is used to enable the computer to execute any parallelized imperfect information game strategy generation method of claims 1-3.