Method and apparatus for determining action selection policy of execution device
Through the fast asynchronous CFR algorithm, Monte Carlo CFR and FCFV technology are used to solve the problems of computational complexity and convergence speed of the existing IIG solution method, and achieve the ability to efficiently process large-scale games in limited memory.
Patent Information
- Application Number
- CN201980040188.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2019-05-15
- Publication Date
- 2024-09-27
- Estimated Expiration
- 2039-05-15
AI Technical Summary
Existing incomplete information game (IIG) solving methods have challenges in computational complexity and convergence speed, especially when dealing with large-scale games. The original CFR algorithm requires large-capacity memory and is difficult to scale to complex large-scale IIG.
Introducing the fast asynchronous counterfactual regret minimization (CFR) algorithm, using Monte Carlo CFR and result sampling or external sampling technology to reduce storage space requirements and improve the convergence speed, and use virtual counterfactual values (FCFV) to accelerate the convergence of the CFR algorithm.
It effectively reduces the computational complexity and variance, improves the convergence speed of the CFR algorithm when solving Nash equilibrium, can handle large-scale games in limited memory, and improves the scalability of large-scale IIG.
Smart Images

Figure CN112292699B
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] 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.
[0003] 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. Summary of the invention
[0004] 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 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 one or more other devices. In some embodiments, these techniques may include executing a fast asynchronous counterfactual regret minimization (CFR) algorithm to solve an incomplete information game. In some embodiments, the technique may reduce computational complexity and variance while increasing 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 embodiments 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 2 is a diagram showing examples of an original CFR algorithm and a fast asynchronous CFR algorithm applied to a partial game tree according to embodiments of this document.
[0011] Figure 3 is a flow chart of an example of a process for performing fast asynchronous CFR to perform policy search in a policy interaction between two or more parties 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 a technique 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 strategy interaction between the execution device and one or more other devices. For example, the execution device may perform a computer-implemented method for seeking a Nash equilibrium of a game between the execution device and one or more other devices. In some embodiments, these techniques may include executing a fast asynchronous counterfactual regret minimization (CFR) algorithm to solve an incomplete information game. In some embodiments, the technique may reduce computational complexity and variance while increasing the convergence rate of the CFR algorithm.
[0016] An IIG may represent one or more real-life 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 turns out 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, plain CFR, or simply CFR) traverses the entire game tree in each iteration. Therefore, 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] 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 a possible history (or state) consisting of the hidden variables of each player and the L actions taken by the player (including chances). 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.
[0021] 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 a0a1...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 .
[0022] Figure 1100 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.
[0023] 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 movements of players in 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 h0 representing a chance. There are 19 different nodes in the first partial game tree 102, corresponding to the 9 non-terminal nodes h in the left tree. i (including opportunity h0) and 10 terminal nodes z i .
[0024] 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".
[0025] 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.
[0026] In the extended game, h i Refers to the history of actions. For example, as shown in the first partial game tree 102, h3 includes actions 0:Q 1:J and P. h7 includes actions 0:Q 1:J, P and B. h8 includes actions 0:Q 1:K, P and B. In the first partial game tree 102, That is, h3 is the premise of h7. A(h3) = {P, B} means that the set of available actions after the non-end point history h3 is P and B. P(h3) = 1 means that the player who takes the action after history h3 is player 1.
[0027] In this IIG, player 1's private cards are not visible to player 0, so h7 and h8 are effectively the same to player 0. An information set can be used to represent a collection of these indistinguishable states. Similarly, h1 and h2 are in the same information set. For the right partial game tree 104, h'3 and h'5 are in the same information set; h'4 and h'6 are in the same information set.
[0028] 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 game tree 102, the information set of h7 and h8 represents the sequence of 0: Q, P and B. Since player 0 does not distinguish between h7 and h8 in this IIG, if I0 is the information set of h7 and h8, then I0=I0(h7)=I0(h8).
[0029] 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 (h1)=I i (h2), σ i (I i )=σ i (h1)=σ i (h2), σ i (a|I i )=σ i (a|h1)=σ i(a|h2). For example, I0 is the information set of h7 and h8, then I0=I0(h7)=I0(h8), σ0(I0)=σ0(h7)=σ0(h8), σ0(a|I0)=σ0(a|h7)=σ0(a|h8). Figure 1 , the same shading (except gray shading) is used to indicate the same information set in the corresponding state.
[0030] 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:
[0031] 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
[0032] 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
[0033] 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.
[0034] 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.
[0035] For player i and strategy distribution σ, the counterfactual value (CFV) v in state h is i σ (h) can be defined as
[0036]
[0037] 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
[0038] 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
[0039] r i σ (a|h)=v i σ (a|h)-v i σ (h) (2).
[0040] 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
[0041]
[0042] in, Note that in an incomplete information game,
[0043] Then, the cumulative regret of action a after T iterations can be calculated according to formula (4):
[0044] 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):
[0045]
[0046] The average policy from iteration 1 to T It can be defined as:
[0047]
[0048] in, Indicates that at the tth iteration I i The information set arrival probability is used to adjust the corresponding current strategy Weighted.
[0049] If in iteration t is defined as an additional numerator, then the average strategy The cumulative numerator of can be defined as
[0050]
[0051] Where S 0 (a|I i )=0.
[0052] In some embodiments, the CFV in the original CFR defined in equation (1) can be rewritten as
[0053] That is, recursively perform weighted summation on the game tree from leaf nodes to the root node.
[0054] In some embodiments, in the fast asynchronous CFR, different from the CFV in the original CFR defined as in equation (9), the probability is obtained according to equation (5) After that, given the information set I i CFV can be based on probability is updated to accelerate the convergence of the CFR algorithm. For example, the fictitious counterfactual value (FCFV), Can be defined as:
[0055]
[0056] For FCFV in formula (9), use replace Right now, For use with information set I i Calculate the action a in the previous state that led to the current state In some embodiments, only counterfactual values of nodes whose child nodes are all visited may be replaced by FCFV. Figure 2 An exemplary update process of the FCFV is shown compared to the original CFV of a node in the game tree.
[0057] In some embodiments, I can be calculated, for example, according to formula (5) i Iteration strategy After that, immediately calculate FCFV as defined in formula (9) Afterwards, That is, FCFV is used as CFV. Therefore, the memory does not need to store In this way, the memory efficiency and space complexity of the fast asynchronous CFR algorithm are comparable to those of the original CFR algorithm.
[0058] 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.
[0059] For example, define Q = {Q1, Q2, ..., 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.
[0060] Figure 2200a and 200b are diagrams showing examples 200a and 200b of the original CFR algorithm and the fast asynchronous CFR algorithm respectively applied to a partial game tree according to an embodiment of the present invention. In both examples 200a and 200b, the partial game tree includes nodes 0, 1, 2, ... 7, where node 0 is the root node and nodes 6 and 7 are leaf nodes. Node i corresponds to information set i i .
[0061] Example 200a shows the CFV update process of the original CFV algorithm. In each iteration, the original CFR needs to maintain the current strategy, generate CFV using the current strategy (e.g., according to equation (1) or (9)), and use the regret matching algorithm (e.g., according to equation (5)) to calculate the current strategy for the next iteration. The weighted average of the current strategies processed in all iterations can converge to the Nash equilibrium.
[0062] Example 200b shows the FCFV update process of the fast asynchronous CFR algorithm. In some embodiments, in each iteration, the fast asynchronous CFR algorithm can traverse the entire game tree and use a bottom-up process to update the CFV of each node of the tree. For example, as shown in 200b, since node 6 and node 7 are leaf nodes, their CFVs can be considered as their respective FCFVs. In the current iteration (e.g., the (t)th iteration), for node 5, the CFV can be updated based on the strategy σ t To calculate the CFVv of node 5 t (I 5 ), for example, according to v t (I 5 )=∑ a v t (a|I 5 )σ t (a|I 5 )=v(a6|I 5 )σ t (a6|I 5 )+v(a7|I 5 )σ t (a7|I 5 ), where v t (a6|I 5 ) is the CFV of action a6 that leads to node 6 in the current iteration, and v t (a7|I 5 ) is the CFV that leads to action a7 of node 7.
[0063] Can be based on CFVv of node 5 t (I 5 ) calculates the regret value of node 5 in the current iteration. For example, the iterative regret value of action a6 in the state of node 5 in the (t)th iteration can be calculated according to r t(a6|I 5 )=v t (a6|I 5 )-v t (I 5 ). The cumulative regret of action a6 in the state of node 5 after t iterations can be calculated according to formula (4), for example
[0064] Similarly, the iterative regret value of action a7 in the state of node 5 can be calculated based on r t (a7|I 5 )=v t (a6|I 5 )-v t (I 5 ). The cumulative regret of action a7 in the state of node 5 after t iterations can be calculated according to formula (4), for example
[0065] Based on the accumulated regret value, the iteration strategy of the two actions a6 and a7 at node 5 can be calculated, for example, according to the regret matching shown in equation (5). In some embodiments, the iteration strategy of the two actions a6 and a7 at node 5 (for example, the regret matching shown in equation (5)) and ) can be expressed as f as an iteration strategy t+1 (a6|I 5 ) and f t+1 (a7|I 5 ), and can be used as the policy at node 5 for traversing the game tree in the next iteration (e.g., the (t+1)th iteration). The iterative policy can represent the probability of each of the two actions a6 and a7 at node 5 leading to nodes 6 and 7, respectively. The average policy at node 5 from iteration 1 to iteration t is It can be based on the iterative strategy f t+1 (a6|I 5 ) and f t+1 (a7|I 5 ) is calculated, for example, according to formula (6). If the convergence condition is met, the average strategy can be Output to approximate the Nash equilibrium and control the action of the participant at node 5.
[0066] FCFV of node 5 in iteration (t) It can be based on the iterative strategy f t+1 To calculate, for example, according to FCFV of Node 5 can be used to replace the CFV of node 5, for example, the CFV of action a5 that leads to node 5 at the parent node of node 5 (i.e. node 1) in the current iteration is v t (a5|I 5 ),Right now For example, the CFV for calculating the parent node of node 5 (ie, node 1) is shown in 200b.
[0067] For example, as shown in 200b, node 1 has two actions (denoted as a4 and a5) that lead to nodes 4 and 5, respectively. Since node 4 is a leaf node, the CFV of node 4 is the CFV of action a4 that leads to node 4. Accordingly, for node 1, it is possible to t To calculate the CFVv of node 1 t (I 1 ), for example, according to v t (I 1 )=∑ a v t (a|I 1 )σ t (a|I 1 )=v(a4|I 1 )σ t (a4|I 1 )+v(a5|I 1 )σ t (a5|I 1 ), where v t (a4|I 1 ) is the CFV of action a4 that leads to node 4 in the current iteration, and v t (a5|I 1 ) is the CFV that results in action a5 of node 5, which is updated to the FCFV of node 5 calculated as described above.
[0068] The iterative regret value of action a4 in the state of node 1 in the (t)th iteration can be calculated according to r t (a4|I 1 )=v t (a4|I 1 )-v t (I 1 ). The cumulative regret of action a4 in the state of node 1 after t iterations can be calculated according to formula (4), for example
[0069] Similarly, the iterative regret value of action a5 in the state of node 1 can be calculated according to r t (a5|I 1 )=v t (a5|I 1)-v t (I 1 ). The cumulative regret of action a5 in the state of node 1 after t iterations can be calculated according to formula (4), for example
[0070] Based on the regret value of node 1, the iteration strategy of the two actions a4 and a5 at node 1 in the next iteration can be calculated (expressed as f t+1 (a4|I 1 ) and f t+1 (a5|I 1 ), for example, according to the regret matching shown in equation (5). The iterative strategy can represent the probability of each of the two actions a4 and a5 at node 1 leading to nodes 4 and 5, respectively. The iterative strategy at node 1 can be used to traverse the game tree at node 1 in the next iteration (the (t+1)th iteration). The average strategy at node 1 from iteration 1 to iteration t is It can be based on the iterative strategy f t+1 (a4|I 1 ) and f t+1 (a5|I 1 ) is calculated, for example, according to formula (6). If the convergence condition is met, the average strategy can be Output to approximate the Nash equilibrium and control the action of the participant at node 1.
[0071] FCFV of Node 1 It can be based on the iteration strategy f in the next iteration t+1 To calculate, for example, according to v(a4|I 1 )f t+1 (a4|I 1 )+v(a5|I 1 )f t+1 (a5|I 1 ). FCFV of Node 1 Can be used to replace the CFV of node 1, for example, the CFV of action a1 that leads to node 1 from the parent node of node 1 (i.e. node 0) in the current iteration is v t (a1|I 0 ),Right now For example, the CFV for calculating the parent node of node 1 (ie, node 0) is shown in 200b.
[0072] The above bottom-up process for calculating the FCFV of the nodes of the game tree can continue until the root node is reached. In some embodiments, the FCFV of the nodes can be substituted for their respective CFVs to determine the action selection policy (e.g., strategy), for example, by executing the original CFR, MCCFR, or any other variant of the CFR algorithm.
[0073] Figure 3 is a flowchart of an example of a process for performing fast asynchronous counterfactual regret minimization (CFR) to determine an action selection policy for a software application according to an embodiment of the present invention. Process 300 may be the process described above with respect to Figure 2 An example of a fast asynchronous CFR algorithm.
[0074] In some embodiments, the process 300 can be performed in an iterative manner, for example, by performing two or more iterations. In some embodiments, the process 300 can be used for automatic control, robotics, or any other application involving action selection. In some embodiments, the execution device can perform the process 300 to generate an action selection policy (e.g., strategy) for completing 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 can perform the process 300 to control the operation of the execution device according to the action selection policy.
[0075] In some embodiments, the execution device may include a data processing device, such as a system consisting of one or more computers located in one or more locations and appropriately programmed according to the present invention. Figure 4 The computer system 400, suitably programmed to perform the process 300, may be associated with an executor or player. The executor or player and one or more other parties (e.g., one or more other parties associated with one or more other devices) may be participants or players in an environment, e.g., for performing a strategic search in a strategic interaction between the executor and the one or more other parties.
[0076] In some embodiments, the environment can be modeled by an incomplete information game (IIG) involving two or more players. In some embodiments, the process 300 can be performed to solve the IIG, for example, by an execution party supported by the application. 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 incomplete information about the decision of another participant. 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 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 300 may be performed to make a recommendation to a party that has limited information about a second party, using the limited information to plan a route.
[0077] At 302, in the first iteration (ie, iteration t=1), the action selection policy (eg, strategy In some embodiments, the action selection policy may include, or otherwise specify, that an execution device (e.g., an execution device executing process 300) select an action (e.g., a) from a plurality of possible actions in a current state (e.g., state i). j ) (e.g., ). The current state is caused by the previous action taken by the execution device in the previous state, and when the execution device is in the current state, each of the multiple possible actions, if executed by the execution device, will lead to the next corresponding state. In some embodiments, the state can be represented by a node of a game tree representing the environment (e.g., nodes 0 to 7 shown in 200b with corresponding information sets), and multiple possible actions under a state (e.g., node 5 shown in 200b) can include multiple actions of the state (e.g., actions a3 and a7 shown in 200b) that lead to the respective next states (e.g., nodes 3 and 7 shown in 200b). As shown in 200b, the state of the execution device (e.g., node 5) is caused by the previous action a5 taken by the execution device in the previous state (e.g., node 1), and when the execution device is in the current state (e.g., node 5), each of the multiple possible actions (e.g., actions a6 and a7) will lead to the next corresponding state (e.g., nodes 6 and 7) if executed by the execution device.
[0078] In some embodiments, for example, the policy can be initialized based on an existing policy, a uniform random policy (e.g., a policy based on a uniform probability distribution), or another policy (e.g., a policy 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 policy can be initialized based on the existing policy distribution to clone the existing regret and policy.
[0079] At 304, 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 the convergence condition is determined to be 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 300 can terminate. In large games, availability is difficult to identify, and typically, larger 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 300 can terminate after a sufficient number of iterations.
[0080] If the convergence condition is met, no more iterations are needed. Process 300 proceeds to 322 to control the operation of the execution device according to the action selection policy in the current iteration. If the convergence condition is not met, t is incremented by 1 and process 300 proceeds to the next iteration, where t>1.
[0081] In the current iteration (eg, the tth iteration), for each of the multiple possible actions of the execution device in the current state, at 305, an action selection policy (eg, strategy) for the current state in the current iteration is obtained. In some embodiments, the action selection policy (e.g., strategy) for the current state in the current iteration is obtained in the previous iteration. ), for example, according to formula (5).
[0082] At 306, the first reward corresponding to each action in the current state is obtained. In some embodiments, the first reward corresponding to each action represents the benefit brought by the action that helps complete the task. For example, the first reward for each action can be the CFV of each action. In some embodiments, obtaining the first reward corresponding to each action in the current state includes selecting an action based on the action selection policy (e.g., strategy) of the current state in the previous iteration. ) Traverse the game tree representing the environment and obtain the corresponding first reward for each action in the current state.
[0083] In some embodiments, each iteration of process 300 may include a bottom-up process for updating the first reward of a state. For example, process 300 may start from a terminal state (e.g., leaf nodes 6 and 7 shown in 200b) and move upward to an initial state (e.g., root node 0 shown in 200b). In some embodiments, for a terminal node, the corresponding first reward for each action in the terminal state may be the first reward of the terminal state (e.g., the utility function u of the terminal state z). i (z) or payoff), because the terminal state no longer has actions that lead to any next state.
[0084] At 308, based on the first rewards of the actions and the action selection policy of the current state in the current iteration, a first reward of the current state is calculated. In some embodiments, the first reward of the current state represents the benefit brought by the current state that helps complete the task. For example, the first reward of the current state can be the CFV of the current state.
[0085] In some embodiments, the first reward of the current state (e.g., a non-terminal state) is calculated based on the first rewards of each of the actions and the action selection policy of the current state in the current iteration, including calculating the first reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the current iteration, for example, according to formula (1) or formula (8).
[0086] For example, as shown in 200b, the first reward of action a6 (e.g., the CFV of action a6, v(a6|I 5)), the first reward of action a7 (e.g., the CFV of action a7, v(a7|I 5 )) and the action selection policy σ for the current state in the current iteration t (a|I 5 ), for example, the probability of selecting the action in the current iteration, to calculate the first reward of the current state (for example, CFV of node 5, v(I 5 )), for example, according to v t (I 5 )=∑ a v t (a|I 5 )σ t (a|I 5 )=v(σ6|I 5 )σ t (a6|I 5 )+v(a7|I 5 )σ t (a7|I 5 ).
[0087] At 310, a corresponding regret value of each action in a plurality of possible actions is calculated based on the difference between the corresponding first reward of the action and the first reward of the current state. In some embodiments, the regret value of an action of an execution device in a state represents the difference between the benefit or utility of the execution device after taking the action in the state and the benefit or utility of the execution device in the state (not taking the action). In some embodiments, the corresponding regret value may be referred to as an iteration regret value in the current iteration.
[0088] In some embodiments, the corresponding cumulative regret value of each action in the current state in the current iteration is calculated based on the corresponding cumulative regret value of each action in the current state in the previous iteration and the corresponding iteration regret value of each action in the current state in the current iteration, for example, according to formula (4).
[0089] For example, as shown in 200b, the iterative regret value of action a6 in the state of node 5 in the (t)th iteration can be calculated based on r t (a6|I 5 )=v t (a6|I 5 )-v t (I 5 ). The cumulative regret of action a6 in the state of node 5 after t iterations can be calculated according to formula (4), for example
[0090] Similarly, the iterative regret value of action a7 in the state of node 5 can be calculated based on r t (a7|I 5 )=vt (a6|I 5 )-v t (I 5 ). The cumulative regret of action a7 in the state of node 5 after t iterations can be calculated according to formula (4), for example
[0091] At 312, based on the corresponding cumulative regret value of each action in the current state in the current iteration, the action selection policy of the current state in the next iteration is calculated. The action selection policy of the current state in the next iteration can be used to traverse the game tree in the next iteration. In some embodiments, the iteration action selection policy of the current state in the current iteration is calculated based not only on the corresponding iteration regret value of each action in the current state in the current iteration, but also on the iteration regret value of each action in the current state in the iteration before the current iteration (for example, the corresponding cumulative regret value of each action in the current state in the previous iteration, as shown in formula (5)).
[0092] For example, as described with respect to 200b, the action selection policy for the two actions a6 and a7 at node 5 in the next iteration (eg, the (t+1)th iteration) can be expressed as f t+1 (a6|I 5 ) and f t+1 (a7|I 5 ). The policy may represent the probability of each of the two actions a6 and a7 at node 5 leading to node 6 and node 7, respectively.
[0093] At 314, a second reward for the current state is calculated based on the first rewards for each of the actions and the action selection policy for the current state in the next iteration. In some embodiments, the second reward for the current state is calculated based on the first rewards for each of the actions and the action selection policy for the current state in the next iteration, including calculating the second reward for the current state based on the sum of the first rewards for each of the actions weighted by the corresponding probabilities of selecting the action in the current state in the next iteration. In some embodiments, the second reward for the state of the execution device may be the FCFV of the state of the execution device. In some embodiments, the second reward for the state of the execution device may be calculated according to formula (9).
[0094] For example, as shown in 200b, the first reward of each action (e.g., CFVv of action a6 (a6|I 5 ), CFVv(a7|I 5 )) to calculate the second reward for the current state of the execution device (e.g., FCFV of node 5 ), for example, according to
[0095] At 316, the first reward for the previous action in the previous state that led to the current state is replaced with the second reward for the current state. In some embodiments, the first reward for the previous action in the previous state represents the first reward for the previous action taken by the execution device in the previous state, and can be used to update the first reward of the previous state based on the second reward for the current state. For example, as shown in 200b, the first reward for the previous action in the previous state that led to the current state (e.g., the CFV of action a5 at node 1 that led to node 5, v(a5|I 1 )) is updated to the second reward of the current state (e.g., FCFV of node 5, ), to represent the first reward for the previous action taken by the executing device in the previous state (e.g., the CFV of action a5 in the previous state of node 1), for example, for the second reward based on the current state (e.g., the FCFV of node 5, ) Update the first reward of the previous state (e.g., CFV of node 1, v(I 1 )), for example according to equation (1) or (8), as described with respect to 200b.
[0096] In some embodiments, replacing the first reward of the current state with the second reward of the current state can simplify the algorithm and improve storage efficiency because no additional storage space needs to be allocated to store the second reward of the state.
[0097] At 318, it is determined whether the current state is the initial state. In some embodiments, such a determination operation can be used to determine whether to continue or terminate the first reward of the state in the current iteration. In some embodiments, the initial state can be represented as the root node of the game tree (e.g., node 0 shown in 200b).
[0098] If the current state is the initial state, then the first reward does not need to be updated. Process 300 proceeds to 320. If the current state is not the initial state, the current state is replaced with the previous state of the state (e.g., the parent node of the current node, e.g., node 1 of the current node 5 as shown in 200b), and process 300 returns to 306 to obtain the corresponding first reward of each action (e.g., action a4 and action a5 as shown in 200b) of the previous state (e.g., node 1 as shown in 200b). Process 300 can be as follows Figure 3 Continue as shown.
[0099] At 320, based on the second reward of the current state (e.g., FCFV of node 5, ), determine the action selection policy for the previous state in the next iteration (for example, the action selection policy f for node 1 in the next iteration t+1 (a|I1) ). For example, as described in 200b, determining the action selection policy of the previous state in the next iteration based on the second reward of the current state includes, based on the second reward of the current state (e.g., FCFV of node 5), calculating the action selection policy of the previous state (e.g., the parent node of node 5, i.e., the node selected by the information set I) in the next iteration. 1 The probability (e.g., f) of selecting the previous action (e.g., a5) from among multiple possible actions (e.g., a4 and a5) under node 1 t+1 (a5|I 1 )). For example, the probability of selecting the previous action from multiple possible actions in the previous state in the next iteration is calculated based on the second reward of the current state (e.g., f t+1 (a5|I 1 )), including: a second reward based on the current state (e.g., FCFV of node 5, v(I 5 )) Calculate the first reward of the previous state (e.g., FCFV of node 1, v(I 1 )), for example, as described with respect to 200b, according to v(I 1 )=v(a4|I 1 )f t (a4|I 1 )+v(a5|I 1 )f t (a5|I 1 ), where v(a5|I 1 ) is the FCFV of node 5, Based on the corresponding accumulated regret value of the previous action in the previous state in the previous iteration, and the first reward of the previous action in the previous state (e.g., R t-1 (a5|I 1 )) and the difference between the first reward of the previous state, and calculate the cumulative regret value of the previous action in the previous state in the current iteration (for example, R t (a5|I 1 ), for example, according to formula (4), for example, And based on the accumulated regret value of the previous action in the previous state, the probability of selecting the previous action from multiple possible actions in the previous state is calculated, for example, according to formula (5).
[0100] At 322, in response to determining that the convergence condition is satisfied, based on the action selection policy, the action of the execution device is controlled. In some embodiments, in response to determining that the convergence condition is satisfied, the average action selection policy for all iterations (e.g., from the first iteration to the current iteration) in each state can be calculated, for example, according to equation (6). In some embodiments, the average action selection policy can be used as an output of process 300, for example, as a calculated Nash equilibrium. In some embodiments, based on the action selection policy of the previous state in the next iteration, the average action selection policy for all iterations is calculated; and controlling the action of the execution device based on the action selection policy of the previous state in the next iteration includes controlling the action of the execution device according to the average action selection policy.
[0101] For example, the action selection policy f can be based on the current state t+1 (a6|I 5 ) and f t+1 (a7|I 5 ), calculate the average action selection policy of the current state of node 5, For example, according to formula (6), the average strategy can be Output to approximate Nash equilibrium and control the action of the execution device in the current state of node 5. Similarly, the policy f can be selected based on the action in the previous state t+1 (a4|I 1 ) and f t+1 (a5|I 1 ), calculate the average action selection policy of node 1 in the previous state, for example, according to equation (6). The average policy Output to approximate Nash equilibrium and control the actions of the execution device in the previous state of node 1.
[0102] For example, the action selection policy can be output as a software-implemented application to automatically control the action of the execution device in each state, for example, by selecting the most likely action among multiple possible actions based on the action selection policy. For example, the environment includes a traffic route planning environment, the execution device supported by the application includes a computer-assisted vehicle, the action selection policy includes a route selection policy for controlling the direction of the computer-assisted vehicle, and controlling the action of the execution device according to the action selection policy includes controlling the direction of the computer-assisted vehicle according to the route selection policy.
[0103] Figure 4 Depicted is a block diagram illustrating an example of a computer-implemented system 400 for providing computing functionality associated with the described algorithms, methods, functions, processes, procedures, and programs according to embodiments herein. Figure 4400 is a block diagram illustrating an example of a computer-implemented system 400 for providing computing functions associated with the described algorithms, methods, functions, processes, procedures, and programs according to an embodiment of the present invention. In the illustrated embodiment, the system 400 includes a computer 402 and a network 430.
[0104] The computer 402 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 virtual instance of a computing device, or a combination of physical or virtual instances of a computing device. In addition, the computer 402 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 402, 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.
[0105] The computer 402 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 402 is shown communicatively coupled to a network 430. In some embodiments, one or more components of the computer 402 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.
[0106] At a high level, the computer 402 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 402 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.
[0107] Computer 402 may receive a request over network 430 (e.g., from a client software application executing on another computer 402) and respond to the received request by processing the received request using the software application or a combination of software applications. Additionally, requests may be sent to computer 402 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.
[0108] Each component of computer 402 can communicate using system bus 403. In some embodiments, any or all components of computer 402, including hardware, software, or a combination of hardware and software, can be interfaced through system bus 403 using application programming interface (API) 412, service layer 413, or a combination of API 412 and service layer 413. API 412 may include specifications for routines, data structures, and object classes. API 412 may be independent of or dependent on a computer language, and refers to a complete interface, a single function, or even a set of APIs. Service layer 413 provides software services to computer 402 or other components (whether or not shown) that are communicatively coupled to computer 402. The functions of computer 402 can be accessed by all service consumers using service layer 413. Software services, such as those provided by service layer 413, provide reusable, predefined functions through predefined interfaces. For example, the interface can be software written in a combination of computer languages that provide data in JAVA, C++, another computing language, or in an extensible markup language (XML) format, another format, or a combination of multiple formats. Although shown as an integrated component of computer 402, alternative embodiments may show API 412 or service layer 413 as a separate component in relation to other components of computer 402 or communicatively coupled to other components of computer 402 (whether shown or not). Furthermore, any or all portions of API 412 or service layer 413 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.
[0109] Computer 402 includes interface 404. Although shown as a single interface 404, two or more interfaces 404 may be used according to the specific needs, expectations, or specific embodiments of computer 402. Interface 404 is used by computer 402 to communicate with another computing system (whether or not shown) that is communicatively linked to network 430 in a distributed environment. Typically, interface 404 is operable to communicate with network 430 and includes logic encoded in software, hardware, or a combination of software and hardware. More specifically, interface 404 may include software supporting one or more communication protocols associated with communication so that network 430 or hardware of interface 404 is operable to communicate physical signals within and outside of computer 402 as shown.
[0110] The computer 402 includes a processor 405. Although shown as a single processor 405, two or more processors 405 may be used depending on the particular needs, desires, or particular embodiments of the computer 402. In general, the processor 405 executes instructions and manipulates data to perform the operations of the computer 402 and any algorithms, methods, functions, processes, procedures, and routines described in this disclosure.
[0111] Computer 402 also includes a database 406 that can store data for computer 402, data of another component (whether or not shown) that is communicatively linked to network 430, or data of a combination of computer 402 and another component. For example, database 406 can be a memory, a conventional database, or another type of database that stores storage data consistent with the present disclosure. In some embodiments, database 406 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 computer 402 and the functions described. Although shown as a single database 406, two or more databases of similar or different types can be used according to the specific needs, expectations, or specific embodiments of computer 402 and the functions described. Although database 406 is shown as an integrated component of computer 402, in alternative embodiments, database 406 can be external to computer 402. As an example, database 406 can include strategy 416 of the CFR algorithm described above.
[0112] Computer 502 also includes memory 407, which can hold data for computer 402, data of another component (whether or not shown) that is communicatively linked to network 430, or data of a combination of computer 402 and another component. Memory 407 can store any data consistent with the present disclosure. In some embodiments, memory 407 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 computer 402 and the functions described. Although shown as a single memory 407, two or more memories 407 of similar or different types can be used depending on the specific needs, expectations, or specific embodiments of computer 402 and the functions described. Although memory 407 is shown as an integrated component of computer 402, in alternative embodiments, memory 407 can be external to computer 402.
[0113] Application 408 is an algorithmic software engine that provides functionality according to the specific needs, expectations, or specific embodiments of computer 402, particularly with respect to the functionality described in this disclosure. For example, application 408 can be used as one or more components, modules, or applications. In addition, although shown as a single application 408, application 408 can be implemented as multiple applications 408 on computer 402. In addition, although shown as integrated with computer 402, in alternative embodiments, application 408 can be external to computer 402.
[0114] The computer 402 may also include a power supply 414. The power supply 414 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 414 may include power conversion or management circuitry (including charging, backup, or another power management function). In some embodiments, the power supply 414 may include a power plug to allow the computer 402 to be plugged into a wall outlet or another power source, such as to power the computer 402 or charge a rechargeable battery.
[0115] There may be any number of computers 402 associated with or external to the computer system containing computer 402, each of which communicates via network 430. In addition, the terms "client," "user," or other appropriate terms may be used interchangeably as appropriate without departing from the scope of the present disclosure. In addition, the present disclosure contemplates that many users may use one computer 402, or that one user may use multiple computers 402.
[0116] Figure 5 is an illustration of an example of a module of the apparatus 500 according to an embodiment of the present invention. In some embodiments, the apparatus 500 may perform a computer-implemented method for an execution device to generate an action selection policy to complete a task in an environment including the execution device and one or more other devices. In some embodiments, the method represents an environment, possible actions of a participant, and incomplete information about other participants available to the application using data representing an incomplete information game (IIG), wherein the application determines an actionable output by performing counterfactual regret minimization (CFR) in an iterative manner (e.g., by performing two or more iterations) to perform a strategy search in a strategy interaction between the participants.
[0117] The device 500 may correspond to the above-mentioned embodiment, and the device 500 includes the following modules: a first obtaining module 501, used for obtaining an action selection policy of a current state in a current iteration among multiple iterations, wherein the action selection policy specifies a corresponding probability of selecting an action from a plurality of possible actions in the current state, wherein the current state is caused by a previous action taken by the execution device in a previous state, and when the execution device is in the current state, each of the plurality of possible actions, if executed by the execution device, leads to the next corresponding state; a second obtaining module 502, used for obtaining a corresponding first reward for each action in the current state, wherein the corresponding first reward for each action represents the benefit brought by the action that helps to complete the task; a first calculating module 503, used for calculating the first reward of the current state based on the first rewards of the respective actions and the action selection policy of the current state in the current iteration, wherein the first reward of the current state A reward represents the benefit brought by the current state that helps complete the task; a second calculation module 504 is used to calculate the corresponding cumulative regret value of each action in the current state in the current iteration based on the corresponding cumulative regret value of each action in the previous iteration, and the difference between the corresponding first reward of the action and the first reward of the current state; a third calculation module 505 is used to calculate the action selection policy of the current state in the next iteration based on the corresponding cumulative regret value of each action in the current state in the current iteration; a fourth calculation module 506 is used to calculate the second reward of the current state based on the first rewards of each action and the action selection policy of the current state in the next iteration; a determination module 508 is used to determine the action selection policy of the previous state in the next iteration based on the second reward of the current state; and a control module 509 is used to control the action of the execution device based on the action selection policy of the previous state in the next iteration in response to determining that the convergence condition is met.
[0118] In an optional embodiment, obtaining the corresponding first reward for each action in the current state includes traversing a game tree representing the environment based on an action selection policy of the current state in a previous iteration to obtain the corresponding first reward for each action in the current state.
[0119] In an optional embodiment, the first reward of the current state is calculated based on the first rewards of each of the actions and the action selection policy of the current state in the current iteration, including calculating the first reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the current iteration.
[0120] In an optional embodiment, the second reward of the current state is calculated based on the first rewards of each of the actions and the action selection policy of the current state in the next iteration, including calculating the second reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the next iteration.
[0121] In an optional embodiment, the apparatus 500 further includes a replacement module 507 for replacing a first reward of a previous action in a previous state that leads to a current state with a second reward of the current state.
[0122] In an optional embodiment, determining the action selection policy for the previous state in the next iteration based on the second reward of the current state includes calculating the probability of selecting the previous action from multiple possible actions in the previous state in the next iteration based on the second reward of the current state.
[0123] In an optional embodiment, it also includes: in response to determining that the convergence condition is met, based on the action selection policy of the previous state in the next iteration, calculating the average action selection policy of all iterations; and, wherein, based on the action selection policy of the previous state in the next iteration, controlling the action of the execution device includes controlling the action of the execution device according to the average action selection policy.
[0124] In an optional embodiment, wherein: the environment includes a traffic route planning environment, the execution device supported by the application includes a computer-assisted vehicle, the action selection policy includes a route selection policy for controlling the direction of the computer-assisted vehicle, and the action of controlling the execution device according to the action selection policy includes controlling the direction of the computer-assisted vehicle according to the route selection policy.
[0125] 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.
[0126] 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.
[0127] 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.
[0128] Reference again Figure 5 , Figure 5 It can be interpreted as showing the internal functional modules and structure of a data processing device, which is used to generate action selection guidelines for a software-implemented application, which performs actions in an environment including an execution party supported by the application and one or more other participants. The execution subject can essentially be an electronic device, which includes the following: one or more processors and a memory configured to store executable instructions for the one or more processors.
[0129] 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 an 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 party 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.
[0130] In some embodiments, the described techniques can help find better strategies for real-world scenarios such as resource allocation, product / service recommendations, cyber-attack prediction and / or prevention, traffic route planning, fraud management, etc. in a more efficient manner, where the strategies can be modeled or represented by policy interactions between the parties (e.g., an IIG involving two or more parties).
[0131] In some embodiments, the described techniques can improve the convergence rate of a counterfactual regret minimization (CFR) algorithm when searching 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 computational effort of the CFR algorithm when searching for the best strategy for a real-world scenario modeled by an IIG, for example, by using an incremental strategy rather than a cumulative regret or average strategy when updating the strategy and regret value for each iteration of the CFR algorithm.
[0132] In some embodiments, the disclosed fast asynchronous CFR algorithm can provide faster convergence than the original CFR algorithm. For example, the fast asynchronous CFR algorithm can use FCFV to take advantage of the update increment strategy calculated based on CFV in the current iteration without waiting for the next iteration. In this way, the fast asynchronous CFR algorithm can reach convergence faster than the original CFR algorithm.
[0133] Embodiments of the described subject matter may include one or more features, either individually or in combination. For example, in a first embodiment, a computer-implemented method of an execution device for generating an action selection policy to complete a task in an environment including an execution device and one or more other devices, the method comprising, in a current iteration among multiple iterations, obtaining an action selection policy for a current state in the current iteration, wherein the action selection policy specifies a corresponding probability of selecting an action from a plurality of possible actions in the current state, wherein the current state is caused by a previous action taken by the execution device in a previous state, and when the execution device is in the current state, each of the plurality of possible actions, if executed by the execution device, will result in the next corresponding state; obtaining a corresponding first reward for each action in the current state, wherein the corresponding first reward for each action represents the benefit brought by the action that helps complete the task; based on the respective first rewards of the actions and the current state in the current iteration, an action selection policy for a state, calculate a first reward for the current state, wherein the first reward for the current state represents the benefit brought by the current state that helps complete the task; calculate a corresponding cumulative regret value for each of a plurality of possible actions in the current state in the current iteration based on a corresponding cumulative regret value for each action in the previous iteration, and a difference between the corresponding first reward for the action and the first reward for the current state; calculate an action selection policy for the current state in the next iteration based on the corresponding cumulative regret value for each action in the current state in the current iteration; calculate a second reward for the current state based on the respective first rewards for the actions and the action selection policy for the current state in the next iteration; determine an action selection policy for the previous state in the next iteration based on the second reward for the current state; and in response to determining that the convergence condition is met, control the action of the execution device based on the action selection policy for the previous state in the next iteration.
[0134] The above and other described embodiments may each optionally include one or more of the following features:
[0135] The first feature is combinable with any of the following features, wherein obtaining the corresponding first reward for each action in the current state includes traversing the game tree representing the environment by selecting an action policy for the current state in the previous iteration to obtain the corresponding first reward for each action in the current state.
[0136] The second feature is combinable with any of the following features, wherein the first reward of the current state is calculated based on the first rewards of each of the actions and the action selection policy in the current state in the current iteration, including calculating the first reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the current iteration.
[0137] The third feature is combinable with any of the following features, wherein the second reward of the current state is calculated based on the first rewards of each of the actions and the action selection policy of the current state in the next iteration, including calculating the second reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the next iteration.
[0138] A fourth feature, which can be combined with any of the following features, further includes replacing a first reward for a previous action in a previous state that led to the current state with a second reward for the current state.
[0139] A fifth feature, which can be combined with any of the following features, wherein the action selection policy for the previous state in the next iteration is determined based on the second reward of the current state, including calculating the probability of selecting the previous action from multiple possible actions in the previous state in the next iteration based on the second reward of the current state.
[0140] The sixth feature, which can be combined with any of the following features, also includes: in response to determining that the convergence condition is met, calculating the average action selection policy of all iterations based on the action selection policy of the previous state in the next iteration; and wherein, controlling the action of the execution device based on the action selection policy of the previous state in the next iteration includes controlling the action of the execution device according to the average action selection policy.
[0141] A seventh feature, which can be combined with any of the following features, wherein: the environment includes a traffic route planning environment, the execution device supported by the application includes a computer-assisted vehicle, the action selection policy includes a route selection policy for controlling the direction of the computer-assisted vehicle, and controlling the action of the execution device according to the action selection policy includes controlling the direction of the computer-assisted vehicle according to the route selection policy.
[0142] 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.
[0143] 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.
[0144] 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.
[0145] 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.
[0146] 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.
[0147] 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.
[0148] 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.
[0149] 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.
[0150] 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.
[0151] 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.
[0152] 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.
[0153] 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.
[0154] 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.
[0155] 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: obtaining, at a current iteration of the plurality of iterations, an action selection policy for a current state in the current iteration, wherein the action selection policy comprises a corresponding probability of selecting an action from a plurality of possible actions in the current state, wherein the current state is caused by a previous action taken by the execution device in a previous state, and when the execution device is in the current state, each of the plurality of possible actions, if executed by the execution device, will result in a next corresponding state; Obtaining a first reward corresponding to each action in the current state, wherein the first reward corresponding to each action represents a benefit brought by the action that helps complete the task; Calculate the first reward of the current state based on the first rewards of the actions and the action selection policy of the current state in the current iteration, wherein the first reward of the current state represents the benefit brought by the current state that helps to complete the task; Calculate the corresponding cumulative regret value of each action in the current state in the current iteration based on the corresponding cumulative regret value of each action in the previous iteration and the difference between the corresponding first reward of the action and the first reward of the current state; Calculate an action selection policy for the current state in the next iteration based on the corresponding accumulated regret value of each action in the current state in the current iteration; Calculating a second reward for the current state based on a sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the next iteration; replacing a first reward of the previous action in the previous state that led to the current state with a second reward of a node in the current state that helps complete the task; Determining an action selection policy for the previous state in the next iteration based on a second reward for the current state; and In response to determining that a convergence condition is satisfied, controlling the action of the execution device based on the action selection policy of the previous state in the next iteration, The action selection policy is used to implement device action control, product / service recommendation or traffic route planning.
2. The method according to claim 1, wherein: Obtaining a corresponding first reward for each action in the current state includes: traversing a game tree representing the environment based on an action selection policy for the current state in a previous iteration to obtain a corresponding first reward for each action in the current state.
3. The method according to claim 1, wherein: The first reward of the current state is calculated based on the first rewards of each of the actions and the action selection policy of the current state in the current iteration, including: calculating the first reward of the current state based on the sum of the first rewards of each of the actions weighted by the corresponding probability of selecting the action in the current state in the current iteration.
4. The method according to claim 1, wherein: Determining an action selection policy for the previous state in the next iteration based on the second reward of the current state includes: calculating a probability of selecting the previous action from the multiple possible actions in the previous state in the next iteration based on the second reward of the current state.
5. The method according to claim 1, further comprising: In response to determining that a convergence condition is satisfied, calculating an average action selection policy for all iterations based on the action selection policy of the previous state in the next iteration; as well as Wherein, controlling the action of the execution device based on the action selection policy of the previous state in the next iteration includes controlling the action of the execution device according to the average action selection policy.
6. The method according to claim 1, wherein: The environment includes a traffic route planning environment, The execution devices supported by the application include computer-assisted vehicles, The action selection policy includes a routing policy for controlling the direction of the computer-assisted vehicle, and Controlling the actions of the actuator device according to the action selection policy includes controlling the direction of the computer-assisted vehicle according to the routing policy.
7. A system for executing a software-implemented application, the system for generating an action selection policy for the software-implemented application, the software-implemented application executing actions in an environment including an execution device supported by the application 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 to 6.
8. An apparatus for generating action selection guidelines for a software-implemented application, wherein the software-implemented application is used to perform actions in an environment including an execution device supported by the application and one or more other devices, the apparatus comprising multiple modules for performing the method of any one of claims 1 to 6.
Citation Information
Patent Citations
Method for calculating optimum response strategy in imperfect information extensive game
CN103559363A
Access control method based on dynamic game
CN103618731A
Risk and benefit equilibrium least regretness evaluation method in incomplete information game
CN106296006A
Discretized exploration method of high-dimensional continuous action space in reinforcement learning task
CN108288097A
Multi-person information asymmetric game decision-making generation system
CN108446801A
