Title: THE PREDICTRON: END-TO-END LEARNING AND PLANNING

Abstract: One of the key challenges of artificial intelligence is to learn models that are effective in the context of planning. In this document we introduce the predictron architecture. The predictron consists of a fully abstract model, represented by a Markov reward process, that can be rolled forward multiple "imagined" planning steps. Each forward pass of the predictron accumulates internal rewards and values over multiple planning depths. The predictron is trained end-to-end so as to make these accumulated values accurately approximate the true value function. We applied the predictron to procedurally generated random mazes and a simulator for the game of pool. The predictron yielded significantly more accurate predictions than conventional deep neural network architectures.

1. INTRODUCTION:

The central idea of model-based reinforcement learning is to decompose the RL problem into two subproblems: learning a model of the environment, and then planning with this model. The model is typically represented by a Markov reward process (MRP) or decision process (MDP). The planning component uses this model to evaluate and select among possible strategies. This is typically achieved by rolling forward the model to construct a value function that estimates cumulative reward. In prior work, the model is trained essentially independently of its use within the planner. As a result, the model is not well-matched with the overall objective of the agent. Prior deep reinforcement learning methods have successfully constructed models that can unroll near pixel-perfect reconstructions (Oh et al., 2015; Chiappa et al., 2016) ; but are yet to surpass state-of-the-art modelfree methods in challenging RL domains with raw inputs (e.g., Mnih et al., 2015; 2016; Lillicrap et al., 2016) . In this paper we introduce a new architecture, which we call the predictron, that integrates learning and planning into one end-to-end training procedure. At every step, a model is applied to an internal state, to produce a next state, reward, discount, and value estimate. This model is completely abstract and its only goal is to facilitate accurate value prediction. For example, to plan effectively in a game, an agent must be able to predict the score. If our model makes accurate predictions, then an optimal plan with respect to our model will also be an optimal plan for the underlying game -even if that model uses a different state space (e.g., an abstract representation of enemy positions, ignoring their shapes and colours), action space (e.g., a high-level action to move away from an enemy), rewards (e.g., a single abstract step could have a higher value than any real reward), or even timestep (e.g., a single abstract step could "jump" the agent to the end of a corridor). All we require is that trajectories through the abstract model produce scores that are consistent with trajectories through the real environment. This is achieved by training the predictron end-to-end, so as to make its value estimates as accurate as possible. An ideal model could generalise to many different prediction tasks, rather than overfitting to a single task; and could learn from a rich variety of feedback signals, not just a single extrinsic reward. We therefore train the predictron to predict a host of different value functions for a variety of pseudoreward functions and discount factors. These pseudo-rewards can encode any event or aspect of the environment that the agent may care about, e.g., staying alive or reaching the next room. We focus upon the prediction task: estimating value functions in MRP environments with uncontrolled dynamics. In this case, the predictron can be implemented as a deep neural network with an MRP as a recurrent core. The predictron unrolls this core multiple steps and accumulates rewards into an overall estimate of value. We applied the predictron to procedurally generated random mazes, and a simulated pool domain, directly from pixel inputs. In both cases, the predictron significantly outperformed model-free algorithms with conventional deep network architectures; and was much more robust to architectural choices such as depth.

2. BACKGROUND:

We consider environments defined by an MRP with states s ∈ S. The MRP is defined by a function, s , r, γ = p(s, α), where s is the next state, r is the reward, and γ is the discount factor, which can for instance represent the non-termination probability for this transition. The process may be stochastic, given IID noise α. The return of an MRP is the cumulative discounted reward over a single trajectory, g t = r t+1 + γ t+1 r t+2 + γ t+1 γ t+2 r t+3 + ... , where γ t can vary per time-step. We consider a generalisation of the MRP setting that includes vector-valued rewards r, diagonal-matrix discounts γ γ γ, and vector-valued returns g; definitions are otherwise identical to the above. We use this bold font notation to closely match the more familiar scalar MRP case; the majority of the paper can be comfortably understood by reading all rewards as scalars, and all discount factors as scalar and constant, i.e., γ t = γ. The value function of an MRP p is the expected return from state s, v p (s) = E p [g t | s t = s]. In the vector case, these are known as general value functions (Sutton et al., 2011) . We will say that a (general) value function v(•) is consistent with environment p if and only if v = v p which satisfies the following Bellman equation (Bellman, 1957) ,

