+ All Categories
Home > Documents > XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3...

XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3...

Date post: 24-Sep-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
16
Clustered Reinforcement Learning Xiao Ma, Shen-Yi Zhao and Wu-Jun Li National Key Laboratory for Novel Software Technology Collaborative Innovation Center of Novel Software Technology and Industrialization Department of Computer Science and Technology, Nanjing University, China {max, zhaosy}@lamda.nju.edu.cn, [email protected] June 7, 2019 Abstract Exploration strategy design is one of the challenging problems in reinforcement learning (RL), especially when the environment contains a large state space or sparse rewards. During exploration, the agent tries to discover novel areas or high reward (quality) areas. In most existing methods, the novelty and quality in the neighboring area of the current state are not well utilized to guide the exploration of the agent. To tackle this problem, we propose a novel RL framework, called c lustered r einforcement l earning (CRL), for efficient exploration in RL. CRL adopts clustering to divide the collected states into several clusters, based on which a bonus reward reflecting both novelty and quality in the neighboring area (cluster) of the current state is given to the agent. Experiments on a continuous control task and several Atari 2600 games show that CRL can outperform other state-of-the-art methods to achieve the best performance in most cases. 1 Introduction Reinforcement learning (RL) [29] studies how an agent can maximize its cumulative reward in an unknown environment, by learning through exploration and exploiting the collected experience. A key challenge in RL is to balance the relationship between exploration and exploitation. If the agent explores more novel states, it might never find rewards to guide the learning direction. Otherwise, if the agent exploits rewards too intensely, it might converge to suboptimal behaviors and have fewer opportunities to discover more rewards from exploring. Although reinforcement learning, especially deep RL (DRL), has recently attracted much attention and achieved significant performance in a variety of applications, such as game playing [20, 25] and robot navigation [33], exploration techniques in RL are far from satisfactory in many cases. Exploration strategy design is still one of the challenging problems in RL, especially when the environment contains a large state 1 arXiv:1906.02457v1 [cs.LG] 6 Jun 2019
Transcript
Page 1: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

Clustered Reinforcement Learning

Xiao Ma, Shen-Yi Zhao and Wu-Jun Li

National Key Laboratory for Novel Software TechnologyCollaborative Innovation Center of Novel Software Technology and Industrialization

Department of Computer Science and Technology, Nanjing University, China{max, zhaosy}@lamda.nju.edu.cn, [email protected]

June 7, 2019

Abstract

Exploration strategy design is one of the challenging problems in reinforcement learning (RL),especially when the environment contains a large state space or sparse rewards. During exploration, theagent tries to discover novel areas or high reward (quality) areas. In most existing methods, the noveltyand quality in the neighboring area of the current state are not well utilized to guide the exploration ofthe agent. To tackle this problem, we propose a novel RL framework, called clustered reinforcementlearning (CRL), for efficient exploration in RL. CRL adopts clustering to divide the collected states intoseveral clusters, based on which a bonus reward reflecting both novelty and quality in the neighboringarea (cluster) of the current state is given to the agent. Experiments on a continuous control task andseveral Atari 2600 games show that CRL can outperform other state-of-the-art methods to achieve the bestperformance in most cases.

1 Introduction

Reinforcement learning (RL) [29] studies how an agent can maximize its cumulative reward in an unknownenvironment, by learning through exploration and exploiting the collected experience. A key challenge inRL is to balance the relationship between exploration and exploitation. If the agent explores more novelstates, it might never find rewards to guide the learning direction. Otherwise, if the agent exploits rewards toointensely, it might converge to suboptimal behaviors and have fewer opportunities to discover more rewardsfrom exploring.

Although reinforcement learning, especially deep RL (DRL), has recently attracted much attention andachieved significant performance in a variety of applications, such as game playing [20, 25] and robotnavigation [33], exploration techniques in RL are far from satisfactory in many cases. Exploration strategydesign is still one of the challenging problems in RL, especially when the environment contains a large state

1

arX

iv:1

906.

0245

7v1

[cs

.LG

] 6

Jun

201

9

Page 2: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

space or sparse rewards. Hence, it has become a hot research topic to design exploration strategy, and manyexploration methods have been proposed in recent years.

Some heuristic methods for exploration, such as ε-greedy [25, 29], uniform sampling [20] andi.i.d./correlated Gaussian noise [19, 24], try to directly obtain more different samples [5] during exploration.For hard applications or games, these heuristic methods are insufficient enough and the agent needs explorationtechniques that can incorporate meaningful information about the environment.

