E XPLORING M ODEL - BASED P LANNING WITH P OLICY N ETWORKS
Anonymous authors
Paper under double-blind review
A BSTRACT
Model-based reinforcement learning (MBRL) with model-predictive control or online planning has shown great potential for locomotion control tasks in both sample efﬁciency and asymptotic performance.
Despite the successes, the existing planning methods search from candidate sequences randomly generated in the action space, which is inefﬁcient in complex high-dimensional environments.
In this paper, we propose a novel MBRL algorithm, model-based policy planning (POPLIN) that combines policy networks with online planning.
More speciﬁcally, we formulate action planning at each time-step as an optimization problem using neural networks.
We experiment with both optimization w.r t. the action sequences initialized from the policy network, and also online optimization directly w.r t. the parameters of the policy network.
We show that in the MuJoCo benchmarking environments, POPLIN is about 3x more sample efﬁcient than the previously stateof-the-art algorithms, such as PETS, TD3 and SAC.
To explain the effectiveness of our algorithm, we show that the optimization surface in parameter space is smoother than in action space.
Further more, we found the distilled policy network can be effectively applied without the expansive model predictive control during test time for some environments such as Cheetah.
Code is released 1 .
I NTRODUCTION
A model-based reinforcement learning (MBRL) agent learns its internal model of the world, i.e. the dynamics, from repeated interactions with the environment.
With the learnt dynamics, a MBRL agent can for example perform online planning, interact with imaginary data, or optimize the controller through dynamics, which provides signiﬁcantly better sample efﬁciency (Deisenroth & Rasmussen, 2011; Sutton, 1990; Levine & Abbeel, 2014; Levine & Koltun, 2013).
However, MBRL algorithms generally do not scale well with the increasing complexity of the reinforcement learning (RL) tasks in practice.
And modelling errors in dynamics that accumulate with time-steps greatly limit the applications of MBRL algorithms.
As a result, many latest progresses in RL has been made with model-free reinforcement learning (MFRL) algorithms that are capable of solving complex tasks at the cost of large number of samples (Schulman et al., 2017; Heess et al., 2017; Schulman et al., 2015;
Mnih et al., 2013; Lillicrap et al., 2015; Haarnoja et al., 2018).
With the success of deep learning, a few recent works have proposed to learn neural network-based dynamics models for MBRL.
Among them, random shooting algorithms (RS), which uses modelpredictive control (MPC), is shown to have good robustness and scalability (Richards, 2005).
In shooting algorithms, the agent randomly generates action sequences, use the dynamics to predict the future states, and choose the ﬁrst action from the sequence with the best expected reward.
However,
RS usually has worse asymptotic performance than model-free controllers (Nagabandi et al., 2017), and the authors of the the PETS algorithm (Chua et al., 2018) suggest that the performance of RS is directly affected by the quality of the learnt dynamics.
They propose a probabilistic ensemble to capture model uncertainty, which enables PETS algorithm to achieve both better sample efﬁciency and better asymptotic performance than state-of-the-art model-free controllers in environments such as Cheetah.
However, PETS is not as effective on environments with higher dimensionality.
In this paper, we explore MBRL algorithms from a different perspective, where we treat the planning at each time-step as an optimization problem.
Random search in action space, as what is being done
[Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure] [Figure] [Figure] [Figure]
[Figure]
[Figure] [Figure]
The are respectively visualization PETS et al. we both is not smooth with respect to trajectory.
POPLIN, using policy networks has much better search efﬁciency, while PETS is stuck around its initialization.
The details are in in state-of-the-art MBRL algorithms such as PETS, is insufﬁcient for more complex environments.
On the one hand, we are inspired by the success of AlphaGo (Silver et al., 2016; 2017), where a policy network is used to generate proposals for the Monte-Carlo tree search.
On the other hand, we are inspired by the recent research into understanding deep neural networks (Nguyen & Hein, 2017;
Li et al., 2018; Soudry & Hoffer, 2017).
Deep neural networks, frequently observed in practices, is much less likely to get stuck in sub-optimal points.
In Figure 1, we apply principal component analysis (PCA) on the action sequences generated in each planning iteration within one time-step.
The reward surface of the action space is not smooth and prone to local-minimas.
We argue that optimization in the policy network’s parameter space will be more efﬁcient.
Furthermore, we note that the state-of-the-art MBRL algorithm with MPC cannot be applied real-time.
We therefore experiment with different policy network distillation schemes for fast control without MPC.
To sum up, the contribution of this paper is three-fold:
• We apply policy networks to generate proposals for MPC in high dimensional locomotion control problems with unknown dynamics.
• We formulate planning as optimization with neural networks, and propose policy planning in parameter space, which obtain state-of-the-art performance on current bench-marking environments, being about 3x more sample efﬁcient than the previous state-of-the-art algorithm, such as PETS (Chua et al., 2018), TD3 (Fujimoto et al., 2018) and SAC (Haarnoja et al., 2018).
• We also explore policy network distillation from the planned trajectories.
We found the distilled policy network alone achieves high performance on environments like Cheetah without the expansive online planning.
R ELATED W ORK
Model-based reinforcement learning (MBRL) has been long studied.
Dyna (Sutton, 1990; 1991) algorithm alternately performs sampling in the real environments and optimize the controllers on the learned model of the environments.
Other pioneering work includes PILCO (Deisenroth & Rasmussen, 2011), where the authors model the dynamics using Gaussian Process and directly optimize the surrogate expected reward.
Effective as it is to solve simple environments, PILCO heavily suffers the curse of dimensionality.
In (Levine & Abbeel, 2014; Levine & Koltun, 2013;
Levine et al., 2016; Chebotar et al., 2017; Zhang et al., 2018), the authors propose guided policy search (GPS).
GPS uses iLQG
(Li & Todorov, 2004; Todorov & Li, 2005; Tassa et al., 2012) as the local controller, and distill the knowledge into a policy neural network.
In SVG (Heess et al., 2015), the authors uses stochastic value gradient so that the stochastic policy network can be optimized by back-propagation with off-policy data.
Recently with the progress of model-free algorithms such as TRPO and PPO (Schulman et al., 2015; 2017), Kurutach et al.
; Luo et al.
(2019) propose modern variants of Dyna, where TRPO (Schulman et al., 2015) is used to optimize the policy network using data generated by the learnt dynamics.
Concurrent to this work, Janner et al.
(2019) further use SAC (Haarnoja et al., 2018) to train the policy network, and gets state-of-the-art performance on many tasks.
At the same time, random shooting methods proposed by Nagabandi et al.
Chua et al.
(2018) have shown its robustness and effectiveness on benchmarking environments.
PETS algorithm
(Chua et al., 2018) is considered by many to be the state-of-the-art shooting algorithm, which we discuss in detail in section 3.
Dynamics is also used to obtain better value estimation to speed up training (Gu et al., 2016;
Feinberg et al., 2018; Buckman et al., 2018).
Latent dynamics models using VAE (Kingma & Welling, 2013) are commonly used to solve problems with image input (Ha & Schmidhuber, 2018a;b; Hafner et al., 2018; Kaiser et al., 2019).
B ACKGROUND 3. R EINFORCEMENT L EARNING
In reinforcement learning, the problem of solving the given task is formulated as a inﬁnite-horizon discounted Markov decision process.
For the agent, we denote the action space and state space respectively as A and S .
We also denote the reward function and transition function as r ( s t , a t ) and f ( s t +1 | s t , a t ) , where s t ∈ S and a t ∈
A are the state and action at time-step t .
The reward function is assumed known to the agent in this work.
The agent maximizes its expected total reward J ( π ) =
E π [ (cid:80) ∞ t =0 r ( s t , a t )] with respect to the agent’s controller π .
3. R ANDOM S HOOTING A LGORITHM AND PETS
Our proposed algorithm is based on the random shooting algorithm (Richards, 2005).
In random shooting algorithms (Nagabandi et al., 2017; Chua et al., 2018), a data-set of D = { ( s t , a t , s t +1 ) } is collected from previously generated real trajectories.
The agent learns an ensemble of neural networks denoted as f φ ( s t +1 | s t , a t ) , with the parameters of the neural networks denoted as φ .
In planning, the agent randomly generates a population of K candidate action sequences.
Each action sequence, denoted as a = { a 0 , ..., a τ } , contains the control signals at every time-steps within the planning horizon τ .
The action sequence with the best expected reward given the current dynamics network f φ ( s t +1 | s t , a t ) is chosen.
RS, as a model-predictive control algorithm, only executes the ﬁrst action signal and re-plan at time-step.
In PETS (Chua et al., 2018), the authors further use cross entropy method (CEM) (De Boer et al., 2005; Botev et al., 2013) to re-samples sequences near the best sequences from the last CEM iteration.
M ODEL -B ASED P OLICY P LANNING Algorithm 1 General POPLIN Framework
1: while Training iterations not Finished do 2: for i th time-step of the agent do 3:
CEM planning as in section 4.1, 4.
Execute the ﬁrst action from CEM.
5: end for 6:
Dynamics update and policy distillation.
7: end while
In this section, we describe two variants of
POPLIN: model-based policy planning in action space ( POPLIN-A ) and model-based policy planning in parameter space ( POPLIN-P ).
Following the notations in section 3.2, we deﬁne the expected planning reward function at time-step i as follows:
[Equation]
The action sequence a i = { a i , a i +1 , ..., a i + τ } is generated by the policy search module, as later described in Section 4.1 and 4.2.
The expectation of predicted trajectories { s i , s i +1 , ...,
s i + τ } is estimated by creating P particles from the current state.
The dynamics model f k,tφ ( s t +1 | s t , a t ) used by k th particle at time-step t is sampled from deterministic or probabilistic ensemble models.
To better illustrate, throughout the paper we denote this dynamics as a ﬁxed deterministic model, i.e. f k,tφ ≡ f φ .
In practice the dynamics uses probabilistic ensemble models, which requires some trivial modiﬁcations to the math and we refer readers to PETS Chua et al.
(2018) for details.
4. M ODEL - BASED P OLICY P LANNING IN A CTION S PACE
In model-based policy planning in action space (POPLIN-A), we use a policy network to generate good initial action distribution.
We denote the policy network as π ( s t ) .
Once the policy network proposes sequences of actions on the expected trajectories, we add Gaussian noise to the candidate actions and use CEM to ﬁne-tune the mean and standard deviation of the noise distribution.
Similar to deﬁning a i = { a i , a i +1 , ..., a i + τ } , we denote the noise sequence at time-step t with horizon τ as δ i =
{ δ i , δ i +1 , ..., δ i + τ } .
We initialize the noise distribution as a Gaussian distribution with mean µ 0 = 0 and covariance Σ
= σ 20 I , where σ 20 is the initial noise variance.
In each
CEM iteration, we ﬁrst sort out the sequences with the top ξ + 1 expected planning reward, whose noise sequences are denoted as { δ
i , δ 1 i , ..., δ ξi } .
Then we estimate the noise distribution of the elite candidates, i. e., Σ (cid:48) [Equation] [Equation] [Equation]
[Equation]
(cid:48)
[Equation] [Equation] [Equation] The elite distribution ( µ (cid:48) , Σ (cid:48) ) in CEM algorithm is used to update the candidate noise distribution as µ = (1 − α ) µ + αµ (cid:48) , Σ
= (1 − α )Σ + α Σ (cid:48) .
For every time-step, several CEM iterations are performed by candidate re-sampling and noise distribution updating.
We provide detailed algorithm boxes in appendix A.1.
We consider the following two schemes to add action noise.
POPLIN-A-Init:
In this planning schemes, we use the policy network only to propose the initialization of the action sequences.
When planning at time-step i with observed state s i , we ﬁrst obtain the initial reference action sequences, denoted as ˆa i
= { ˆ a i , ˆ a i +1 , ..., ˆ a i + τ } , by running the initial forward pass with policy network.
At each planning time-step t, where i ≤ t ≤ i + τ , we have ˆ a t
=
π
( ˆ s t ) , where ˆ s t = f φ (ˆ s t − 1 , a t − 1 ) , ˆ s i
=
s i
The expected reward given search noise δ i will be:
[Equation]
, where s t +1 = f φ ( s t +1 | s t , ˆ a t + δ t ) .
[Equation]
POPLIN-A-Replan: POPLIN-A-Replan is a more aggressive planning schemes, which always re-plans the controller according the changed trajectory given the current noise distribution.
If we had the perfect dynamics network and the policy network, then we expect re-planning to achieve faster convergence the optimal action distribution.
But it increases the risk of divergent behaviors.
In this case, the expected reward for each trajectory is
[Equation]
, where s t +1 = f φ
[Equation]
s
[Equation]
+
[Equation]
4. M ODEL - BASED P OLICY P LANNING IN P ARAMETER S PACE
While planning in the action space is a natural extension of the original PETS algorithm, we found it provides little performance improvement in complex environments.
One potential reason is that POPLIN-A still performs CEM searching in action sequence space, where the conditions of convergence for CEM is usually not met.
Let’s assume that a robot arm needs to either go left or right to get past the obstacle in the middle.
In CEM planning in the action space, the theoretic distribution mean is always going straight, which fails to model the bi-modal action distribution.
Indeed, planning in action space is a non-convex optimization whose surface has lots of holes and peaks.
Recently, much research progress has been made in understanding why deep neural networks are much less likely to get stuck in sub-optimal points Nguyen & Hein (2017);
Li et al.
; Soudry & Hoffer (2017).
And we believe that planning in parameter space is essentially using deeper neural networks.
Therefore, we propose model-based policy planning in parameter space (POPLIN-P).
Instead of adding noise in the action space, POPLIN-P adds noise in the parameter space of the policy network.
We denote the parameter vector of policy network as θ , and the parameter noise sequence starting from time-step i as ω i = { ω i , ω
i +1 , ..., ω
i + τ } .
The expected reward function is now
R
[Equation]
, where s t +1 = f φ ( s t +1 | s t , π θ + ω t ( s t )) .
Similarly, we update the CEM distribution towards the following elite distribution:
[Equation]
We can force the policy network noise within the sequence to be consistent, i.e. ω i
= ω
i +
= ...
= ω i + τ , which we name as POPLIN-P-Uni .
This reduces the size of the ﬂattened noise vector from ( τ + 1) | θ | to | θ | , and is more consistent in policy behaviors.
The noise can also be separate for each time-step, which we name as POPLIN-P-Sep .
We benchmark both schemes in section 5.4.
Equivalence to re-parameterized stochastic policy: Stochastic policy network encourages exploration, and increases the robustness against the impact of compounded model errors.
POPLIN-P, which inserts exogenous noise into the parameter space, can be regarded as a re-parameterized stochastic policy network, which natural combines stochastic policy network with planning.
4. M ODEL - PREDICTIVE C ONTROL AND P OLICY C ONTROL
MBRL with online re-planning or model-predictive control (MPC) is effective, but at the same time time-consuming.
Many previous attempts have tried to distill the planned trajectories into a policy network Levine & Abbeel (2014); Levine & Koltun (2013); Chebotar et al.
; Zhang et al.
(2018), and control only with policy network.
In this paper, we deﬁne two settings of using POPLIN:
MPC Control and Policy Control .
In MPC control, the agent uses policy network during the online planning and only execute the ﬁrst action.
In policy control, the agent directly executes the signal produced by the policy network given current observation, just like how policy network is used in
MFRL algorithms.
We show both performance of POPLIN in this paper.
4. P OLICY D ISTILLATION S CHEMES
The agents iterate between interacting with the environments, and distilling the knowledge from planning trajectory into a policy network.
We consider several policy distillation schemes here, and discuss their effectiveness in the later experimental section.
Behavior cloning (BC) : BC can be applied to POPLIN-A and POPLIN-P, by minimizing the squared
L2 loss as Equation 7.
D is the collection of observation and planned action from real environment.
When applying BC to POPLIN-P, we ﬁx parameter noise of the network to be zeros.
[Equation]
Generative adversarial network training (GAN) Goodfellow et al.
(2014): GAN can be applied to POPLIN-P.
We consider the following fact.
During MPC control, the agent only needs to cover the best action sequence in its action sequence distribution.
Therefore, instead of point-to-point supervised training such as BC, we can train the policy network using GAN:
[Equation]
(8) where a discriminator D parameterized by ψ is used, and we sample the random noise z from the initial CEM distribution N ( 0 , σ 0 I ) .
Setting parameter average (AVG) : AVG is also applicable to POPLIN-P.
During interaction with real environment, we also record the optimized parameter noise in to the data-set, i. e. D =
{ ( s, ω ) } .
And we sacriﬁce the effectiveness of the policy control and only use policy network as a good search initialization.
The new parameter is updated as θ = θ + 1 / |D| (cid:80) ω ∈D ω.
E XPERIMENTS
In section 5.1, we compare POPLIN with existing algorithms.
We also show the policy control performance of POPLIN with different training methods in section 5.2.
In section 5.3, we provide explanations and analysis for the effectiveness of our proposed algorithms by exploring and visualizing the planner’s reward optimization surface.
In section 5.4, we study the sensitivity of our algorithms with respect to hyper-parameters, and show the performance of different algorithm variants.
[Figure] [Figure]
[Table]
5. M U J O C O B ENCHMARKING P ERFORMANCE
In this section, we compare POPLIN with existing reinforcement learning algorithms including
PETS (Chua et al., 2018), GPS (Levine et al., 2016), RS (Richards, 2005), MBMF (Nagabandi et al., 2017), TD3 (Fujimoto et al., 2018) METRPO
(Kurutach et al., 2018), PPO (Schulman et al., 2017;
Heess et al., 2017), TRPO (Schulman et al., 2015) and SAC (Haarnoja et al., 2018), which includes the most recent progress of both model-free and model-based algorithms.
We examine the algorithms with 12 environments, which is a wide collection of environments from OpenAI Gym (Brockman et al., 2016) and the environments proposed in PETS (Chua et al., 2018), which are summarized in appendix A.2.
Due to the page limit and to better visualize the results, we put the complete ﬁgures and tables in appendix A.3.
And in Figure 2 and Table 1, we show the performance of our algorithms and the best performing baselines.
The hyper-parameter search is summarized in appendix A.3.1.
As shown in Table 1, POPLIN achieves state-of-the-art performance in almost all environments, solving most of the them with 200,000 or 50,000 time-steps, instead of 1 million time-steps commonly used in MFRL algorithms.
POPLIN-A (POPLIN-A-BC-Replan) has the best performance in simpler environments such as Pendulum, Cart-pole, Swimmer.
But on complex environments such as Ant, Cheetah or Hopper, POPLIN-A does not have obvious performance gain compared with PETS.
POPLIN-P (POPLIN-P-Sep-AVG) on the other hand, has consistent and stable performance among different environments.
POPLIN-P is signiﬁcantly better than all other algorithms in complex environments such as Ant and Cheetah.
However, like other model-based algorithms, POPLIN cannot solve environments such as Walker and Humanoid.
the performance of POPLIN plateaus quickly. Gradually model-free algorithms will have better asymptotic performance.
We view this as a bottleneck of our algorithms and leave it to future research.
5. P OLICY C ONTROL P ERFORMANCE
In this section, we show the performance of POPLIN without MPC.
To be more speciﬁc, we show the performance with the Cheetah, Pendulum, Pusher and Reacher3D, as shown in Figure 3, and we refer readers to appendix A.4 for the full results.
[Figure]
[Figure] [Figure]
We note that policy control is not always successful, and in environments such as Ant and Walker2D, the performance is almost random.
In simple environments such as Pusher and Reacher3D, POPLIN-A has the best MPC performance, but has worse policy control performance compared with POPLIN-PBC and POPLIN-P-GAN.
At the same time, both POPLIN-P-BC and POPLIN-P-GAN are able to efﬁciently distill the knowledge from planned trajectory.
Which one of POPLIN-P-BC and POPLIN-PGAN is better depends on the environment tested, and they can be used interchangeably.
This indicates that POPLIN-A, which uses a deterministic policy network, is more prone to distillation collapse than
POPLIN-P, which can be interpreted as using a stochastic policy network with reparameterization trick.
POPLIN-P-Avg, which only use policy network as optimization initialization has good MPC performance, but sacriﬁces the policy control performance.
In general, the performance of policy control lags behind MPC control.
5. S EARCH E FFECTIVENESS AND R EWARD S URFACE
In this section, we explore the reasons for the effectiveness of POPLIN.
In Figure 4, we show the performance of PETS, POPLIN-A and POPLIN-P with different population sizes.
As we can see, PETS and POPLIN-A, which are the two algorithms that add search noise in the action space, cannot increase their performance by having bigger population size.
However, POPLIN-P is able to efﬁciently increase performance with bigger population size.
We then visualize the candidates in their
[Figure] [Figure]
or optimization surface in Figure 1.
We use PCA (principal component analysis) to transform the action sequences into 2D features.
As we can see, the reward surface is not smooth, with lots of local-minima and local-maxima islands.
The CEM distribution of PETS algorithm is almost ﬁxed across iterations on this surface, even if there are potentially higher reward regions.
POPLIN is able to efﬁciently search through the jagged reward surface, from the low-reward center to the high reward left-down corner.
To further understand why POPLIN is much better at searching through the reward surface, we then plot the ﬁgures in the solution space in Figure 5.
More speciﬁcally, we now perform
PCA on the policy parameters for POPLIN-P. As we can see in Figure 5 (c), the reward surface in parameter space is much smoother than the reward surface in action space, which are shown in
Figure 5 (a), (b).
POPLIN-P can efﬁciently search through the smoother reward surface in parameter space.
[Figure]
In Figure 6, we also visualize the actions distribution in one episode taken by PETS, POPLIN-A and POPLINP using policy networks of different number of hidden layers.
We again use PCA to project the actions into 2D feature space.
As we can see, POPLIN-P shows a clear pattern of being more multi-modal with the use of deeper the network.
5. A BLATION S TUDY
In this section, we study how sensitive our algorithms are with respect to some of the crucial hyperparameters, for example, the initial variance of the CEM noise distribution.
We also show the performance of different algorithm variants.
The full ablation study and performance against different random seeds are included in appendix A.5.
In Figure 7 (a), we show the performance of POPLIN-A using different training schemes.
We try both training with only the real data samples, which we denote as "Real", and training also with imaginary data the agent plans into the future, which we denote as "Hallucination".
In practice, POPLIN-A-Init performs better than POPLIN-A-Replan, which suggests that there can be divergent or overconﬁdent update in POPLIN-A-Replan.
And training with or without imaginary does not have big impact on the performance.
In Figure7 (b) and (c), we also compare the performance of POPLIN-P-Uni with POPLIN-P-Sep, where we show that POPLIN-P-Sep has much better performance than POPLIN-P-Uni, indicating the search is not efﬁcient enough in the constrained parameter space.
For POPLIN-P-Avg, with bigger initial variance of the noise distribution, the agent gets better at planning.
However, increasing initial noise variance does not increase the performance of PETS algorithm, as shown in 7 (b), (d).
It is worth mentioning that POPLIN-P-GAN is highly sensitive to the entropy penalty we add to the discriminator, with the 3 curves in Figure7 (c) using entropy penalty of 0.003, 0.001 and 0.0001 respectively,
C ONCLUSIONS
In this paper, we explore efﬁcient ways to combine policy networks with model-based planning.
We propose POPLIN, which obtains state-of-the-art performance on the MuJoCo benchmarking environments.
We study different distillation schemes to provide fast controllers during testing.
More importantly, we formulate online planning as optimization using deep neural networks.
We believe
POPLIN will scale to more complex environments in the future.
A A PPENDIX A. A LGORITHM D IAGRAMS
To better illustrate the algorithm variants of our proposed methods, we summarize them in Algorithm 2, 3, 4.
Algorithm
1: Initialize policy network parameters θ , dynamics network parameters φ , data-set D 2: while Training iterations not Finished do 3: for i th time-step of the agent do (cid:46)
Sampling Data 4:
Initialize reference action sequence { ˆ a i , ˆ a
i +1 , ..., ˆ a i
+ τ } .
(cid:46)
Using Equation5:
Initialize action-sequence noise distribution.
µ = µ 0 , Σ
= σ 20 I 6: for j th CEM Update do (cid:46) CEM Planning 7:
Sample action noise sequences { δ i } from N ( µ, Σ) .
8: for Every candidate δ i do (cid:46) Trajectory Predicting 9: for t
= i to i + τ , s t +1 =
f φ ( s t +1 | s t , a t =
ˆ a t + δ t ) 10:
Evaluate expected reward of this candidate.
11: end for 12:
Fit distribution of the elite candidates as µ (cid:48) , Σ (cid:48) .
Update noise distribution µ = (1 − α ) µ + αµ (cid:48) , Σ =
(1 − α )Σ + α Σ (cid:48) 14: end for 15:
Execute the ﬁrst action from the optimal candidate action sequence.
16: end for 17:
Update φ using data-set D (cid:46)
Dynamics Update 18:
Update using
(cid:46) Policy Distillation 19: end while µ = µ 0 , Σ
= σ 20 I 5: for j th CEM Update do (cid:46) CEM Planning 6:
Sample action noise sequences { δ i } from N ( µ, Σ) .
7: for Every candidate δ i do (cid:46) Trajectory Predicting 8: for t
= i to i + τ , s t +1 =
f φ ( s t +1 | s t , a t = π θ ( s t ) + δ t ) 9:
Evaluate expected reward of this candidate.
10: end for 11:
Fit distribution of the elite candidates as µ (cid:48) , Σ (cid:48) .
Update noise distribution µ = (1 − α ) µ + αµ (cid:48) , Σ =
(1 − α )Σ + α Σ (cid:48) 13: end for 14:
Execute the ﬁrst action from the optimal candidate action sequence.
15: end for 16:
Update φ using data-set D (cid:46)
Dynamics Update 17:
Update θ using data-set D (cid:46) Policy Distillation 18: end while
A. B ENCH - MARKING E NVIRONMENTS
In the original PETS paper Chua et al.
(2018), the authors only experiment with 4 environments, which are namely Reacher3D, Pusher, Cartpole and Cheetah.
In this paper, we experiment with themore environments based on the standard bench-marking environments from OpenAI Gym Brockman et al.
More speciﬁcally, we experiment with InvertedPendulum, Acrobot, Pendulum, Ant,
Hopper, Swimmer, Walker2d.
We also note that the Cheetah environment in PETS Chua et al.
(2018) is different from the standard HalfCheetah-v1 in OpenAI Gym.
Therefore we experiment with both versions in our paper, where the Cheetah from PETS is named as "Cheetah", and the HalfCHeetah
1: Initialize policy network parameters θ , dynamics network parameters φ , data-set D 2: while Training iterations not Finished do 3: for i th time-step of the agent do (cid:46)
Sampling Data 4:
Initialize parameter-sequence noise distribution.
µ = µ 0 , Σ
= σ 20 I 5: for j th CEM Update do (cid:46) CEM Planning 6:
Sample parameter noise sequences { ω i } from N ( µ, Σ) .
7: for Every candidate ω
i do (cid:46)
Trajectory Predicting 8: for t
= i to i + τ , s t +1 =
f φ ( s t +1 | s t , a t = π θ + ω t ( s t )) 9:
Evaluate expected reward of this candidate.
10: end for 11:
Fit distribution of the elite candidates as µ (cid:48) , Σ (cid:48) .
Update noise distribution µ = (1 − α ) µ + αµ (cid:48) , Σ =
(1 − α )Σ + α Σ (cid:48) 13: end for 14:
Execute the ﬁrst action from the optimal candidate action sequence.
15: end for 16:
Update φ using data-set D (cid:46)
Dynamics Update 17:
Update θ using data-set D (cid:46) Policy Distillation 18: end while
[Table]
et al
[Table]
Table 2.
from OpenAI Gym is named as "Cheetah-v0".
Empirically, Cheetah is much easier to solve than
Cheetah-v0, as show in Table 2 and Table 4.
We also include two swimmer, which we name as
Swimmer and Swimmer-v0, which we explain in section A.2.1.
[Figure]
(i) Reacher3D
[Figure]
A.2. F IXING THE S WIMMER E NVIRONMENTS
We also notice that after an update in the Gym environments, the swimmer became unsolvable for almost all algorithms.
The reward threshold for solving is around 340 for the original swimmer
[Figure]
but almost all algorithms, including the results shown in many published papers Schulman et al.
(2017), will be stuck at the 130 reward local-minima.
We note that this is due the fact that the velocity sensor is on the neck of the swimmer, making swimmer extremely prone to this performance local-minimum.
We provide a ﬁxed swimmer, which we name as Swimmer, by moving the sensor from the neck to the head.
We believe this modiﬁcation is necessary to test the effectiveness of the algorithms. [Table] [Table]
A. F ULL R ESULTS OF B ENCH - MARKING P ERFORMANCE
In this section [Table] we show the ﬁgures of all the environments in Figure 8.
We also include the ﬁnal performance in the Table 2 and 4.
As we can see [Table] POPLIN has consistently the best performance among almost all the environments.
We also include the time-steps we use on each environment for all the algorithms in Table 2 and 4.
A.3. H YPER - PARAMETERS
In this section
[Table]
we introduce the hyper-parameters we search during the experiments.
One thing to notice is that, for all of the experiments on PETS, POPLIN, we use the model type PE (probabilistic ensembles) and propagation method of E (expectation).
While other combinations of model type and propagation methods might result in better performance, they are usually prohibitively computationally expensive.
For example, the combination of PE-DS requires a training time of about 68 hours for one random seed, for PETS to train with 200 iteration, which is 200,000 time-step.
As a matter of fact, PE-E is actually one of the best combination in many environments.
Since POPLIN is based on
PETS, we believe this is a fair comparison for all the algorithms.
We show the hyper-parameter search we perform for PETS in the paper in Table 5.
For the hyperparameters speciﬁc to POPLIN, we summarize them in 6 and 7.
[Table] [Table]
[Table]
A. F ULL R ESULTS OF P OLICY C ONTROL
Due to the space limit, we are not able to put all of the results of policy control in the main article.
More speciﬁcally, we add the ﬁgure for the original Cheetah-v0 compared to the ﬁgures shown in the main article, as can be seen in 9 (b).
Again, we note that POPLIN-P-BC and POPLIN-P-GAN are comparable to each other, as mentioned in the main article.
POPLIN-P-BC and POPLIN-P-GAN are the better algorithms respectively in Cheetah and Cheetah-v0, which are essentially the same environment with different observation functions.
[Figure]
A. A BLATION S TUDY FOR D IFFERENT V ARIANT OF POPLIN
In this section [Figure] we show the results of different variant of our algorithm.
In Figure 11, the performances of different random seeds are visualized, where we show that POPLIN has similar randomness in performance to PETS.
Additionally, we visualize POPLIN-P-BC in Figure 10 (b), whose best distribution variance for policy planning is 0 .
01 , while the best setting for testing is 0 .
A. P OPULATION S IZE
In Figure 12, we include more detailed ﬁgures of the performance of different algorithms with different population size.
One interesting ﬁnding is that even with ﬁxed parameters of zeros, POPLINP can still performance very efﬁcient search.
This is indicating that the efﬁciency in optimization of
[Figure] [Figure] POPLIN-P, especially of POPLIN-P-AVG, is the key reasons for successful planning.
However, this scheme naturally sacriﬁces the policy distillation and thus cannot be applied without planning.
A. T HE R EWARD S URFACE OF D IFFERENT A LGORITHM
In this section [Figure] we provide a more detailed description of the reward surface with respect the the solution space (action space for PETS and POPLIN-A, and parameter space for POPLIN-P) in
Figure 13, 14, 15, 16, 17.
As we can see, variants of POPLIN-A are better at searching, but the reward surface is still not smooth.
POPLIN-A-Replan is more efﬁcient in searching than POPLIN-A-Init, but the errors in dynamics limit its performance.
We also include the results for POPLIN-P using a 1-layer neural network in solution space in Figure 16 (g), (h).
The results indicate that the deeper the network, the better the search efﬁciency.
We also provide more detailed version of Figure 1 in Figure 18.
We respectively show the surface for
PETS, POPLIN-P-P using 1 and 0 hidden layers.
Their planned trajectories across different CEM updates are visualized in Figure 19, 20, 21.
Originally in Figure 1, we use the trajectories in iteration
[Figure]
[Figure]
[Figure]
Iteration
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]
[Figure] [Figure]