EQUATION

In model-based reinforcement learning (Sutton and Barto, 1998) , an approximation m ≈ p to the environment is learned. In the uncontrolled setting this model is normally an MRP s , r, γ γ γ = m(s, β) that maps from state s to subsequent state s and additionally outputs rewards r and discounts γ γ γ; the model may be stochastic given an IID source of noise β. A (general) value function v m (•) is consistent with model m (or valid, (Sutton, 1995) 

3. PREDICTRON ARCHITECTURE:

The predictron is composed of four main components. First, a state representation s = f (s) that encodes raw input s (this could be a history of observations, in the partially observed setting, for example when f is a recurrent network) into an internal (abstract, hidden) state s. Second, a model s , r, γ γ γ = m(s, β) that maps from internal state s to subsequent internal state s , internal rewards r, and internal discounts γ γ γ. Third, a value function v that outputs internal values v = v(s) representing the future, internal return from internal state s onwards. The predictron is applied by unrolling its model m multiple "planning" steps to produce internal rewards, discounts and values. We use superscripts • k to indicate internal steps of the model (which have no necessary connection to time steps • t of the environment). Finally, these internal rewards, discounts and values are combined together by an accumulator into an overall estimate of value g. The whole predictron, from input state s to output g, may be viewed as a value function approximator for external targets (i.e. the returns in the real environment). We consider both k-step and λ-weighted accumulators.

The k-step predictron rolls its internal model forward k steps. Specifically, the k-step predictron return g k (henceforth abbreviated as preturn) is the internal return obtained by accumulating k model steps, plus a final value v k from the kth step,

EQUATION

The 0-step preturn is simply the first value g 0 = v 0 . The 1-step preturn is g 1 = r 1 + γ γ γ 1 v 1 , and so on (see Fig. 1a ). The λ-predictron combines together many k-step preturns. Specifically, it computes a diagonal weight matrix λ λ λ k from each internal state s k . The accumulator uses weights λ λ λ 0 , ..., λ λ λ K to aggregate a) k-step predictron b) λ-predictron ... ... ...

γ 2 λ r 2 λ 2 & & ... s 2 / / O O 9 9 v 2 / / + γ 1 s 2 O O / / 9 9 v 2 1-λ 2 / / + γ 1 λ r 1 % % r 1 λ 1 & & ... s 1 / / O O 9 9 v 1 / / + γ 0 s 1 O O / / 9 9 + γ 0 s 1 O O / / 9 9 v 1 1-λ 1 / / + γ 0 λ r 0 % % r 0 % % r 0 λ 0 & & s 0 / / O O 9 9 v 0 / / + s 0 O O / / 9 9 + s 0 O O / / 9 9 + s 0 O O / / 9 9 v 0 1-λ 0 / / + s O O g 0 s O O g 1 s O O g 2 s O O g λ

Figure 1 : a) The k-step predictron architecture. The first three columns illustrate 0, 1 and 2-step pathways through the predictron. The 0-step preturn reduces to standard model-free value function approximation; other preturns "imagine" additional steps with an internal model. Each pathway outputs a k-step preturn g k that accumulates discounted rewards along with a final value estimate. In practice all k-step preturns are computed in a single forward pass. b) The λ-predictron architecture.

The λ-parameters gate between the different preturns. The output is a λ-preturn g λ that is a mixture over the k-step preturns. For example, if λ λ λ 0 = 1, λ λ λ 1 = 1, λ λ λ 2 = 0 then we recover the 2-step preturn, g λ = g 2 . Discount factors γ γ γ k and λ-parameters λ λ λ k are dependent on state s k ; this dependence is not shown in the figure . over k-step preturns g 0 , ..., g K and output a combined value that we call the λ-preturn g λ ,