In recent years, some exploration strategies try to discover novel state areas for exploring. The directway to measure novelty is using the counts. In [5, 21], pseudo-count is estimated from a density model.Hash-based method [30] records the visits of hash codes as counts. There also exist some approximateways for computing counts [15, 6, 3, 12, 28, 18, 13]. Besides, the state novelty can also be measured byempowerment [17], the agent’s belief of environment dynamics [14], prediction error of the system dynamicsmodel [22, 26], prediction by exemplar model [11], and the error of predicting features of states [7].

All the above methods perform exploration mainly based on the novelty of states, without considering thequality of states. Furthermore, in most existing methods, the novelty and quality in the neighboring area ofthe current state are not well utilized to guide the exploration of the agent. To tackle this problem, we proposea novel RL framework, called clustered reinforcement learning (CRL), for efficient exploration in RL. Thecontributions of CRL are briefly outlined as follows:

• CRL adopts clustering to divide the collected states into several clusters. The states from the samecluster have similar features. Hence, the clustered results in CRL provide a possibility to sharemeaningful information among different states from the same cluster.

• CRL proposes a novel bonus reward, which reflects both novelty and quality in the neighboring area ofthe current state. Here, the neighboring area is defined by the states which share the same cluster withthe current state. This bonus reward can guide the agent to perform efficient exploration, by seamlesslyintegrating novelty and quality of states.

• Experiments on a continuous control task and several Atari 2600 [4] games with sparse rewards showthat CRL can outperform other state-of-the-art methods to achieve the best performance in most cases.In particular, on several games known to be hard for heuristic exploration strategies, CRL achievessignificant improvement over baselines.

The rest content of this paper is organized as follows. Section 2 introduces the related work. Section 3presents the details of CRL, including the clustering algorithm and clustering-base bonus reward. Section 4 isthe experimental result and analysis. Section 5 concludes the paper.

2 Related Work

In the tabular setting, there is a finite number of state-action pairs that can directly define a decreasingfunction of the true visitation count as the exploration bonus. MBIE-EB [27] adds the square root of countsof state-action pairs as the bonus reward to the augmented Bellman equation for exploring less visited ones

2

Page 3: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

with theoretical guarantee.In finite MDPs, E3 [15], R-Max [6] and UCRL [3] all make use of state-action counts and are activated

by the idea of optimism under uncertainty. E3 [15] determines online to choose an efficient learning policy.R-Max [6] assumes the received reward is not in quality area and trains a fictitious model to learn the optimalpolicy. UCRL [3] chooses an optimistic policy by using upper confidence bounds. Bayesian RL methodsmaintain a distribution of belief state as the uncertainty over possible MDPs [12, 28, 18, 13] and use countsto explore .

In the continuous and high-dimensional space, the number of states is too large to be counted. In [5, 21],the exploration bonus reward is designed based on a state pseudo-count quantity, which is estimated from adensity model. In the hash-based method [30], the hash function encodes states to hash codes and then itexplores with the reciprocal of visitation as a reward bonus, which performs well on some hard explorationAtari 2600 games. Hash-based method is limited by the hash function. Static hashing, using locality-sensitivehashing, is stable but random. Learned hashing, using an autoencoder (AE) to capture the semantic features,updates during the training time. A related work is [1], which record the number of cluster center and actionpairs which used to select an action from the Gibbs distribution given to a state.

These count-based methods activate the agent by making use of the novelty of states and do not takequality as consideration. To the best of our knowledge, the novelty and quality in the neighboring area ofthe current state have not been well utilized to guide the exploration of the agent in existing methods. Thismotivates the work of this paper.

3 Clustered Reinforcement Learning

This section presents the details of our proposed RL framework, called clustered reinforcement learning (CRL).

3.1 Notation

In this paper, we adopt similar notations as those in [30]. More specifically, wemodel the RL problem as a finite-horizon discounted Markov decision process (MDP), which can be defined by a tuple (S,A,P, r, ρ0, γ,T).Here, S ∈ Rd denotes the state space, A ∈ Rm denotes the action space, P : S × A × S → R denotes atransition probability distribution, r : S ×A → R denotes a reward function, ρ0 is an initial state distribution,γ ∈ (0, 1] is a discount factor, and T denotes the horizon. In this paper, we assume r ≥ 0. For cases withnegative rewards, we can transform them to cases without negative rewards. The goal of RL is to maximizeEπ,P

[∑T

t=0γtr (st, at )

]which is the total expected discounted reward over a policy π.

3.2 CRL

The key idea of CRL is to adopt clustering to divide the collected states into several clusters, and then design anovel cluster-based bonus reward for exploration. The algorithmic framework of CRL is shown in Algorithm 1,

3

Page 4: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

