Method and apparatus for determining action selection policy of execution device
The streaming CFR algorithm solves the problems of large storage space and high computational complexity of existing CFR algorithms in large games by reducing storage space requirements and improving convergence speed, and achieves efficient Nash equilibrium solution under limited storage conditions.
Patent Information
- Application Number
- CN201980040187.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-15
- Publication Date
- 2024-09-13
- Estimated Expiration
- 2039-05-15
AI Technical Summary
Existing imperfect information game (IIG) solving algorithms, such as CFR, suffer from the problems of large storage space requirements, high computational complexity and slow convergence speed, especially when dealing with large games, it is difficult to expand and find Nash equilibrium efficiently.
A streaming CFR algorithm is proposed to reduce storage space requirements by accessing only a subset of the information set in each iteration, and update the iteration strategy through an incremental strategy to improve the convergence speed and achieve large-scale game solving under limited memory conditions. .
The streaming CFR algorithm greatly reduces the storage space and computational complexity, while improving the convergence speed. It can effectively solve large-scale games, save storage space requirements, and only needs half the storage space to converge to comparable results of the original CFR.
Smart Images

Figure CN112292698B
Abstract
Description
Technical Field
[0001] The present invention relates to determining action selection guidelines for an execution device to complete a task in an environment including the execution device and one or more other devices. Background Art
[0002] Methods for solving IIGs have great economic and social benefits. Because information is hidden, players must reason with uncertainty about their opponents' information, and they also need to take actions to take advantage of their opponents' uncertainty about their own information.
[0003] The strategic interaction between two or more parties can be modeled by a game involving two or more parties (also called players). In imperfect information games (IIGs) involving two or more players, players can only partially understand their opponents before making decisions. This is similar to real-life scenarios such as trade, traffic route planning, and public auctions. Many real-life scenarios can be represented as IIGs, such as business competition between different companies, bidding relationships in auction scenarios, and game relationships between fraudulent parties and anti-fraud parties. Summary of the invention
[0004] Techniques for determining an action selection policy for an execution device to complete a task in an environment including an execution device and one or more other devices, for example, a strategic interaction between the execution device and the one or more other devices, are described herein. For example, the execution device may execute a computer-implemented method for seeking a Nash equilibrium of a game between the execution device and the one or more other devices. In some embodiments, these techniques may include executing a streaming counterfactual regret minimization (CFR) algorithm for solving an imperfect information game (IIG), which may save storage space, reduce computational complexity and variance, and improve the convergence rate of the CFR algorithm.
[0005] The present invention also describes one or more non-transitory computer-readable storage media coupled to one or more processors and having instructions stored thereon, which, when executed by the one or more processors, will cause the one or more processors to perform operations in accordance with an embodiment of the method provided herein.
[0006] The present invention also describes a system for implementing the method described herein. The system includes one or more processors and a computer-readable storage medium coupled to the one or more processors and having instructions stored thereon, which, when executed by the one or more processors, will cause the one or more processors to perform operations according to embodiments of the method provided herein.
[0007] The methods, systems and computer media described herein may include any combination of the various aspects and features described herein. That is, the methods described herein are not limited to the combinations of the various aspects and features specifically described herein, but also include any combination of the various aspects and features described.
[0008] The details of one or more implementations of the present disclosure are set forth in the accompanying drawings and the description below. Other features and advantages of this disclosure will be apparent from the description and drawings, and from the claims. BRIEF DESCRIPTION OF THE DRAWINGS
[0009] Figure 1 is a diagram showing an example of a partial game tree in one-card poker according to embodiments of the present invention.
[0010] Figure 2A is a diagram showing an example of the workflow of raw CFR and streaming CFR, Figure 2B An example of a workflow of a streaming CFR according to an embodiment of this document is shown.
[0011] Figure 3 is a flow chart of an example of a process for performing streaming CFR to determine an action selection policy for a software application according to embodiments herein.
[0012] Figure 4 Depicted is a block diagram illustrating an example of a computer-implemented system for providing computing functionality associated with the algorithms, methods, functions, processes, procedures, and procedures according to embodiments herein.
[0013] Figure 5 is a diagram of an example of modules of an apparatus according to embodiments herein.
[0014] The same reference numbers and names in different drawings represent the same elements. DETAILED DESCRIPTION
[0015] This article describes techniques for determining an action selection policy for an execution device to complete a task in an environment including an execution device and one or more other devices, for example, to perform a policy interaction between the execution device and the one or more other devices. For example, the execution device may execute a computer-implemented method for seeking a Nash equilibrium of a game between the execution device and the one or more other devices. In some embodiments, these techniques may include executing a streaming counterfactual regret minimization (CFR) algorithm for solving an imperfect information game (IIG), which can save storage space, reduce computational complexity and variance, and improve the convergence speed of the CFR algorithm.
[0016] An IIG may represent one or more real-world scenarios, such as resource allocation, product / service recommendations, cyber-attack prediction and / or prevention, traffic route planning, fraud management, in which two or more parties (also referred to as players) are involved, and each party may have incomplete or imperfect information about the decisions of the other party.
[0017] A Nash equilibrium is a typical solution to an IIG involving two or more players. Counterfactual regret minimization (CFR) is an algorithm that aims to approximately find Nash equilibria for large games. CFR attempts to minimize the overall counterfactual regret. It is proven that the average of multiple strategies over all iterations converges to a Nash equilibrium. When solving a game, the original form of CFR (also called original CFR, standard CFR, vanilla CFR, or simply CFR) traverses the entire game tree in each iteration. As a result, original CFR requires large amounts of memory to handle large zero-sum extended games, such as heads-up no-limit Texas Hold'em. In some cases, original CFR may not be able to handle large games with limited memory.
[0018] Monte Carlo CFR (MCCFR) is introduced to minimize counterfactual regret. MCCFR can calculate unbiased estimates of counterfactual values and avoid traversing the entire game tree. Since only a subset of all information sets is accessed in each iteration, MCCFR requires less storage space than the original CFR.
[0019] MCCFR can be performed using either an outcome sampling algorithm or an external sampling algorithm. The variance of the outcome sampling algorithm in MCCFR is large, and it is difficult to converge to an approximate Nash equilibrium solution in fewer iterations. The variance of the external sampling algorithm in MCCFR is smaller than that of the outcome sampling algorithm, but this method presents similar disadvantages as CFR. It requires very large storage space when the game tree is large, and cannot be extended to complex large-scale IIGs.
[0020] A streaming CFR algorithm is disclosed herein. Compared to the original CFR algorithm, in some embodiments, the space complexity of the streaming CFR algorithm is about half of that of the original CFR algorithm. In some embodiments, the streaming CFR algorithm only requires a tabular memory or a single neural network to track key information while converging to comparable results produced by the original CFR. The disclosed streaming CFR algorithm can be used for large-scale games, even in the presence of memory limitations. In some embodiments, the described techniques can be used, for example, in AI poker, recommendation platforms, and many other applications that can be modeled by games involving two or more participants.
[0021] In some embodiments, an extended game with a finite set of players N = {0, 1, ..., n-1} can be represented as follows. Define h v i is the hidden variable of player i in the IIG. For example, in the poker game, h v i can refer to the private hand of player i. H refers to a finite set of histories. Each member of H represents the possible history (or state) which includes the hidden variables of each player and the L actions taken by the players including chance. For player i, h can also be expressed as in Refers to the adversary's hidden variable. Empty sequence is a member of H. The expression Indicates h j is the prefix of h, where and 0 <L’<L。 denotes a terminal history, and any member z∈Z is not a prerequisite of any other sequence. A(h)={a:ha∈H} is the set of available actions after a non-terminal history h∈H\Z. The player function P assigns a member of N∪{c} to each non-terminal history, where c denotes a chance player identifier (ID), which can typically be, for example, -1. P(h) is the player who takes an action after history h.
[0022] I of history {h∈H:P(h)=i} i is the information partition of player i. Set I i ∈I i is the information set of player i. i (h) refers to the information set I in state h i In some embodiments, I i can only remember the information observed by player i, including player i’s hidden variables and public actions. i represents the sequence in IIG, i.e. h v i a 0 a 1 ...a L-1 In some embodiments, for I i ∈I i and for any h∈I i , the set A(h) can be represented by A(I i ), and the player P(h) is represented by P(I i ) represents. For each player i∈N, the utility function u i (z) defines the payoff of the terminal state z. A more detailed explanation of these symbols and definitions will be discussed below and will include Figure 1 The example shown in .
[0023] Figure 1 100 is an example of a partial game tree 102 and a partial game tree 104 in single card poker according to an embodiment of the present invention. Single card poker is a two-player IIG poker. Single card poker is an example of an extended game. The rules of the game are defined as follows. A card is dealt to each player from a deck of X cards. The first player can check or put in a chip. If the first player puts in a chip, the second player can put in the same chip or fold. If the first player checks, the second player can check or put in a chip. If the second player puts in a chip, the first player can fold or put in the same chip. The game ends with two checks, putting in the same chip or folding. The folding player will lose 1 chip. If the game ends with two checks, the player with the higher card wins 1 chip. If the game ends with the same chip, the player with the higher card wins 2 chips.
[0024] A game tree is a directed graph. The nodes of a game tree represent positions (or player states) in a game, and the edges of a game tree may represent actions or motions of players of the game. Figure 1 In, z i represents the terminal node, represents the terminal state, h i The partial game trees 102 and 104 each have a root node h representing an opportunity. 0 There are 19 different nodes in the first part of the game tree 102, corresponding to the left tree including the opportunity h 0 The 9 non-terminal nodes h i and 10 terminal nodes z i .
[0025] In the first partial game tree 102, (Q, J) is issued to two players (Player 0 and Player 1) as shown in the left subtree "0:Q 1:J", and (Q, K) is issued to two players as shown in the right subtree "0:Q 1:K".
[0026] The trace from the root node to each node is the history of actions. Actions are represented by letters (e.g., F, C, P, and B) or expressions (e.g., "0:Q1:J") next to the edges of the game tree (represented by arrows). The letters F, C, P, and B represent folding, betting the same chips, checking, and betting chips, respectively.
[0027] In the extended game, h i Refers to the history of actions. For example, as shown in the first part of the game tree 102, h 3 Includes actions 0:Q 1:J and P. 7 Includes actions 0:Q 1:J, P and B.8 Including actions 0: Q 1: K, P and B. In the first part of the game tree 102, That is h 3 Yes 7 A(h 3 )={P,B} represents the non-terminal history h 3 The available action groups after that are P and B. P(h 3 )=1 means that in the history h 3 The next player to take action is Player 1.
[0028] In this IIG, player 1's private cards are invisible to player 0, so for player 0 h 7 and h 8 are actually the same. The information set can be used to represent the set of these indistinguishable states. Similarly, h 1 and h 2 In the same information set. For the right part of the game tree 104, h′ 3 and h′ 5 In the same information set; h′ 4 and h′ 6 In the same set of information.
[0029] Usually, any I i ∈I i Only the information observed by player i can be remembered, including the hidden variables and public actions of player i. For example, as shown in the first part of the game tree 102, h 7 and h 8 The information set represents the sequence of 0:Q, P and B. Since player 0 does not distinguish between h 7 and h 8 , if I 0 Yes 7 and h 8 information set, then I 0 =I 0 (h 7 )=I 0 (h 8 ).
[0030] Strategy distribution σ={σ i |σ i ∈Σ i ,i∈N} is the set of all player strategies, where Σ i is the set of all possible strategies of player i. -i refers to the strategies of all players except player i. For player i∈N, strategy σ i (I i ) is a function that converts A(I i) is assigned to the information set I i σ i (a|h) represents the probability of taking action a by player i∈N∪{c} in state h. In an IIG, if two or more states have the same information set, then the two or more states have the same strategy. That is, I i =I i (h 1 )=I i (h 2 ), σ i (I i )=σ i (h 1 )=σ i (h 2 ), σ i (a|I i )=σ i (a|h 1 )=σ i (a|h 2 ). For example, 0 Yes 7 and h 8 information set, then I 0 =I 0 (h 7 )=I 0 (h 8 ), σ 0 (I 0 )=σ 0 (h 7 )=σ 0 (h 8 ), σ 0 (a|I 0 )=σ 0 (a|h 7 )=σ 0 (a|h 8 ).exist Figure 1 , the same shading (except gray shading) is used to indicate the same information set in the corresponding state.
[0031] For player i, the expected game utility of the strategy distribution σ is expressed as It is the expected return of all possible terminal nodes. Given a fixed policy distribution σ -i , player i's target Any strategy to maximize profit is the best response. For an extended game with two players, the Nash equilibrium is the distribution of strategies So that each player's strategy is the best response to the opponent. ∈-Nash equilibrium is an approximation of Nash equilibrium, whose strategy distribution σ * satisfy:
[0032] Strategy σ i The availability can be defined as If ∈ i (σ i ) = 0, then the strategy is unexploitable. In large two-player zero-sum games like poker, is difficult to calculate. However, if the players swap their positions, then the value of a pair of games is zero, i.e. The exploitability of the policy distribution σ can be defined as
[0033] For iterative methods such as CFR, σ t refers to the strategy distribution of the tth iteration. If the player takes an action according to σ, the probability of reaching the state of history h can be expressed as π σ (h) represents. For the empty sequence, π σ (φ) = 1. The arrival probability can be decomposed into in and
[0034] Information Set I i The arrival probability of (also called the information set arrival probability) can be defined as if The probability of reaching the interval state from state h' to h can be defined as π σ (h',h), then π σ (h',h)=π σ (h) / π σ (h'). Arrival probability and can be defined similarly. and
[0035] In large zero-sum IIGs, CFR is shown to be an effective method for computing Nash equilibria. It can be shown that the probability of a player reaching a state is proportional to the posterior probability of the opponent's hidden variables, i.e., where h v i and I i Indicates a specific h.
[0036] For player i and strategy distribution σ, the counterfactual value (CFV) v in state h iσ (h) can be defined as
[0037]
[0038] in is the expected reward of player i relative to the approximate posterior distribution of the opponent’s hidden variables. Thus, the information set I i The counterfactual value is
[0039] The counterfactual value of taking action a can be expressed as v i σ (a|h)=v i σ (ha), and the regret of taking that action is
[0040] r i σ (a|h)=v i σ (a|h)-v i σ (h). (2)
[0041] Similarly, information set I i The CFV can be defined as The CFV of action a is Given an information set I i The regret of action a can be defined as
[0042]
[0043] in, Note that in imperfect information games,
[0044] Then, the cumulative regret of action a after T iterations can be calculated according to formula (4):
[0045] Where R i 0 (a|I i )=0. Define R i T,+ (a|I i )=max(R i T (a|I i ), 0), the current strategy (or iteration strategy or behavior strategy) at the T+1 iteration can be updated, for example, based on regret matching (RM) according to the following formula (5):
[0046]
[0047] The average policy from iteration 1 to T It can be defined as:
[0048]
[0049] in, Indicates that at the tth iteration I i The information set arrival probability is used to adjust the corresponding current strategy Weighted.
[0050] If in iteration t is defined as an additional numerator, then the average strategy The cumulative numerator of can be defined as
[0051]
[0052] Where S 0 (a|I i )=0.
[0053] For streaming CFR, different from the iterative strategy in the original CFR Incremental Strategy It is defined as formula (8):
[0054]
[0055] in is an initial policy, for example, initialized by a random policy such as a uniform random policy distribution or other initialization policy.
[0056] The iteration strategy of streaming CFR in iteration t can be defined by equation (9):
[0057]
[0058] Among them, α t (I i ) is the number of I in the tth iteration i The learning rate is σ i 0 (a|I i )=0. When t approaches infinity, the learning rate α t (I i ) is close to 0. For example, α t (I i ) can be set to 1 / t or other values. Using formula (9), the iteration strategy in the next iteration can be obtained. After enough iterations, the iteration strategy distribution obtained by the streaming CFR is It can converge to an approximate Nash equilibrium. It is proved that the iterative strategy distribution defined by equation (9) can converge to a set of Nash equilibria in a two-player zero-sum game.
[0059] When solving the game, the original CFR traverses the entire game tree in each iteration. Therefore, the original CFR may not be able to handle large games with limited memory. Monte Carlo CFR (MCCFR) is introduced to minimize counterfactual regret. MCCFR can calculate unbiased estimates of counterfactual values and avoid traversing the entire game tree. Since only a subset of all information sets is accessed in each iteration, MCCFR requires less storage space than the original CFR.
[0060] For example, define Q = {Q 1 ,Q 2 ,...,Q m}, where Qj∈Z is the block of sampling endpoint history in each iteration such that Q j covers the set Z. In general, different Q j There may be overlap. Several sampling schemes can be used.
[0061] Figure 2A is a diagram showing an example of a workflow 200 for raw CFR and streaming CFR, Figure 2B An example of a workflow 205 of a streaming CFR according to embodiments herein is shown. As shown, both the original CFR and the streaming CFR can be performed in an iterative manner. Figure 2A and Figure 2B Four iterations are shown, t=1, 2, 3, or 4. The superscript 1, 2, 3, or 4 indicates the tth iteration. The raw CFR and the streaming CFR may include more iterations. To simplify the expressions, and Each of the following subscripts i in .
[0062] like Figure 2B As shown in the workflow 205 of the midstream CFR, in the first iteration, t=1, for example, according to equation (8), the initial regret value can be 211 to calculate the incremental strategy 213. For example, according to formula (9), we can 213 and the initial iteration strategy σ 0 (a|I)=0 to calculate the iteration strategy σ 1 (a|I) 215. Based on the iterative strategy σ 1 (a|I)215, for example, according to formula (3), the updated regret value of the iterative strategy can be calculated by recursively traversing the game tree based on the counterfactual value 221.
[0063] Updated regret value of iterative strategy 221 can be used to calculate the update increment strategy in the next iteration t=2, for example according to equation (8): 223. For example, according to formula (9), we can 223 and the iteration strategy σ in the first iteration 1 (a|I)215 to calculate the iteration strategy σ 2 (a|I)225. Similarly, based on the iterative strategy σ 2 (a|I)225, for example, according to formula (3), the iterative strategy σ can be calculated by recursively traversing the game tree based on the counterfactual value 2 Updated regret value of (a|I)225 231.
[0064] Similarly, in the next iteration, t=3, the regret value is updated based on 231, for example, the update increment strategy can be calculated according to formula (8) 233. For example, according to formula (9), we can 233 and iterative strategy σ 2 (a|I)225 to calculate the iteration strategy σ 3 (a|I) 235. Based on the iterative strategy σ 3 (a|I)235, for example, according to formula (3), the iterative strategy σ can be calculated by recursively traversing the game tree based on the counterfactual value 3 Updated regret value of (a|I)235 241.
[0065] In the next iteration, t = 4, the regret value is updated based on 241, for example, the update increment strategy can be calculated according to formula (8) 243. For example, according to formula (9), we can 244 and iterative strategy σ 3 (a|I)235 to calculate the iterative strategy σ 4 (a|I) 245. Based on the iterative strategy σ 4 (a|I)245, for example, according to equation (4), the iterative strategy σ can be calculated by recursively traversing the game tree based on the counterfactual value 4 Updated regret value of (a|I)245 (Not shown). Update regret value It can be used to calculate the incremental strategy for the next iteration. The streaming CFR can repeat the above iterations until convergence is achieved.
[0066] Note that in streaming CFR, Figure 2BAs shown, the incremental strategy in the current iteration (for example, in the Tth iteration) ) can be based on the regret value of the action in the previous iteration (e.g., the regret value of the action in the (T-1)th iteration ) is used to calculate the regret of the action in any other previous iteration (e.g., the (T-2)th iteration, the (T-3)th iteration). The iterative strategy in the current iteration (e.g., σ in the Tth iteration) T (a|I)) can be based on the iteration strategy of the action in the (T-1)th iteration (for example, σ in the (T-1)th iteration T-1 (a|I)) and the incremental policy of the action in the current iteration (e.g., the action in the Tth iteration ) to calculate. Therefore, only the iteration strategy in the current iteration (for example, σ in the Tth iteration) T (a|I)) needs to be stored to calculate the updated iteration strategy in the next iteration (σ in the (T+1)th iteration T+1 (a|I)). This is different from the original CFR. For example, for the current iteration (e.g., iteration T), the original CFR is based on the accumulated regret in all iterations t=1, 2, …, T and averaging strategies.
[0067] like Figure 2A As shown in the original CFR workflow 200, in the first iteration, t = 1, for example, according to equation (5), the initial cumulative regret R 0 (a|I)212 to calculate the iterative strategy σ 1 (a|I)214. For example, according to formula (6), it can be based on the iteration strategy σ 1 (a|I)214 and the initial average strategy σ 0 (a|I)=0 to calculate the average strategy 210. Based on the iterative strategy σ 1 (a|I)214, for example, according to formula (3), the updated regret value of the iterative strategy can be calculated by recursively traversing the game tree based on the counterfactual value 216. For example, according to formula (4), we can 216 Iteration strategy and initial cumulative regret R 0 (a|I)212 to calculate the updated cumulative regret R of action a after the first iteration 1 (a|I)222.
[0068] In the second iteration, t = 2, for example, according to equation (5), the cumulative regret R can be updated based on 1 (a|I)222 to calculate the iterative strategy σ 2(a|I)224. For example, according to formula (6), we can 2 (a|I)224 and the average strategy in the first iteration 210 to calculate the average strategy 220. Based on the iterative strategy σ 2 (a|I)224, for example, according to formula (3), the updated regret value of the iterative strategy can be calculated by recursively traversing the game tree based on the counterfactual value 226. For example, according to formula (4), we can 226 Iteration Strategy and Cumulative Regret R 1 (a|I)222 is used to calculate the updated cumulative regret R of action a after the second iteration 2 (a|I)232.
[0069] In the third iteration, t=3, for example, according to equation (5), the cumulative regret R can be updated based on 2 (a|I)232 to calculate the iteration strategy σ 3 (a|I)234. For example, according to formula (6), we can 3 (a|I)234 and the average strategy in the second iteration 220 to calculate the average strategy 230. Based on the iterative strategy σ 3 (a|I)234, for example, according to formula (3), the updated regret value of the iterative strategy can be calculated by recursively traversing the game tree based on the counterfactual value 236. For example, according to formula (4), we can 236 Iteration Strategy and Cumulative Regret R 2 (a|I)232 to calculate the updated cumulative regret R of action a after the third iteration 3 (a|I)242.
[0070] In the fourth iteration, t=4, for example, according to equation (5), the cumulative regret R can be updated based on 3 (a|I)242 to calculate the iterative strategy σ 4 (a|I)244. For example, according to formula (6), we can 4 (a|I)244 and the average strategy in the third iteration 230 to calculate the average strategy 240. Based on the iterative strategy σ 4 (a|I)244, for example, according to formula (3), the updated regret value of the iterative strategy can be calculated by recursively traversing the game tree based on the counterfactual value (not shown). Similarly, for example, according to formula (4), it can be based on Iteration strategy and cumulative regret R 3 (a|I)242 is used to calculate the updated cumulative regret R of action a after the fourth iteration 4 (a|I) (not shown). The original CFR may repeat the above iterations until convergence is achieved.
[0071] like Figure 2A As shown in the original CFR workflow 200, the original CFR needs to track at least two values in each iteration, namely, the accumulated regret in all t=1, 2, ..., T iterations. and average strategy Because each iteration of the original CFR depends not only on the regret and strategy of the previous iteration, but also on the regret and strategy in all iterations before the previous iteration. On the other hand, each iteration of the streaming CFR can be performed without knowing any regret value or strategy in any iteration before the previous iteration (e.g., the (T-2)th iteration, the (T-3)th iteration). For example, the streaming CFR may only need to store the iteration strategy (e.g., σ 1 (a|I)215,σ 2 (a|I)225,σ 3 (a|I)235,σ 4 (a|I)245, such as Figure 2A ), while the original CFR needs to store the accumulated regret in each iteration (e.g., R 0 (a|I)212, R 1 (a|I)222, R 2 (a|I)232 and R 3 (a|I)242) and the average strategy (e.g., 210, 220, 230 and 240, such as Figure 2B As shown in the gray blocks in ). Therefore, the streaming CFR requires less storage space (e.g., half the storage space) than the original CFR, thereby improving memory efficiency.
[0072] In some embodiments, the streaming CFR algorithm is an iterative algorithm. In each iteration t, the function SCFR is called for player 0 and player 1 to update the incremental strategy and iterative strategies
[0073] Figure 3 is a flowchart of an example of a process for performing streaming counterfactual regret minimization (CFR) to determine an action selection policy for a software application according to an embodiment of the present invention. Process 400 may be described above with respect to Figure 2A and Figure 2B An example of a streaming CFR algorithm. In some embodiments, process 400 can be performed in an iterative manner, for example, by performing two or more iterations. In some embodiments, process 400 can be used in automatic control, robotics, or any other application involving action selection. In some embodiments, process 400 can be performed to generate an action selection policy (e.g., strategy) for a software implementation application that performs an action in an environment including an execution device supported by the application and one or more other devices. The action selection policy specifies the corresponding probability of selecting each of a plurality of possible actions. For example, an execution device can perform process 400 when determining the action selection policy of the execution device and controlling the operation of the execution device according to the action selection policy.
[0074] In some embodiments, the action selection policy is in an environment that includes an execution device supported by an application and one or more other devices.
[0075] In some embodiments, process 400 may be performed by an execution device to generate an action selection policy (e.g., a strategy) to complete a task (e.g., finding a Nash equilibrium) in an environment including the execution device and one or more other devices. In some embodiments, the execution device may perform process 400 to control the operation of the execution device according to the action selection policy.
[0076] In some embodiments, the execution device may include a data processing device, such as a system of one or more computers, located in one or more locations and appropriately programmed according to the present invention. Figure 4 The computer system 500 may be appropriately programmed to perform the process 400. The execution device may be associated with an execution device or a player. The execution device or player and one or more other participants (e.g., associated with one or more other devices) may be participants or players in an environment, for example, for performing a strategic search in a strategic interaction between the execution device and the one or more other participants.
[0077] In some embodiments, the environment can be modeled by an imperfect information game (IIG) involving two or more players. In some embodiments, for example, the process 400 can be executed by an execution device supported by an application to solve the IIG. The IIG can represent one or more real-life scenarios involving two or more participants, such as resource allocation, product / service recommendation, network attack prediction and / or prevention, traffic route planning, fraud management, etc., and each participant may have incomplete or imperfect information about the decision of other participants. For example, the IIG can represent a collaborative product service recommendation service involving at least a first player and a second player. The first player can be, for example, an online retailer with customer (or user) information, product and service information, customer's purchase history, etc. The second player can be, for example, a social network platform with social network data of the customer, a bank or other financial institution with financial information of the customer, a car dealer, or any other participant that may have customer information such as customer preferences, needs, financial status, location, etc. when predicting and recommending products and services to the customer. The first player and the second player may each have proprietary data that the player does not want to share with others. The second player can only provide part of the information to the first player at different times. Therefore, the first player can only limit access to the second player's information. In some embodiments, process 400 may be performed to make a recommendation to a party having limited information of a second party, using the limited information to plan a route.
[0078] At 402, an iterative action selection policy (e.g., strategy) for an action of a participant (e.g., an execution device supported by an application) in a state is initialized in a first iteration (i.e., iteration t=1). In some embodiments, the state of the execution device is caused by a history of actions taken by the participant.
[0079] In some embodiments, the iterative strategy can be initialized, for example, based on an existing strategy, a uniform random strategy (e.g., a strategy based on a uniform probability distribution), or other strategies (e.g., a strategy based on a different probability distribution). For example, if the system is hot-started from an existing CFR method (e.g., the original CFR or MCCFR method), the iterative strategy can be initialized based on the existing strategy distribution to clone the existing regret and strategy.
[0080] In some embodiments, the strategic interaction between two or more participants can be modeled by an imperfect information game (IIG). As an example, the IIG represents a collaborative product service recommendation service including a participant and a second participant. The participant has limited access to the information of the second participant. The state of the participant includes a history of information provided by the second participant, and the action of the participant includes an action in response to the history of information provided by the second participant to provide product service recommendations to customers.
[0081] At 404, it is determined whether the convergence condition is met. The convergence condition can be used to determine whether to continue or terminate the iteration. In some embodiments, the convergence condition can be based on the availability of the strategy σ. According to the definition of availability, the availability should be greater than or equal to 0. The smaller the availability, the better the strategy. That is, after enough iterations, the availability of the convergent strategy should be close to 0. For example, in poker, when the availability is less than 1, the time average strategy is regarded as a good strategy, and it is determined that the convergence condition is met. In some embodiments, the convergence condition can be based on a predetermined number of iterations. For example, in small games, iterations can be easily determined by availability. That is, if the availability is small enough, the process 400 can terminate. In large games, availability is difficult to identify, and typically, large parameters for iteration can be specified. After each iteration, a new strategy distribution can be obtained, which is better than the old strategy distribution. For example, in large games, the process 400 can terminate after a sufficient number of iterations.
[0082] If the convergence condition is met, no further iteration is required. Process 400 proceeds to 416, where the iteration policy (the latest policy in the current iteration) is output. If the convergence condition is not met, t is incremented by 1 and process 400 proceeds to the next iteration, where t>1.
[0083] In the current iteration (e.g., the t-th iteration), at 406, the iteration strategy of the participant's action in the state in the previous iteration (e.g., in the (t-1)-th iteration, the information set I i The iteration strategy of action a in this state of the participant represented by ) is identified. The iteration strategy of the action of the participant in the state in the (t-1)th iteration represents the possibility of the participant taking the action in the state in the (t-1)th iteration.
[0084] At 408, the regret value (e.g., ) is calculated based on the iterative strategy of the action of the participant in the state in the (t-1)th iteration. In some embodiments, the regret value of the action of the execution device in the state represents the difference between the gain (e.g., CFV) of the execution device taking the action in the state and the gain of the execution device in the state. In some embodiments, the CFV can be calculated by recursively traversing a game tree representing an environment including execution devices supported by the application and one or more other participants.
[0085] In some embodiments, calculating the regret value of the participant's action in the state in the (t-1)th iteration based on the iterative strategy of the participant's action in the state in the (t-1)th iteration includes: calculating the regret value of the participant's action in the state in the (t-1)th iteration based on the iterative strategy of the participant's action in the state in the (t-1)th iteration, rather than any regret value of the participant's action in the state in any iteration before the (t-1)th iteration.
[0086] In some embodiments, calculating the regret value of the participant's action in the state in the (t-1)th iteration based on the iterative strategy of the participant's action in the state in the (t-1)th iteration includes: calculating the regret value of the participant's action in the state in the (t-1)th iteration based on the difference between the counterfactual value of the participant's action in the state and the counterfactual value of the participant's state (for example, according to formula (3)), wherein the counterfactual value of the participant's action in the state and the counterfactual value of the participant's state are calculated by recursively traversing a game tree representing an environment of execution devices supported by an application and one or more other participants in the (t-1)th iteration.
[0087] At 410, the incremental strategy of the participant's action in the state in the tth iteration (e.g., ) is calculated based on the regret value of the participant's action in the state in the (t-1)th iteration, rather than any regret value of the participant's action in the state in any iteration before the (t-1)th iteration. In some embodiments, the incremental strategy of the participant's action in the state in the tth iteration is calculated based on the regret value of the participant's action in the state in the (t-1)th iteration according to formula (8), rather than any regret value of the participant's action in the state in any iteration before the (t-1)th iteration. For example, the incremental strategy of the participant's action in the state in the tth iteration is calculated based on the regret value of the participant's action in the state in the (t-1)th iteration according to the following formula, rather than any regret value of the participant's action in the state in any iteration before the (t-1)th iteration:
[0088]
[0089] Among them, a represents action, I i Indicates the status of the participant. represents the incremental strategy of the participant's actions in this state in the tth iteration, represents the regret value of the participant's action in this state in the (t-1)th iteration, |A(I i )| represents the total number of actions available to the participants in this state.
[0090] At 412, the iterative strategy of the action of the participant in the state in the t-th iteration is calculated based on the weighted sum of the iterative strategy of the action of the participant in the state in the (t-1)-th iteration and the incremental strategy of the action of the participant in the state in the t-th iteration. For example, the iterative strategy of the action of the participant in the state in the t-th iteration is calculated based on the weighted sum of the iterative strategy of the action of the participant in the state in the (t-1)-th iteration and the incremental strategy of the action of the participant in the state in the t-th iteration according to formula (9). In some embodiments, the weighted sum of the iterative strategy of the action of the participant in the state in the (t-1)-th iteration and the incremental strategy of the action of the participant in the state in the t-th iteration includes: the sum of the iterative strategy of the action of the participant in the state in the (t-1)-th iteration scaled by the first learning rate in the t-th iteration and the incremental strategy of the action of the participant in the state in the t-th iteration scaled by the second learning rate in the t-th iteration. When t approaches infinity, the first learning rate approaches 1; when t approaches infinity, the second learning rate approaches 0. In some embodiments, the first learning rate is (t-1) / t, and the second learning rate is 1 / t.
[0091] At 414, the iteration strategy of the action of the party in the state in the tth iteration is stored, for example, to calculate the iteration strategy of the action of the party in the state in the (t+1)th iteration. In some embodiments, the iteration strategy of the action of the party in the state in the tth iteration may be stored in a memory (e.g., in a table or other data structure in the memory). In some embodiments, the iteration strategy of the action of the party in the state in the tth iteration may be stored by a neural network. For example, a neural network may be used to learn the iteration strategy of the action of the party in the state in the tth iteration, for example, to predict the iteration strategy of the action of the party in the state in the (t+1)th iteration. In some embodiments, compared to the original CFR, the streaming CFR algorithm only requires half the storage size or a single neural network instead of dual neural networks to track key information while converging to comparable results produced by the original CFR.
[0092] At 416, in response to determining that the convergence condition is satisfied, the iterative strategy of the action of the party in the state in the tth iteration is output. In some embodiments, the iterative strategy of the action of the party in the state in the tth iteration can be used to approximate a Nash equilibrium and used as an output of the CFR algorithm. In some embodiments, the iterative strategy of the action of the party in the state can include a series of actions of the players in the real scene modeled by the IIG. For example, in a collaborative product service recommendation scenario, the iterative strategy of the action of the party in the state can include, for example, a series of actions in response to information provided by the second player, based on the information of the first player, the corresponding product service recommendation to the customer, and the information provided by the second player. The iterative strategy of the action of the party in the state can include other information in other real scenes modeled by the IIG.
[0093] Figure 4 Depicted is a block diagram illustrating an example of a computer-implemented system for providing computing functionality associated with the described algorithms, methods, functions, processes, procedures, and programs according to embodiments herein. Figure 4 5 is a block diagram illustrating an example of a computer-implemented system 500 for providing computing functions associated with the described algorithms, methods, functions, processes, procedures, and programs according to an embodiment of the present disclosure. In the illustrated embodiment, the system 500 includes a computer 502 and a network 530.
[0094] The computer 502 shown is intended to include any computing device, such as a server, a desktop computer, a laptop / notebook computer, a wireless data port, a smart phone, a personal data assistant (PDA), a tablet computer, one or more processors in these devices, another computing device, or a combination of computing devices, including a physical or counterfactual instance of a computing device, or a combination of physical or counterfactual instances of a computing device. In addition, the computer 502 may include an input device, such as a keypad, a keyboard, a touch screen, another input device, or a combination of input devices that can accept user information, and an output device that conveys information associated with the operation of the computer 502, including digital data, visuals, audio, another type of information, or a combination of various types of information on a graphical user interface (UI) (or GUI) or other UI.
[0095] The computer 502 may act as a client, a network component, a server, a database, or another persistent device, another role, or a combination of roles for performing the subject matter described in the present disclosure in a distributed computing system. The computer 502 shown is communicatively coupled to a network 530. In some embodiments, one or more components of the computer 502 may be configured to operate in an environment including a cloud-based environment, a local environment, a global environment, another environment, or a combination of environments.
[0096] At a high level, the computer 502 is an electronic computing device operable to receive, send, process, store, or manage data and information associated with the described subject matter. According to some embodiments, the computer 502 may also include or be communicatively coupled to a server, including an application server, an email server, a web server, a cache server, a streaming data server, another server, or a combination of servers.
[0097] Computer 502 may receive the request over network 530 (e.g., from a client software application executing on another computer 502) and respond to the received request by processing the received request using the software application or a combination of software applications. Additionally, the request may be sent to computer 502 from an internal user (e.g., from a command console or through another internal access method), an external or third party, or other entity, person, system, or computer.
[0098] Each component of the computer 502 can communicate using the system bus 503. In some embodiments, any or all components of the computer 502, including hardware, software, or a combination of hardware and software, can be interfaced through the system bus 503 using an application programming interface (API) 512, a service layer 513, or a combination of an API 512 and a service layer 513. The API 512 may include specifications for routines, data structures, and object classes. The API 512 may be independent of the computer language or dependent on the computer language, and refers to a complete interface, a single function, or even a set of APIs. The service layer 513 provides software services to the computer 502 or other components (whether or not shown) that are communicatively coupled to the computer 502. All service clients using the service layer 513 can access the functions of the computer 502, such as the software services provided by the service layer 513, through a defined interface to provide reusable, defined functions. For example, the interface can be software written in JAVA, C++, another computing language, or a combination of computer languages that provide data in an extensible markup language (XML) format, another format, or a combination of multiple formats. Although shown as an integrated component of computer 502, alternative embodiments may show API 512 or service layer 513 as a separate component in relation to other components of computer 502 or communicatively coupled to other components of computer 502 (whether shown or not). Furthermore, any or all portions of API 512 or service layer 513 may be implemented as a child or a sub-module of another software module, enterprise application, or hardware module without departing from the scope of the present disclosure.
[0099] The computer 502 includes an interface 504. Although shown as a single interface 504, two or more interfaces 504 may be used according to the specific needs, expectations, or specific embodiments of the computer 502. The interface 504 is used by the computer 502 to communicate with another computing system (whether or not shown) that is communicatively linked to the network 530 in a distributed environment. Typically, the interface 504 is operable to communicate with the network 530 and includes logic encoded in software, hardware, or a combination of software and hardware. More specifically, the interface 504 may include software supporting one or more communication protocols associated with the communication so that the network 530 or the hardware of the interface 504 is operable to communicate physical signals within the computer 502 shown and outside the computer 502 shown.
[0100] The computer 502 includes a processor 505. Although shown as a single processor 505, two or more processors 505 may be used depending on the particular needs, desires, or particular embodiments of the computer 502. In general, the processor 505 executes instructions and manipulates data to perform the operations of the computer 502 and any algorithms, methods, functions, processes, procedures, and routines described in this disclosure.
[0101] The computer 502 also includes a database 506 that can store data for the computer 502, data of another component (whether or not shown) that is communicatively linked to the network 530, or data of a combination of the computer 502 and another component. For example, the database 506 can be a memory, a conventional database, or another type of database that stores data consistent with the present disclosure. In some embodiments, the database 506 can be a combination of two or more different database types (e.g., a hybrid memory and conventional database) according to the specific needs, expectations, or specific embodiments of the computer 502 and the functions described. Although shown as a single database 506, two or more databases of similar or different types can be used according to the specific needs, expectations, or specific embodiments of the computer 502 and the functions described. Although the database 506 is shown as an integrated component of the computer 502, in alternative embodiments, the database 506 can be external to the computer 502. As an example, the database 506 can include the above-mentioned storage space 516 that stores the iteration strategy of the streaming CFR algorithm.
[0102] The computer 502 also includes a memory 507 that can hold data for the computer 502, data of another component (whether or not shown) that is communicatively linked to the network 530, or data of a combination of the computer 502 and another component. The memory 507 can store any data consistent with the present disclosure. In some embodiments, the memory 507 can be a combination of two or more different types of memory (e.g., a combination of semiconductor and magnetic storage devices) depending on the specific needs, expectations, or specific embodiments of the computer 502 and the functions described. Although shown as a single memory 507, two or more memories 507 of similar or different types can be used depending on the specific needs, expectations, or specific embodiments of the computer 502 and the functions described. Although the memory 507 is shown as an integrated component of the computer 502, in alternative embodiments, the memory 507 can be external to the computer 502.
[0103] Application 508 is an algorithmic software engine that provides functionality according to the specific needs, expectations, or specific embodiments of computer 502, particularly with respect to the functionality described in this disclosure. For example, application 508 can be used as one or more components, modules, or applications. In addition, although shown as a single application 508, application 508 can be implemented as multiple applications 508 on computer 502. In addition, although shown as integrated with computer 502, in alternative embodiments, application 508 can be external to computer 502.
[0104] The computer 502 may also include a power supply 514. The power supply 514 may include a rechargeable battery that may be configured to be user-replaceable or a non-rechargeable battery that is not user-replaceable. In some embodiments, the power supply 514 may include power conversion or management circuitry (including charging, backup, or another power management function). In some embodiments, the power supply 514 may include a power plug to allow the computer 502 to be plugged into a wall outlet or another power source, such as to power the computer 502 or charge a rechargeable battery.
[0105] There may be any number of computers 502 associated with or external to the computer system containing the computer 502, each of which communicates via the network 530. Furthermore, the terms "client," "user," or other appropriate terms may be used interchangeably as appropriate without departing from the scope of the present disclosure. Furthermore, the present disclosure contemplates that many users may use one computer 502, or that one user may use multiple computers 502.
[0106] Figure 5It is a diagram of a module example of the device 600 according to an embodiment of the present invention. In some embodiments, the device 600 can generate an action selection policy for a software implementation application, which performs an action in an environment including an execution device supported by the application and one or more other participants. For example, the device 600 can execute a computer implementation method for a software implementation application to generate a software implementation application to generate an operational output to be performed in an environment, wherein the environment includes an application party supported by the application and one or more other participants. In some embodiments, the method represents the environment, the possible actions of the participants, and the imperfect information about other participants that the application can obtain with data representing an imperfect information game (IIG), wherein the application performs counterfactual regret minimization (CFR) in an iterative manner (e.g., by performing two or more iterations) to perform an action selection policy search in a strategic interaction between the participants to determine the operational output.
[0107] The device 600 may correspond to the above-mentioned embodiment, and the device 600 includes the following: an identification module 601, which is used to identify the iterative action selection policy of the action of the participant in the state in the previous iteration at each time in multiple iterations and for each action of multiple possible actions of the execution device in a state in the current iteration, wherein the state of the execution device is caused by the history of actions taken by the execution device, wherein the iterative action selection policy of the action of the participant in the state in the previous iteration represents the probability that the participant took the action in the state in the previous iteration; a first calculation module 602, which is used to calculate the regret value of the action of the participant in the state in the previous iteration based on the iterative action selection policy of the action of the participant in the state in the previous iteration, wherein the regret value of the action of the execution device in the state The value represents the difference between the gain of the execution device after taking the action in this state and the gain of the execution device in this state; a second calculation module 603 is used to calculate the incremental action selection policy of the participant's action in this state in the current iteration based on the regret value of the participant's action in this state in the previous iteration, rather than any regret value of the participant's action in this state in any iteration before the previous iteration; a third calculation module 604 is used to calculate the iterative action selection policy of the participant's action in this state in the current iteration based on the weighted sum of the iterative action selection policy of the participant's action in this state in the previous iteration and the incremental action selection policy of the participant's action in this state in the current iteration; and a storage module 605 is used to store the iterative action selection policy of the participant's action in this state in the current iteration.
[0108] In an optional embodiment, the IIG represents a collaborative product service recommendation service involving a participant and a second participant, wherein the participant has limited access to the second participant's information, wherein the participant's state includes a history of information provided by the second participant, and wherein the participant's actions include actions in response to the history of information provided by the second participant to provide product service recommendations to customers.
[0109] In an optional embodiment, the apparatus 600 further includes: a determination module 606 for determining whether a convergence condition is satisfied; and an output module 607 for outputting an iterative action selection policy for the actions of the participants in the current iteration in this state in response to determining that the convergence condition is satisfied.
[0110] In an optional embodiment, calculating the regret value of the participant's action in the state in the previous iteration based on the iterative action selection policy of the participant's action in the state in the previous iteration includes: calculating the regret value of the participant's action in the state in the previous iteration based on the iterative action selection policy of the participant's action in the state in the previous iteration, rather than any regret value of the participant's action in the state in any iteration before the previous iteration.
[0111] In an optional embodiment, calculating the regret value of a participant's action in this state in a previous iteration based on the iterative action selection policy of the participant's action in this state in the previous iteration includes: calculating the regret value of the participant's action in this state in the previous iteration based on the difference between the counterfactual value of the participant's action in this state and the counterfactual value of the participant's state, wherein the counterfactual value of the participant's action in this state and the counterfactual value of the participant's state are calculated by recursively traversing a game tree representing an environment including an execution device supported by an application in the previous iteration and one or more other participants.
[0112] In an optional embodiment, the weighted sum of the iterative action selection policy of the participant's action in this state in the previous iteration and the incremental action selection policy of the participant's action in this state in the current iteration includes: the sum of the iterative action selection policy of the participant's action in this state in the previous iteration scaled by the first learning rate in the current iteration and the incremental action selection policy of the participant's action in this state in the current iteration scaled by the second learning rate in the current iteration, wherein, when the number of iterations t approaches infinity, the first learning rate approaches 1, and when t approaches infinity, the second learning rate approaches 0.
[0113] In an alternative embodiment, the first learning rate is (t-1) / t, and the second learning rate is 1 / t.
[0114] In an optional embodiment, the incremental action selection policy for the participant's action in the state in the current iteration is calculated based on the regret value of the participant's action in the state in the previous iteration, rather than any regret value of the participant's action in the state in any iteration before the previous iteration, according to the following formula:
[0115]
[0116] Among them, a represents action, I i Indicates the status of the participant. Indicates the incremental action selection policy for the actions of the participants in this state in the current iteration, represents the regret value of the participant's action in this state in the previous iteration, |A(I i )| represents the total number of actions available to the participants in this state.
[0117] In an optional embodiment, the apparatus 600 further includes: an initialization module 608, configured to initialize an iterative action selection policy for the actions of the participants in the state in the first iteration based on a uniform random action selection policy.
[0118] The systems, devices, modules or units shown in the previous embodiments may be implemented by using a computer chip or entity, or may be implemented by using a product having a specific function. The typical embodiment device is a computer, which may be a personal computer, a laptop computer, a cellular phone, a camera phone, a smart phone, a personal digital assistant, a media player, a navigation device, an email transceiver, a game console, a tablet computer, a wearable device, or any combination of these devices.
[0119] For the implementation process of the functions and effects of each module in the device, reference may be made to the implementation process of the corresponding steps in the aforementioned method. For the sake of simplicity, the details are omitted here.
[0120] Since the device embodiment basically corresponds to the method embodiment, for the relevant parts, reference can be made to the relevant description in the method embodiment. The device embodiment described above is only an example. The modules described as independent parts may be physically independent or not physically independent, and the parts shown as modules may be physical modules or not physical modules, may be located in one position, or may be distributed on multiple network modules. Some or all of the modules may be selected based on actual needs to achieve the purpose of the solution of this article. Those of ordinary skill in the art can understand and implement the embodiments of the present application without creative efforts.
[0121] Reference again Figure 5 , Figure 5Can be interpreted as showing the internal functional modules and structure of a data processing device, the data processing device is used to generate an action selection policy for a software implementation application, the software implementation application performs an action in an environment including an execution device supported by the application and one or more other participants. In some embodiments, the data processing device can be used to perform counterfactual regret minimization (CFR) for action selection policy search in a strategic interaction between two or more players. In some embodiments, the strategic interaction between two or more players can be modeled by an imperfect information game (IIG) containing two or more players. In some embodiments, the data processing device can execute a computer-implemented method for software implementation applications to generate an operational output to be executed in an environment, wherein the environment includes an application party supported by the application and one or more other participants, the method uses data representing an imperfect information game (IIG) to represent the environment, the possible actions of the participants, and the imperfect information about other participants that the application can obtain, wherein the application determines the operational output by performing counterfactual regret minimization (CFR) in an iterative manner to search for strategies in the strategic interaction between the participants. The execution subject may be essentially an electronic device, which includes the following: one or more processors and a memory, wherein the memory is configured to store executable instructions of the one or more processors.
[0122] One or more processors are configured to, at each of multiple iterations and for each of multiple possible actions of an executing device in a state in a current iteration, wherein the state of the executing device is caused by a history of actions taken by the executing device, identify an iterative action selection policy for an action of a participant in a state in a previous iteration, wherein the iterative action selection policy for an action of a participant in a state in a previous iteration represents a probability that the participant took the action in the state in the previous iteration; and calculate a regret value for an action of the participant in the state in the previous iteration based on the iterative action selection policy for an action of the participant in the state in the previous iteration, wherein the regret value for an action of the executing device in the state Represents the difference between the gain of the executing device after taking the action in the state and the gain of the executing device in the state; calculates the incremental action selection policy of the participant's action in the state in the current iteration based on the regret value of the participant's action in the state in the previous iteration, rather than any regret value of the participant's action in the state in any iteration before the previous iteration; calculates the iterative action selection policy of the participant's action in the state in the current iteration based on the weighted sum of the iterative action selection policy of the participant's action in the state in the previous iteration and the incremental action selection policy of the participant's action in the state in the current iteration; and stores the iterative action selection policy of the participant's action in the state in the current iteration.
[0123] Optionally, the IIG represents a collaborative product service recommendation service involving a participant and a second participant, wherein the participant has limited access to the second participant's information, wherein the participant's state includes a history of information provided by the second participant, and wherein the participant's actions include actions in response to the information history provided by the second participant to provide product service recommendations to customers.
[0124] Optionally, the one or more processors are configured to, in response to determining that a convergence condition is satisfied, output an iterative action selection policy for the action of the participant in the state in the current iteration.
[0125] Optionally, calculating the regret value of the participant's action in the state in the previous iteration based on the iterative action selection policy of the participant's action in the state in the previous iteration includes: calculating the regret value of the participant's action in the state in the previous iteration based on the iterative action selection policy of the participant's action in the state in the previous iteration, rather than any regret value of the participant's action in the state in any iteration before the previous iteration.
[0126] Optionally, calculating the regret value of the participant's action in the state in the previous iteration based on the iterative action selection policy of the participant's action in the state in the previous iteration includes: calculating the regret value of the participant's action in the state in the previous iteration based on the difference between the counterfactual value of the participant's action in the state and the counterfactual value of the participant's state, wherein the counterfactual value of the participant's action in the state and the counterfactual value of the participant's state are calculated by recursively traversing a game tree representing an environment including an execution device supported by the application in the previous iteration and one or more other participants.
[0127] Optionally, the weighted sum of the iterative action selection policy of the participant's action in this state in the previous iteration and the incremental action selection policy of the participant's action in this state in the current iteration includes: the sum of the iterative action selection policy of the participant's action in this state in the previous iteration scaled by the first learning rate in the current iteration and the incremental action selection policy of the participant's action in this state in the current iteration scaled by the second learning rate in the current iteration, wherein, when the number of iterations t approaches infinity, the first learning rate approaches 1, and when t approaches infinity, the second learning rate approaches 0.
[0128] Optionally, the first learning rate is (t-1) / t, and the second learning rate is 1 / t.
[0129] Optionally, the incremental action selection policy for the participant's action in the state in the current iteration is calculated based on the regret value of the participant's action in the state in the previous iteration, rather than any regret value of the participant's action in the state in any iteration before the previous iteration, according to the following formula:
[0130]
[0131] Among them, a represents action, I i Indicates the status of the participant. Indicates the incremental action selection policy for the actions of the participants in this state in the current iteration, represents the regret value of the participant's action in this state in the previous iteration, |A(I i )| represents the total number of actions available to the participants in this state.
[0132] Optionally, the one or more processors are configured to initialize an iterative action selection policy for the actions of the participants in the state in a first iteration based on a uniform random action selection policy.
[0133] The technology described herein produces one or more technical effects. In some embodiments, the technology described can be performed by an execution device to generate an action selection policy, thereby completing a task in an environment including the execution device and one or more other devices. In some embodiments, the technology described can determine the action selection policy of a software implementation application, which performs an action in an environment including an execution device supported by the application and one or more other participants. In some embodiments, the technology described can be used in automatic control, robots, or any other application involving action selection.
[0134] In some embodiments, the described sampling techniques can help find better strategies for real-world scenarios such as resource allocation, product / service recommendations, network attack prediction and / or prevention, traffic route planning, fraud management, etc. in a more efficient way, which can be modeled or represented by the strategic interactions between the parties (e.g., an IIG involving two or more parties). In some embodiments, the described techniques can improve the convergence speed of the counterfactual regret minimization (CFR) algorithm when looking for Nash equilibrium to solve a game representing one or more real-world scenarios. In some embodiments, the described techniques can improve computational efficiency and reduce the amount of computation when the CFR algorithm looks for the best strategy for a real-world scenario modeled by an IIG, for example, when updating the action selection policy and regret value for each iteration of the CFR algorithm, by using an incremental action selection policy instead of cumulative regret or average action. In some embodiments, the described techniques save storage space and provide faster convergence. In some embodiments, the described techniques can be only half the amount of storage space required by the existing CFR algorithm, while converging to comparable results produced by the original CFR. The disclosed streaming CFR algorithm can be used for large games, even with storage limitations.
[0135] Embodiments of the described subject matter may include one or more features alone or in combination.
[0136] For example, in a first embodiment, a computer-implemented method for a software-implemented application to generate an actionable output executed in an environment, wherein the environment includes an application participant supported by the application and one or more other participants, the method using data representing an imperfect information game (IIG) to represent the environment, possible actions of the participants, and imperfect information about the other participants available to the application, wherein the application determines the actionable output by iteratively performing counterfactual regret minimization (CFR) to perform a policy search in policy interactions between the participants, wherein performing CFR includes: performing two or more iterations; and in the tth iteration, where t>1; identifying an iterative policy for the action of the participant in a state in the (t-1)th iteration, wherein the iterative policy for the action of the participant in the state in the (t-1)th iteration represents the probability that the participant takes the action in the state in the (t-1)th iteration; based on the iterative strategy of the participant's action in the state in the (t-1)th iteration, calculate the regret value of the participant's action in the state in the (t-1)th iteration; based on the regret value of the participant's action in the state in the (t-1)th iteration, but not any regret value of the participant's action in the state in any iteration before the (t-1)th iteration, calculate the incremental strategy of the participant's action in the state in the tth iteration; based on the weighted sum of the iterative strategy of the participant's action in the state in the (t-1)th iteration and the incremental strategy of the participant's action in the state in the tth iteration, calculate the iterative strategy of the participant's action in the state in the tth iteration; and store the iterative strategy of the participant's action in the state in the tth iteration.
[0137] In a second embodiment, a computer-implemented method of an execution device is provided for generating an action selection policy to complete a task in an environment including the execution device and one or more other devices, the method comprising: at each of multiple iterations and for each of multiple possible actions of the execution device in the state in the current iteration, wherein the state of the execution device is caused by a history of actions taken by the execution device, identifying an iterative action selection policy for the action of the execution device in the state in the previous iteration, wherein the iterative action selection policy for the action of the execution device in the state in the previous iteration represents a probability that the execution device took the action in the state in the previous iteration; and calculating the probability of the action of the execution device in the state in the previous iteration based on the iterative action selection policy for the action of the execution device in the state in the previous iteration. The regret value of the action of the executing device in this state represents the difference between the gain of the executing device after taking the action in this state and the gain of the executing device in this state; based on the regret value of the action of the executing device in this state in the previous iteration, but not any regret value of the action of the executing device in this state in any iteration before the previous iteration, calculate the incremental action selection policy of the action of the executing device in this state in the current iteration; based on the weighted sum of the iterative action selection policy of the executing device in this state in the previous iteration and the incremental action selection policy of the executing device in this state in the current iteration, calculate the iterative action selection policy of the action of the executing device in this state in the current iteration; and store the iterative action selection policy of the action of the executing device in this state in the current iteration.
[0138] The above and other described embodiments may each optionally include one or more of the following features:
[0139] A first feature, combinable with any of the following features, wherein the IIG represents a collaborative product service recommendation service involving a participant and a second participant, wherein the participant has limited access to information of the second participant, wherein the state of the participant includes a history of information provided by the second participant, and wherein the actions of the participant include actions in response to the history of information provided by the second participant to provide product service recommendations to customers.
[0140] The second feature, which can be combined with any of the following features, further includes: in response to determining that the convergence condition is satisfied, outputting an iterative action selection policy for the actions of the participants in the current iteration under this state.
[0141] The third feature, which can be combined with any of the following features, wherein the regret value of the participant's action in this state in the previous iteration is calculated based on the iterative action selection policy of the participant's action in this state in the previous iteration, includes: calculating the regret value of the participant's action in this state in the previous iteration based on the iterative action selection policy of the participant's action in this state in the previous iteration, rather than any regret value of the participant's action in this state in any iteration before the previous iteration.
[0142] The fourth feature is combinable with any of the following features, wherein calculating the regret value of the participant's action in this state in the previous iteration based on the iterative action selection policy of the participant's action in this state in the previous iteration includes: calculating the regret value of the participant's action in this state in the previous iteration based on the difference between the counterfactual value of the participant's action in this state and the counterfactual value of the participant's state, wherein the counterfactual value of the participant's action in this state and the counterfactual value of the participant's state are calculated by recursively traversing a game tree representing an environment including an execution device supported by the application in the previous iteration and one or more other participants.
[0143] The fifth feature is combinable with any of the following features, wherein the weighted sum of the iterative action selection policy of the participant's action in this state in the previous iteration and the incremental action selection policy of the participant's action in this state in the current iteration includes: the sum of the iterative action selection policy of the participant's action in this state in the previous iteration scaled by the first learning rate in the current iteration and the incremental action selection policy of the participant's action in this state in the current iteration scaled by the second learning rate in the current iteration, wherein the first learning rate approaches 1 when the number of iterations t approaches infinity, and the second learning rate approaches 0 when t approaches infinity.
[0144] The sixth feature is combinable with any of the following features, wherein the first learning rate is (t-1) / t, and the second learning rate is 1 / t.
[0145] A seventh feature, combinable with any of the following features, is that the incremental action selection policy for the action of the participant in the state in the current iteration is calculated based on the regret value of the action of the participant in the state in the previous iteration, rather than any regret value of the action of the participant in the state in any iteration before the previous iteration according to the following formula:
[0146]
[0147] Among them, a represents action, I i Indicates the status of the participant. Indicates the incremental action selection policy for the actions of the participants in this state in the current iteration, represents the regret value of the participant's action in this state in the previous iteration, |A(I i )| represents the total number of actions available to the participants in this state.
[0148] The eighth feature, which can be combined with any of the following features, also includes: based on a uniform random action selection policy, initializing the iterative action selection policy of the participant's actions in this state in the first iteration.
[0149] The ninth feature, which can be combined with any of the following features, further includes, in response to determining that the convergence condition is satisfied, controlling the operation of the execution device according to an iterative action selection policy for the action of the execution device in this state in the current iteration.
[0150] The embodiments of the subject matter described herein and the actions and operations can be implemented in digital electronic circuits, tangibly implemented computer software or firmware, computer hardware (including the structures disclosed herein and their structural equivalents), or a combination of one or more of them. The embodiments of the subject matter described herein can be implemented as one or more computer programs, for example, one or more computer program instruction modules, encoded on a computer program carrier, for being executed by a data processing device or controlling the operation of a data processing device. For example, a computer program carrier may include one or more computer storage media with instructions encoded thereon or stored thereon. The carrier may be a tangible non-transitory computer-readable medium, such as a magnetic disk, a magneto-optical disk or an optical disk, a solid-state drive, a random access memory (RAM), a read-only memory (ROM), or other types of media. Alternatively or additionally, the carrier may be an artificially generated propagation signal, for example, a machine-generated electrical signal, an optical signal, or an electromagnetic signal, which is generated to encode information for transmission to a suitable receiver device for execution by a data processing device. The computer storage medium may be or partly be a machine-readable storage device, a machine-readable storage substrate, a random or serial access memory device, or a combination of one or more of them. The computer storage medium is not a propagation signal.
[0151] A computer program, which may also be referred to or described as a program, software, software application, application, module, software module, engine, script or code, may be written in any form of programming language, including compiled or deductive languages, declarative or procedural languages; it may be configured in any form, including as a stand-alone program, or as a module, component, engine, subroutine or other unit suitable for execution in a computing environment, which may include one or more computers at one or more locations interconnected by a data communications network.
[0152] A computer program may, but need not, correspond to a file in a file system. A computer program may be stored in: a portion of a file that holds other programs or data, such as one or more scripts stored in a markup language document; a single file dedicated to the program in question; or multiple coordinated files, such as multiple files storing one or more modules, subroutines, or code portions.
[0153] Processors for executing computer programs include, for example, general-purpose microprocessors and special-purpose microprocessors and any one or more processors of any kind of digital computer. Typically, the processor will receive instructions and data for executing the computer program from a non-transitory computer-readable medium coupled to the processor.
[0154] The term "data processing apparatus" includes all types of apparatus, devices and machines for processing data, including, for example, a programmable processor, a computer or multiple processors or computers. The data processing apparatus may include special-purpose logic circuits, such as an FPGA (field programmable gate array), an ASIC (application-specific integrated circuit) or a GPU (graphics processing unit). In addition to hardware, the apparatus may also include code that creates an execution environment for a computer program, for example, code that constitutes processor firmware, a protocol stack, a database management system, an operating system, or a combination of one or more of them.
[0155] The processes and logic flows described herein may be performed by one or more computers or processors executing one or more computer programs to operate by operating on input data and generating output. The processes and logic flows may also be performed by a dedicated logic circuit such as an FPGA, ASIC, GPU, etc., or a combination of a dedicated logic circuit and one or more programmed computers.
[0156] Computers suitable for executing computer programs may be based on general or special purpose microprocessors, or both, or any other kind of central processing unit. Typically, the central processing unit will receive instructions and data from a read-only memory or a random access memory, or both. Elements of a computer may include a central processing unit for executing instructions and one or more memory devices for storing instructions and data. The central processing unit and the memory may be supplemented by or integrated in special purpose logic circuitry.
[0157] Typically, the computer will also include or be operably coupled to one or more storage devices to receive data from one or more storage devices or transfer data to one or more storage devices. The storage device can be, for example, a disk, a magneto-optical disk or an optical disk, a solid-state drive, or any other type of non-transient computer-readable medium. However, the computer does not need to have such a device. Therefore, the computer can be coupled to one or more storage devices, such as one or more local and / or remote memories. For example, the computer can include one or more local memories as components of the computer, or the computer can be coupled to one or more remote memories in a cloud network. In addition, the computer can be embedded in another device, such as a mobile phone, a personal digital assistant (PDA), a mobile audio or video player, a game console, a global positioning system (GPS) receiver, or a portable storage device such as a universal serial bus (USB) flash drive, to name a few.
[0158] Components may be coupled to each other by being interactively electrically or optically connected to each other, such as directly or via one or more intermediate components. Components may also be coupled to each other if one component is integrated into another component. For example, a storage component integrated into a processor (e.g., an L2 cache component) is coupled to the processor.
[0159] To provide interaction with a user, embodiments of the subject matter described herein may be implemented on or configured to communicate with a computer having: a display device, such as an LCD (liquid crystal display) monitor, for displaying information to a user; and an input device through which a user can provide input to the computer, such as a keyboard and a pointer device such as a mouse, trackball, or touchpad. Other types of devices may also be used to provide interaction with a user; for example, the feedback provided to the user may be any form of sensory feedback, such as visual feedback, auditory feedback, or tactile feedback; and any form of input from the user may be received, including sound, voice, or tactile input. In addition, a computer may interact with a user by sending documents to and receiving documents from a device used by a user; for example, by sending a web page to a web browser on a user's device in response to a request received from the web browser, or by interacting with an application (app) running on a user's device, such as a smart phone or electronic tablet. In addition, a computer may interact with a user by sending text messages or other forms of messages to a personal device (e.g., a smart phone running a messaging application) in turn and receiving a response message from the user.
[0160] The term "configured to" is used herein in relation to systems, devices, and computer program components. For a system of one or more computers configured to perform a specific operation or action, it means that the system has installed thereon software, firmware, hardware, or a combination thereof that causes the system to perform the operation or action in operation. For one or more computer programs configured to perform a specific operation or action, it means that one or more programs include instructions that, when executed by a data processing device, cause the device to perform the operation or action. For a dedicated logic circuit configured to perform a specific operation or action, it means that the circuit has electronic logic to perform the operation or action.
[0161] Although many specific implementation details are included herein, these should not be interpreted as limitations on the scope of the claims defined by the claims themselves, but rather as descriptions of specific features of specific embodiments. A plurality of specific features described herein in the context of a plurality of separate embodiments may also be implemented in combination in a single embodiment. On the contrary, the various features described in the context of a single embodiment may also be implemented in a plurality of embodiments individually or in any suitable sub-combination. In addition, although the above features may be described as acting in certain combinations and even initially claimed as such, in some cases, one or more features from the combination may be deleted from the claimed combination, and a variant directed to a sub-combination or a sub-combination may be claimed.
[0162] Similarly, although operations are depicted in the drawings and described in the claims in a particular order, this should not be understood as requiring that the operations be performed in the particular order shown or in sequence in order to achieve the desired result, or requiring that all of the operations shown be performed. In some cases, multi-tasking parallel processing may be advantageous. In addition, the division of various system modules and components in the above-described embodiments should not be understood as requiring such division in all embodiments, but it should be understood that the described program components and systems can generally be integrated together in a single software product or packaged into multiple software products.
[0163] Specific embodiments of the subject matter have been described. Other embodiments are within the scope of the following claims. For example, the actions recited in the claims can be performed in a different order and still achieve the desired results. As an example, the processes depicted in the accompanying drawings do not require the specific order or sequence shown to achieve the desired results. In some cases, multitasking and parallel processing may be advantageous.
Claims
1. A computer-implemented method for an execution device for generating an action selection policy to complete a task in an environment including the execution device and one or more other devices, the method comprising: at each of a plurality of iterations and for each of a plurality of possible actions of the execution device in a state in the current iteration, wherein the state of the execution device is caused by a history of the actions taken by the execution device, Identifying an iterative action selection policy for the action of the execution device in the state in a previous iteration, wherein the iterative action selection policy for the action of the execution device in the state in the previous iteration represents a probability that the execution device takes the action in the state in the previous iteration; calculating a regret value of the action of the execution device in the state in the previous iteration based on an iterative action selection policy of the action of the execution device in the state in the previous iteration, instead of any regret value of the action of the execution device in the state in any iteration before the previous iteration, wherein the regret value of the action of the execution device in the state represents a difference between a gain of the execution device after taking the action in the state and a gain of the execution device in the state; Calculating an incremental action selection policy for the action of the execution device at the state in the current iteration based on a regret value for the action of the execution device at the state in the previous iteration, but not any regret value for the action of the execution device at the state in any iteration before the previous iteration; Calculate an iterative action selection policy for the action of the execution device in the state in the current iteration based on a weighted sum of an iterative action selection policy for the action of the execution device in the state in the previous iteration and an incremental action selection policy for the action of the execution device in the state in the current iteration; storing an iterative action selection policy for the action of the execution device in the state in the current iteration; and In response to determining that a convergence condition is satisfied, controlling the operation of the execution device according to an iterative action selection policy for the action of the execution device in the state in the current iteration, wherein the convergence condition is based on availability of the action selection policy or based on a predetermined number of iterations; The action selection policy is used to implement device action control, product / service recommendation or traffic route planning.
2. A method according to any preceding claim, wherein Based on the iterative action selection policy of the action of the execution device in the state in the previous iteration, calculating the regret value of the action of the execution device in the state in the previous iteration includes: calculating the regret value of the action of the execution device in the state in the previous iteration based on the difference between the counterfactual value of the action of the execution device in the state and the counterfactual value of the state of the execution device, wherein the counterfactual value of the action of the execution device in the state and the counterfactual value of the state of the execution device are calculated by recursively traversing a game tree representing an environment including the execution device and one or more other devices supported by the application in the previous iteration.
3. The method according to claim 1, wherein: The weighted sum of the iterative action selection policy of the action of the execution device in the state in the previous iteration and the incremental action selection policy of the action of the execution device in the state in the current iteration includes: The sum of an iterative action selection policy of the action of the execution device in the state in the previous iteration scaled by a first learning rate in the current iteration and an incremental action selection policy of the action of the execution device in the state in the current iteration scaled by a second learning rate in the current iteration, wherein the first learning rate approaches 1 when the number of iterations t approaches infinity, and the second learning rate approaches 0 when t approaches infinity.
4. The method according to claim 3, wherein: The first learning rate is (t-1) / t, and the second learning rate is 1 / t.
5. The method according to claim 1, further comprising: An iterative action selection policy for the action of the execution device in the state is initialized in a first iteration based on a uniform random action selection policy.
6. A system for generating an action selection policy for completing a task in an environment including an execution device and one or more other devices, the system comprising: one or more processors; as well as One or more computer-readable memories, coupled to the one or more processors, and having instructions stored thereon, wherein the instructions can be executed by the one or more processors to perform the method of any one of claims 1-5.
7. An apparatus for generating an action selection policy for completing a task in an environment including an execution device and one or more other devices, the apparatus comprising a plurality of modules for executing the method according to any one of claims 1 to 5.