g λ = K k=0 w k g k where w k =      (1 -λ λ λ k ) k-1 j=0 λ λ λ j if k < K K-1 j=0 λ λ λ j otherwise.

(

EQUATION

where 1 is the identity matrix. This λ-preturn is analogous to the λ-return in the forward-view TD(λ) algorithm (Sutton, 1988; Sutton and Barto, 1998) . It may also be computed by a backward accumulation through intermediate steps g k,λ ,

EQUATION

where g K,λ = v K , and then using g λ = g 0,λ . Computation in the λ-predictron operates in a sweep, iterating first through the model from k = 0 . . . K and then back through the accumulator from k = K . . . 0 in a single "forward" pass of the network (see Figure 1b ). Each λ λ λ k weight acts as a gate on the computation of the λ-preturn: a value of λ λ λ k = 0 will truncate the λ-preturn at layer k, while a value of λ λ λ k = 1 will utilise deeper layers based on additional steps of the model m; the final weight is always λ λ λ K = 0. The individual λ λ λ k weights may depend on the corresponding abstract state s k and can differ per prediction. This enables the predictron to compute to an adaptive depth (Graves, 2016) depending on the internal state and learning dynamics of the network.

4. PREDICTRON LEARNING UPDATES:

We first consider updates that optimise the joint parameters θ of the state representation, model, and value function. We begin with the k-step predictron. We update the k-step predictron g k towards a target outcome g, such as the Monte-Carlo return from the real environment, by minimising a mean-squared error loss,

EQUATION

)

where l k = 1 2 gg k 2 is the sample loss. We can use the gradient of the sample loss to update parameters, e.g. by stochastic gradient descent. For stochastic models, two independent samples are required for g k and ∂g k ∂θ to get unbiased samples for the gradient of L k .

The λ-predictron combines together many k-step preturns. To update the joint parameters θ, we can uniformly average the losses on the individual preturns g k ,

EQUATION

Alternative, we could weight each loss by the usage w k of the corresponding preturn, such that the gradient is

K k=0 w k g -g k ∂g k

∂θ . The λ-predictron uses an accumulator with additional parameters η that determine the relative weighting of the k-step preturns. These weights are also updated so as to minimise a mean-squared error loss L λ ,

EQUATION

In summary, the joint parameters θ of the state representation f , the model m, and the value function v are updated to make each of the k-step preturns g k more similar to the target g, and the parameters η of the λ-accumulator are updated to make the aggregate λ-preturn g λ more similar to the target g.

4.1. CONSISTENCY (SEMI-SUPERVISED) LEARNING WITH THE λ-PREDICTRON:

Ideally, the predictron (f, m, v) learns preturns that are all equal in expectation to the true value function of the environment,

E m g k | s = E p [g t | s] = v p (s), in which case the preturns must be equal in expectation, E m g 0 | s = E m g 1 | s = ... = E m g K | s . In addition, each k-step preturn must then be equal in expectation to the λ-preturn, E m g k | s = E m g λ | s

, for any λ parameters. All these consistency relations between preturns give rise to additional constraints upon the predictron. Specifically, we may adjust the parameters of the predictron to lead to consistent preturns, even in the absence of labelled targets. Concretely, we can adjust each preturn g k towards the λ-preturn g λ ; in other words, we can update each individual value estimate towards the best aggregated estimate by minimizing

EQUATION

)

Here g λ is considered fixed; the parameters θ are only updated to make g k more similar to g λ , not vice versa. This consistency update does not require any labels g or samples from the environment.

As a result, it can be applied to (potentially hypothetical) states that have no associated 'real' (e.g. Monte-Carlo) outcome: we update the value estimates to be self-consistent with each other. Note the similarity with the semi-supervised setting, where we may have unlabelled inputs.

5. EXPERIMENTS:

