C ONVEX R EGULARIZATION IN M ONTE -C ARLO T REE S EARCH
Anonymous authors
Paper under double-blind review
A BSTRACT
Monte-Carlo planning and Reinforcement Learning (RL) are essential to sequential decision making.
The recent AlphaGo and AlphaZero algorithms have shown how to successfully combine these two paradigms to solve large scale sequential decision problems.
These methodologies exploit a variant of the well-known UCT algorithm to trade off the exploitation of good actions and the exploration of unvisited states, but their empirical success comes at the cost of poor sample-efﬁciency and high computation time.
In this paper, we overcome these limitations by studying the beneﬁt of convex regularization in Monte-Carlo Tree Search (MCTS) to drive exploration efﬁciently and to improve policy updates, as already observed in
RL.
First, we introduce a unifying theory on the use of generic convex regularizers in MCTS, deriving the ﬁrst regret analysis of regularized MCTS and showing that it guarantees an exponential convergence rate.
Second, we exploit our theoretical framework to introduce novel regularized backup operators for MCTS, based on the relative entropy of the policy update and on the Tsallis entropy of the policy. We provide an intuitive demonstration of the effect of each regularizer empirically verifying the consequence of our theoretical results on a toy problem.
Finally, we show how our framework can easily be incorporated in AlphaGo and AlphaZero, and we empirically show the superiority of convex regularization w.r.t.
representative baselines, on well-known RL problems across several Atari games.
I NTRODUCTION
Monte-Carlo Tree Search (MCTS) is a well-known algorithm to solve decision-making problems through the combination of Monte-Carlo planning with an incremental tree structure (Coulom, 2006).
Although standard MCTS is only suitable for problems with discrete state and action spaces, recent advances have shown how to enable MCTS in continuous problems (Silver et al., 2016; Yee et al., 2016).
Most remarkably, AlphaGo (Silver et al., 2016) and AlphaZero (Silver et al., 2017b;a) couple MCTS with neural networks trained using Reinforcement Learning (RL) (Sutton & Barto, 1998) methods, e.g., Deep Q -Learning (Mnih et al., 2015), to speed up learning of large scale problems with continuous state space.
In particular, a neural network is used to compute value function estimates of states as a replacement of time-consuming Monte-Carlo rollouts, and another neural network is used to estimate policies as a probability prior for the therein introduced PUCT action selection method, a variant of well-known UCT sampling strategy commonly used in MCTS for exploration (Kocsis et al., 2006).
Despite AlphaGo and AlphaZero achieving state-of-the-art performance in games with high branching factor like Go (Silver et al., 2016) and Chess (Silver et al., 2017a), both methods suffer from poor sample-efﬁciency, mostly due to the polynomial convergence rate of PUCT (Xiao et al., 2019).
This problem, combined with the high computational time to evaluate the deep neural networks, signiﬁcantly hinder the applicability of both methodologies.
In this paper, we provide a uniﬁed theory of the use of convex regularization in MCTS, which proved to be an efﬁcient solution for driving exploration and stabilizing learning in RL (Schulman et al., 2015; 2017a; Haarnoja et al., 2018).
In particular, we show how a regularized objective function in
MCTS can be seen as an instance of the Legendre-Fenchel transform, similar to previous ﬁndings on the use of duality in RL (Mensch & Blondel, 2018; Geist et al., 2019; Nachum & Dai, 2020) and game theory (Shalev-Shwartz & Singer, 2006; Pavel, 2007).
Establishing our theoretical framework, we can derive the ﬁrst regret analysis of regularized MCTS, and prove that a generic convex regularizer guarantees an exponential convergence rate to the solution of the regularized objective function, which improves on the polynomial rate of PUCT.
These results provide a theoretical ground for the use of arbitrary entropy-based regularizers in MCTS until now limited to maximum entropy (Xiao et al., 2019), among which we speciﬁcally study the relative entropy of policy updates, drawing on similarities with trust-region and proximal methods in RL (Schulman et al., 2015; 2017b), and the Tsallis entropy, used for enforcing the learning of sparse policies (Lee et al., 2018).
Moreover, we provide an empirical analysis of the toy problem introduced in Xiao et al. (2019) to intuitively evince the practical consequences of our theoretical results for each regularizer. Finally, we empirically evaluate the proposed operators in AlphaGo and AlphaZero on problems of increasing complexity, from classic RL problems to an extensive analysis of Atari games, conﬁrming the beneﬁt of our novel operators compared to maximum entropy and, in general, the superiority of convex regularization in MCTS w.r.t.
classic methods.
P RELIMINARIES 2. M ARKOV D ECISION P ROCESSES
We consider the classical deﬁnition of a ﬁnite-horizon Markov Decision Process (MDP) as a 5tuple M =
(cid:104)S , A , R , P , γ (cid:105) , where S is the state space, A is the ﬁnite discrete action space,
R : S × A × S → R is the reward function, P : S ×
A → S is the transition kernel, and γ ∈ [0 , 1) is the discount factor.
A policy π ∈ Π : S ×
A → R is a probability distribution of the event of executing an action a in a state s .
A policy π induces a value function corresponding to the expected cumulative discounted reward collected by the agent when executing action a in state s , and following the policy π thereafter: Q π ( s, a[-) (cid:44) E (cid:2)(cid:80) ∞ k =
 γ k r i + k +
-]
[Equation]
where r i +1 is the reward obtained after the i -th transition.
An MDP is solved ﬁnding the optimal policy π ∗ , which is the policy that maximizes the expected cumulative discounted reward.
The optimal policy corresponds to the one satisfying the optimal Bellman equation (Bellman, 1954) Q [Equation] ( s, a )
[Equation]
S P ( s [Equation] s, a ) [ R [Equation]
s, a, s [Equation] + γ max a [Equation]
Q ∗
[Equation]
s
[Equation]
, a (cid:48) )] ds (cid:48) , and is the ﬁxed point of the optimal Bellman operator T ∗ Q ( s, a ) (cid:44) (cid:82) S P [Equation] s [Equation]
s,
[Equation]
[Equation] s [Equation] γ max
[Equation]
a (cid:48) )] ds [Equation] Additionally, we deﬁne the Bellman operator under the policy π as T π Q ( s, a ) (cid:44) (cid:82) S P ( s (cid:48) | s, a ) (cid:2) R ( s, a, s (cid:48) )
+ γ (cid:82)
A π ( a (cid:48) | s (cid:48) )
Q ( s (cid:48) , a (cid:48) )
da (cid:48) (cid:3) ds (cid:48) , the optimal value function V ∗ ( s ) (cid:44) max a ∈A Q ∗ ( s, a ) , and the value function under the policy π as V π ( s ) (cid:44) max a ∈A Q π ( s, a ) .
2. M ONTE -C ARLO T REE S EARCH AND U PPER C ONFIDENCE BOUNDS FOR T REES
Monte-Carlo Tree Search (MCTS) is a planning strategy based on a combination of Monte-Carlo sampling and tree search to solve MDPs.
MCTS builds a tree where the nodes are the visited states of the MDP, and the edges are the actions executed in each state.
MCTS converges to the optimal policy (Kocsis et al., 2006; Xiao et al., 2019), iterating over a loop composed of four steps:
Selection: starting from the root node, a tree-policy is executed to navigate the tree until a node with unvisited children, i
e. expandable node, is reached; 2.
Expansion: the reached node is expanded according to the tree policy; 3.
Simulation: run a rollout, e.g. Monte-Carlo simulation, from the visited child of the current node to the end of the episode; 4.
Backup: use the collected reward to update the action-values Q ( · ) of the nodes visited in the trajectory from the root node to the expanded node.
The tree-policy used to select the action to execute in each node needs to balance the use of already known good actions, and the visitation of unknown states.
The Upper Conﬁdence bounds for Trees (UCT) sampling strategy (Kocsis et al., 2006) extends the use of the well-known UCB sampling strategy for multi-armed bandits (Auer et al., 2002), to MCTS.
Considering each node corresponding to a state s ∈ S as a different bandit problem, UCT selects an action a ∈
A applying an upper bound to the action-value function
[Equation]
where N ( s, a ) is the number of executions of action a in state s , N ( s )
= (cid:80) a N ( s, a ) , and (cid:15) is a constant parameter to tune exploration.
UCT asymptotically converges to the optimal action-value function Q ∗ , for all states and actions, with the probability of executing a suboptimal action at the root node approaching 0 with a polynomial rate O ( 1 t ) , for a simulation budget t (Kocsis et al., 2006;
Xiao et al., 2019).
R EGULARIZED M ONTE -C ARLO T REE S EARCH
The success of RL methods based on entropy regularization comes from their ability to achieve state-of-the-art performance in decision making and control problems, while enjoying theoretical guarantees and ease of implementation (Haarnoja et al., 2018; Schulman et al., 2015; Lee et al., 2018).
However, the use of entropy regularization is MCTS is still mostly unexplored, although its advantageous exploration and value function estimation would be desirable to reduce the detrimental effect of high-branching factor in AlphaGo and AlphaZero.
To the best of our knowledge, the
MENTS algorithm (Xiao et al., 2019) is the ﬁrst and only method to combine MCTS and entropy regularization.
In particular, MENTS uses a maximum entropy regularizer in AlphaGo, proving an exponential convergence rate to the solution of the respective softmax objective function and achieving state-of-the-art performance in some Atari games (Bellemare et al., 2013).
In the following, motivated by the success in RL and the promising results of MENTS, we derive a uniﬁed theory of regularization in MCTS based on the Legendre-Fenchel transform (Geist et al., 2019), that generalizes the use of maximum entropy of MENTS to an arbitrary convex regularizer.
Notably, our theoretical framework enables to rigorously motivate the advantages of using maximum entropy and other entropy-based regularizers, such as relative entropy or Tsallis entropy, drawing connections with their RL counterparts TRPO (Schulman et al., 2015) and Sparse DQN (Lee et al., 2018), as
MENTS does with Soft Actor-Critic (SAC) (Haarnoja et al., 2018).
3. L EGENDRE -F ENCHEL TRANSFORM
Consider an MDP M =
(cid:104)S , A , R , P , γ (cid:105) , as previously deﬁned.
Let Ω : Π → R be a strongly convex function.
For a policy π s = π ( ·| s ) and Q s = Q ( s
, · ) ∈ R A , the Legendre-Fenchel transform (or convex conjugate) of Ω is Ω ∗ : R A
→ R , deﬁned as:
[Equation]
where the temperature τ speciﬁes the strength of regularization.
Among the several properties of the
Legendre-Fenchel transform, we use the following (Mensch & Blondel, 2018; Geist et al., 2019).
Proposition 1 Let Ω be strongly convex.
• Unique maximizing argument: ∇ Ω ∗ is Lipschitz and satisﬁes
[Equation]
• Boundedness: if there are constants L Ω and U Ω such that for all π s ∈ Π s , we have L Ω ≤ Ω( π s )
≤ U Ω , then
[Equation]
• Contraction: for any Q 1 , Q 2 ∈ R S×A
[Equation]
Ω ∗ ( Q 1 ) − Ω ∗ ( Q 2 ) (cid:107) ∞ ≤ γ (cid:107) Q 1 − Q 2 (cid:107) ∞ . [Equation] Although the Legendre-Fenchel transform Ω ∗ applies to every strongly convex function, for the purpose of this work we only consider a representative set of entropic regularizers.
3. R
POLICY
In MCTS, each node of the tree represents a state s ∈ S and contains a visitation count
N ( s, a ) .
Given a trajectory, we deﬁne n ( s T ) as the leaf node corresponding to the reached state s T .
Let s 0 , a 0 , s 1 , a 1 ..., s T be the state action trajectory in a simulation, where n ( s T ) is a leaf node of T .
Whenever a node n ( s T ) is expanded, the respective action values (Equation 6) are initialized as
Q Ω ( s T , a ) = 0 , and N ( s T , a ) = 0 for all a ∈ A .
For all nodes in the trajectory, the visitation count is updated by N ( s t , a t ) =
N ( s t , a t ) + 1 , and the action-values by
[Equation]
where Q Ω ( s t +1 ) ∈
R A with components Q Ω ( s t +1 , a ) , ∀ a ∈ A , and ρ is an estimate returned from an evaluation function computed in s T , e.g. a discounted cumulative reward averaged over multiple rollouts, or the value-function of node n ( s T +1 ) returned by a value-function approximator, e.g. a neural network pretrained with deep Q -learning
(Mnih et al., 2015), as done in (Silver et al., 2016;
Xiao et al., 2019).
We revisit the E2W sampling strategy limited to maximum entropy regularization (Xiao et al., 2019) and, through the use of the convex conjugate in Equation (6), we derive a novel sampling strategy that generalizes to any convex regularizer
[Equation]
where λ s t = (cid:15) |A| / log( (cid:80) a N ( s t ,a )+1) with (cid:15) > 0 as an exploration parameter, and ∇ Ω ∗ depends on the measure in use (see Table 1 for maximum, relative, and Tsallis entropy).
We call this sampling strategy Extended Empirical Exponential Weight (E3W) to highlight the extension of E2W from maximum entropy to a generic convex regularizer.
3. C ONVERGENCE RATE TO REGULARIZED OBJECTIVE
We show that the regularized value V Ω can be effectively estimated at the root state s ∈ S , with the assumption that each node in the tree has a σ 2 -subgaussian distribution.
This result extends the analysis provided in (Xiao et al., 2019), which is limited to the use of maximum entropy.
Theorem 1 At the root node s where N ( s ) is the number of visitations, with (cid:15) > 0 , V Ω ( s ) is the estimated value, with constant C and ˆ C , we have
[Equation]
where V Ω ( s ) =
Ω ∗ ( Q s ) and V ∗ Ω ( s ) =
Ω ∗ ( Q ∗ s ) .
From this theorem, we obtain that the convergence rate of choosing the best action a ∗ at the root node, when using the E3W strategy, is exponential.
Theorem 2 Let a t be the action returned by E3W at step t .
For large enough t and constants C, ˆ C
[Equation]
E NTROPY - REGULARIZATION BACKUP OPERATORS
From the introduction of a uniﬁed view of generic strongly convex regularizers as backup operators in MCTS, we narrow the analysis to entropy-based regularizers.
For each entropy function, Tableshows the Legendre-Fenchel transform and the maximizing argument, which can be respectively replaced in our backup operation (Equation 6) and sampling strategy E3W (Equation 7).
Using maximum entropy retrieves the maximum entropy MCTS problem introduced in the MENTS algorithm (Xiao et al., 2019).
This approach closely resembles the maximum entropy RL framework used to encourage exploration (Haarnoja et al., 2018; Schulman et al., 2017a).
We introduce two novel MCTS algorithms based on the minimization of relative entropy of the policy update, inspired by trust-region (Schulman et al., 2015) and proximal optimization methods (Schulman et al., 2017b) in RL, and on the maximization of Tsallis entropy, which has been more recently introduced in RL as an effective solution to enforce the learning of sparse policies (Lee et al., 2018).
We call these algorithms RENTS and TENTS.
Contrary to maximum and relative entropy, the deﬁnition of the
Legendre-Fenchel and maximizing argument of Tsallis entropy is non-trivial, being
[Equation]
where spmax is deﬁned for any function f : S ×
A → R as
[Equation]
and K is the set of actions that satisfy 1 + if ( s, a i ) > (cid:80) ij =1 f ( s, a j ) , with a i indicating the action with the i -th largest value of f ( s, a ) (Lee et al., 2018). [Table] [Equation]
Equation
[Equation]
Equation (11) 4. R EGRET ANALYSIS
At the root node, let each children node i be assigned with a random variable X i , with mean value
V i , while the quantities related to the optimal branch are denoted by ∗ , e.g. mean value V ∗ .
At each timestep n , the mean value of variable X i is V i n .
The pseudo-regret (Coquelin & Munos, 2007) at the root node, at timestep n , is deﬁned as R UCT n = nV ∗ − (cid:80) nt =1 V i t .
Similarly, we deﬁne the regret of E3W at the root node of the tree as
[Equation]
where ˆ π t ( · ) is the policy at time step t , and I ( · ) is the indicator function. Theorem 3 Let κ i = ∇ Ω ∗ ( a i | s ) + Lp (cid:113) ˆ
Cσ 2 log
Cδ / 2 n , and χ i = ∇ Ω ∗ ( a i | s ) − Lp (cid:113) ˆ
Cσ 2 log
Cδ / 2 n , where ∇ Ω ∗ ( .
| s ) is the policy with respect to the mean value vector V ( · ) at the root node s .
For any δ > 0 , with probability at least 1 − δ , ∃ constant L, p, C, ˆ C so that the pseudo regret R n satisﬁes
[Equation]
This theorem provides bounds for the regret of E3W using a generic convex regularizer Ω ; thus, we can easily retrieve from it the regret bound for each entropy regularizer.
Let m =
min a ∇ Ω ∗ ( a | s ) .
Corollary 1 Maximum entropy:
[Equation]
Corollary 2 Relative entropy:
[Equation]
Corollary 3 Tsallis entropy:
[Equation]
Remarks.
The regret bound of UCT and its variance have already been analyzed for nonregularized MCTS with binary tree (Coquelin & Munos, 2007).
On the contrary, our regret bound analysis in Theorem 3 applies to generic regularized MCTS.
From the specialized bounds in the corollaries, we observe that the maximum and relative entropy share similar results, although the bounds for relative entropy are slightly smaller due to 1 m .
Remarkably, the bounds for Tsallis entropy become tighter for increasing number of actions, which translates in limited regret in problems with high branching factor.
This result establishes the advantage of Tsallis entropy in complex problems w.r.t.
to other entropy regularizers, as empirically conﬁrmed by the positive results in several
Atari games described in Section 5.
4. E RROR ANALYSIS
We analyse the error of the regularized value estimate at the root node n ( s ) w.r.t.
the optimal value: ε Ω = V Ω ( s ) − V ∗ ( s ) .
Theorem 4 For any δ > 0 and generic convex regularizer Ω , with some constant C, ˆ C , with probability at least 1 − δ , ε Ω satisﬁes
[Equation]
To give a better understanding of the effect of each entropy regularizer in Table 1, we specialize the bound in Equation 14 to each of them.
From (Lee et al., 2018), we know that for maximum entropy Ω( π t ) =
(cid:80) a π t log π t , we have − log |A| ≤ Ω( π t ) ≤ 0 ; for relative entropy Ω( π t ) =
KL ( π t ||
π t − 1 ) , if we deﬁne m = min a π t − 1 ( a | s ) , then we can derive 0 ≤ Ω( π t ) ≤ − log |A| + log 1 m ; and for Tsallis entropy Ω( π t )
= 12 ( (cid:107) π t (cid:107) 22 − 1) , we have − |A|− 1 2 |A| ≤ Ω( π t ) ≤ 0 .
Then,
Corollary 4 maximum entropy error: − [Equation] Cσ
[Equation]
Corollary 5 relative entropy error: −
[Equation]
Corollary 6 Tsallis entropy error: −
[Equation]
These results show that when the number of actions |A| is large, TENTS enjoys the smallest error; moreover, we also see that lower bound of RENTS is always smaller than for MENTS.  E MPIRICAL EVALUATION In this section, we empirically evaluate the beneﬁt of the proposed entropy-based MCTS regularizers.
First, we complement our theoretical analysis with an empirical study of the synthetic tree toy problem introduced in Xiao et al.
(2019), which serves as a simple scenario to give an interpretable demonstration of the effects of our theoretical results in practice.
Second, we compare to
AlphaGo and AlphaZero (Silver et al., 2016; 2017a), recently introduced to enable MCTS to solve large scale problems with high branching factor.
Our implementation is a simpliﬁed version of the original algorithms, where we remove various tricks in favor of better interpretability.
For the same reason, we do not compare with the most recent and state-of-the-art variant of AlphaZero known as
MuZero (Schrittwieser et al., 2019), as this is a slightly different solution highly tuned to maximize performance, and a detailed description of its implementation is not available.
5. S YNTHETIC TREE
This toy problem is introduced in Xiao et al.
(2019) to highlight the improvement of MENTS over
UCT.
It consists of a tree with branching factor k and depth d .
Each edge of the tree is assigned
[Figure]
[Figure]
{+UCT 1 2 3 
+}
{+MENTS 1 2 3 
+}
{+RENTS 1 2 3 
+}
TENTS 0.
{+UCT (b) 1 2 3 
+}
{+UCT 1 2 3 
+}
{+MENTS 1 2 3 
+}
{+RENTS 1 2 3 
+}
TENTS
R
[Figure]
the respective optimal value (a), and w.r.t.
the optimal value of UCT (b); regret at the root node (c).
a random value between 0 and 1 .
At each leaf, a Gaussian distribution is used as an evaluation function resembling the return of random rollouts.
The mean of the Gaussian distribution is the sum of the values assigned to the edges connecting the root node to the considered leaf, while the standard deviation is σ = 0 .
For stability, all the means are normalized between 0 and 1 .
As in Xiao et al.
(2019), we create 5 trees on which we perform 5 different runs in each, resulting inexperiments, for all the combinations of branching factor k = { 2 , 4 , 6 , 8 , 10 , 12 , 14 , 16 } and depth d = { 1 , 2 , 3 , 4 , 5 } , computing: (i) the value estimation error at the root node w.r.t.
the regularized optimal value: ε Ω = V Ω − V ∗ ; (ii) the value estimation error at the root node w.r.t.
the unregularized optimal value: ε UCT = V Ω − V ∗ UCT ; (iii) the regret R as in Equation (13).
For a fair comparison, we use ﬁxed τ = 0 .
1 and (cid:15) = 0 .
1 across all algorithms.
Figure 1 and 2 show how UCT and each regularizer behave for different conﬁgurations of the tree.
We observe that, while RENTS and MENTS converge slower for increasing tree sizes, TENTS is robust w.r.t. the size of the tree and almost always converges faster than all other methods to the respective optimal value. Notably, the optimal value of TENTS seems to be very close to the one of UCT, i.e. the optimal value of the
[Figure] unregularized objective, and also converges faster than the one estimated by UCT, while MENTS and RENTS are considerably further from this value.
In terms of regret, UCT explores less than the regularized methods and it is less prone to high regret, at the cost of slower convergence time.
Nevertheless, the regret of TENTS is the smallest between the ones of the other regularizers, which seem to explore too much. These results show a general superiority of TENTS in this toy problem, also conﬁrming our theoretical ﬁndings about the advantage of TENTS in terms of approximation error (Corollary 6) and regret (Corollary 3), in problems with many actions.
5. E NTROPY - REGULARIZED A LPHA Z ERO
In its standard form, AlphaZero (Silver et al., 2017a) uses the PUCT sampling strategy, a variant of
UCT (Kocsis et al., 2006) that samples actions according to the policy
[Equation]
where P is a prior probability on action selection, and (cid:15) is an exploration constant.
A value network and a policy network are used to compute, respectively, the action-value function Q and the prior policy P .
We use a single neural network, with 2 hidden layers composed of 128 ELU units, and two output layer respectively for the action-value function and the policy.
We run 500 AlphaZero episodes, where each episode is composed of 300 steps.
A step consists of running 32 MCTS simulations from the root node, as deﬁned in Section 2, using the action-value function computed by the value network instead of using Monte-Carlo rollouts.
At the end of each cycle, the average action-value of the root node is computed and stored, the tree is expanded using the given sampling strategy, and the root node is updated with the reached node.
At the end of the episode, a minibatch of 32 samples is built from the 300 stored action-values, and the network is trained with one step of gradient descent using RMSProp with learning rate 0 .
The entropy-regularized variants of
AlphaZero can be simply derived replacing the average backup operator, with the desired entropy function, and replacing PUCT with E3W using the respective maximizing argument and (cid:15)
= 0 .
Cartpole and Acrobot.
Figure 3 shows the cumulative reward of standard AlphaZero based on
PUCT, and the three entropy-regularized variants, on the Cartpole and Acrobot discrete control problems (Brockman et al., 2016).
While standard AlphaZero clearly lacks good convergence and stability, the entropy-based variants behave differently according to the problem.
First, although not signiﬁcantly superior, RENTS exhibits the most stable learning and faster convergence, conﬁrming the beneﬁt of relative entropy in control problems as already known for trust-region methods in RL (Schulman et al., 2015).
Second, considering the small number of discrete actions in the problems, TENTS cannot beneﬁt from the learning of sparse policies and shows slightly unstable learning in Cartpole, even though the overall performance is satisfying in both problems.
Last,
MENTS solves the problems slightly slower than RENTS, but reaches the same ﬁnal performance.
Although the results on these simple problems are not conclusive to assert the superiority of one method over the other, they deﬁnitely conﬁrm the advantage of regularization in MCTS, and hint at the beneﬁt of the use of relative entropy in control problems. Further analysis on more [Table]
control problems will be desirable (e [Table] g. MuJoCo (Todorov et al., 2012)) [Table]
but the need to account for continuous actions, a non-trivial setting for MCTS [Table] makes it out of the scope of this paper [Table]
5. E NTROPY - REGULARIZED A LPHA G O
The learning time of AlphaZero can be slow in problems with high branching factor, due to the need of a large number of MCTS simulations for obtaining good estimates of the randomly initialized action-values. To overcome this problem, AlphaGo (Silver et al., 2016) initializes the action-values using the values retrieved from a pretrained network, which is kept ﬁxed during the training. Atari.
Atari 2600 (Bellemare et al., 2013) is a popular benchmark for testing deep RL methodologies (Mnih et al., 2015; Van Hasselt et al., 2016;
Bellemare et al., 2017) but still relatively disregarded in MCTS.
We use a Deep Q -Network, pretrained using the same experimental setting of Mnih et al.
, to initialize the action-value function of each node after expansion as
Q init ( s, a ) =
( Q ( s, a ) − V ( s )) /τ , for MENTS and TENTS, as done in Xiao et al.
For
RENTS we init Q init ( s, a ) = log P prior ( a | s ))
+ ( Q ( s, a ) − V ( s )) /τ , where P prior is the Boltzmann distribution induced by action-values Q ( s, . )
computed from the network.
Each experimental run consists of 512 MCTS simulations.
The temperature τ is optimized for each algorithm and game via grid-search between 0 . 01 and 1 .
The discount factor is γ = 0 . 99 , and for PUCT the exploration constant is c = 0 .
Table 2 shows the performance, in terms of cumulative reward, of standard AlphaGo with PUCT and our three regularized versions, on 22 Atari games. Moreover, we test also AlphaGo using the MaxMCTS backup (Khandelwal et al., 2016) for further comparison with classic baselines.
We observe that regularized MCTS dominates other baselines, in particular TENTS achieves the highest scores in all the 22 games, showing that sparse policies are more effective in
Atari.
This can be explained by Corollary 6 which shows that Tsallis entropy can lead to a lower error at the root node even with a high number of actions compared to relative or maximum entropy.
C ONCLUSION
We introduced a theory of convex regularization in Monte-Carlo Tree Search (MCTS) based on the Legendre-Fenchel transform.
Exploiting this theoretical framework, we studied the regret of
MCTS when using a generic strongly convex regularizer, and we proved that it has an exponential convergence rate.
We use these results to motivate the use of entropy regularization in MCTS, particularly considering maximum, relative, and Tsallis entropy. Finally, we test regularized MCTS algorithms in discrete control problems and Atari games, showing its advantages over other methods. A R ELATED W ORK Entropy regularization is a common tool for controlling exploration in Reinforcement Learning (RL) and has lead to several successful methods (Schulman et al., 2015;
Haarnoja et al., 2018; Schulman et al., 2017a; Mnih et al., 2016).
Typically speciﬁc forms of entropy are utilized such as maximum entropy (Haarnoja et al., 2018) or relative entropy (Schulman et al., 2015).
This approach is an instance of the more generic duality framework, commonly used in convex optimization theory.
Duality has been extensively studied in game theory (Shalev-Shwartz & Singer, 2006; Pavel, 2007) and more recently in RL, for instance considering mirror descent optimization (Montgomery & Levine, 2016; Mei et al., 2019) or formalizing the RL objective via Legendre-Rockafellar duality (Nachum & Dai, 2020).
Recently (Geist et al., 2019) introduced regularized Markov Decision
Processes, formalizing the RL objective with a generalized form of convex regularization, based on the Legendre-Fenchel transform.
In this paper, we provide a novel study of convex regularization in MCTS, and derive relative entropy (KL-divergence) and Tsallis entropy regularized MCTS algorithms, i.e. RENTS and TENTS respectively.
Note that the recent maximum entropy MCTS algorithm MENTS (Xiao et al., 2019) is a special case of our generalized regularized MCTS. Unlike MENTS, RENTS can take advantage of any action distribution prior, in the experiments the prior is derived using Deep Q -learning (Mnih et al., 2015).
On the other hand, TENTS allows for sparse action exploration and thus higher dimensional action spaces compared to MENTS.
In experiments, both RENTS and TENTS outperform MENTS.
Several works focus on modifying classical MCTS to improve exploration. UCB1-tuned (Auer et al., 2002) modiﬁes the upper conﬁdence bound of UCB1 to account for variance in order to improve exploration. (Tesauro et al., 2012) proposes a Bayesian version of UCT, which obtains better estimates of node values and uncertainties given limited experience. Many heuristic approaches based on speciﬁc domain knowledge have been proposed, such as adding a bonus term to value estimates (Gelly & Wang, 2006; Teytaud & Teytaud, 2010; Childs et al., 2008; Kozelek, 2009; Chaslot et al., 2008) or prior knowledge collected during policy search (Gelly & Silver, 2007; Helmbold & Parker-Wood, 2009; Lorentz, 2010; Tom, 2010; Hoock et al., 2010).
(Khandelwal et al., 2016) formalizes and analyzes different on-policy and off-policy complex backup approaches for MCTS planning based on RL techniques.
(Vodopivec et al., 2017) proposes an approach called SARSAUCT, which performs the dynamic programming backups using SARSA (Rummery, 1995).
Both (Khandelwal et al., 2016) and (Vodopivec et al., 2017) directly borrow value backup ideas from RL to estimate the value at each tree node, but they do not provide any proof of convergence.
B P ROOFS
Let ˆ r and r be respectively the average and the the expected reward at the leaf node, and the reward distribution at the leaf node be σ 2 -sub-Gaussian.
{+Lemma 
+}
For the stochastic bandit problem E3W guarantees that, for t ≥ 4 ,
[Equation]
Proof 1 Let us deﬁne N t ( a ) as the number of times action a have been chosen until time t , and ˆ N t ( a ) =
[Equation]
ts =1 π s ( a ) , where π s ( a ) is the E3W policy at time step s .
By choosing λ s =
[Equation]
, it follows that for all a and t ≥ 4 ,
[Equation]
From Theorem 2.19 in Wainwright (2019)
[Equation]
we have the following concentration inequality:
[Equation]
where σ 2 s ≤ 1 / 4 is the variance of a Bernoulli distribution with p =
π s ( k ) at time step s.
We deﬁne the event
[Equation]
and consequently
[Equation]
Conditioned on the event E (cid:15) , for (cid:15) =
t 4log(2+ t ) , we have N t ( a ) ≥ t 4log(2+ t ) .
For any action a by the deﬁnition of sub-gaussian,
P
[Equation]
by choosing a δ satisfying log( 2 δ ) =
[Equation]
log
[Equation]
2+
[Equation]
3 , we have
[Equation]
Therefore, for t ≥
[Equation]
) ≤ (cid:88) k (cid:32)
P (cid:32) | r ( a ) − ˆ r t ( a ) | > 2 σ log(2 + t ) (cid:33) + P ( E C(cid:15) )
≤ 2 |
A | exp (cid:32) − (log(2 + t ))
(cid:33)(cid:33) + 2 |
A
{+| exp (cid:32) − t (log(2 + t ))(cid:33) = 
+}
| A | exp (cid:32) − t (log(2 + t ))(cid:33) .
{+Lemma 
+}
Given two policies π (1) = ∇ Ω ∗ ( r (1) ) and π (2) = ∇ Ω ∗ ( r (2) ) , ∃ L , such that
[Equation]
{+Proof 
+}
This comes directly from the fact that π = ∇ Ω ∗ ( r ) is Lipschitz continuous with (cid:96) p -norm.
Note that p has different values according to the choice of regularizer.
Refer to Niculae & Blondel (2017) for a discussion of each norm using Shannon entropy and Tsallis entropy regularizer.
Relative entropy shares the same Properties with Shannon Entropy.
Lemma 3 Consider the E3W policy applied to a tree.
At any node s of the tree with depth d , Let us deﬁne N ∗ t ( s, a ) =
π ∗ ( a | s ) .t , and ˆ N t ( s, a ) =
(cid:80) ts =1 π s ( a | s ) , where π k ( a | s ) is the policy at time step k .
There exists some C and ˆ C such that
[Equation]
Proof 3 We denote the following event,
[Equation]
Thus, conditioned on the event (cid:84) ti =1 E r t and for t ≥ 4 , we bound | ˆ N t ( s, a ) − N ∗ t
[Equation]
s, a ) | as |
[Equation]
, a
[Equation]
[Equation]
k ( .
| s ) − π ∗ ( .
| s ) (cid:107) p + t (cid:88) k
= λ k ≤ L t (cid:88) k
= (cid:107)
ˆ Q k ( s (cid:48) , . )
− Q ( s (cid:48) , . )
(cid:107) p + t (cid:88) k
= λ k ( Lemma 2 ) ≤ L
| A | 1 p t (cid:88) k
= (cid:107)
ˆ Q k ( s (cid:48) , . )
− Q ( s (cid:48) , . )
(cid:107) ∞ + t (cid:88)
k
= λ k
( Property of p -norm ) ≤ L
| A | 1 p γ d t (cid:88) k
= (cid:107)
ˆ r k
( s (cid:48)(cid:48) , . )
− r ( s (cid:48)(cid:48) , . )
(cid:107) ∞ + t (cid:88)
k
= λ k ( Contraction 3.1 ) ≤ L
| A | 1 p γ d t (cid:88) k
=
[Equation]
t (cid:88)
[Equation]
=
[Equation]
t
[Equation]
=
[Equation]
[Equation]
|
[Equation]
≤
[Equation]
log
[Equation]
for some constant C depending on | A | , p, d, σ, L , and γ .
Finally,
P
[Equation]
i
[Equation]
Lemma 4 Consider the E3W policy applied to a tree.
At any node s of the tree, Let us deﬁne
N ∗ t ( s, a ) =
π ∗ ( a | s ) .t , and N t ( s, a ) as the number of times action a have been chosen until time step t .
There exists some C and ˆ C such that
[Equation]
Proof 4 Based on the result from Lemma
[Equation]
we have
[Equation]
Theorem 1 At the root node s of the tree, deﬁning N ( s ) as the number of visitations and V Ω ∗ ( s ) as the estimated value at node s, for (cid:15) > 0 , we have
[Equation]
{+Proof 
+}
We prove this concentration inequality by induction.
When the depth of the tree is D = 1 , from Proposition 1, we get
[Equation]
where ˆ r is the average rewards and r ∗ is the mean reward.
So that
[Equation]
From Lemma 1, with (cid:15) = 2 σγ log(2+ N ( s )) , we have
[Equation]
Let assume we have the concentration bound at the depth D − 1 , Let us deﬁne V Ω ( s a ) =
Q Ω ( s, a ) , where s a is the state reached taking action a from state s .
then at depth D −
[Equation]
Now at the depth D , because of the Contraction Property
[Equation] we have [Equation] So that
[Equation]
From (17), we can have lim t →∞ N ( s a ) = ∞
because if ∃ L, N ( s a ) <
L , we can ﬁnd (cid:15) >for which (17) is not satisﬁed.
From Lemma 4, when N ( s ) is large enough, we have N ( s a ) → π ∗ ( a | s ) N ( s ) (for example N ( s a ) > 12 π ∗ ( a | s ) N ( s ) ), that means we can ﬁnd C
and
ˆ C that satisfy
{+[Equation] Lemma 
 At any node s of+} the tree, N ( s ) is the number of visitations. We deﬁne the event