Algorithm 1 Framework of Clustered Reinforcement Learning (CRL)Initialize the number of clusters K , bonus coefficient β, count coefficient ηfor each iteration j do

Collect a set of state-action samples {(si, ai, ri)}Ni=1 with policy πj ;Cluster the state samples with f : S → C, where C = {Ci}Ki=1 and f is some clustering algorithm;Compute the cluster assignment for each state φ(si) = argmin

k

‖si −Ck ‖, ∀i : 1 6 i 6 N, k : 1 6 k 6 K;

Compute sum of rewards Rk using (1) and the number of states Nk using (2), ∀k : 1 6 k 6 K;Compute the bonus b(si) using (3);Update the policy πj using rewards {ri + b(si)}Ni=1 with some policy updating algorithm;

end for

from which we can find that CRL is actually a general framework. We can get different RL variants by takingdifferent clustering algorithms and different policy updating algorithms. The details of Algorithm 1 arepresented in the following subsections, including clustering and clustering-based bonus reward.

3.2.1 Clustering

Intuitively, both novelty and quality are useful for exploration strategy design. If the agent only cares aboutnovelty, it might explore intensively in some unexplored areas without any reward. If the agent only caresabout quality, it might converge to suboptimal behaviors and have low opportunity to discover unexploredareas with higher rewards. Hence, it is better to integrate both novelty and quality into the same explorationstrategy.

We find that clustering can provide the possibility to integrate both novelty and quality together. Intuitively,a cluster of states can be treated as an area. The number of collected states in a cluster reflects the count (novelty)information of that area. The average reward of the collected states in a cluster reflects the quality of thatarea. Hence, based on the clustered results, we can design an exploration strategy considering both noveltyand quality. Furthermore, the states from the same cluster have similar features, and hence the clusteredresults provide a possibility to share meaningful information among different states from the same cluster.The details of exploration strategy design based on clustering will be left to the following subsection. Here,we only describe the clustering algorithm.

In CRL, we perform clustering on states. Assume the number of clusters is K , and we have collected N

state-action samples {(si, ai, ri)}Ni=1 with some policy. We need to cluster the collected states {si}Ni=1 into K

clusters by using some clustering algorithm f : S → C, where C = {Ci}Ki=1 and Ci is the center of the ithcluster. We can use any clustering algorithm in the CRL framework. Although more sophisticated clusteringalgorithms might be able to achieve better performance, in this paper we just choose k-means algorithm [9]for illustration. K-means is one of the simplest clustering algorithms with wide applications. The detail of

4

Page 5: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

k-means is omitted here, and readers can find it in most machine learning textbooks.

3.2.2 Clustering-based Bonus Reward

As stated above, clustering can provide the possibility to integrate both novelty and quality together forexploration. Here, we propose a novel clustering-based bonus reward, based on which many policy updatingalgorithms can be adopted to get an exploration strategy considering both novelty and quality.

Given a state si, it will be allocated to the nearest cluster by the cluster assignment function φ(si) =argmin

k

‖si − Ck ‖. Here, 1 6 k 6 K and ‖si − Ck ‖ denotes the distance between si and the kth cluster center

Ck . The sum of rewards in the kth cluster is denoted as Rk , which can be computed as follows:

Rk =

N∑i=1

riI(φ(si) = k), (1)

where I(·) is an indicator function. Rk is also called cluster reward of cluster k in this paper. The number ofstates in the kth cluster is denoted as Nk , which can be computed as follows:

Nk =

N∑i=1I(φ(si) = k). (2)

Intuitively, a larger Nk typically means that the area corresponding to cluster k has more visits (exploration),which implies the novelty of this area is lower. Hence, the bonus reward should be inversely proportional toNk . The average reward of cluster k, denoted as Rk

Nk, can be used to represents the quality of the corresponding

area of cluster k. Hence, the bonus reward should be proportional to Rk

Nk.

With the above intuition, we propose a clustering-based bonus reward b : S → R to integrate both noveltyand quality of the neighboring area of the current state s , which is defined as follows:

b(s) = βmax(I(

N∑i=1

ri > 0)η, Rφ(s))

Nφ(s), (3)

where β ∈ R+ is the bonus coefficient and η ∈ R+ is the count (novelty) coefficient. Typically, η is set to avery small number. There are two cases:

b(s) =

β

max(η,Rφ(s))Nφ(s)

, ifN∑i=1

ri > 0,

0, ifN∑i=1

ri = 0.

Please note that in this paper, we assume ri ≥ 0.

In the first case, I(N∑i=1

ri > 0) = 1, which means that the current policy can get some rewards in some

states. Hence, the states with rewards can share meaningful information among different states from the same