We conducted experiments on two domains. The first domain consists of randomly generated 20×20 mazes in which each location either is empty or contains a wall. Two locations in a maze are considered connected if they are both empty and we can reach one from the other by moving horizontally or vertically through adjacent empty cells. The goal is to predict, for each of the locations on the diagonal from top-left to bottom-right of the maze, whether the bottom-right corner is connected to that location, given the entire maze as an input image. Some of these predictions will be straightforward, for instance for locations on the diagonal that contain a wall themselves and for locations close to the bottom right. Many other predictive questions seem to require a simple algorithm, such as some form of a flood fill or search; our hypothesis is that an internal model can learn to emulate such algorithms, where naive approximation may struggle. A few example mazes are shown in Figure 2 .

Our second domain is a simulation of the game of pool, using four balls and four pockets. The simulator is implemented in the physics engine Mujoco (Todorov et al., 2012) . We generate sequences of RGB frames starting from a random arrangement of balls on the table. The goal is to simultaneously learn to predict future events for each of the four balls, given 5 RGB frames as input. These events include: collision with any other ball, collision with any boundary of the table, entering a quadrant (×4, for each quadrant), being located in a quadrant (×4, for each quadrant), and entering a pocket It was selected by maximising the prediction of pocketing balls, using the predictron. 

Updates:

Figure 3 : Exploring predictron variants. Aggregated prediction errors over all predictions (20 for mazes, 280 for pool) for the eight predictron variants corresponding to the cube on the left (as described in the main text), for both random mazes (top) and pool (bottom). Each line is the median of RMSE over five seeds; shaded regions encompass all seeds. The full (r, γ, λ)-prediction (red) consistently performed best.

(×4, for each pocket). Each of these 14×4 events provides a binary pseudo-reward that we combine with 5 different discount factors {0, 0.5, 0.9, 0.98, 1} and predict their cumulative discounted sum over various time spans. This yields a total of 280 general value functions. An example trajectory is shown in Figure 2 . In both domains, inputs are presented as minibatches of i.i.d. samples with their regression targets. Additional domain details are provided in Appendix E.

5.1. EXPLORING THE PREDICTRON ARCHITECTURE:

Our first set of experiments examines three binary dimensions that differentiate the predictron from standard deep networks. We compare eight predictron variants corresponding to the corners of the cube on the left in Figure 3 . The first dimension corresponds to whether or not the predictron architecture utilises the structure of an MRP model. In the MRP case, labelled r, γ, internal rewards and discounts are both learned. In the non-r, γ case, which corresponds to a vanilla hidden-to-hidden neural network module, internal rewards and discounts are ignored by fixing their values to r k = 0 and γ γ γ k = 1.

The second dimension is whether a K-step accumulator or λ-accumulator is used to aggregate over preturns. When a λ-accumulator is used, a λ-preturn is computed as described in Section 3. Otherwise, intermediate preturns are ignored by fixing their values to λ λ λ k = 1 for k < K. In this case, the overall output of the predictron is simply the maximum-depth preturn g K . The third dimension, labelled usage weighting, defines the loss that is used to update the parameters θ. On this dimension, we consider two options: the preturn losses can either be weighted uniformly (see Equation 6), or the update for each preturn g k can be weighted according to the weight w k that determines how much it is used in the λ-predictron's overall output. We call the latter loss 'usage weighted'. Note that for architectures without a λ-accumulator, w k = 0 for k < K, and w K = 1, thus usage weighting then implies backpropagating only the loss on the final preturn g top row corresponds to the random mazes and the bottom row to the pool domain. The main conclusion is that learning an MRP model improved performance greatly. The inclusion of λ λ λ weights helped as well, especially on pool. Usage weighting further improved performance.

5.2. COMPARING THE PREDICTRON TO OTHER DEEP NETWORKS:

Our second set of experiments compares the predictron to feedforward and recurrent deep learning architectures, with and without skip connections. We compare the corners of a new cube, as depicted on the left in Figure 4 , based on three different binary dimensions.

