DORA T HE E XPLORER : D IRECTED O UTREACHING R EINFORCEMENT A CTION -S ELECTION
Anonymous authors
Paper under double-blind review
A BSTRACT
Exploration is a fundamental aspect of Reinforcement Learning.
Two key challenges are how to focus exploration on more valuable states, and how to direct exploration toward gaining new world knowledge.
Visit-counters have been proven useful both in practice and in theory for directed exploration.
However, a major limitation of counters is their locality, considering only the immediate one step exploration value.
While there are a few model-based solutions to this difﬁculty, a model-free approach is still missing.
We propose E -values, a generalization of counters that can be used to evaluate the propagating exploratory value over stateaction trajectories.
We compare our approach to commonly used RL techniques, and show that using E -value improves learning and performance over traditional counters.
We also show how our method can be implemented with function approximation to learn continuous MDPs.
I NTRODUCTION
”If there’s a place you gotta go - I’m the one you need to know.
“ (Map, Dora The Explorer)
We consider Reinforcement Learning in a Markov Decision Process (MDP).
An MDP is a ﬁvetuple M =
( S , A , P, R, γ ) where S is a set of states and A is a set of actions .
The dynamics of the process is given by P ( s (cid:48) | s, a ) which denotes the transition probability from state s to state s (cid:48) following action a .
Each such transition also has a distribution R ( r | s, a ) from which the reward for such transitions is sampled.
Given a policy π : S → A , a function – possibly stochastic – deciding which actions to take in each of the states, the state-action value function Q π : S ×
A → R satisﬁes:
[Equation]
( s (cid:48) ))] where γ is the discount factor .
The agent’s goal is to ﬁnd an optimal policy π ∗ that maximizes
Q π ( s, π ( s )) .
For brevity, Q π ∗ (cid:44) Q ∗ .
There are two main approaches for learning π ∗ .
The ﬁrst is a model-based approach, where the agent learns an internal model of the MDP (namely P and
R ).
Given a model, the optimal policy could be found using dynamic programming methods such as Value Iteration (Sutton & Barto, 1998).
The alternative is a model-free approach, where the agent learns only the value function of states or state-action pairs, without learning a model (Kaelbling et al., 1996).
The ideas put forward in this paper are relevant to any model-free learning of MDPs.
For concreteness, we focus on a particular example, Q -Learning
(Watkins & Dayan, 1992; Sutton & Barto, 1998).
Q -Learning is a common method for learning Q ∗ , where the agent iteratively updates its values of Q ( s, a ) by performing actions and observing their outcomes.
At each step the agent takes action a t then it is transferred from s t to s t +1 and observe reward r . Then it applies the update rule regulated by a learning rate α :
[Equation]
1. E XPLORATION AND E XPLOITATION
One of the challenges in every reinforcement learning framework is balancing between Exploration and Exploitation .
Seemingly, the agent may want to choose the alternative associated with the highest expected reward, a behavior known as exploitation.
However, in that case it may fail to learn that there are better options.
Therefore exploration, namely the taking of new actions and the visit of new states, may also be beneﬁcial.
It is important to note that exploitation is also inherently relevant for learning, as we want the agent to have better estimations of the values of valuable state and actions and we care less about the exact values of actions the agent already knows to be clearly inferior.
Formally, to guarantee convergence to Q ∗ , the Q-Learning algorithm must visit each state-action pair inﬁnitely many times.
A naive random walk exploration is sufﬁcient for converging asymptotically.
However, such random exploration has two major limitations when the learning process is ﬁnite.
First, the agent would not explore the more relevant trajectories by exploiting its current knowledge about the world.
For example, an action with a known disastrous outcome will be explored over and over again.
Second, the agent would not be biased in favor of exploring unvisited trajectories more than the visited ones – hence ”wasting” exploration resources on actions and trajectories which are already well known to it.
A widely used method for dealing with the ﬁrst problem is the (cid:15) -greedy schema (Sutton & Barto, 1998), in which with probability 1 − (cid:15) the agent greedily chooses the best action, and with probability (cid:15) it chooses a random action.
Another popular alternative, emphasizing the preference to learn about actions associated with higher rewards, is to draw actions from a Boltzmann Distribution ( Softmax ) over the learned Q values, regulated by a Temperature parameter.
While such approaches lead to more informed exploration that is based on learning experience, they still fail to address the second issue, namely they are not directed (Thrun, 1992) towards gaining more knowledge, not biasing actions in the direction of unexplored trajectories.
Another important approach in the study of efﬁcient exploration is based on Sample Complexity of Exploration as deﬁned in the PAC-MDP literature (Kakade et al., 2003).
Relevant to our work is Delayed Q Learning (Strehl et al., 2006), a model-free algorithm that has theoretical PAC-MDP guarantees.
However, to ensure these theoretical guarantees this algorithm uses a conservative exploration which might be impractical (see also (Kolter & Ng, 2009) and Appendix B).
1. C URRENT D IRECTED E XPLORATION AND ITS L IMITATIONS
In order to achieve directed exploration, the estimation of an exploration or information value of different actions (often termed exploration bonus ) is needed.
The most commonly used exploration bonus is based on counting (Thrun, 1992) – for each pair ( s, a ) , store a counter C ( s, a ) that indicates how many times the agent performed action a at state s so far.
Counter-based methods are widely used both in practice and in theory (Kolter & Ng, 2009; Strehl & Littman, 2008; Guez et al., 2012; Busoniu et al., 2008).
Other options for evaluating exploration include recency and value difference (or error ) measures (Thrun, 1992; Tokic & Palm, 2011).
While all of these exploration measures can be used for directed exploration, their major limitation in a model-free settings is that the exploratory value of a state-action pair is evaluated with respect only to its immediate outcome, one step ahead.
It seems desirable to determine the exploratory value of an action not only by how much new immediate knowledge the agent gains from it, but also by how much more new knowledge could be gained from a trajectory starting with it.
The goal of this work is to develop a measure for such exploratory values of state-action pairs, in a model-free settings.
L EARNING E XPLORATION V ALUES 2. P ROPAGATING E XPLORATION V ALUES
The challenge discussed in 1.2 is in fact similar to that of learning the value functions.
The value of a state-action represents not only the immediate reward, but also the temporally discounted sum of expected rewards over a trajectory starting from this state and action.
Similarly, the ”explorationvalue” of a state-action should represent not only the immediate knowledge gained but also the expected future gained knowledge.
This suggests that a similar approach used for value-learning might be appropriate for learning the exploration values as well, using exploration bonus as the immediate reward.
However, because it is reasonable to require exploration bonus to decrease over repetitions of the same trajectories, a naive implementation would violate the Markovian property.
This challenge has been addressed in a model-based settings: The idea is to use at every step the current estimate of the parameters of the MDP in order to compute, using dynamic programming, the future exploration bonus (Little & Sommer, 2014).
However, this solution cannot be implemented in model-free settings.
Therefore, a satisfying approach for propagating directed exploration in modelfree reinforcement learning is still missing.
In this section, we propose such an approach.
2. E -V ALUES
We propose a novel approach for directed exploration, based on two parallel MDPs.
One MDP is the original MDP, which is used to estimate the value function.
The second MDP is identical except for one important difference.
We posit that there are no rewards associated with any of the state-actions.
Thus, the true value of all state-action pairs is 0 .
We will use an RL algorithm to ”learn” the ”actionvalues” in this new MDP which we denote as E -values.
We show that these E -values represent the missing knowledge and thus can be used for propagating directed exploration.
This will be done by initializing E -values to 1 .
These positive initial conditions will subsequently result in an optimistic bias that will lead to directed exploration, by giving high estimations only to state-action pairs from which an optimistic outcome was not yet excluded by the agent’s experience.
Formally, given an MDP M = ( S , A , P, R, γ ) we construct a new MDP M (cid:48)
= ( S , A , P, 0 , γ E ) with 0 denoting the identically zero function, and≤ γ E < 1 is a discount parameter.
The agent now learns both Q and E values concurrently, while initially E ( s, a ) =
1 for all s, a .
Note that while E ∗ = 0 , intuitively the value of E ( s, a ) at a given timestep during training stands for the knowledge, or uncertainty, that the agent has regarding this state-action pair.
Eventually, after enough exploration, there is no additional knowledge left to discover which corresponds to E ( s, a ) → 0 .
For learning E , we use the SARSA algorithm
(Rummery & Niranjan, 1994; Sutton & Barto, 1998) which differs from Watkin’s Q -Learning by being on-policy , following the update rule:
[Equation]
Where α E is the learning rate.
For simplicity, we will assume throughout the paper that α E = α .
Note that this learning rule updates the E -values based on E ( s t +1 , a t +1 ) rather than max a E ( s t +1 , a ) , thus not considering potentially highly informative actions which are never selected.
This is important for guaranteeing that exploration values will decrease when repeating the same trajectory (as we will show below).
Maintaining these additional updates doesn’t affect the asymptotic space/time complexity of the learning algorithm, since it is simply performing the same updates of a standard Q -Learning process twice.
2. E -V ALUES AS G ENERALIZED C OUNTERS
The logarithm of E -Values can be thought of as a generalization of visit counters, with propagation of the values along state-action pairs.
To see this, let us examine the case of γ E = 0 in which there is no propagation from future states.
In this case, the update rule is given by:
[Equation]
So after being visited n times, the value of the state-action pair is (1 − α ) n , where α is the learning rate.
By taking a logarithm transformation, we can see that log 1 − α ( E ) = n .
Moreover, when s is a terminal with one action, log 1 − α ( E ) = n for any value of γ E .
When γ E > 0 and for non-terminal states, E will decrease slower and therefore log 1 − α E will increase slower than a counter.
The exact rate will depend on the MDP, the policy and the speciﬁc value of γ E .
Crucially, for state-actions which lead to many potential states, each visit contributes less to the generalized counter, because more visits are required to exhaust the potential outcomes of the action.
To gain more insight, consider the MDP depicted in Figure 1 left, a tree with the root as initial state and the leaves as terminal states.
If actions are chosen sequentially, one leaf after the other, we expect that each complete round of choices (which will result with k actual visits of the ( s, start ) pair) will be roughly equivalent to one generalized counter.
Simulation of this and other simple MDPs show that E -values behave according to such intuitions (see Figure 1 right).
An important property of E -values is that they decrease over repetition.
Formally, by completing a trajectory of the form s 0 , a 0 , . . .
, s n , a n , s 0 , a 0 in the MDP, the maximal value of E ( s i , a i ) will
[Figure]
decrease.
To see this, assume that E ( s i , a i ) was maximal, and consider its value after the update:
[Equation]
Because γ E < 1 and E ( s i +1 , a i +1 ) ≤ E ( s i , a i ) , we get that after the update, the value of E ( s i , a i ) decreased.
For any non-maximal ( s j , a j ) , its value after the update is a convex combination of its previous value and γ E E ( s k , a k ) which is not larger than its composing terms, which in turn are smaller than the maximal E -value.
A PPLYING E -V ALUES
The logarithm of E -values can be considered as a generalization of counters.
As such, algorithms that utilize counters can be generalized to incorporate E -values.
Here we consider two such generalizations
. 3. E -V ALUES AS R EWARD E XPLORATION B ONUS
In model-based RL, counters have been used to create an augmented reward function.
Motivated by this result, augmenting the reward with a counter-based exploration bonus has also been used in model-free RL (Storck et al., 1995; Bellemare et al., 2016).
E -Values can naturally generalize this approach, by replacing the standard counter with its corresponding generalized counter ( log 1 − α E ).
To show the advantage of using E -values over standard counters, we tested an (cid:15) -greedy agent with an exploration bonus of
[Figure]
log 1 − α E added to the observed reward on the bridge
MDP (Figure 2).
To measure the learning progress and its convergence, we calculated the mean square error
E P ( s,a | π ∗ ) (cid:104) ( Q ( s, a ) − Q ∗ ( s, a )) 2 (cid:105) , where the average is over the probability of state-action pairs when following the optimal policy π ∗ .
We varied the value of γ E from 0 – resulting effectively in standard counters – to γ E = 0 .
Our results (Figure 3) show that adding the exploration bonus to the reward leads to more efﬁcient exploration and hence faster learning.
This effect further increases with the increase of γ E , demonstrating that generalized counters signiﬁcantly outperforming standard counters.
3. E -V ALUES AND A CTION -S ELECTION R ULES
Another way in which counters can be used to assist exploration is by adding them to the estimated
Q -values.
In this framework, action-selection is a function not only of the Q -values but also of [Figure] the counters.
Several such action-selection rules have been proposed (Thrun, 1992; Meuleau &
Bourgine, 1999; Kolter & Ng, 2009).
These usually take the form of a deterministic policy that maximizes some combination of the estimated value of rewards with a counter-based exploration bonus.
It is easy to generalize such rules using E -values – simply replace the counters C by the generalized counters log 1 − α ( E ) .
Next, we consider a special family of action-selection rules that are derived as deterministic equivalents of standard stochastic rules.
3. D ETERMINIZATION OF S TOCHASTIC D ECISION R ULES
Stochastic action-selection rules are commonly used in RL.
In their simple form they include rules such as the (cid:15) -greedy or Softmax exploration described above.
In this framework, exploratory behavior is usually achieved due to the stochasticity of action selection without direct dependence on past choices.
At ﬁrst glance, it might be unclear how E -values can contribute or improve such rules.
We now turn to show that, by using counters, for every stochastic rule there exist equivalent deterministic rules.
Once turned to deterministic counter-based rules, it is again possible improve them using
E -values.
The stochastic action-selection rules determine the frequency of choosing the different actions in the limit of a large number of repetitions, while abstracting away the speciﬁc order of choices.
This fact is a key to understanding the relation between a deterministic rule and a stochastic one.
An equivalence of two such rules can only be an in-the-limit equivalence, and can be seen as choosing a speciﬁc realization of sample from the distribution.
Therefore, in order to derive a deterministic equivalent of a given stochastic rule, we only have to make sure that both rules agree on their stationary distribution – the probability, in the limit, by which each action is selected.
As the probability for each action is likely to depend on the current Q -values, we have to consider ﬁxed Q -values to deﬁne this equivalence.
We prove that given a stochastic action-selection rule f ( a | s ) , every deterministic policy that does not choose an action that was visited too many times until now (with respect to the expected number according to the probability distribution) is a determinization of f .
Formally, lets assume that given a certain Q function and state s we wish a certain ratio between different choices of actions a ∈ A to hold.
We denote the frequency of this ratio f Q ( a | s ) .
For brevity we assume s and Q are constants and denote f Q ( a | s ) =
f ( a ) .
We also assume a counter C ( s, a ) is kept denoting the number of choices of a in s .
For brevity we denote C ( s, a ) =
C ( a ) and (cid:80) a C ( s, a ) =
C .
When we look at the counters after T steps we use subscript C T ( a ) .
Following this notation, note that C T = T .
Theorem 3.1.
For any sub-linear function b ( t ) and for any deterministic policy which chooses at step T an action a such that C T ( a ) T − f ( a ) ≤ b ( t ) it holds that ∀ a ∈
A
[Equation]
Proof.
For a full proof of the theorem see Appendix A in the supplementary materials
The result above is not a vacuous truth – we now provide two possible determinization rules that achieves it.
One rule is straightforward from the theorem, using b = 0 , choosing arg min a C ( a ) C − f ( a ) .
Another rule follows the probability ratio between the stochastic policy and the empirical distribution: arg max a f ( a ) C ( a ) .
We denote this determinization LLL , because when generalized counters are used instead of counters it becomes arg max a l og f ( s, a ) − l og l og 1 − α E ( s, a ) .
Now we can combine the two main ideas presented in this paper, and replace the visit counters
C ( s, a ) with the generalized counters log 1 − α ( E ( s, a )) to create Directed Outreaching Reinforcement Action-Selection – DORA the explorer.
By this combination, we can transform any stochastic or counter-based action-selection rule into a deterministic rule in which exploration propagates over the states and the expected trajectories to follow.
Input: Stochastic action-selection rule f , learning rate α , Exploration discount factor γ E initialize Q ( s, a ) = 0 , E ( s, a ) = 1 ; foreach episode do init s ; while not terminated do
Choose a = arg max x log f Q ( x | s ) − log log 1 − α E ( s, x ) ; Observe transitions ( s, a, r, s (cid:48) , a (cid:48) ) ; Q ( s, a
[Equation]
Q ( s, a ) + α ( r + γ max x Q ( s (cid:48) , x )) ;
E ( s, a ) ← (1 − α ) E ( s, a ) + αγ E E ( s (cid:48) , a (cid:48) ) ; end end
To test this algorithm, the ﬁrst set of experiments were done on Bridge environments of various lengths
k
(Figure 2).
We considered the following agents: (cid:15) -greedy, Softmax and their respective
LLL determinizations (as described in 3.3) using both counters and E -values.
In addition, we compared a more standard counter-based agent in the form of a UCB-like algorithm (Auer et al., 2002) following an action-selection rule with exploration bonus of (cid:113) log t C .
We tested two variants of this algorithm, using ordinary visit counters and E -values.
Each agent’s hyperparameters ( (cid:15) and
Temperature) were ﬁtted separately to optimize learning.
For stochastic agents, we averaged the results over 50 trials for each execution.
Unless stated otherwise, γ E = 0 .
We also used a normalized version of the bridge environment, where all rewards are between 0 and 1 , to compare DORA with the Delayed Q -Learning algorithm (Strehl et al., 2006).
Our results (Figure 4) demonstrate that E -value based agents outperform both their counter-based and their stochastic equivalents on the bridge problem.
As shown in Figure 4, Stochastic and counter-based (cid:15) -greedy agents, as well as the standard UCB fail to converge.
E -value agents are the ﬁrst to reach low error values, indicating that they learn faster and more effectively.
Similar results were achieved on other gridworld environments, such as the Cliff problem (Sutton & Barto, 1998) (not shown).
We also achieved competitive results with respect to Delayed Q Learning (see supplementary B and Figure 7 there).
To test to what extent generalized counters are a measure of the amount of missing knowledge about the values of state-action pairs in the world, we conducted another experiment.
We studied the behavior of an E -value LLL Softmax on the short bridge environment ( k = 5 ).
We recorded C , log 1 − α ( E ) and (cid:12)(cid:12)(cid:12) Q − Q ∗ Q ∗ (cid:12)(cid:12)(cid:12) for each s, a at the end of each episode.
Given state-action pair, the amount of missing knowledge for it is measured through the distance between its estimated value ( Q ) and its value according to the optimal policy ( Q (cid:63) ).
Generally, this is expected to be a monotonouslydecreasing function of the number of visits ( C ).
This is indeed true, as depicted in Figure 5 (left).
However, over all state-action pairs, visit counters do not capture well the amount of missing knowledge, as the convergence level depends not only on the counter but also on the identity of the stateaction it counts.
By contrast, considering the convergence level as a function of the generalized counter (Figure 5, right) reveals a strikingly different pattern.
Independently of the state-action identity, the convergence level is a unique function of the generalized counter.
These results demonstrate that generalized counters are a useful measure of the amount of missing knowledge.
E - VALUES WITH F UNCTION A PPROXIMATION
So far we discussed E -values in the tabular case, relying on ﬁnite (and small) state and action spaces.
However, a main motivation for using model-free approach is that it can be successfully applied in large MDPs where tabular methods are intractable.
In this case (in particular for continuous MDPs), achieving directed exploration is a non-trivial task.
Because revisiting a state or a state-action pair is unlikely, and because it is intractable to store individual values for all state-action pairs, counterbased methods cannot be directly applied.
In fact, most implementations in these cases adopt simple exploration strategies such as (cid:15) -greedy or softmax (Bellemare et al., 2016).
There are standard model-free techniques to estimate value function in function-approximation scenarios.
Because learning E -values is simply learning another value-function, the same techniques can be applied for learning E -values in these scenarios.
In this case, the concept of visit-count – or a generalized visit-count – will depend on the representation of states used by the approximating function.
4. R ESULTS – F UNCTION A PPROXIMATION
To test our approach in the function-approximation scenario, we used the Freeway Atari 2600 game, which is known as a hard exploration problem (Bellemare et al., 2016).
We trained a neural network with two streams to predict the Q and E -values.
First, we trained the network using standard DQN technique (Mnih et al., 2015), which ignores the E-values.
Second, we trained the network while adding an exploration bonus of β √− log E to the reward (In all reported simulations, β = 0 . 05 ).
In both cases, action-selection was performed by an (cid:15) -greedy rule, as in Bellemare et al.
Note that the exploration bonus requires 0 < E < 1 .
To satisfy this requirement, we applied a logistic activation fucntion on the output of the last layer of the E -value stream, and initialized the weights of this layer to 0 .
As a result, the E -values were initialized at 0.5 and satisﬁed 0 < E <throughout the training.
In comparison, no non-linearity was applied in the last layer of the Q -value stream and the weights were randmoly initialized.
We compared our approach to a DQN baseline, as well as to the density model counters suggested by (Bellemare et al., 2016).
The baseline used here does not utilize additional enhancements (such as Double DQN and Monte-Carlo return) which were used in (Bellemare et al., 2016).
Our results, depicted in Figure 6, demonstrate that the use of E -values outperform both DQN and density model counters baselines.
In addition, our approach results in better performance than in (Bellemare et al., 2016) (with the mentioned enhancements), converging in approximately 2 · 10 6 steps, instead of 10 · 10 6 steps 1 .
Additional results on simpler continuous MDPs, and using simpler architectures, are found in Appendix C.
In addition, we used such a simpler continuous MDP to empirically evaluate the behavior of E -values as generalized counters in the function-approximation scenario.
Results and analysis are found in Appendix D.
R ELATED W ORK
The idea of using reinforcement-learning techniques to estimate exploration can be traced back to
Storck et al.
and Meuleau & Bourgine (1999) who also analyzed propagation of uncertainties and exploration values.
These works followed a model-based approach, and did not fully deal with the problem of non-Markovity arising from using exploration bonus as the immediate reward.
A related approach was used by Little & Sommer (2014), where exploration was investigated by information-theoretic measures.
Such interpretation of exploration can also be found in other works (Schmidhuber (1991); Sun et al.
(2011); Houthooft et al.
Efﬁcient exploration in model-free RL was also analyzed in PAC-MDP framework, most notably the Delayed Q Learning algorithm by Strehl et al.
For further discussion and comparison of our approach with Delayed Q Learning, see 1.1 and Appendix B.
In terms of generalizing Counter-based methods there has been some works on using counter-like notions for exploration in continuous MDPs (Nouri & Littman, 2009). A more direct attempt was recently proposed by Bellemare et al.
This generalization provides a way to implement visit counters in large, continuous state and action spaces by using density models.
Our generalization is different, as it aims ﬁrst on generalizing the notion of visit counts themselves, from actual counters to ”propagating counters”.
In addition, our approach does not depend on any estimated model – which might be an advantage in domains for which good density models are not available.
Nevertheless, we believe that an interesting future work will be comparing between the approach suggested by Bellemare et al.
and our approach, in particular for the case of γ E =
A P ROOF OF THE D ETERMINIZATION T HEOREM
The proof for the determinization mentioned in the paper is achieved based on the following lemmata.
Lemma A.1.
The absolute sum of positive and negative differences between the empiric distribution (deterministic frequency) and goal distribution (non-deterministic frequency) is equal.
[Equation]
Proof.
Straightforward from the observation that
[Equation]
Lemma A.2.
For any t
[Equation]
Proof.
The proof of A.2 is done by induction.
For t =
[Equation]
Hence we look at a ∈ A .
[Equation]
assume the claim is true for t
=
T then for t =
T + 1 There exists a such that C T ( a ) /T
− f ( a ) ≤ b ( t ) which the algorithm chooses for this a .
For it
[Equation]
It also holds that ∀ a (cid:48)
∈
A s.t. a (cid:48)
[Equation]
Proof of 3.1.
It holds from A.2 together with A.1 that in the step t in the worst case all but one of the actions have C t ( a ) t − f ( a ) =
1 t and the last action has f ( a ) − C t ( a ) t = − |
A |− 1 t .
So by the bound on sum of positives and negatives we get:
[Equation]
B C OMPARISON WITH D ELAYED Q -L EARNING
Because Delayed Q learning initializes its values optimistically, which result in a high MSE, we normalized the MSE of the two agents (separately) to enable comparison.
Notably, to achieve this performance by the Delayed Q Learning, we had to manually choose a low value for m (in Figure 7, m = 10 ), the hyperparameter regulating the number of visits required before any update.
This is an order of magnitude smaller than the theoretical value required for even moderate PAC-requirements in the usual notion of (cid:15), δ , such m also implies learning in orders of magnitudes slower.
In fact, for this limit of m → 1 the algorithm is effectively quite similar to a ”Vanilla” Q -Learning with an optimistic initialization, which is possible due to the assumption made by the algorithm that all rewards are between 0 and 1 .
In fact, several exploration schemes relying on optimism in the face of uncertainty were proposed (Walsh et al., 2009).
However, because our approach separate reward values and exploratory values, we are able to use optimism for the latter without assuming any prior knowledge about the ﬁrst – while still achieving competitive results to an optimistic initialization based on prior knowledge.
C R ESULTS ON C ONTINUOUS MDP S – M OUNTAIN C AR
Simulations were performed using the MountainCar environment (Moore, 1990).
The version of the problem considered here is with sparse and delayed reward, meaning that there is a constant reward of 0 unless reaching a goal state which provides a reward of magnitude 1 .
Episode length was limited to 1000 steps.
We used linear approximation with tile-coding features (Sutton & Barto, 1998), learning the weights vectors for Q and E in parallel.
To guarantee that E -values are uniformly initialized and are kept between 0 and 1 throughout learning, we initialized the weights vector for E -values to 0 and added a logistic non-linearity to the results of the standard linear approximation.
In contrast, the Q -values weights vector was initialized at random, and there was no non-linearity.
We compared the performance of several agents.
The ﬁrst two used only Q -values, with a softmax or an (cid:15) -greedy action-selection rules.
The other two agents are the DORA variants using both Q and E values, following the LLL determinization for softmax either with γ E = 0 or with γ E = 0 . 99 .
Parameters for each agent (temperature and (cid:15) ) were ﬁtted separately to maximize performance.
The results depicted in Figure 8 demonstrate that using E -values with γ E > 0 lead to better performance in the MountainCar problem
In addition we tested our approach using (relatively simple) neural networks.
We trained two neural networks in parallel (unlike the two-streams single network used for Atari simulations), for pre- dicting Q and E values.
In this architecture, the same technique of 0 initializing and a logistic non-linearity was applied to the last linear of the E -network.
Similarly to the linear approximation approach, E -values based agents outperform their (cid:15) -greedy and softmax counterparts (not shown).
D E VALUATING E -V ALUES DYNAMICS IN FUNCTION - APPROXIMATION
To gain insight to the relation between E-values and number of visits, we used the linearapproximation architecture on the MountainCar problem (see Appendix C. Simulation for this experiment was performed with a non-sparse constant reward of − 1 ). Note that in our framework, the E -values are correlated with visit counts both because visits result in update of the E -values through learning and because E -values affect visits through the exploration bonus (or action-selection rule).
To dissociate the two, Q -values and E -values were learned in parallel in these simulation, but actionselection was independent of the E -values.
Rather, actions were chosen by an (cid:15) -greedy agent.
To estimate visit-counts, we recorded the entire set of visited states, and computed the empirical visits histogram by binning the two-dimensional state-space.
For each state, its visit counter estimator ˜ C ( s ) is the value of the matching bin in the histogram for this state.
In addition, we recorded the learned model (weights vector for E -values) and computed the E -values map by sampling a state for each bin, and calculating its E -values using the model.
For simplicity, we consider here the resolution of states alone, summing over all 3 actions for each state.
That is, we compare ˜ C
( s ) to (cid:80) a log 1 − α E ( s, a ) .
Figure 9 depicts the empirical visits histogram (left) and the estimated Evalues for the case of γ E = 0 after the complete training.
The results of the analysis show that roughly speaking, those regions in the state space that were more often visited, were also associated with a higher E -value.
To better understand these results, we considered smaller time-windows in the learning process.
Speciﬁcally, Figure 10 depicts the empirical visit histogram (left), and the corresponding E -value
(right) in the ﬁrst 10 episodes, in which visits were more centrally distributed.
Figure 11 depicts the change in the empirical visit histogram (left), and change in the corresponding E
-value
(right) in the last 10 episodes of the training, in which visits were distributed along a spiral (forming an nearoptimal behavior).
These results demonstrate high similarity between visit-counts and the E -value representation of them, indicating that E -values are good proxies of visit counters.
The results depicted in Figures 10 and 11 were achieved with γ E = 0 .
For γ E > 0 , we expect the generalized counters (represented by E -values) to account not for standard visits but for ”generalized visits”, weighting the trajectories starting in each state.
We repeated the analysis of Figure 11 for the case of γ E = 0 . 99 .
Results, depicted in Figure 12, shows that indeed for terminal or nearterminal states (where position > 0 . 5 ) generalized visits, measured by difference in their generalized counters, are higher – comparing to far-from terminal states – than the empirical visits of these states (comparing to far-from terminal states).
To quantify the relation between visits and E -values, we densely sampled the (achievable) statespace to generate many examples of states.
For each sampled state, we computed the correlation coefﬁcient between (cid:80) a log 1 − α E
( s, a ) and ˜ C
( s ) throughout the learning process (snapshots taken each 10 episodes).
The values ˜ C ( s ) were estimated by the empirical visits histogram (value of the bin corresponding to the sampled state) calculated based on visits history up to each snapshot.
Figure 13, depicting the histogram of correlation coefﬁcients between the two measures, demonstrating strong positive correlations between empirical visit-counters and generalized counters represented by E -values.
These results indicate that E -values are an effective way for counting effective visits in continuous MDPs.
Note that the number of model parameters used to estimate E ( s, a ) in this case is much smaller than the size of the table we would have to use in order to track state-action counters in such binning resolution.