5

Page 6: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

cluster. Please note that I(N∑i=1

ri > 0) = 1 only means that there exist some clusters with positive reward, and

does not mean all clusters have positive reward. It is possible that all states in some clusters have zero rewards.Please note that η is typically set to be a very small positive number. In general, as long as there exist one ortwo states with positive rewards in cluster φ(s), Rφ(s) will be larger than η. Hence, if b(s) = βη

Nφ(s), it is highly

possible that all states in cluster φ(s) have zero reward. Hence, when Rφ(s) = 0 which means no rewards havebeen got for cluster φ(s), the bonus reward should be determined by the count of the cluster. This is just whatour bonus reward function in (3) does. From (3), larger Nφ(s) will result in smaller bonus reward b(s). Thiswill guide the agent to explore novel areas corresponding to clusters with less visits (exploration), whichis reasonable. When Rφ(s) > 0, typically b(s) = βRφ(s)

Nφ(s). For two clusters with the same cluster reward, the

cluster with smaller number of states (higher novelty) will be more likely to be explored, which is reasonable.For two clusters with the same number of states, the cluster with higher cluster reward (higher quality) will bemore likely to be explored, which is also reasonable.

In the second case, I(N∑i=1

ri > 0) = 0, which means that the policy is unbelievable and sharing information

among different states from the same cluster is not a good choice. Furthermore, the states explored by thecurrent policy should not get any extra bonus reward. This is just what our bonus reward function in (3) does.

Hence, the clustering-based bonus reward function defined in (3) is intuitively reasonable, and it canseamlessly integrate both novelty and quality into the same bonus function. Finally, the agent will adopt{(si, ai, ri + bi)}Ni=1 to update the policy (perform exploration). Many policy updating algorithms, such astrust region policy optimization (TRPO) [24], can be adopted. Please note that ri + bi is only used for trainingCRL in Algorithm 1. But the performance evaluation (test) is measured without bi, which can be directlycompared with existing RL methods without extra bonus reward.

4 Experiments

We use a continuous control task and several Atari 2600 games to evaluate CRL and baselines. We want toinvestigate and answer the following research questions:

• Is the count-based exploration sufficient to excite the agent to achieve the final goal?• Can CRL improve performance significantly across different tasks?• What is the impact of hyperparameters on the performance?Due to space limitation, the hyperparameter settings are reported in the supplementary material.

4.1 Experimental Setup

4.1.1 Environments

MuJoCo. The rllab benchmark [10] consists of various continuous control tasks to test RL algorithms. Wedesign a variant of MountainCar, in which S ⊆ R3,A ⊆ R1. The agent receives a reward of +1 when the car

6

Page 7: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

(a)

0 5 10 15 20 25Iteration

0.4

0.6

0.8

1.0

1.2

Mea

n A

vera

ge R

etur

n

TRPOTRPO-HashCRLTRPO

(b)Figure 1: (a) A snapshot of MountainCar; (b) Mean average return of different algorithms on MountainCar over 5random seeds. The solid line represents the mean average return and the shaded area represents one standard deviation.

(a) freeway (b) frostbite (c) gravitar (d) solaris (e) venture

Figure 2: Snapshots of five hard exploration Atari 2600 games.

escapes the valley from the right side and receives a reward of +0.001 at other positions. One snapshot of thistask is shown in Figure 1 (a).

Arcade Learning Environment. The Arcade Learning Environment (ALE) [4] is an important benchmarkfor RL because of its high-dimensional state space and wide variety of video games. We select five games1featuring long horizons and still requiring significant exploration: Freeway, Frostbite, Gravitar, Solaris andVenture. Figure 2 shows a snapshot for each game. For example, in Freeway, the agent need to go through theroad, avoid the traffic and get the reward across the street. These games are classified into hard explorationcategory, according to the taxonomy in [5].

1The Montezuma game evaluated in [30] is not adopted in this paper for evaluation, because this paper only uses raw pixels whichare not enough for learning effective policy on Montezuma game for most methods including CRL and other baselines. We can useadvanced feature to learn effective policy, but this is not the focus of this paper.

7

Page 8: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

4.1.2 Baselines

CRL is a general framework which can adopt many different policy updating (optimization) algorithms to getdifferent variants. In this paper, we only adopt trust region policy optimization (TRPO) [24] as the policyupdating algorithm for CRL, and leave other variants of CRL for future work. We will denote our methodas CRLTRPO in the following content. The baselines for comparison include TRPO and TRPO-Hash [30],which are also TRPO-based methods and have achieved state-of-the-art performance in many tasks.