The first dimension of this second cube is whether we use a predictron, or a (non-λ, non-r, γ) deep network that does not have an internal model and does not output or learn from intermediate predictions. We use the most effective predictron from the previous section, i.e., the (r, γ, λ)-predictron with usage weighting.

The second dimension is whether weights are shared between all cores (as in a recurrent network), or whether each core uses separate weights (as in a feedforward network). We note that the nonλ, non-r, γ variants of the predictron then correspond to standard (convolutional) feedforward and (unrolled) recurrent neural networks respectively. The third dimension is whether we include skip connections. This is equivalent to defining the model step to output a change to the current state, ∆s, and then defining s k+1 = h(s k + ∆s k ), where h is the non-linear function-in our case a ReLU, h(x) = max(0, x). The deep network with skip connections is a variant of ResNet (He et al., 2015) . Root mean squared prediction errors for each architecture are shown in Figure 4 . All (r, γ, λ)predictrons (red lines) outperformed the corresponding feedforward or recurrent neural network baselines (black lines) both in the random mazes and in pool. We also investigated the effect of changing the depth of the networks (see Appendix C). The predictron outperformed the corresponding feedforward or recurrent baselines for all depths, with and without skip connections.

5.3. SEMI-SUPERVISED LEARNING BY CONSISTENCY:

We now consider how to use the predictron for semi-supervised learning, training the model on a combination of labelled and unlabelled random mazes. Semi-supervised learning is important because a common bottleneck in applying machine learning in the real world is the difficulty of collecting labelled data, whereas often large quantities of unlabelled data exist. We trained a full (r, γ, λ)-predictron by alternating standard supervised updates with consistency updates, obtained by stochastically minimizing the consistency loss (8), on the unlabelled samples.

For each supervised update we apply either 0, 1, or 9 consistency updates. Figure 5 shows that the performance improved monotonically with the number of consistency updates, measured as a function of the number of labelled samples consumed. 

Unshared cores:

Figure 5 : Semi-supervised learning. Prediction errors of the (r, γ, λ)-predictrons (shared core, no skips) using 0, 1, or 9 consistency updates for every update with labelled data, plotted as function of the number of labels consumed. Learning performance improves with more consistency updates.

5.4. ANALYSIS OF ADAPTIVE DEPTH:

In principle, the predictron can adapt its depth to 'think more' about some predictions than others, perhaps depending on the complexity of the underlying target. We investigate this by looking at qualitatively different prediction types in pool: ball collisions, rail collisions, pocketing balls, and entering or staying in quadrants. For each prediction type we consider several different time-spans (determined by the real-world discount factors associated with each pseudo-reward). Figure 6 shows distributions of depth for each type of prediction. The 'depth' of a predictron is here defined as the effective number of model steps. If the predictron relies fully on the very first value (i.e., λ λ λ 0 = 0), this counts as 0 steps. If, instead, it learns to place equal weight on all rewards and on the final value, this counts as 16 steps. Concretely, the depth d can be defined recursively as d = d 0 where

d k = λ λ λ k (1 + γ γ γ k d k+1

) and d K = 0. Note that even for the same input state, each prediction has a separate depth. The depth distributions exhibit three properties. First, different types of predictions used different depths. Second, depth was correlated with the real-world discount for the first four prediction types. Third, the distributions are not strongly peaked, which implies that the depth can differ per input even for a single real-world discount and prediction type. In a control experiment (not shown) we used a scalar λ shared among all predictions, which reduced performance in all scenarios, indicating that the heterogeneous depth is a valuable form of flexibility.

5.5. VISUALIZING THE PREDICTIONS IN THE POOL DOMAIN:

We test the quality of the predictions in the pool domain to evaluate whether they are well-suited to making decisions. For each sampled pool position, we consider a set I of different initial conditions (different angles and velocity of the white ball), and ask which is more likely to lead to pocketing coloured balls. For each initial condition s ∈ I, we apply the (r, γ, λ)-predictron (shared cores, 16 model steps, no skip connections) to obtain predictions g λ . We sum the predictions that correspond 0 0.5 0.9 0.98 1