[Equation]
} where N ∗ ( s, a ) = π ∗ ( a | s ) N ( s ) , where (cid:15) > 0 and V Ω ∗ ( s ) is the estimated value at node s. We have
{+[Equation] Proof 
 The proof is the same+} as in Theorem 2. We prove the concentration inequality by induction.
When the depth of the tree is D = 1 , from Proposition 1, we get
[Equation]
Contraction Property ) where ˆ r is the average rewards and r ∗ is the mean rewards.
So that
[Equation]
From Lemma 1, with (cid:15) = [Equation] log(2+ N ( s )) and given E s , we have
[Equation]
Let assume we have the concentration bound at the depth D − 1 , Let us deﬁne V Ω ( s a ) =
Q Ω ( s, a ) , where s a is the state reached taking action a from state s , then at depth D −
[Equation]
Now at depth D , because of the Contraction Property and given E s , we have
[Equation] So that [Equation] of E s
[Equation]
Theorem 2 Let a t be the action returned by algorithm E3W at iteration t .
Then for t large enough, with some constants C, ˆ C ,
[Equation]
Proof 7 Let us deﬁne event E s as in Lemma 5.
Let a ∗ be the action with largest value estimate at the root node state s .
The probability that E3W selects a sub-optimal arm at s is
[Equation]
Let us deﬁne ∆ =
V ∗ Ω ( s a ∗ ) − V ∗ Ω ( s a ) , therefore for ∆ > 0 , we have
[Equation]
where α + β = 1 , α > 0 , β > 0 , and N ( s ) is the number of visitations the root node s .
Let us deﬁne 1ˆ C = min { ( α ∆) C a , ( β ∆)
C a ∗ } , and C = 1 | A | max { C a , C a ∗ } we have
[Equation]
From Lemma 4, ∃ C (cid:48) , ˆ C (cid:48) for which
[Equation]
so that [Equation] Theorem 3 Consider an E3W policy applied to the tree. Let κ i = ∇ Ω ∗ ( a i |
[Equation] χ i = [Equation] Ω ∗ ( a i | s ) − Lp
[Equation]
ˆ Cσ 2 log Cδ / 2 n , where ∇ Ω ∗ ( . | s ) is the policy with respect to the mean value vector V ( · ) at the root node s . For any δ > 0 , with probability at least 1 − δ , ∃ constant L, p, C, ˆ C so that the pseudo regret R n satisﬁes [Equation]
Proof 8 From Lemma 2 given two policies π (1) = ∇ Ω ∗ ( r (1) ) and π (2) = ∇ Ω ∗ ( r (2) ) , ∃ L , such that [Equation] From (13), we have the regret [Equation]
[Equation] where ˆ π t ( · ) is the policy at time step t , and I ( · ) is the indicator function. V ∗ is the optimal branch at the root node, V i is the mean value function of the branch with respect to action i , V ( · ) is the | A | vector of value function at the root node.
ˆ V ( · ) is the | A | estimation vector of value function at the root node. π ( . | s ) = ∇ Ω ∗ ( V ( · )) is the policy with respect to the V ( · ) vector at the root node.
Then for any δ > 0 , with probability at least 1 − δ [Equation] we have [Equation]
( Theorem 4 ) So that [Equation] so that
[Equation] In case of Maximum Entropy and Relative Entropy p = [Equation] because
[Equation] So that we have for MENTS [Equation] For RENTS, we have
[Equation] where m = min a π ( a | s ) . In case of Tsallis Entropy p = 2 ( Niculae & Blondel (2017)), so that [Equation]
Before derive the next theorem, we state here the Theorem 2 in Geist et al. • Boundedness: for two constants L Ω and U Ω such that for all π ∈ Π , we have L Ω ≤ Ω ( π ) ≤ U Ω , then
[Equation] Where τ is the temperature and γ is the discount constant. Theorem 4 For any δ > 0 , with probability at least 1 − δ , the ε Ω satisﬁes [Equation]
{+Proof 9 From Theorem 2, let us deﬁne δ = C exp {− 2 N ( s ) (cid:15) 
 ˆ Cσ 2 } , so that (cid:15) = (cid:114) ˆ Cσ 2 log+}
Cδ 2 N ( s ) then for any δ > 0 , we have [Equation] Then, for any δ > 0 , with probability at least 1 − δ , we have [Equation]
From Proposition
[Equation]
we have
[Equation]