TRPO [24] is a classic policy gradient method, which uses trust region to guarantee stable improvementof policy and can handle both discrete and continuous action space. Furthermore, this method is not toosensitive to hyperparameters. TRPO adopts a Gaussian control noise as a heuristic exploration strategy.

TRPO-Hash [30] is a hash-based method, which is a generalization of classic count-based method forhigh-dimensional and continuous state spaces. The main idea is to use locality-sensitive hashing (LSH) [2] toencode continuous and high-dimensional data into hash codes, like {−1, 1}h. Here, h is the length of hashcodes. TRPO-Hash has several variants in [30]. For fair comparison, we choose SimHash [8] as the hashfunction and pixels as inputs for TRPO-Hash in this paper, because our CRL also adopts pixels rather thanadvanced features as inputs. TRPO-Hash is trained by using the code provided by its authors.

4.2 Disadvantage of Count-based Exploration

TRPO-Hash tries to help the agent explore more novel states and hope that it can achieve better performancethan TRPO. But it might go through all states until reaching the goal state, which is the disadvantage ofcount (novelty) based exploration. Here, we use MountainCar to show this disadvantage. Figure 1 (b) showsthe results of TRPO, TRPO-Hash and CRLTRPO in MountainCar. We find that TRPO-Hash is slower thanTRPO and CRLTRPO on finding out the goal state because the curve of TRPO-Hash ascends until the middleof training. At the end of training, TRPO-Hash fails to reach the goal, but the other methods can achievethe goal. Our method, CRLTRPO is the first to visit the goal and learn to achieve the goal. The reason whyTRPO-Hash fails is that the novelty of states diverts the agent’s attention. The worst case is that the agentcollects all states until it finds the goal. This disadvantage of count-based methods might become more seriousin the high-dimensional state space since it is impossible to go through all states in the high-dimensional statespace. Therefore, strategies with only count-based exploration are insufficient.

4.3 Performance on Atari 2600

For video games which typically have high-dimensional and complex state space, advanced features like thoseextracted by auto-encoder (AE) and variational auto-encoder (VAE) [16, 23] can be used for performanceimprovement. But this is not the focus of this paper. Hence, we simply use raw pixels as inputs for our methodand other baselines. Hence, the comparison is fair.

For the five games of Atari 2600, the agent is trained for 500 iterations in all experiments with eachiteration consisting of 0.4M frames. During each iteration, although the previous four frames are taken

8

Page 9: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

0 100 200 300 400Iteration

5

0

5

10

15

20

25

30

35

Me

an

Ave

rag

e R

etu

rn

TRPOTRPO-HashCRLTRPO

(a) freeway

0 100 200 300 400Iteration

0

2000

4000

6000

8000

Me

an

Ave

rag

e R

etu

rn

TRPOTRPO-HashCRLTRPO

(b) frostbite

0 100 200 300 400Iteration

200

300

400

500

600

700

Me

an

Ave

rag

e R

etu

rn

TRPOTRPO-HashCRLTRPO

(c) gravitar

0 100 200 300 400Iteration

1000

2000

3000

4000

5000

6000

Me

an

Ave

rag

e R

etu

rn

TRPOTRPO-HashCRLTRPO

(d) solaris

0 100 200 300 400Iteration

0

200

400

600

800

1000

Me

an

Ave

rag

e R

etu

rn

TRPOTRPO-HashCRLTRPO

(e) venture

Figure 3: Mean average return of different algorithms on Atari 2600 over 5 random seeds. The solid line represents themean average return and the shaded area represents one standard deviation.

into account by the policy and baseline, clustering is performed on the latest frames and counting also payattention to last frames. The performance is evaluated over 5 random seeds. The seeds for evaluation are thesame for TRPO, TRPO-Hash and CRLTRPO.

We show the training curves in Figure 3 and summarize all results in Table 1. Please note that TRPOand TRPO-Hash are trained with the code provided by the authors of TRPO-Hash. All hyper-parametersare reported in the supplementary material. We also compare our results to double-DQN [31], duelingnetwork [32], A3C+ [5], double DQN with pseudo-count [5], the results of which are from [30].

CRLTRPO achieves significant improvement over TRPO and TRPO-Hash on Freeway, Frostbite, Solarisand Venture. Especially on Frostbite, CRLTRPO achieves more than 250% improvement compared withTRPO and more than 50% improvement compared with TRPO-Hash. On Venture, CRLTRPO achieves morethan 70% improvement compared with TRPO and TRPO-Hash. Furthermore, CRLTRPO can outperform allother methods in most cases. Please note that DQN-based methods reuse off-policy experience, which is anadvantage over TRPO. Hence, DQN-based methods have better performance than TRPO. But our CRLTRPO