Real-world discounts to pocketing any ball except the white ball, and to real-world discounts γ = 0.98 and γ = 1. We select the condition s * that maximises this sum.

We then roll forward the pool simulator from s * and log the number of pocketing events. Figure 2 shows a sampled rollout, using the predictron to pick s * . When providing the choice of 128 angles and two velocities for initial conditions (|I| = 256), this procedure resulted in pocketing 27 coloured balls in 50 episodes. Using the same procedure with an equally deep convolutional network only resulted in 10 pocketing events. These results suggest that the lower loss of the learned (r, γ, λ)-predictron translated into meaningful improvements when informing decisions. A video of the rollouts selected by the predictron is available here: https://youtu.be/BeaLdaN2C3Q.

6 RELATED WORK Lee et al. (2015) introduced a neural network architecture where classifications branch off intermediate hidden layers. An important difference with respect to the λ-predictron, is that the weights are hand-tuned as hyper-parameters, whereas in the predictron the λ weights are learnt and, more importantly, conditional on the input. Another difference is that the loss on the auxiliary classifications is used to speed up learning, but the classifications themselves are not combined into an aggregate prediction; the output of the model itself is the deepest prediction.

Graves ( 2016) introduced an architecture with adaptive computation time (ACT), with a discrete (but differentiable) decision on when to halt, and aggregating over the outputs at each pondering step. This is related to our λ λ λ weights, but obtains depth in a different way; one notable difference is that the λ-predictron can choose different pondering depths for each of its predictions.

Value iteration networks (VINs) (Tamar et al., 2016 ) also learn value functions end-to-end using an internal model, similar to the (non-λ) predictron. However, VINs plan via convolutional operations over the full input state space; whereas the predictron plans via imagined trajectories through an abstract state space. This may allow the predictron architecture to scale much more effectively in domains that do not have a natural two-dimensional encoding of the state space.

The notion of learning about many predictions of the future relates to work on predictive state representations (PSRs; Littman et al., 2001) , general value functions (GVFs; Sutton et al., 2011) , and nexting (Modayil et al., 2012) . Such predictions have been shown to be useful as representations (Schaul and Ring, 2013) and for transfer (Schaul et al., 2015) . So far, however, none of these have been considered for learning abstract models. Schmidhuber (2015) discusses learning abstract models, but maintains separate losses for the model and a controller, and suggests training the model unsupervised to compactly encode the entire history of observations, through predictive coding. The predictron's abstract model is instead trained endto-end to obtain accurate values.

7. CONCLUSION:

The predictron is a single differentiable architecture that rolls forward an internal model to estimate external values. This internal model may be given both the structure and the semantics of traditional reinforcement learning models. But unlike most approaches to model-based reinforcement learning, the model is fully abstract: it need not correspond to the real environment in any human understandable fashion, so long as its rolled-forward "plans" accurately predict outcomes in the true environment.

The predictron may be viewed as a novel network architecture that incorporates several separable ideas. First, the predictron outputs a value by accumulating rewards over a series of internal planning steps. Second, each forward pass of the predictron outputs values at multiple planning depths. Third, these values may be combined together, also within a single forward pass, to output an overall ensemble value. Finally, the different values output by the predictron may be encouraged to be self-consistent with each other, to provide an additional signal during learning. Our experiments demonstrate that these differences result in more accurate predictions of value, in reinforcement learning environments, than more conventional network architectures.

We have focused on value prediction tasks in uncontrolled environments. However, these ideas may transfer to the control setting, for example by using the predictron as a Q-network (Mnih et al., 2015) . Even more intriguing is the possibility of learning an internal MDP with abstract internal actions, rather than the MRP considered in this paper. We aim to explore these ideas in future work. (black/grey lines) more robust to the depth (i.e., the black/grey dashed lines almost overlap, especially on pool), and that the predictron outperforms the corresponding feedforward or recurrent baselines for all depths, with and without skips.

D CAPACITY COMPARISONS:

