B ENCHMARKING
M ODEL -B ASED
R EINFORCEMENT
L EARNING
Anonymous authors
Paper under double-blind review
A BSTRACT
Model-based reinforcement learning (MBRL) is widely seen as having the potential to be signiﬁcantly more sample efﬁcient than model-free RL.
However, research in model-based RL has not been very standardized.
It is fairly common for authors to experiment with self-designed environments, and there are several separate lines of research, which are sometimes closed-sourced or not reproducible.
Accordingly, it is an open question how these various existing algorithms perform relative to each other.
To facilitate research in MBRL, in this paper we gather a wide collection of MBRL algorithms and propose over 18 benchmarking environments specially designed for MBRL.
We benchmark these algorithms with uniﬁed problem settings, including noisy environments.
Beyond cataloguing performance, we explore and unify the underlying algorithmic differences across MBRL algorithms.
We characterize three key research challenges for future MBRL research: the dynamics bottleneck, the planning horizon dilemma, and the early-termination dilemma.
Finally, to facilitate future research on MBRL, we open-source our benchmark 1 .
I NTRODUCTION
Reinforcement learning (RL) algorithms are most commonly classiﬁed in two categories: model-free
RL (MFRL), which directly learns a value function or a policy by interacting with the environment, and model-based RL (MBRL), which uses interactions with the environment to learn a model of it.
While model-free algorithms have achieved success in areas including robotics (Lillicrap et al., 2015; Schulman et al., 2017; Heess et al., 2017; Andrychowicz et al., 2018), video-games (Mnih et al., 2013; 2016), and character animation (Peng et al., 2018), their high sample complexity limits largely their application to simulated domains.
By learning a model of the environment, model-based methods learn with signiﬁcantly lower sample complexity.
However, learning an accurate model of the environment has proven to be a challenging problem in certain domains.
Modelling errors cripple the effectiveness of these algorithms, resulting in policies that exploit the deﬁciencies of the models, which is known as model-bias (Deisenroth & Rasmussen, 2011).
Recent approaches have been able to alleviate the model-bias problem by characterizing the uncertainty of the learned models by the means of probabilistic models and ensembles.
This has enabled model-based methods to match model-free asymptotic performance in challenging domains while using much fewer samples (Kurutach et al., 2018; Chua et al., 2018; Clavera et al., 2018).
These recent advances have led to a great excitement in the ﬁeld of model-based reinforcement learning.
Despite the impressive results achieved, how these methods compare against each other and against standard baselines remains unclear.
Reproducibility and lack of open-source code are persistent problems in RL (Henderson et al., 2018; Islam et al., 2017), which makes it difﬁcult to compare novel algorithms against prior lines of research.
In MBRL, this problem is exacerbated by the modiﬁcations made to the environments: pre-processing of the observations, modiﬁcation of the reward functions, or using different episode horizons.
Such lack of standardized implementations and environments in MBRL makes it difﬁcult to quantify scientiﬁc progress.
Systematic evaluation and comparison will not only further our understanding of the strengths and weaknesses of existing algorithms, but also reveal their limitations and suggest directions for future research.
Benchmarks play a crucial role in other ﬁelds of research.
For instance, MFRL has beneﬁted greatly from the introduction of benchmarking code bases and environments such as rllab (Duan et al., 2016),
OpenAI Gym (Brockman et al., 2016), and DM Control Suite (Tassa et al., 2018); where the latter two have been the de facto benchmarking platforms.
Besides RL, benchmarking platforms have also accelerated areas such as computer vision (Deng et al., 2009; Lin et al., 2014), machine translation (Koehn et al., 2007) and speech recognition (Panayotov et al., 2015).
In this paper, we benchmark 11 MBRL algorithms and 4 MFRL algorithms across 18 environments based on the standard OpenAI Gym (Brockman et al., 2016).
The environments, designed to hold the common assumptions in model-based methods, range from simple 2D tasks, such as Cart-Pole, to complex domains that are usually not evaluated on, such as Humanoid.
The benchmark is further extended by characterizing the robustness of the different methods when stochasticity in the observations and actions is introduced.
Based on the empirical evaluation, we propose three main causes that stagnate the performance of model-based methods: 1) Dynamics bottleneck : algorithms with learned dynamics are stuck at performance local minima signiﬁcantly worse than using groundtruth dynamics, i.e. the performance does not increase when more data is collected.
Planning horizon dilemma : while increasing the planning horizon provides more accurate reward estimation, it can result in performance drops due to the curse of dimensionality and modelling errors.
Early termination dilemma : early termination is commonly used in MFRL for more directed exploration, to achieve faster learning.
However, similar performance gain are not yet observed in MBRL algorithms, which limits their effectiveness in complex environments.
P RELIMINARIES
We formulate all of our tasks as a discrete-time ﬁnite-horizon Markov decision process (MDP), which is deﬁned by the tuple ( S , A , p, r, ρ 0 , γ, H ) .
Here, S denotes the state space, A denotes the action space, p ( s (cid:48) | a, s ) : S ×
A × S → [0 , 1] is transition dynamics density function, r ( s, a, s (cid:48) ) :
S ×
A × S → R deﬁnes the reward function, ρ 0 is the initial state distribution, γ is the discount factor, and H is the horizon of the problem.
Contrary to standard model-free RL, we assume access to an analytic differentiable reward function.
The aim of RL is to learn an optimal policy π that maximizes the expected total reward J ( π ) =
E a t ∼ π s t ∼ p
[ (cid:80)
Ht
=1 γ t r ( s t , a t )] .
Dynamics Learning: MBRL algorithms are characterized by learning a model of the environment.
After repeated interactions with the environment, the experienced transitions are stored in a dataset D
= { ( s t , a t , s t +1 ) } which is then used to learn a dynamics function ˜ f φ .
In the case where ground-truth dynamics are deterministic, the learned dynamics function ˜
f φ predicts the next state.
In stochastic settings, it is common to represent the dynamics with a Gaussian distribution, i.e., p ( s t +1 | a t , s t ) ∼ N ( µ ( s t , a t ) , Σ( s t , a t )) and the learned dynamics model corresponds to ˜ f φ = (˜ µ φ ( s t , a t ) , ˜Σ φ ( s t , a t )) .
A LGORITHMS
In this section, we introduce the benchmarked MBRL algorithms, which are divided into: 1) Dynastyle Algorithms, 2) Policy Search with Backpropagation through Time, and 3) Shooting Algorithms.
3. D YNA -S TYLE A LGORITHMS
In the Dyna algorithm (Sutton, 1990; 1991a;b), training iterates between two steps.
First, using the current policy, data is gathered from interaction with the environment and then used to learn the dynamics model.
Second, the policy is improved with imagined data generated by the learned model.
Dyna algorithms learn policies using model-free algorithms with rich imaginary experience without interaction with the real environment.
Dyna can also be applied to tasks with image input as in world models (Ha & Schmidhuber, 2018a;b).
Model-Ensemble Trust-Region Policy Optimization (ME-TRPO)
(Kurutach et al., 2018): Instead of using a single model, ME-TRPO uses an ensemble of neural networks to model the dynamics, which effectively combats model-bias.
The ensemble ˜ f φ = { ˜ f φ 1 , ..., ˜ f φ K } is trained using standard squared L2 loss.
In the policy improvement step, the policy is updated using Trust-Region Policy
Optimization (TRPO) (Schulman et al., 2015), on experience generated by the learned dynamics models.
Stochastic Lower Bound Optimization (SLBO) (Luo et al., 2019): SLBO is a variant of ME-TRPO with theoretical guarantees of monotonic improvement.
In practice, instead of using single-step squared L2 loss, SLBO uses a multi-step L2-norm loss to train the dynamics.
Model-Based Meta-Policy-Optimzation (MB-MPO) (Clavera et al., 2018): MB-MPO forgoes the reliance on accurate models by meta-learning a policy that is able to adapt to different dynamics.
Similar to ME-TRPO, MB-MPO learns an ensemble of neural networks.
However, each model in the ensemble is considered as a different task to meta-train (Finn et al., 2017) on.
MB-MPO meta-trains a policy that quickly adapts to any of the different dynamics of the ensemble, which is more robust against model-bias.
3. P OLICY S EARCH WITH B ACKPROPAGATION THROUGH T IME
Contrary to Dyna-style algorithms, where the learned dynamics models are used to provide imagined data, policy search with backpropagation through time exploits the model derivatives.
Consequently, these algorithms are able to compute the analytic gradient of the RL objective with respect to the policy, and improve the policy accordingly.
Probabilistic Inference for Learning Control (PILCO) (Deisenroth & Rasmussen, 2011; Deisenroth et al., 2015; Kamthe & Deisenroth, 2017):
In PILCO, Gaussian processes (GPs) are used to model the dynamics of the environment.
The dynamics model f D ( s t , a t ) is a probabilistic and nonparametric function of the collected data D .
The policy π θ is trained to maximize the RL objective by computing the analytic derivatives of the objective with respect to the policy parameters θ .
The training process iterates between collecting data using the current policy and improving the policy.
Inference in GPs does not scale in high dimensional environments, limiting its application to simpler domains.
Iterative Linear Quadratic-Gaussian (iLQG) (Tassa et al., 2012):
In iLQG, the ground-truth dynamics are assumed to be known by the agent.
The algorithm uses a quadratic approximation on the RL reward function and a linear approximation on the dynamics, converting the problem solvable by linear-quadratic regulator (LQR) (Bemporad et al., 2002).
By using dynamic programming, the optimal controller for the approximated problem is a linear time-varying controller.
iLQG is a model predictive control (MPC) algorithm, where re-planning is performed at each time-step.
Guided Policy Search (GPS) (Levine & Abbeel, 2014; Levine et al., 2015; Zhang et al., 2016;
Finn et al., 2016b; Montgomery & Levine, 2016; Chebotar et al., 2017): Guided policy search essentially distills the iLQG controllers π G into a neural network policy π θ by behavioural cloning, which minimizes E [ D KL ( π G ( ·| s t ) (cid:107) π θ )] .
The dynamics are modelled to be Gaussian-linear time-varying.
To prevent over-conﬁdent policy improvement that deviates from the last real-world trajectory, the reward function is augmented as ˜ r ( s t , a t ) =
r ( s t , a t ) − ηD KL ( π G ( ·| s t ) || p ( ·| s t )) , where p ( ·| s t ) is the passive dynamics distribution from last trajectories.
In this paper, we use the MD-GPS variant (Montgomery & Levine, 2016).
Stochastic Value Gradients (SVG) (Heess et al., 2015): SVG tackles the problem of compounding model errors by using observations from the real environment, instead of the imagined one.
To accommodate mismatch between model predictions and real transitions, the dynamics models in SVG are probabilistic.
The policy is improved by computing the analytic gradient of the real trajectories with respect to the policy.
Re-parametrization trick is used to permit back-propagation through the stochastic sampling.
3. S HOOTING A LGORITHMS
This class of algorithms provide a way to approximately solve the receding horizon problem posed in model predictive control (MPC) when dealing with non-linear dynamics and non-convex reward functions.
Their popularity has increased with the use of neural networks for modelling dynamics.
Random Shooting (RS) (Richards, 2005; Rao, 2009): RS optimizes the action sequence a t : t + τ to maximize the expected planning reward under the learned dynamics model, i.e., max a t : t + τ E s (cid:48)
t ∼ ˜ f φ [ (cid:80) t + τ t (cid:48)
=
t r ( s (cid:48) t , a (cid:48) t )] .
In particular, the agent generates K candidate random sequences of actions from a uniform distribution, and evaluates each candidate using the learned dynamics.
The optimal action sequence is approximated as the one with the highest return.
A RS agent only applies the ﬁrst action from the optimal sequence and re-plans at every time-step.
Mode-Free Model-Based (MB-MF) (Nagabandi et al., 2017):
Generally, random shooting has worse asymptotic performance when compared with model-free algorithms.
In MB-MF, the authors ﬁrst train a RS controller π RS , and then distill the controller into a neural network policy π θ using DAgger (Ross et al., 2011), which minimizes D KL ( π θ ( s t ) , π RS ) .
After the policy distillation step, the policy is ﬁne-tuned using standard model-free algorithms.
In particular the authors use
TRPO (Schulman et al., 2015).
Probabilistic Ensembles with Trajectory Sampling (PETS-RS and PETS-CEM)
(Chua et al., 2018):
In the PETS algorithm, the dynamics are modelled by an ensemble of probabilistic neural networks models, which captures both epistemic uncertainty from limited data and network capacity, and aleatoric uncertainty from the stochasticity of the ground-truth dynamics.
PETS-RS is the same as RS except for different modeling of the dynamics.
In PETS-CEM, the online optimization problem is solved using cross-entropy method (CEM) (De Boer et al., 2005; Botev et al., 2013) to obtain a better solution.
PETS-CEM can also plan in latent space of image observations (Hafner et al., 2018).
3. M ODEL - FREE B ASELINES
In our benchmark, we include MFRL baselines to quantify the sample complexity and asymptotic performance gap between MFRL and MBRL.
Speciﬁcally, we compare against representative
MFRL algorithms including Trust-Region Policy Optimization (TRPO) (Schulman et al., 2015),
Proximal-Policy Optimization (PPO) (Schulman et al., 2017; Heess et al., 2017),
Twin Delayed Deep
Deterministic Policy Gradient (TD3) (Fujimoto et al., 2018), and Soft Actor-Critic (SAC) (Haarnoja et al., 2018).
The former two are state-of-the-art on-policy MFRL algorithms, and the latter two are considered the state-of-the-art off-policy MFRL algorithms.
E XPERIMENTS
In this section, we present the results of our benchmarking and examine the causes that stagnate the performance of MBRL methods.
Speciﬁcally, we designed the benchmark to answer the following questions: 1) How do existing MBRL approaches compare against each other and against MFRL methods across environments with different complexity (Section 4.3)?
Are MBRL algorithms robust against observation and action noise (Section 4.4)?
and 3)
What are the main bottlenecks in the MBRL methods?
Aiming to answer the last question, we present three phenomena inherent of MBRL methods, which we refer to as dynamics bottleneck (Section 4.5), planning horizon dilemma (Section 4.6), and early termination dilemma (Section 4.7).
4. B ENCHMARKING E NVIRONMENTS
Our benchmark consists of 18 environments with continuous state and action space based on OpenAI
Gym (Brockman et al., 2016).
We include a full spectrum of environments with different difﬁculty and episode length, from CartPole to Humanoid.
More speciﬁcally, we have the following modiﬁcations:
• To accommodate traditional MBRL algorithms such as iLQG and GPS, we modify the reward function so that the gradient with respect to observation always exists or can be approximated.
• We note that early termination has not been applied in MBRL, and we speciﬁcally have both the raw environments and the variants with early termination, indicated by the sufﬁx ET.
• The original Swimmer-v0 in OpenAI Gym was unsolvable for all algorithms.
Therefore, we modiﬁed the position of the velocity sensor so that it’s easier to solve.
We name this easier version as Swimmer while still keep the original one as a reference, named as Swimmer-v0.
For a detailed description of the environments and the reward functions
[Figure]
4. E XPERIMENT S ETUP
Performance Metric and Hyper-parameter Search :
Each algorithm is run with 4 random seeds.
In the learning curves, the performance is averaged with a sliding window of 5 algorithm iterations.
The error bars were plotted by the default Seaborn (Waskom, 2010) smoothing scheme from the mean and standard deviation of the results.
Similarly, in the tables, we show the performance averaged across different random seeds with a window size of 5000 time-steps.
We perform a grid search for each algorithm separately, which is summarized in appendix B. For each algorithm, We show the results using the hyper-parameters producing the best average performance.
Training Time : In MFRL, 1 million time-step training is common, but for many environments,
MBRL algorithms converge much earlier than 200k time-steps and it takes an impractically long time to train for 1 million time-steps for some of the MBRL algorithms.
We therefore show both the performance of 200k time-step training for all algorithms and show the performance of 1M time-step training for algorithms where computation is not a major bottleneck.
4. B ENCHMARKING P ERFORMANCE
In Table 1, we summarize the performance of each algorithm trained with 200,000 time-steps.
We also include some representative performance curves in Figure 1.
The learning curves for all the environments can be seen in appendix C.
The engineering statistics shown in Table 2 include the computational resources, the estimated wall-clock time, and whether the algorithm is fast enough to run at real-time at test time, namely, if the action selection can be done faster than the default time-step of the environment.
In Table 5, we summarize the performance ranking.
Shooting Algorithms : RS is very effective on simple tasks such as InvertedPendulum, CartPole and
Acrobot, but as task difﬁculty increases RS gradually gets surpassed by PETS-RS and PETS-CEM, which indicates that modelling uncertainty aware dynamics is crucial for the performance.
At the same time, PETS-CEM is better than PETS-RS in most of the environments, showing the importance of an effective planning module.
However, PETS-CEM search is not as effective as PETS-RS in Ant, Walker2D and SlimHumanoid, indicating that we need more expressive and general planning module for more complex environments.
MB-MF does not have obvious gains compared to other shooting algorithms, but like other model-free controllers, MB-MF can jump out of performance local-minima in MountainCar.
Shooting algorithms are effective and robust across different environments.
Dyna-Style Algorithms
: MB-MPO surpasses the performance of ME-TRPO in most of the environments and achieves the best performance in domains like HalfCheetah.
Both algorithms seems to perform the best when the horizon is short.
SLBO can solve MountainCar and Reacher very efﬁciently, but more interestingly in complex environment it achieves better performance than ME-TRPO and MB-MPO, except for in SlimHumanoid.
This category of algorithms is not efﬁcient to solve long horizon complex domains due to the compounding error effect.
SVG : For the majority of the tasks, SVG does not have the best sample efﬁciency.
But for Humanoid environments, SVG is very effective compared with other MBRL algorithms.
Complex environments exacerbate compounding errors; SVG which uses real observations and a value function to look into future returns, is able to surpass other MBRL algorithms in these high-dimensional domains.
[Table]
PILCO : PILCO achieves one of the best sample efﬁciency in low dimentional environments such as Cartpole, Pendulum and InvertedPendulum.
But it fails in most other environments with bigger episode length and observation size, being unstable across random seeds and time-consuming to train.
GPS : GPS has the best performance in Ant-ET, but cannot match the best algorithms in other environments.
In the original GPS, the environment is usually 100 time-step long, while most of our environments are 200 or 1000 time-step.
Also GPS assumes several separate constant initial states, while our environments sample the initial state from a distribution.
The deviation of trajectories between iterations can be the reason of GPS’s performance drop.
[Table] [Table]
[Table] [Table]
[Table] [Table]
[Table] [Table]
MF baselines : SAC and TD3 are two very powerful baselines with very stable performance across different environments.
In general model-free and model-based methods are two almost evenly matched rivals when trained for 200,000 time-steps.
MB with Ground-truth Dynamics : Algorithms with ground-truth dynamics can solve the majority of the tasks, except for some of the tasks such as MountainCar.
With the increasing complexity of the environments, shooting methods gradually have much better performance than the policy search methods such as iLQG, whose linear quadratic assumption is not a good approximation anymore.
Early termination cause a lot of troubles for model-based algorithms, both with and without ground-truth dynamics, which is further studied in section 4.7.
4. N OISY E NVIRONMENTS
In this section, we study the robustness of each algorithm with respect to the noise added to the observation and actions.
Speciﬁcally, we added Gaussian white noise to the observations and actions with standard deviation σ o and σ a , respectively.
In Table 3 we show the results for the HalfCheetah environment, for the full results we refer the reader to appendix D.
[Table]
We use bold text to indicates a decrease of performance >10% of the performance without noise.
As expected, adding noise is in general detrimental to the performance of the MBRL algorithms.
ME-TRPO and SLBO are more likely to suffer from a catastrophic performance drop when compared to shooting methods such as PETS and RS, suggesting that re-planning successfully compensates for the uncertainty.
On the other hand, the Dyna-style method MB-MPO presents to be very robust against noise.
Due to the limited exploration in baseline, the performance is sometimes increased after adding noise that encourages exploration.
4. D YNAMICS B OTTLENECK
We further run MBRL algorithms for 1M time-steps on HalfCheetah, Walker2D, Hopper, and Ant environments to capture the asymptotic performance, as are shown in Table 4 and Figure 2.
The results show that MBRL algorithms plateau at a performance level well below their model-free counterparts and themselves with ground-truth dynamics.
This points out that when learning models, more data does not result in better performance.
For instance, PETS’s performance plateaus after 400k time-steps at a value much lower than the performance when using the ground-truth dynamics.
We also study the performance with different network capacity, as well as using linear of RBF parameterization, as summarized in Appendix G.
The following assumptions can potentially explain the dynamics bottleneck.
The prediction error accumulates with time, and MBRL inevitably involves prediction on unseen states.
While techniques such as probabilistic ensemble were proposed to capture uncertainty, it can be seen empirically in our paper as well as in Chua et al.
(2018), that prediction becomes unstable and inaccurate with time.
The policy and the learning of dynamics is coupled, which makes the agents more prone to performance local-minima.
While exploration and off-policy learning have been studied in Bellemare et al.
Dearden et al. (1999); Wiering & Schmidhuber (1998); Houthooft et al.
; Schaul et al.
; Fujimoto et al.
(2018), it has been barely addressed on current model-based approaches.
[Figure] [Figure]
-marking performance for 1 million -steps
[Figure]
4. P LANNING H ORIZON D ILEMMA
[Figure]
One of the critical choices in shooting methods is the planning horizon.
In Figure 3, we show the performance of iLQG,
CEM and RS, using the same number of candidate planning sequences, but with different planning horizon.
We notice that increasing the planning horizon does not necessarily increase the performance, and more often instead decreases the performance.
This happens both when using ground-truth dynamics and using learned dynamics.
We argue that this is result of insufﬁcient planning in a search space which increases exponentially with planning depth, i. e., the curse of dimensionality, as is also observed in Vemula et al.
; Hafner et al.
However, in more complex environments such as the ones with early terminations, short planning horizon can lead to catastrophic performance drop, which we discuss in appendix I.
We further experiment with the imaginary environment length in Dyna algorithms.
We have similar results that increasing horizon does not necessarily help the performance, which is summarized in appendix F.
4. E ARLY T ERMINATION D ILEMMA
Early termination, when the episode is ﬁnalized before the horizon has been reached, is a standard technique used in MFRL algorithms to prevent the agent from visiting unpromising states or damaging states for real robots (Peng et al., 2018; 2016; Merel et al., 2017; Heess et al., 2016; Brockman et al., 2016).
When early termination is applied to the real environments, MBRL can correspondingly also apply early termination in the planned trajectories, or generate early terminated imaginary data.
However, we ﬁnd this technique hard to integrate into the existing MB algorithms.
The results, shown in Table 1, indicates that early termination does in fact decrease the performance for MBRL algorithms of different types.
We further experiment with addition schemes to incorporate early termination, summarized in appendix I.
However none of them were successful.
We argue that to perform efﬁcient learning in complex environments, such as Humanoid, early termination is almost necessary.
We leave it as an important request for research.
[Table]
C ONCLUSIONS
In this paper, we benchmark the performance of a wide collection of existing MBRL algorithms, evaluating their sample efﬁciency, asymptotic performance and robustness.
Through systematic evaluation and comparison, we characterize three key research challenges for future MBRL research.
Across this very substantial benchmarking, there is no clear consistent best MBRL algorithm, suggesting lots of opportunities for future work bringing together the strengths of different approaches.
A E NVIRONMENT O VERVIEW
We provide an overview of the environments in this section.
Table 6 shows the dimensionality and horizon lengths of those environments
[Table]
and Table 7 speciﬁes their reward functions.
[Table] [Table]
A. E NVIRONMENT -S PECIFIC D ESCRIPTIONS
In this section, we provide details about environment-speciﬁc dynamics and goals.
Acrobot The dynamical system consists of a pendulum with two links.
The joint between the two links is actuated.
Initially, both links point downwards.
The goal is to swing up the pendulum, such that the tip of the pendulum reaches a given height.
Let θ 1 ,t , θ 2 ,t be the joint angles of the ﬁrst (with one end ﬁxed to a hinge) and second link at time t .
The 6-dimensional observation at time t is the tuple: (cos θ 1 ,t , sin θ 1 ,t , cos θ 2 ,t , sin θ 2 ,t , ˙ θ 1 ,t , ˙ θ 2 ,t ) .
The reward is the height of the tip of the pendulum: R t = − cos θ 1 ,t − cos ( θ 1 ,t + θ 2 ,t ) .
Pendulum A single-linked pendulum is ﬁxed on the one end, with an actuator located on the joint.
The goal is to keep the pendulum at the upright position.
Let θ t be the joint angle at time t .
The 3-dimensional observation at time t is (cos θ t , sin θ t , ˙ θ t )
The reward penalizes the position and velocity deviation from the upright equilibrium, as well as the magnitude of the control input.
InvertedPendulum
The dynamical system consists of a cart that slides on a rail, and a pole connected through an unactuated joint to the cart.
The only actuator applies force on the cart along the rail.
The actuator force is a real number.
Let θ t be the angle of the pole away from the upright vertical position, and x t be the position of the cart away from the centre of the rail at time t .
The 4-dimensional observation at time t is ( x t , θ t , ˙ x t , ˙ θ t ) .
The reward − θ 2 t penalizes the angular deviation from the upright position.
CartPole The dynamical system of Cart-Pole is very similar to that of the Inverted Pendulum environment.
The differences are: 1) the real-valued actuator input is discretized to − 1 , 1 , with a threshold at zero; 2) the reward cos θ t − 0 .
01 x 2 t indicates that the goal is to make the pole stay upright, and the cart stay at the centre of the rail.
MountainCar A car is initially positioned between two “mountains", and can drive on a onedimensional track.
The goal is to reach the top of the “mountain" on the right.
However, the engine of the car is not strong enough for it to drive up the valley in one go, so the solution is to drive back and forth to accumulate momentum.
The observation at time t is the tuple ( position t , velocity t ) , where both the position and velocity are one-dimensional, with respect to the track.
The reward at time t is simply position t .
Note that we use a ﬁxed horizon, so that the agent is encouraged to reach the goal as soon as possible.
Reacher2D (or Reacher)
An arm with two links is ﬁxed at one end, and is free to move on the horizontal 2D plane.
There are two actuators, located at the two joints respectively.
At each episode, a target is randomly placed on the 2D plane within reach of the arm.
The goal is to make the tip of the arm reach the target as fast as possible, and with the smallest possible control input.
Let θ t be the two joint positions, x target,t be the position of the target, and x tip,t be the position of the tip of the arm at time t , respectively.
The observation is (cos θ t , sin θ t , x target,t , ˙ θ t , x tip,t − x target,t ) .
The reward at time t is || x tip,t − x target,t || 22 − || a t || 22 , where the ﬁrst term is the Euclidean distance between the tip and the target.
HalfCheetah Half Cheetah is a 2D robot with 7 rigid links, including 2 legs and a torso.
There are 6 actuators located at 6 joints respectively.
The goal is to run forward as fast as possible, while keeping control inputs small.
The observation include the (angular) position and velocity of all the joints (including the root joint, whose position speciﬁes the robot’s position in the world coordinate), except for the x position of the root joint.
The reward is the x direction velocity plus penalty for control inputs.
Swimmer-v0 Swimmer-v0 is a 2D robot with 3 rigid links, sliding on a 2D plane.
There areactuators, located on the 2 joints between the links.
The root joint is located at the centre of the middle link.
The observation include the (angular) position and velocity of all the joints, except for the position of the two slider joints (indicating the x and y positions).
The reward is the x direction velocity plus penalty for control inputs.
Swimmer The dynamical system of Swimmer is similar to that of Swimmer-v0, except that the root joint is located at the tip of the ﬁrst link (i.e. the “head" of the swimmer).
Hopper Hopper is a 2D “robot leg" with 4 rigid links, including the torso, thigh, leg and foot.
There are 3 actuators, located at the three joints connecting the links.
The observation include the (angular) position and velocity of all the joints, except for the x position of the root joint.
The reward is the x direction velocity plus penalty for the distance to a target height and control input.
The intended goal is to hop forward as fast as possible, while approximately maintaining the standing height, and with the smallest control input possible.
We also add an alive bonus of 1 to the agents at every time-step, which is also applied to Ant, Walker2D.
Ant Ant is a 3D robot with 13 rigid links, including a torso 4 legs.
There are 8 actuators, 2 for each leg, located at the joints.
The observation include the (angular) position and velocity of all the joints, except for the x and y positions of the root joint.
The reward is the x direction velocity plus penalty for the distance to a target height and control input.
The intended goal is to go forward, while approximately maintaining the normal standing height, and with the smallest control input possible.
Walker2D Walker 2D is a planar robot, consisting of 7 rigid links, including a torso and 2 legs.
There are 6 actuators, 3 for each leg.
The observation include the (angular) position and velocity of all the joints, except for the x position of the root joint.
The reward is the x direction velocity plus penalty for the distance to a target height and control input.
The intended goal is to walk forward as fast as possible, while approximately maintaining the standing height, and with the smallest control input possible.
Humanoid Humanoid is a 3D human shaped robot consisting of 13 rigid links.
There areactuators, located at the humanoid’s abdomen, hips, knees, shoulders and elbows.
The observation space include the joint (angular) positions and velocities, centre of mass based inertia, velocity, external force, and actuator force.
The reward is the scaled x direction velocity, plus penalty for control input, impact (external force) and undesired height.
SlimHumanoid
The dynamical system of Slim Humanoid is similar to that of Humanoid, except that the observation is simply the joint positions and velocities, without the center of mass based quantities, external force and actuator force.
Also, the reward no longer penalizes the impact (external force).
B H YPER - PARAMETER S EARCH AND E NGINEERING D ETAILS
In this section, we provide a more detailed description of the hyper-parameters we search for each algorithm.
Note that we select the best hyper-parameter combination for each algorithm, but we still provide a reference hyper-parameter combination that is generally good for all environments.
B. I LQG
For iLQG algorithm, the hyper-parameters searched are summarized in 8.
While the recommended hyper-parameters usually have the best performance, they can result in more computation resources needed.
In the following sections, number of planning trajectory is also refereed as search population size.
[Table]
B. G ROUND - TRUTH CEM AND G ROUND - TRUTH RS
For the CEM and RS with ground-truth dynamics, we search only with different planning horizon, search population size.
which include 10, 20, 30, 40, 50, 60, 70, 80, 90, 100.
As also mentioned in planning horizon dilemma in section 4.6, the best planning horizon is usually 20 to
. B. RS, PETS AND PETS-RS
We mention that in Nagabandi et al.
(2017), RS has very different hyper-parameter sets from the
RS studied in PETS-RS Chua et al.
The search of hyper-parameters for RS is the same for
[Table]
RS using ground-truth dynamics as illustrated in the Table 9.
The PETS and PETS is searched with the hyper-parameters in Table 10.
For simpler environments, it is usually better to use a planning horizon of 30.
For environments such as Walker2D and Hopper, 100 is the best planning horizon.
We
[Table]
note that for the dynamics-propagation combination, we choose PE-E not because of having the best performance.
PE-E is among the best models, with comparable performance to other combinations such as PE-DS, PE-TS1, PE-TSinf.
However PE-E is very computation efﬁcient compared to other variants.
For example, PE-DS on PETS-CEM costs 68 hours for one random seed for HalfCheetah with planning horizon of 30 to train for 200,000 time-steps.
While PE-E usually only takes abouthours, and is suitable for research.
The best models for HalfCheetah uses planning horizon of 100, and takes about 15 hours.
We also note that with some trivial pre-processing of the observation function, such as using sin and cos functions to the angle observation, the performance can be much better for PETS.
We include the performance on the pre-processed task provided in the original PETS paper Chua et al.
(2018), and compare it with the performance on the provided task in the benchmark in Figure 4.
We note that for the modiﬁed environments in Chua et al.
(2018), the performance can reach more than 10000 for 200k time-steps.
[Figure]
both environments for PETS-CEM and PETS-RS
[Figure]
[Figure] [Figure]
In the benchmark results in the main paper, PETS-RS uses the search scheme in Table 10, except for it does not have hyper-parameters of elite size.
B. MBMF
Originally MBMF was designed to run for 1 million time-steps Nagabandi et al.
Therefore, to accommodate the algorithm with 200,000 time-steps, we perform the search in Table 11.
[Table]
B. METRPO AND SLBO
For METRPO and SLBO
[Table]
we search for the following hyper-parameters.
We note that for environments with episode length of 100 or 200, we always use the same length for imaginary episodes.
We also refer to Appendix F for more details.
[Table]
B. GPS
The GPS is based on the code-base Finn et al.
(2016a).
We note that in the original code-base, the agent samples the initial state from several separate conditions.
For each condition, there is not randomness of the initial state.
However, in our bench-marking environments, the initial state is sample from a Gaussian distribution
[Table]
which is essentially making the environments harder to solve
[Table]
B. PILCO
For PILCO, we search for the following hyper-parameter in Table 14.
We note that PILCO is very unstable across random seeds.
Also, it is quite common for PILCO algorithms to add additional penalty in existing code-bases using human priors.
We argue that it is unfair to other algorithms and we remove any additional reward functions.
Also, for PILCO to train for 200,000 time-steps, we have to use a data-set to increase training efﬁciency.
B. SVG
For SVG, we reproduce the variant of SVG-1 with experience replay, which is claimed in Heess et al.
[Table] [Table]
B.
[Table]
MB-MPO
In this algorithm
[Table]
we use most the hyper-parameters in the original paper Clavera et al
[Table] [Table]
except in the ones the algorithm is more sensitive to.
[Table]
M
For PPO and TRPO
[Table]
we search for different time-steps samples in one iteration.
For SAC and TD3, we use the default values from Haarnoja et al.
(2018) and Fujimoto et al.
) respectively.
[Table]
C D ETAILED B ENCH - MARKING P ERFORMANCE R ESULTS
[Figure]
In this appendix section
[Figure]
we include all the curves of every algorithms in Figure 5 and Figure 6.
Some of the GPS curves and PILCO curves are not shown in the ﬁgures.
We note that this is because their reward scale is sometimes very different from other algorithms
[Figure]
[Figure]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
In addition to Table
[Figure]
we also have the performance of SVG trained for 1 million time-steps.
For the environments of HalfCheetah, Ant, Walker2D and Hopper, the performance is respectively 578.7 ± 239.1,
[Table]
[Table]
D N OISY E NVIRONMENTS
In this appendix section [Table] we provide more details of the performance with noise for each algorithm.
In Figure 7 and Figure
[Table]
we show the curves of different algorithms
[Table]
and in Table 19 and Tablewe show the performance numbers at the end the of training.
The pink color indicates a decrease of performance, while the green color indicates a increase of performance, and black color indicates a almost the same performance.
[Table]
, respectively.
E P LANNING H ORIZON D ILEMMA G RID S EARCH
We note that we also perform the dilemma search with different population size with learnt PETSCEM.
We experiment both with the HalfCheetah in our benchmarking environments, as well as the environments from Chua et al.
(2018), whose observation is further pre-processed.
It can be seen from the ﬁgure that, planning horizon dilemma exists with different population size.
We also show that observation pre-processing can affect the performance by a large margin. [Figure] [Figure]
) CartPole MBMF
[Figure]
F P LANNING H ORIZON D ILEMMA IN D YNA A LGORITHMS
In this section, we study how the environment length and imaginary environment length (or planning horizon) affect the performance.
More speciﬁcally, we test with HalfCheetah and Ant, using different environment length form [100, 200, 500, 1000].
For the planning horizon, besides the matching
[Figure] (j1) HalfCheetah SAC [Figure] length, we also test all the length from [100, 200, 500, 800, 1000].
The ﬁgures are shown in Figure 10, and the tables are shown in Table 21.
Note that we also include planning horizon longer than the actual environment length for reference.
For example, for the Ant with 100 environment length, we also include results using 200, 500, 800,
[Table] [Figure] [Table] [Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure] [Table] [Figure] [Table]
[Figure]
[Table] [Figure] [Table] [Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure] [Table] [Figure] [Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
[Table]
[Figure]
with pre-processing in Chua et al.
[Figure]
=
[Figure] = Horizon= Horizon=
Horizon=
HalfCheetah
Env-
[Table]
[Table]
HalfCheetah
[Table]
[Table]
[Table]
Ant
[Table] [Table] 1000 planning horizon. As we can see, for the HalfCheetah environment, increasing planning horizon does not have obvious affects on the performance.
In the Ant environments with different environment lengths, a planning horizon of 100 usually produces the best performance, instead of the longer ones.
[Figure]
[Figure]
G D YNAMICS N ETWORK S TRUCTURE AND C APACITY
We also study how the structure or the capacity of the dynamics network affect the performance.
In
Figure 11, we show the performance of PETS-CEM on HalfCheetah using different networks to learn the dynamics.
In Rajeswaran et al.
, the authors show that two simple networks, linear network and RBF network, can be used as the policy network, which obtains similar performance compared with using multi-layer perceptron (MLP) in model-free reinforcement learning.
Therefore, we use linear network and RBF network to learn the dynamics in model-based reinforcement learning.
We also test the performance using wider and deeper networks.
As we can see from Figure 11, in model-based RL, linear network and RBF network lead to catastrophic performance drop, indicating multi-layer neural network (MLP) is needed to learn the features to model forward dynamics.
On the other hand, increasing the capacity of the MLP by making it much deeper and wider does not seem to increase the performance either.
H N ON -M U J O C O E NVIRONMENTS
To facilitate research, we also provide simulated agents that uses free physics engines other than
MuJoCo.
Some of the results can be shown in Figure 12.
We note that these environments have different reward and observation functions from the environments benchmarked in the main paper.
Therefore the results can not be used to compare with the results of the environments based on
MuJoCo.
[Figure]
[Figure]
performance curve for some of the tasks based on Roboschool or Pybullet Klimov &
Schulman (2017); AMD (2014); Ellenberger (2018).
We use the best hyper-parameters for the corresponding MuJoCo environments, which indicates potential performance gain can be obtained with more careful hyper-parameter search
[Table]
I E ARLY T ERMINATION
[Table]
In this appendix section, we include the results of several schemes we experiment with early termination.
The early termination dilemma is universal in all MBRL algorithms we tested, including Dynaalgorithms, shooting algorithms
[Table]
and algorithm that performs policy search with back-propagation through time.
To study the problem [Table] we majorly start with exploring shooting algorithms including
RS, PETS-RS and PETS-CEM, which only relates to early termination during planning.
In Tableand Table [Table] we also include the results that the agent does not consider being terminated in planning, even if it will be terminated, which we represent as "Unaware".
[Table]
For the algorithms with unknown dynamics
[Table]
we speciﬁcally study PETS.
We design the following schemes.
Scheme A :
The episode will not be terminated and the agent does not consider being terminated during planning.
[Table]
[Table] [Table] Scheme B : The episode will be terminated early and the agent adds penalty in planning to avoid being terminated.
Scheme C :
The episode will be terminated, and the agent pads zero rewards after the episode is terminated during planning.
Scheme D : The same as Scheme A except for that the episode will be terminated.
Scheme E : The same as Scheme C except for that agent is allow to interact with the environment for extra time-steps (100 time-steps for example) to learn dynamics around termination boundary.
The results are summarized in Table 25.
We also study adding more alive bonus, i. e. more death penalty during planning, whose results are shown in Table 26.