can still outperform DQN-based methods in most cases. It is illustrated that the novelty and quality in theneighboring area of states give the on-policy agent an experience buffer like off-policy.

9

Page 10: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

Table 1: Average total reward after training for 50M time steps.

Freeway Frostbite Gravitar Solaris Venture

TRPO 17.55 1229.66 500.33 2110.22 283.48TRPO-Hash 22.29 2954.10 577.47 2619.32 299.61CRLTRPO 26.68 4558.52 541.72 2976.23 523.79

Double-DQN 33.3 1683 412 3068 98.0Dueling network 0.0 4672 588 2251 497A3C+ 27.3 507 246 2175 0pseudo-count 29.2 1450 - - 369

4.4 Hyperparameter Effect

We use Venture of Atari 2600 to study the performance sensitivity to hyperparameters, including K in k-means,β and η in bonus reward.

We choose different K from {8, 12, 16, 20} on Venture to illustrate the effect of K when η = 10−4, β = 0.01.Larger K will divide the state space more precisely but the statistic of average reward Rk

Nkmight become less

meaningful. Smaller K will mix information from different areas, which might be too coarse for exploration.The results on Venture are summarized in Table 7 with fixed β and η. On Venture, the scores are roughlyconcave in K , peaking at around K = 12. We can find that the performance is not too sensitive to K in arelatively large range.

Table 2: Effect of the number (K) of clusters on Venture

K 8 12 16 20

Venture 347.86 663.32 523.79 451.94

We choose β from {0.01, 0.1} and η from {0, 10−4, 10−3, 10−2, 10−1}. The results are shown in Table 3.The value of β × η decides the level about pure exploration of novelty. Therefore, by fixing β × η as10−6, 10−5, 10−4, the performance in β = 0.01 are better than β = 0.1 because large β causes the bonusrewards to overwhelm the true rewards. By fixing β = 0.01, η decides the degree of pure exploration aboutthe novel states. Larger η means that more novel states will be explored. The scores are roughly concave,peaking at around η = 0.0001, which shows that count-based exploration is insufficient.

5 Conclusion

In this paper, we propose a novel RL framework, called clustered reinforcement learning (CRL), for efficientexploration. By using clustering, CRL provides a general framework to adopt both novelty and quality in the

10

Page 11: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

Table 3: Effect of hyperparameter β and η on Venture, where the number in bracket is β × η.

βη

0 0.0001 0.001 0.01 0.1

0.01 292.39 523.79 (10e-7) 512.74 (10e-6) 279.84 (10e-5) 182.04 (10e-4)0.1 218.44 113.12 (10e-6) 101.95 (10e-5) 81.70(10e-4) 88.51 (10e-3)

neighboring area of the current state for exploration. Experiments on a continuous control task and severalhard exploration Atari 2600 games show that CRL can outperform other state-of-the-art methods to achievethe best performance in most cases.

References

[1] D. Abel, A. Agarwal, F. Diaz, A. Krishnamurthy, and R. E. Schapire. Exploratory gradient boosting forreinforcement learning in complex domains. CoRR, abs/1603.04119, 2016.