In this section, we present some additional experiments comparing the predictron to more conventional deep networks. The purposes of these experiments are 1) to show that the conclusions obtained above do not depend on the precise architecture used, and 2) to show that the structure of the network-whether we use a predictron or not-is more important than the raw number of parameters. Specifically, we again consider the same 20 by 20 random mazes, and the pool task described in the main text. As described in Section A, for the results in the paper we used an encoder that preserved the size of the input plans, 20 × 20 for the mazes and 28 × 28 for pool. Each convolution had 32 channels and therefore the abstract states were 20 × 20 × 32 for the mazes and 28 × 28 × 32 for pool.

We now consider a different architecture, where we no longer pad the convolutions used in the encoder. For the mazes, we still use two layers of 3 × 3 stride-1 convolutions, which means the planes reduce in size to 16 × 16. This means that the abstract states are about one third smaller. For pool, we use three 5 × 5 stride-1 convolutions, which bring us from 28 × 28 down to 16 × 16 as well. So, the abstract states are now of equal size for both experiments. For pool, this is approximately a two-thirds reduction, which helps reduce the compute needed to run the model. Most of the parameters in the predictron are in the fully connected layers. Previously, the first fully connected layer for each of the internal values, rewards, discounts, and λ-parameters would take a flattened abstract state, and then go into 32 hidden nodes. This means the number of parameters in this layer were 20 × 20 × 32 × 32 = 409, 600 for the mazes and 28 × 28 × 32 × 32 = 802, 816 for pool. The predictron with shared core would have four of these layers, one for each of the internal values, rewards, discounts, and λs, compared to one for the deep network which only has values. We change this in two ways. First, we add a 1 × 1 convolution with a stride of 1 and 8 channels before the first fully connected layer for each of these outputs. This reduces the number of channels, and therefore the number of parameters in the subsequent fully-connected layer, by one fourth. Second, we tested three different numbers of hidden nodes: 32, 128, or 512. The deep network with 128 hidden nodes for its values has the exact same number of parameters as the (r, γ, λ)-predictron with 32 hidden nodes for each of its outputs. Before, the deep network had fewer parameters, because we kept this number fixed at 32 across experiments. This opens the question of whether the improved performance of the predictron was not just an artifact of having more parameters. We tested this hypothesis, and the results are shown in Figure 9 .

Figure 9 shows that in each setting-on the mazes and pool, and with or without shared coresboth. The predictrons always performed better than all the deep networks. This includes the 32 node predictron (darkest red) compared to the 512 node deep network (lightest blue), even though the latter has approximately 4 times as many parameters (1.27M vs 4.85M). This means that the number of parameters mattered less than whether or not we use a predictron. with very different scales, we have normalised the pseudo returns. The normalization procedure consisted in dividing all targets by their standard deviation, as empirically measured across an initial set of 20,000 sequences.

E ADDITIONAL DOMAIN DETAILS:



E.2 RANDOM MAZES:

To generate mazes we first determine, with a stochastic line search, a number of walls so that the topleft corner is connected to the bottom-right corner (both always forced to be empty) in approximately 50% of the mazes. We then shuffle the walls uniformly randomly. For 20 by 20 mazes this means 70% of locations are empty and 30% contain walls. More than a googol different such 20-by-20 mazes exist (as 398 120 > 10 100 ).

:



Figures and Tables:

Figure 2: Left: Two sample mazes from the random-maze domain. Light blue cells are empty, darker blue cells contain a wall. One maze is connected from top-left to bottom-right (indicated in black), the other is not. Right: An example trajectory in the pool domain (before downsampling).It was selected by maximising the prediction of pocketing balls, using the predictron.

Figure 6: Thinking depth. Distributions of thinking depth on pool for different types of predictions and for different real-world discounts.

Figure 10: Pool input frame. An example of a 28x28 RGB input frame in the pool domain.

Comparing depths. Comparing the (r, γ, λ)-predictron (red) against more conventional deep networks (black) for various depths (2, 4, 8, or 16 model steps, corresponding to 10, 16, 28, or 52 total layers of depth). Lighter colours correspond to shallower networks. Dashed lines correspond to networks with skip connections.