[2] A. Andoni and P. Indyk. Near-optimal hashing algorithms for approximate nearest neighbor in high dimensions.In (FOCS, pages 459–468, 2006.

[3] P. Auer and R. Ortner. Logarithmic online regret bounds for undiscounted reinforcement learning. In NeurIPS,pages 49–56, 2006.

[4] M. G. Bellemare, Y. Naddaf, J. Veness, and M. Bowling. The arcade learning environment: An evaluation platformfor general agents. JAIR, 47:253–279, 2013.

[5] M. G. Bellemare, S. Srinivasan, G. Ostrovski, T. Schaul, D. Saxton, and R. Munos. Unifying count-basedexploration and intrinsic motivation. In NeurIPS, pages 1471–1479, 2016.

[6] R. I. Brafman and M. Tennenholtz. R-MAX - A general polynomial time algorithm for near-optimal reinforcementlearning. JMLR, 3:213–231, 2002.

[7] Y. Burda, H. Edwards, A. J. Storkey, and O. Klimov. Exploration by random network distillation. CoRR,abs/1810.12894, 2018.

[8] M. Charikar. Similarity estimation techniques from rounding algorithms. In STOC, pages 380–388, 2002.

[9] A. Coates and A. Y. Ng. Learning feature representations with k-means. In Neural Networks: Tricks of the Trade -Second Edition, pages 561–580. 2012.

[10] Y. Duan, X. Chen, R. Houthooft, J. Schulman, and P. Abbeel. Benchmarking deep reinforcement learning forcontinuous control. In ICML, pages 1329–1338, 2016.

[11] J. Fu, J. D. Co-Reyes, and S. Levine. EX2: exploration with exemplar models for deep reinforcement learning. InNeurIPS, pages 2574–2584, 2017.

[12] M. Ghavamzadeh, S. Mannor, J. Pineau, and A. Tamar. Bayesian reinforcement learning: A survey. Foundationsand Trends in Machine Learning, 8(5-6):359–483, 2015.

11

Page 12: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

[13] A. Guez, N. Heess, D. Silver, and P. Dayan. Bayes-adaptive simulation-based search with value functionapproximation. In NeurIPS, pages 451–459, 2014.

[14] R. Houthooft, X. Chen, Y. Duan, J. Schulman, F. D. Turck, and P. Abbeel. VIME: variational informationmaximizing exploration. In NeurIPS, pages 1109–1117, 2016.

[15] M. J. Kearns and S. P. Singh. Near-optimal reinforcement learning in polynomial time. Machine Learning,49(2-3):209–232, 2002.

[16] D. P. Kingma and M. Welling. Auto-encoding variational bayes. In ICLR, 2014.

[17] A. S. Klyubin, D. Polani, and C. L. Nehaniv. Empowerment: a universal agent-centric measure of control. InCEC, pages 128–135, 2005.

[18] J. Z. Kolter and A. Y. Ng. Near-bayesian exploration in polynomial time. In ICML, pages 513–520, 2009.

[19] T. P. Lillicrap, J. J. Hunt, A. Pritzel, N. Heess, T. Erez, Y. Tassa, D. Silver, and D. Wierstra. Continuous controlwith deep reinforcement learning. In ICLR, 2016.

[20] V. Mnih, K. Kavukcuoglu, D. Silver, A. A. Rusu, J. Veness, M. G. Bellemare, A. Graves, M. A. Riedmiller,A. Fidjeland, G. Ostrovski, S. Petersen, C. Beattie, A. Sadik, I. Antonoglou, H. King, D. Kumaran, D. Wierstra,S. Legg, and D. Hassabis. Human-level control through deep reinforcement learning. Nature, 518(7540):529–533,2015.

[21] G. Ostrovski, M. G. Bellemare, A. van den Oord, and R. Munos. Count-based exploration with neural densitymodels. In ICML, pages 2721–2730, 2017.

[22] D. Pathak, P. Agrawal, A. A. Efros, and T. Darrell. Curiosity-driven exploration by self-supervised prediction. InICML, pages 2778–2787, 2017.

[23] D. J. Rezende, S. Mohamed, and D. Wierstra. Stochastic backpropagation and approximate inference in deepgenerative models. In ICML, pages 1278–1286, 2014.

[24] J. Schulman, S. Levine, P. Abbeel, M. I. Jordan, and P. Moritz. Trust region policy optimization. In ICML, pages1889–1897, 2015.

[25] D. Silver, A. Huang, C. J. Maddison, A. Guez, L. Sifre, G. van den Driessche, J. Schrittwieser, I. Antonoglou,V. Panneershelvam, M. Lanctot, S. Dieleman, D. Grewe, J. Nham, N. Kalchbrenner, I. Sutskever, T. P. Lillicrap,M. Leach, K. Kavukcuoglu, T. Graepel, and D. Hassabis. Mastering the game of go with deep neural networksand tree search. Nature, 529(7587):484–489, 2016.

[26] B. C. Stadie, S. Levine, and P. Abbeel. Incentivizing exploration in reinforcement learning with deep predictivemodels. CoRR, abs/1507.00814, 2015.

[27] A. L. Strehl and M. L. Littman. An analysis of model-based interval estimation for markov decision processes.JCSS, 74(8):1309–1331, 2008.

[28] Y. Sun, F. J. Gomez, and J. Schmidhuber. Planning to be surprised: Optimal bayesian exploration in dynamicenvironments. In AGI, pages 41–51, 2011.

[29] R. S. Sutton and A. G. Barto. Reinforcement learning - an introduction. Adaptive computation and machinelearning. MIT Press, 1998.

12

Page 13: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

[30] H. Tang, R. Houthooft, D. Foote, A. Stooke, X. Chen, Y. Duan, J. Schulman, F. D. Turck, and P. Abbeel.#exploration: A study of count-based exploration for deep reinforcement learning. In NeurIPS, pages 2750–2759,2017.

[31] H. van Hasselt, A. Guez, and D. Silver. Deep reinforcement learning with double q-learning. In AAAI, pages2094–2100, 2016.

[32] Z. Wang, T. Schaul, M. Hessel, H. van Hasselt, M. Lanctot, and N. de Freitas. Dueling network architectures fordeep reinforcement learning. In ICML, pages 1995–2003, 2016.

[33] M. Zhang, Z. McCarthy, C. Finn, S. Levine, and P. Abbeel. Learning deep neural network policies with continuousmemory states. In ICRA, pages 520–527, 2016.

13

Page 14: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

A Hyperparameter Settings

A.1 Hyperparameter setting in MuJoCo

In MuJoCo, the hyperparameter setting is shown as Table 4.

Table 4: Hyperparameter setting in MuJoCo

TRPO TRPO-Hash CRLTRPO

TRPO batchsize 5000TRPO stepsize 0.01Discount factor 0.99

Policy hidden units (32, 32)Baseline function Linear

Iteration 30Max length of path 500Bonus coefficient - 0.01 1

Others - Simhash dimension: 32 #cluster centers: 16- - η = 0.0001

A.2 Hyperparameter settings in Atari 2600

The hyperparameter settings of results in Figure 3 and Table 1 is shown as Table 5 and Table 6.In TRPO-Hash, [30] chooses 16,64,128,256,512 as the SimHash dimension. When SimHash dimension is 16, it

only has 65536 distinct hash codes. When SimHash dimension is 64, it has more than 1019 hash codes and the agentonly receive 5 × 107 states during the training time. Therefore, we choose 64 as the SimHash dimension, which issufficient. The hyperparameters settings about exploration of TRPO-Hash and TRPO-Clustering are shown in Table 6.

We choose smaller η for Venture because Venture belongs to hard exploration category with sparse rewards. As theanalyze in Section 4.4, large β might mislead the agent to novel but low-quality area because the bonus is decided by thenovelty part severely. Therefore, we choose η = 0.0001 for Venture.

14

Page 15: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

Table 5: Hyperparameter setting in Atari 2600

TRPO, TRPO-Hash, CRLTRPO

TRPO batchsize 100KTRPO stepsize 0.001Discount factor 0.99Iteration 500Max length of path 4500Policy structure 16 conv filters of size 8 × 8, stride 4

32 conv filters of size 4 × 4, stride 2fully-connect layer with 256 units

linear transform and softmax to output action probabilitiesInput preprocessing grayscale; downsampled to 42 × 42; each pixel rescaled to [−1, 1]

4 previous frames are concatenated to form the input state

Table 6: Hyperparameter setting of Exploration in the Table 3

TRPO-Hash CRLTRPO

bonus coeffcient β 0.01 0.01others SimHash dimension: 64 number of cluster centers: 16

venture: η = 0.0001others: η = 0.1

B Hyperparameter sensitivity in Frostbite

Frostbite is easier than Venture because of dense rewards, although Frostbite is one of games in the hard explorationcategory. In Frostbite, we achieve more than 250% of the baseline (TRPO) and more than 50% of TRPO-Hash methodscore. And due to space limitation, we show the hyperparameter effects on this Section.

B.1 The hyperparameter K in k-means

Similar to Venture, we choose different K from {8, 12, 16, 20} when η = 10−4, β = 0.01. When K = 20, it is too largeto make the information in cluster centers useless. When K = 8, the performance has significant improvement. Itis illustrated that the choice of K needs to balance the relationship between segmentation granularity and statisticsdifference.

Table 7: The effect of the number of cluster center K on Frostbite

8 12 16 20

Frostbite 6275.06 2249.02 4526.88 1346.49

15

Page 16: XiaoMa,Shen-YiZhaoandWu-JunLi ...withtheoreticalguarantee. InfiniteMDPs,E3 [15],R-Max[6]andUCRL[3]allmakeuseofstate-actioncountsandareactivated bytheideaofoptimismunderuncertainty.

B.2 The hyperparameter of bonus

When K = 16, we choose β from {0.01, 0.1} and η from {0, 10−4, 10−3, 10−2, 10−1}. We fix the value of β × η andβ = 0.01 performs better than β = 0.1 in most cases. When β is fixed as 0.01, the performances are better than TRPO.The performances have no significantly trend because this game has dense rewards. Therefore, the bonus is affected bythe novelty slightly.

Table 8: The effect of hyperparameter β and η on Frostbite, where the number in brackets is β × η.

βη

0 0.0001 0.001 0.01 0.1

0.01 3292.63 4526.88 (10e-7) 2719.07 (10e-6) 3691.03 (10e-5) 4558.52 (10e-4)0.1 2835.28 766.28 (10e-6) 4125.28 (10e-5) 2350.22 (10e-4) 497.64 (10e-3)

16


Recommended