Table content: <table><tr><td>(log scale) RMSE on random mazes</td><td colspan="2">0.0001 0.001 0.01</td><td>0</td><td>1M recurrent net, no skip 2M recurrent net, skip (r, γ, λ)-predictron, no skip 3M (r, γ, λ)-predictron, skip Shared core</td><td>4M</td><td>5M</td><td>0</td><td>1M</td><td>2M Unshared cores 3M</td><td>4M</td><td>5M</td></tr><tr><td/><td>RMSE on pool</td><td>0.2 0.3 0.4</td><td/><td/><td/><td/><td/><td/><td/><td/></tr><tr><td/><td/><td/><td>0</td><td>500K Updates</td><td/><td>1M</td><td>0</td><td/><td>500K Updates</td><td/><td>1M</td></tr><tr><td>Figure 8:</td><td/><td/><td/><td/><td/><td/><td/><td/><td/><td/></tr></table>

Comparing depths. Comparing the (r, γ, λ)-predictron (red) against more conventional deep networks (blue) for different numbers hidden nodes in the fully connected layers, and therefore different total numbers of parameters. The deep networks with 32, 128, and 512 nodes respectively have 381,416, 1,275,752, and 4,853,096 parameters in total. The predictrons with 32 and 128 nodes respectively have 1,275,752, and 4,853,096 parameters in total. Note that the number of parameters for the 32 and 128 node predictrons are exactly equal to the number of parameters for the 128 and 512 node deep networks.

Table content: <table/>

Peer review (iclr2017):
The paper proposes an approach to learning models that are good for planning problems, using deep netowork architectures. The key idea is to ensure that models are self-consistent and accurately predict the future. The problem of learning good planning models (as opposed to simply good predictive models is really crucial and attempts so far have failed. This paper is conceptually interesting and provides a valuable perspective on how to achieve this goal. Its incorporation of key RL concepts (like discounting and eligibility traces) and the flexibility to learn these is very appealing. Hence, I think it should be accepted. This being said, I think the paper does not quite live up to its claims. Here are some aspects that need to be addressed (in order of importance): 1. Relationship to past work: the proposed representation seems essentially a non-linear implementation of the Horde architecture. It is also very similar in spirit to predictive state representations. Yet these connections are almost not discussed at all. The related work paragraph is very brief and needs expansion to situate the work in the context of other predictive modelling attempts that both were designed to be used for planning and (in the case of PSRs) were in fact successsfully used in planning tasks. Some newer work on learning action-conditional models in Atari games are also not discussed. Situating the paper better in the context of existing model learning would also help understand easier both the motivations and the novel contributions of the work (otherwise, the reader is left to try and elucidate this for themselves, and may come to the wrong conclusion). 2. The paper needs to provide some insight about the necessity of the recurrent core of the architecture. The ideas are presented nicely in general fashion, yet the proposed impolementation is quite specific and *bulky* (very high number of parameters). Is this really necessary in all tasks? Can one implement the basic ideas outside of the particular architecture proposed? Can we use feedforward approximations or is the recurrent part somehow necessary? At the very least the paper should expand the discussion on this topic, if not provide some empirical evidence. 3. The experiments are very restricted in their setup: iid data drawn from fixed distributions, correct targets. So, the proposed approach seems like an overkill for these particular tasks. There is an indirect attempt to provide evidence the learned models would be useful for planning, but no direct measurement to support this*d claim (no use of the models in planning). Compared to the original Horde paper, fewer predictions are learned, and these are more similar to each other. While I sympathize with the desire to go in steps, I think the paper stops short of where it should. At the very least, doing prediction in the context of an actual RL prediction task, with non-iid inputs, should be included in the paper. This should only require minor modifications to the experiments (same task, just different data). Ideally, in the case of the mazes, the learned models should be used in some form of simplified planning to learn paths. This would align the experiments much better with the claims in the presentation of the architecture.