{'fraction_non_alphanumeric': 0.04097160883280757, 'fraction_numerical': 0.013905362776025236, 'mean_word_length': 4.494765305414962, 'pattern_counts': {'":': 0, '<': 2, '<?xml version=': 0, '>': 1, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 24, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
A Survey on Model-based Reinforcement Learning

Reinforcement learning (RL) solves sequential decision-making problems via a trial-and-error process interacting with the environment. While RL achieves outstanding success in playing complex video games that allow huge trial-and-error, making errors is always undesired in the real world. To improve the sample efficiency and thus reduce the errors, model-based reinforcement learning (MBRL) is believed to be a promising direction, which builds environment models in which the trial-and-errors can take place without real costs. In this survey, we take a review of MBRL with a focus on the recent progress in deep RL. For non-tabular environments, there is always a generalization error between the learned environment model and the real environment. As such, it is of great importance to analyze the discrepancy between policy training in the environment model and that in the real environment, which in turn guides the algorithm design for better model learning, model usage, and policy training. Besides, we also discuss the recent advances of model-based techniques in other forms of RL, including offline RL, goal-conditioned RL, multi-agent RL, and meta-RL. Moreover, we discuss the applicability and advantages of MBRL in real-world tasks. Finally, we end this survey by discussing the promising prospects for the future development of MBRL. We think that MBRL has great potential and advantages in real-world applications that were overlooked, and we hope this survey could attract more research on MBRL.

1 Overview of Model-based RL Reinforcement learning (RL) studies the methodologies of improving the performance of sequential decision-making for autonomous agents [Sutton and Barto, 2018]. Since the success of deep RL in playing the game of Go and video games shows the beyond-human ability of decision-making, it is of great interest to extend its application horizon to include real-world tasks.
Typically, deep RL algorithms require tremendous training samples, resulting in much high sample complexity. In general RL tasks, the sample complexity of a particular algorithm refers to the amount of samples required for learning an approximately optimal policy. Particularly, unlike the supervised learning paradigm that learns from historical labeled data, typical RL algorithms require the interaction data by running the latest policy in the environment. Once the policy updates, the underlying data distribution (formally the occupancy measure [Syed et al., 2008]) changes, and the data has to be collected again by running the policy. As such, RL algorithms with high sample complexity are hard to be directly applied in real-world tasks, where trial-and-errors can be highly costly.
Therefore, a major focus of the recent research on deep reinforcement learning (DRL) is on improving sample efficiency [Yu, 2018]. Among different branches of research, model-based reinforcement learning (MBRL) is one of the most important directions that is widely believed to have the great potential to make RL algorithms significantly more sample efficient [Wang et al., 2019]. This belief is intuitively from an analogy with human intelligence. Human beings are capable of having an imagined world in mind, in which how things could happen following different actions can be neural networks, we review the theories and the key challenges when facing complex environments, as well as advances for reducing model errors. For model usage, we categorize the literature into two parts, i.e., the blackbox model rollout for trajectory sampling and whitebox model for gradient propagation. Regarding model usage as a subsequent task of model learning, we also cover the attempts to bridge model learning and model usage, i.e., value-aware and policy-aware model learning. Moreover, we take a brief review on the combination of model-based methods in other forms of reinforcement learning, including offline RL, goal-conditioned RL, multi-agent RL, and meta RL. We also discuss the applicability and advantages of MBRL in real-world tasks. We finally conclude this paper with a discussion of promising the emerging research perspectives and future trends in the development of MBRL.

Model Learning
For MBRL, the first component to consider is the learning of the environment model. As introduced above, the model is formulated as the MDP S, A, M, R, γ , where S, A, and γ are commonly predefined, and the state transition dynamics M and the reward function R are to be learned. We assume that some historical data is available for learning. Usually, the historical data can be in the form of trajectories {τ 1 , τ 2 , . . . , τ k }, and each trajectory is a sequence of state-action-reward pairs, τ i = (s i 0 , a i 0 , r i 0 , . . . , s i L−1 , a i L−1 , r i L−1 , s i L ). It is easy to discover that the data records the past transitions (s t , a t , s t+1 ) corresponding to the input and output of the transition dynamics M , and the past rewards (s t , a t , r t ) corresponding to the input and output of the reward function R. Therefore, it is straightforward to borrow ideas from supervised learning for model learning.

Model Learning in Tabular Setting
At the early stage of RL research, the state and action spaces are finite and small, the model learning is considered with the tabular MDPs [Sutton, 1990a], where policies, transition dynamics, and reward functions can all be recorded in a table. To learn the transition dynamics, let C[s, a, s ] record the counting of the state-action-next-state (s, a, s ). The transition dynamics are thenM where R min is the preset minimum value of the immediate reward.
The above simple calculation of the transition dynamics and the reward function corresponds to the maximum likelihood estimation (MLE) under the tabular setting. Notice thatM andR are an unbiased estimation of the true transition M * and the true reward function R * respectively, and thus converges to M * and R * as the samples approach infinity.
For collecting samples, sampling trajectories from the environment is not as straightforward as sampling a coin. R-MAX [Brafman and Tennenholtz, 2002] is a representative algorithm for joint model learning and exploration. In R-MAX, a state transits to itself, and the immediate reward is set to the maximum value by default, but only when a state-action pair has been visited sufficiently many times, i.e., larger than K, the transition probability, and the reward are assigned to their average value. This is implemented by using theM andR as in Eq.(3).
M (s |s, a) = where I is the indicator function that is 1 when the inner expression is true and 0 otherwise.
In every iteration, R-MAX solves an -optimal policy in the fictitious model S, A,M ,R, γ , which naturally tries to explore unvisited states due to the set of the R max reward, and applies the policy in the environment to collect more samples to update the fictitious model. With a properly set K, R-MAX requiresÕ |S| 2 |A| 3 (1−γ) 2 log 1 δ episodes to achieve a high accuracy ( 1 difference on transition < /2) model [Jiang, 2020].
The simulation lemma shows that the value loss corresponding to the model error max m has a quadratic coefficient on the effective horizon 1 1−γ . This means that the value loss grows quadratically fast as the horizon grows. When the reward function is out of the consideration, as discussed above, we can omit the r term. Meanwhile, the simulation lemma also shows that the reward error is not severe compared to the model error.
We can also note the limitations of the simulation lemma. Compared with the learning loss Eq.(4) where the data follows the distribution of the data-collecting policy, the model error max m is measured as the maximum difference over all state-action pairs, which is not easily achieved or assessed in a practical way.
In the recent analysis [Luo et al., 2018, Janner et al., 2019, Xu et al., 2020, the error of the learned transition model M θ is measured over the data distribution, and thus directly connects with the learning loss Eq.(4). We present the result in Theorem 2, named simulation lemma II. Note that we omit the reward function error since it is not essential.
Theorem 2 (Simulation Lemma II). Given an MDP with reward upper bound R max and transition model M * , and a data-collecting policy π D , and a learned transition model M θ with the value evaluation error of the policy is bounded as Note that we denote the distributional model error as ρ m to distinguish the uniform model error max m in Theorem 1.
The policy evaluation error of simulation lemma II contains two terms, the bias of the learned model, and the policy divergence between the evaluating policy π and the data-collecting policy π D . Theorem 2 indicates that the policy evaluation error w.r.t the model error ρ m also has a quadratic coefficient on the effective horizon 1 1−γ , similar to Theorem 1. The coefficient means a quadratic compounding error of learning in the model, which is the reason that studies such as [Janner et al., 2019] only adopt short rollouts, say, less than 10 steps, in the learned model. Moreover,  provided a finite sample complexity result for the evaluation error by further relating the model error ρ m with the samples and model space of the model learning. Interested readers are referred to [Xu et al., 2021a, Corollary 2] for the detailed analysis.

Model Variants
Since the compounding error is due to the recursive state-action generation using the one-step transition model, a way of alleviating the issue is to predict many steps at a time. A multistep model [Asadi et al., 2019] takes the current state s t and a sequence of actions (a t , a t+1 , . . . , a t+h ) with length h as the input, and predicts the future h states. A (deterministic) multistep model is represented as (s t+1 , . . . , s t+h ) = M h θ (s t , a t+1 , . . . , a t+h ), which can also be trained by supervised learning. Intuitively, compared with the one-step model, the multistep model does not take the predicted "fake" states as the input and hence could avoid the compounding error within h steps [Asadi et al., 2019]. Meanwhile, the dynamics across multi-steps can be much more complex than one-step dynamics, therefore, multistep transition predictions can have a larger error.
The transition models discussed before are all forward models, i.e., predict along time. In addition to the forward model, there also exist studies on the backward transition model in MBRL [Edwards et al., 2018, Goyal et al., 2019, Lai et al., 2020a, Lee et al., 2020a, Wang et al., 2021. The backward transition model takes the future state s t+1 and action a t as inputs and predicts the state s t . The backward model is often used to generate reverse data, which can help reduce the rollout horizon [Lai et al., 2020a] and could improve the sample efficiency of MBRL [Wang et al., 2021].

Model Learning with Reduced Error
In the above model properties, we can see the horizon-squared compounding error is a major issue of model learning. The issue is mainly due to the use of prediction loss to learn an unconstrained model.

Model Learning with Lipschitz Continuity Constraint
To reduce the compounding error, one way is to constrain the model. Venkatraman et al. [2015] and , Asadi et al. [2018] employed the Lipschitz continuity constraint for the models. They firstly employed Wasserstein distance [Vaserstein, 1969] to measure the similarity between two transition distributions. For any two distributions P and Q over space X , the Wasserstein distance between P and Q is defined as where Π (P, Q) denotes the set of all joint distributions γ(x, y), whose marginals are respectively P and Q, and d is the distance metric on X . Compared with other divergence measures (e.g., KL divergence and TV distance), Wasserstein distance can appropriately measure the similarity between two distributions with disjoint supports [Asadi et al., 2018].
When considering a state distribution ρ over the state space S rather than a single state s, we can also define the transition model, i.e., the generalized transition model, M θ (·|ρ, a) as M θ (s |ρ, a) := M θ (s |s, a)ρ(s)ds.
M θ is called w -accurate w.r.t. the Wasserstein distance if and only if sup s,a W (M θ (·|s, a), M * (·|s, a)) ≤ ε w . Notice that w measures the one-step error of the transition model and is connected to max m in Theorem 1.
With a Lipschitz continuity constrained model, the n-step error can be bounded.
Theorem 3 (Theorem 1 in [Asadi et al., 2018]). Suppose the real transition model M * is K * -Lipschitz and the learned transition model M θ is K-Lipschitz and ε w -accurate, then ∀n ≥ 1, Asadi et al. [2018] further introduced two assumptions to simplify the analysis. One assumption is single action, i.e., A = {a}. The other assumption is the state-only K R -Lipschitz continuous reward function. Under the two assumptions, the value function under the transition M is simplified as Then the value function error (of the policy taking the only action) can be bounded.
Theorem 4 (Theorem 2 in [Asadi et al., 2018]). Under the same assumptions as in Theorem 3. Further, suppose that A = {a} and the reward function only depends on the state and is K R -Lipschitz continuous. Then ∀s ∈ S and K ∈ [0, 1 γ ), where K = min{K * , K}.
Although the analysis is over-simplified, we can still notice that when K is small, the evaluation error can be small. In other words, the compounding error can be controlled, compared with those in the simulation lemmas (i.e., Theorem 1 and Theorem 2).
Since K is the minimum between the Lipschitz constants of M * and M θ , the theorem suggests a trade-off on the Lipschitz constant of M θ . When K is small and K ≤ K , K is also small. Meanwhile, with a small K, the model might be hard to approximate M * with a large K * and thus w could be large.

Model Learning by Distribution Matching
The prediction loss employed in Theorem 1 and Theorem 2 minimizes the model error on each point of the state-action data. While the prediction loss minimization can be straightforwardly solved by supervised learning, the long-term effect of transitions is hard to be captured, resulting in the horizon-squared compounding error issue. Therefore, to learn the long-term effect of transitions, an idea is to match the distributions between the real trajectories and the trajectories rolled out in the learned model.
The idea of distribution matching has been employed in imitation learning through adversarial learning such as the GAIL method [Ho and Ermon, 2016] that imitates the expert policy in an adversarial manner, where a discriminator D learns to identity whether a state-action pair comes from the expert demonstrations and a generator π imitates the expert policy by maximizing the discriminator score. This corresponds to the minimax optimization problem min recalling that ρ π is the state-action distribution by running the policy π, and π E is the expert policy. When the discriminator is optimal to the inner objective, i.e., D * (s, a) = ρ π E (s, a)/ (ρ π E (s, a) + ρ π (s, a)), the generator essentially minimizes the Jensen-Shannon (JS) divergence between ρ π E and ρ π (up to a constant), which achieves the goal of distribution matching and solves the compounding error issue of imitation learning theoretically [Zhang et al., 2020c, Xu et al., 2020 and empirically [Ho and Ermon, 2016, Ghasemipour et al., 2019, Ke et al., 2019.
Through the bridge of duel MDP [Zhang et al., 2018b, Shi et al., 2019 that treats the environment also as an agent, the idea of distribution matching is brought for model learning [Shi et al., 2019, Wu et al., 2019, Xu et al., 2020, Eysenbach et al., 2021]. The transition model M θ , which takes the current state-action pair as inputs and predicts a distribution over the next state, is regarded as a policy in the imitation view. A discriminator is employed to distinguish expert state-action-next-state tuples from the "fake" ones. The minimax optimization problem in [Xu et al., 2020] is then formulated as min where µ M * and µ M θ are the joint state-action-next-state distributions induced by the data-collecting policy π D in the true environment M * and M θ , respectively. Formally, µ M * (s, a, s ) = ρ M * π D (s, a)M * (s |s, a) , µ M θ (s, a, s ) = ρ M θ π D (s, a)M θ (s |s, a). The optimal solution of M θ minimizes the JS divergence between µ M and µ M θ , matching the trajectory distribution. Different from [Xu et al., 2020], Wu et al. [2019] chose to minimize the Wasserstein distance between µ M * and µ M θ . In [Wu et al., 2019, Xu et al., 2020, they kept the data-collecting policy π D fixed during the training process of the transition model M θ . On the other hand, Shi et al. [2019] optimized the transition model and policy jointly, which forms a multi-agent adversarial imitation learning.
By the distribution matching, Xu et al. [2020] (Theorem 3) proved an improved policy evaluation error bound as in Theorem 5, which is named Simulation Lemma III.
Theorem 5 (Simulation Lemma III). Given an MDP with reward upper bound R max and transition model with M * , and a data-collecting policy π D , and a learned transition model M θ with for an arbitrary policy π with bounded divergence, max s D KL π(·|s), π D (·|s) ≤ π , the policy evaluation error is bounded as We can see in Theorem 5 that the coefficient on the model error JS m is linear w.r.t. the effective horizon, i.e., 1 1−γ , which meets the lower bound  and thus cannot be further improved in general. This means the compounding error issue is solved.
One may further notice that the model error JS m is a different quantity from the error m in Theorem 2. This is true. To achieve the same value, the matching loss using the JS-divergence requires more samples than the prediction loss. In [Xu et al., 2021b], the adversarial imitation approach has been improved to have a lower sample complexity than that of supervised learning.

Robust Model Learning
While in simulation lemma III the compounding error is reduced, the policy divergence term about π can still be large. The policy divergence is the difference between the data-collecting policy and the target policy. In order to reduce the divergence, one direction is to use a data-collecting policy with a wide distribution. Zhang et al. [2021c] proposed to use a distribution of policy to collect data, instead of a single policy, such that the divergence can be reduced. When using a distribution of the data-collecting policy, the model learning objective can be formulated as min where µ M * π and µ M θ π are the joint state-action-next-state distributions. Empirically, the expectation operation E π∼P(π) can be approximated via taking average over a set of sampled policies.
Furthermore, to particularly deal with concern-case interacting policies, i.e., the outlier policies with much different behavior from the majority, Zhang et al. [2021c] designed conditioned value at risk (CVaR) [Tamar et al., 2015] objective which focuses on the -percentile of policies with the largest value discrepancy in simulation.

Model Learning for Complex Environments Dynamics
The mainstream realization of the environment dynamics model is an ensemble of Gaussian processes where the mean vector and covariance matrix for the distribution of the next state are built based on neural networks fed in the current state-action pair [Chua et al., 2018]. Such an architecture is shown to work well on MuJuCo robot locomotion environments, where the state observations are sufficient statistics for future derivation. However, there still exist many complex environments which are hard to be directly modeled via the above method. Below we discuss two important aspects of complex environment dynamics modeling.
Partial Observability. For partially observable environments, the observations may not be sufficient statistics for future derivation, which makes the environment a partially observable MDP (POMDP) [Spaan, 2012]. For model learning in a POMDP, belief state estimation is the classic solution, where an observation model p(o t |s t ) and a latent transition model p(s t+1 |s t , a t ) is learned via maximizing a posterior and the posterior distribution p(s t |o 1 , . . . , o t ) can be inferred. With deep learning, the latent state distribution p(s t |o 1 , . . . , o t ) can be obtained via a recurrent neural network [Ha and Schmidhuber, 2018]. Hausknecht and Stone [2015] further introduced a delta distribution for deterministic settings or a Gaussian distribution for stochastic settings.
Representation Learning. For high-dimensional state space such as images, representation learning that learns informative latent state or action representation will much benefit the environment model building so as to improve the effectiveness and sample efficiency of model-based RL [Yang and Nachum, 2021] on different aspects, including value prediction [Oh et al., 2017a] and model rollout [Nagabandi et al., 2018c]. Ha and Schmidhuber [2018] applied an autoencoder network to encode the latent state that can reconstruct the image. Hafner et al. [2020] proposed Dreamer to learn the latent dynamics for visual control tasks, in which an environment model (called world model) with visual encoder and latent dynamics is learned based on collected experience, and the model is shown to have the capability of performing long rollout and value estimation. Hafner et al. [2021] further proposed DreamerV2 that supports the agent to learn purely from the model rollout data and achieve human-level performance on 55 Atari game tasks. Compared with Dreamer, DreamerV2 replaces the Gaussian latent as proposed in PlaNet [Hafner et al., 2019a] with the discrete latent, which brings superior performance. The possible reason for such effects would be the discrete latent representation can better fit the aggregate posterior and handle multi-modal cases. Considering the state-action pair distribution mismatch between the model training and model rollout stages, Shen et al. [2020] incorporated a domain adaptation objective into the model learning task to encourage the model to learn invariant representations of state-action pairs between the real data and rollout data.

Planning with Model Simulation
When a model is available, the most straightforward idea of utilizing the model is to plan in it. Planning denotes any computational process that takes a model as input and produces or improves a policy for interacting with the modeled environment Barto, 2018, Moerland et al., 2020a,b]. We will list the MBRL approaches that integrate planning into their methods or frameworks. We will categorize these approaches according to the planning methods they adopt.
Model predictive control (MPC). MPC [Camacho and Alba, 2013] is a kind of model-based control method that plans an optimized sequence of actions in the model. Classical MPC approach requires to design a parametric model and policy, such as in the linear quadratic form, to fit the optimizer such as a quadratic optimization solver. Learning-based MPC [Hewing et al., 2020] has a tight connection with MBRL, particularly for nonlinear and black-box models. In general, at each time step, MPC obtains an optimal action sequence by sampling multiple sequences and applying the first action of the sequence to the environment. Formally, at time step t, an MPC agent will seek an action sequence a t:t+τ by optimizing: where τ denotes the planning horizon. Then the agent will choose the first action a t from the action sequence and apply it to the environment.
Black-box MPC regards Eq.(13) as a black-box optimization problem and adopts some zero-order optimization methods to solve it. MB-MF [Nagabandi et al., 2018b] adopts a basic optimization method, i.e., the Monte Carlo (MC) method (also known as "random shooting"), which samples a number of action sequences a t:t+τ from the space of action sequence uniformly and randomly. By applying the action sequences in the model, the current state s t can be transited to s t+τ following the transition distribution. The returns accumulated during the transition process are used to evaluate the action sequences. The action sequence with the highest evaluation will be preserved as the solution of Eq.(13). The MC method is simple to implement and does not require many computational resources. However, because of the low efficiency of the random sampling process, it also suffers from high variance and could fail to sample a high reward action sequence when the action space is large. Recent advances in MPC methods focus on altering the sampling strategies [Chua et al., 2018, Hafner et al., 2019b and the sampling space [Wang and Ba, 2020].
Replacing the MC method with CEM [Botev et al., 2013], PETS [Chua et al., 2018], and PlaNet [Hafner et al., 2019b] improves the optimization efficiency. Instead of sampling randomly and uniformly, CEM samples the action sequences from a multivariate normal distribution, which will be adjusted according to the evaluation of the sampled sequences such that the high-reward sequences can be sampled with a higher probability. This principle resembles many other derivative-free optimization methods [Hansen, 2016, Yu et al., 2016, Hu et al., 2017. As a result, other derivative-free optimization methods can also be used to solve Eq.(13) and integrated into the MPC framework. In addition to altering the optimization method, POPLIN-A [Wang and Ba, 2020] further improves the optimization efficiency by altering the sampling space to a space of action bias. Specifically, POPLIN-A seeks a sequence of action residual to adjust an action sequence proposed by a policy. For example, POPLIN-A-Replan, a variant of POPLIN-A, alters Eq.(13) to Eq (14) by introducing a policy function π(s): The policy learns to imitate the MPC results. As a result, at the state the policy has met, it can propose a nearly optimal action sequence as an initial solution. Thus, POPLIN-A largely simplifies the optimization problem and improves planning efficiency.
With an imperfect model, the result of MPC could not be reliable. However, we can still make use of the planning result by integrating it into a model-free RL framework. I2A [Racanière et al., 2017] integrates Monte Carlo planning results into model-free RL framework as the auxiliary information. Instead of applying the first action of the sequence with the highest return, I2A encodes several rollouts from the model to rollout embeddings. The embeddings will then be aggregated and used to augment the input of the model-free RL agent. As I2A does not rely on the planning results, it can successfully use imperfect models.
Monte Carlo tree search (MCTS). MCTS [Browne et al., 2012, Chaslot et al., 2008a is an extension of Monte Carlo sampling methods. MCTS also aims at solving Eq.(13). Unlike the MC methods mentioned in the MPC part, MCTS adopts a tree-search method. At each time step, MCTS incrementally extends a search tree from the current environment state [Browne et al., 2012, Chaslot et al., 2008a. Each node in the tree corresponds to a state, which will be evaluated by some approximated value functions or the return obtained after rollouts in the model with a random policy [Chaslot et al., 2008a] or a neural network policy [Silver et al., , 2017a. Finally, action will be chosen such that the agent can be more likely transited to a state which has a higher evaluated value. In MCTS, models are generally used to generate the search tree and evaluate the state.
AlphaGo  first uses MCTS to beat professional human players in the game of Go. AlphaGo first utilizes human expert data to pre-train a policy network, which is used to generate the search tree. For each decision timestep, AlphaGo uses MCTS to decide where to play the next stone on board. AlphaGo Zero [Silver et al., 2017b] is able to defeat professional human players without any human knowledge. AlphaGo Zero trains a policy to mimic the planning outputs of MCTS, like POPLIN-A [Wang and Ba, 2020]. The policy is then used to generate the search tree in MCTS. The procedure of AlphaGo Zero can be regarded as an iteration between improving a policy by planning and enhancing the planning by the policy. This training procedure has also been adopted by recent work to play the board game Hex [Anthony et al., 2017].
Despite the conventional MCTS algorithm can only be used in discrete action space, Couëtoux et al. [2011]and Moerland et al. [2018] extended the MCTS framework to continuous action space by progressive widening [Coulom, 2007, Chaslot et al., 2008b, which adaptively determines the number of child actions of a state in the tree according to the total number of visits of the state. Further, when the true model is not provided, MCTS can be applied to a learned model. Value prediction network (VPN) [Oh et al., 2017b] learns an abstract state transition model. The abstract state transition model infers the next abstract state by taking the current abstract state and action as input, which is the same as the transition function in typical MDP. However, the abstract state has no semantics of the corresponding state. The purpose of the abstract transition model is to transit the abstract state to an abstract state that can be used to make more precise value and reward predictions. As a result, given an action sequence, the VPN can predict the reward and the state value for the future states after taking the action sequence to the environment. VPN applies MCTS to the learned model to search an action sequence that has the highest bootstrapped environment return. With the abstract transition model, VPN can be applied to the tasks where the observation is the image, e.g. atari games. The experiments show that VPN can outperform DQN [Mnih et al., 2015] in several atari games. With a similar framework, MuZero [Schrittwieser et al., 2019] further improves the performance in atari games. Muzero also learns a transition model but additionally learns an abstract policy, which outputs actions with the abstract states as inputs. Empirical results have shown huge advantages of Muzero in atari games, Go, chess and shogi.
Background planning. MPC and MCTS always begin and complete planning after the agent encounters a new state. This kind of method is also known as decision-time planning [Sutton and Barto, 2018]. Another way of planning is background planning, which uses the simulated data obtained from the model to improve the policy or value learning [Sutton and Barto, 2018]. Dynamic programming [Sutton and Barto, 2018], tabular Dyna [Sutton, 1990b[Sutton, , 1991, and prioritized sweeping [Moore and Atkeson, 1993] all belong to background planning methods. Here, we introduce VIN [Tamar et al., 2016], which implements a dynamic programming method, value iteration (VI), with a neural network. VIN reveals that the classic VI planning algorithm [Bellman, 1958] may be represented by a specific type of convolutional neural network (CNN). A step of VI can be achieved by passing a reward tensor to a CNN followed by a max-pooling layer. They embed such a module inside a standard feed-forward network and thus obtain a NN model that can learn to plan implicitly and provide the policy with useful planning results.

Data Augmentation with Model Simulation
With a model, instead, we can generate any number of simulated samples as we want. We can use the simulated data for policy learning or value approximation. These kinds of integration of policy/value learning and models are known as Dyna-style methods. Dyna-style methods [Sutton, 1990a] utilize the learned transition model to generate more experiences and then perform reinforcement learning on the dataset augmented by the model experiences. As a result, the models in Dyna-style methods are regarded as the data-augmenter for the policies. The main purpose of models is to generate simulated experiences for policy learning. In this sub-section, we will introduce value learning and policy learning with the simulated experience obtained from a model.
Value estimation. Monte Carlo (MC) value estimation [Tesauro andGalperin, 1996, Sutton andBarto, 2018] is the original method to approximate state values. Specifically, for an state s t , it uses MC search to estimate Q π (s t , a) by performing action a in state s t and subsequently executing policy π in all successor states. In MC search, many simulated trajectories starting from (s t , a) are generated following π. The value function Q π (s t , a) will be estimated by averaging the cumulative reward of the trajectories. MC value estimation depicts an original model usage for value approximation, i.e., averaging the cumulative reward of the simulated trajectories. Another value approximation method is temporal-difference (TD) prediction [Tesauro, 1995], which is broadly used in many value-based RL methods , Mnih et al., 2015. In one step TD, the update target of the value of state s t , V (s t ), is determined by the value of the next state V (s t+1 ) and the received reward r t : r t + γV (s t+1 ). Compared with the MC methods, one step TD does not need a environment model and thus is preferred by many model-free methods. The intermediate between MC methods and one-step TD is H-step TD, whose update target for V (s t ) is Feinberg et al. [2018] proposed Model-based Value Expansion (MVE), which indicates that H-step TD value prediction can reduce the value estimation error under some conditions, which is concluded in Theorem 6.
Theorem 6 (Theorem 3.1 in [Feinberg et al., 2018]). Define s t , a t , r t to be the states, actions, and rewards resulting from following policy π using the true dynamics f starting at s 0 ∼ v and analogously defineŝ t ,â t ,r t using the learned dynamicsf in place of f . Let the reward function r be L r -Lipschitz and the value function V π be L V -Lipschitz. Let be a be an upper bound max t∈ [H] E ŝ t − s t 2 ≤ 2 , on the model risk for an H-step rollout. Then for any parameterized value functionV , H-step model value expansion where c 1 , c 2 grow at most linearly in L r , L V and are independent of H for γ < 1, measures the value estimation error, (f π ) H ν denotes the pushforward measure resulting from playing π H times starting from states in ν,V is the . We assume MSE (f π ) H ν (V ) ≥ 2 for simplicity of presentation, but an analogous result holds when the critic outperforms the model.
Theorem 6 implies that, if is small and the value functionV is at least as accurate on imagined states (f π ) H ν as on those sampled from ν: the MSE of the H-step value estimation will approximately contract by γ 2H . Thus, the primary principle of MVE is forming H-step TD targets by unrolling the model dynamics for H steps. Moreover, in order to satisfy Eq. (15), MVE trains the value function on the data sampled in the environment as well as the imagined data sampled in a learned model. However, MVE relies on fixed horizon H, which is task-specific and may change in different training phases and states space. Stochastic ensemble value expansion (STEVE) [Buckman et al., 2018] further improves MVE by interpolating between different horizons H based on the uncertainty calculated using ensemble. It reweights the value targets of different depths according to their uncertainty, which is derived from both the value function and transition dynamics uncertainty. The rollout length with lower uncertainty will be assigned with a higher weight.
Policy learning. The data augmented by the model can also be used by model-free RL methods for policy improvement. The learned dynamic model can be regarded as a simulator where the policy can be trained. Kurutach et al. [2018b] proposed Model Ensemble Trust Region Policy Optimization (ME-TRPO), which learns a policy via TRPO [Schulman et al., 2015] from a set of learned models. The training process iterates between collecting data using the current policy, training the ensemble model with the environment data, and improving the policy in the ensemble model. Each model is learned from the real trajectories by minimizing the prediction error. When interacting with the ensemble model, in every step, ME-TRPO randomly chooses a model to predict the next state given the current state and action. The collected imagined trajectories are used to update the policy via TRPO. Further, Luo et al. [2018] studied such a learning framework from a theoretical perspective. The authors find that if we establish a discrepancy bound and update a modelM and a policy π following π,M ← arg max the policy performance in a true dynamical model M will improve monotonically. Here, π ref is a reference policy, M is the estimated model, Vπ ,M denotes the value ofπ in modelM , Π is the policy space, M is the model space.
Eq.(16) can be divided into two terms. Based on Eq. (16), as a result, Luo et al. [2018] proposed stochastic lower bound optimization (SLBO), which could be regarded as a variant of ME-TRPO. The authors discard the gradient of the first term w.r.t. the model for an approximation. As a result, the maximization of the first term is equal to updating the policy by an RL algorithm in the current model. The second term implies minimizing an H-step prediction of the model. The training procedure is quite similar to ME-TRPO but uses a multi-step L2-norm loss to train the dynamics. SLBO is built with theoretical guarantees but still has a problem. SLBO uses the model to roll out whole trajectories from the start state. However, due to the compounding error of the model, we may not rollout so long horizon. Model-based policy optimization (MBPO) [Janner et al., 2019], on the other hand, samples the branched rollout in the model. MBPO begins a rollout from a state sampled in the real environment and runs k steps according to policy π and the learned model p θ . Moreover, MBPO also adopts Soft Actor-Critic [Haarnoja et al., 2018], which is an off-policy RL algorithm, to update the policy with the mixed data from the real environment and learned model. MBPO also gives a monotonic improvement theorem with model bias and k-branch rollouts.
Theorem 7 (Theorem 4.3 in [Janner et al., 2019]). Let the expected TV-distance between two transition distributions be bounded at each timestep by m , the policy divergence be bounded by π , the model error on the distribution of the current policy π be bounded by m , the true returns η[π] and the returns from the k-branched rollout method satisfy: Theorem 7 implies if we can improve the returns under the model η branch [π] by more than C( m , π , m , k), the policy improvement under the true returns can be guaranteed. Further the authors also prove that the optimal k = arg min k C( m , π , m , k) > 0 for sufficiently low m , which indicates that roll-out in the learned model with k steps is better than sampling full trajectories or discarding the model. Further, bidirectional model-based policy optimization (BMPO) [Lai et al., 2020a] adopts a backward model to reduce C( m , π , m , k). BMPO introduces a backward dynamic model q(s t |s t+1 , a t ) and a backward policy π(a t |s t+1 ) to accomplish backward trajectory sampling. Starting from a state s t , BMPO will sample k 1 steps backward rollouts and k 2 steps forward rollouts. The policy will be learned from the mixture of the forward rollouts, backwards rollouts, and real environment data. The true returns of the policy learned by BMPO will be bounded by: Note that the bound of MBPO with the same rollout length to BMPO is C( m , π , m , k 1 + k 2 ). It is evident that BMPO obtains a tighter upper bound of the return discrepancy by employing bidirectional models.
Typically, MBPO uses a short rollout length to avoid large compounding errors, which may limit the model usage.
Recently, Pan et al. [2020] proposed Masked Model-based Actor-Critic (M2AC), which can choose a longer rollout length to leverage the model better by discarding the samples with high uncertainty. M2AC computes the uncertainty of each sample by measuring the disagreement between one model versus the rest of the models in an ensemble model. M2AC simultaneously samples B trajectories from the learned ensemble model. For each step, B samples will be collected and sorted according to their uncertainty. Only the first wB samples with the least uncertainty will be stored, others will be discarded. Experiment results demonstrate that M2AC can even benefit from longer model rollouts. On the contrary, the performance of MBPO drops rapidly as the rollouts become longer.
Dyna-style methods can integrate model learning and model-free RL naturally. These methods have an impressive performance as well as a theoretical bound. As a result, Dyna-style algorithms attract lots of research interest in the MBRL community. A common and significant problem for these methods is how to tackle or alleviate the compounding errors. How to use the model to generate more reliable data and how to make better use of the imagined data are still open problems.

Gradient Generation with White Box Model Simulation
In the former sub-sections, we regard the dynamic model as a black box, with which we can transfer a state to another conditioned on an action. However, in many MBRL scenarios, the dynamic models are differentiable. A dynamic model could be a neural network [Heess et al., 2015], Gaussian process [Deisenroth and Rasmussen, 2011], or a differentiable physics engine [Degrave et al., 2019]. We can utilize the internal structure of the models to facilitate policy learning. In this sub-section, we will introduce the approaches that use a white box dynamic model for policy learning. We list two categories of these approaches: differential planning and value gradient, both of which use the internal structure of the model to plan or learn a policy.
Differential planning. Planning in a white box model could be more data-efficient. The Monte Carlo trials discussed in Sec. 3.1 can be altered by gradient-based search. In some cases, we can obtain the analytic form of the optimal policy for an MDP. Linear quadratic regulator (LQR) [Kwakernaak andSivan, 1969, Todorov andLi, 2005] studies the MDP where the dynamic is linear, and the reward is quadratic. Particularly, the dynamic function is a linear function of state and action. Meanwhile, the reward function is a quadratic function of state and action. In this case, the optimal policy for each step is a linear function of the current state and can be derived from the parameters of the dynamic and reward functions. In the non-linear model, we can approximate the dynamic model to the first order and the cost function to the second order. LQR can then be applied to the approximated model, which is known as iterative LQR (iLQR) Todorov, 2004, Tassa et al., 2012]. As a result, we can linearize a learned dynamic model and use iLQR to determine the approximately optimal action at each step [Watter et al., 2015, Levine and Koltun, 2013, Levine and Abbeel, 2014. Guided Policy Search (GPS) [Levine and Koltun, 2013] uses iLQR to draw samples from a white-box model. The samples are used in two ways: producing an initial neural network policy by BC and updating the policy via policy gradient. GPS is a successful integration of planning and reinforcement learning. The GPS framework has been generalized to the case where the dynamic model is unknown [Levine and Abbeel, 2014], or the input is high-dimensional images . In recent work, Zhang et al. [2019b] proposed stochastic optimal control with latent representations (SOLAR) based on the GPS framework. SOLAR defeats an MPC method [Ebert et al., 2018] in the task of learning image-based control policy on a real robot. This result indicates the promising potential of GPS for solving real-world tasks.
Another way of differential planning is utilizing the gradient of the dynamic model for action sequences search. Eq.(13) can be optimized by gradient descent methods if the dynamic model is differentiable. Srinivas et al. [2018] proposed universal planning networks (UPN), which involves a gradient descent planner (GDP). The GDP uses gradient descent to optimize an action sequence to reach a goal. In UPN, the reward is related to the distance between the final state s t+τ and a goal state s g . The reward is given at the last step of the planned rollout. Thus, in UPN, Eq.(13) is instantiated by min at:t+τ where f (s t , a t ) is the dynamic model. In fact, we can write s t+τ as iteratively calling the dynamic model: a t+2 ), . . . , a t+τ −1 ).
(19) As f (s t , a t ) is differentiable, the gradient of Eq.(18) can be passed to a t:t+τ −1 through the dynamic model. GDP alters the Monte Carlo search in MPC to gradient-based search, which is more data-efficient. Despite the high data efficiency, gradient-based methods are prone to sticking to local minimums. However, sample-based methods, e.g. CEM, do not suffer from this problem. Bharadhwaj et al. [2020] integrated CEM and gradient-based search to optimize the action sequence. For each CEM iteration, they will use a gradient-based search to refine the action sequences sampled by CEM before the sequences are evaluated. Their experiments show that their method can also avoid the local minima. Compared with CEM, their methods can converge faster and obtain better or equal performance.
Value gradient. The policy gradient can also be passed through a white-box model. Probabilistic inference for learning control (PILCO) [Deisenroth and Rasmussen, 2011] models the dynamic model by the Gaussian process [Seeger, 2004]. PILCO contains four stages, i) learns a probabilistic Gaussian process dynamic model from data; ii) evaluates the policy via approximate inference in the learned model; iii) obtains the gradient of the policy w.r.t. the policy evaluation; iv) updates the policy parameters to maximize the policy evaluation via conjugate gradient or L-BFGS [Peters and Schaal, 2006]. The training process iterates between collecting data using the current policy and improving the policy. Although PILCO has a graceful mathematics form for the policy gradient and is able to estimate the model uncertainty with by Gaussian process naturally, its GP model is hard to scale in high-dimensional environments. To improve the scalability of PILCO, Gal et al. [2016] replaced the GP with a Bayesian neural network to model the dynamic [Mackay, 1992]. They scale PILCO to high dimensions as well as retain the probabilistic nature of the GP model. For the dynamic model instantiated by a common neural network, e.g. fully-connected or convolutional neural network, the policy gradient can be estimated by backpropagating through the learned model [Mohamed et al., 2020]. These methods typically involve two parts: re-parameterization of distributions [Kingma andWelling, 2014, Rezende et al., 2014] and policy gradient backpropagation through a model. We will take stochastic value gradient (SVG) [Heess et al., 2015] as an example. SVG re-parameterizes the policy π(a|s) by regarding the policy as deterministic function of state s and a noise η: a = π(s, η; θ), where η ∈ ρ(η) is a random vector, θ is the parameter of π. Similarly, the dynamic model is s = f (s, a, ξ; φ), where ξ ∈ ρ(ξ) is a random vector, φ is the parameter of f . For any state-action sequence (s t , a t , s t+1 , a t+1 , . . . ), we can infer the corresponding (η t , ξ t , η t+1 , ξ t+1 , . . . ) with π(s, η) and f (s, a, ξ), such that π(s t , η t ; θ) = a t , f (s t , a t , ξ t ; φ) = s t +1 , ∀t ∈ {t, t + 1, . . . }. Further, the value function V π (s t ) can be estimated by H-step return plus a parameterized value function v(·): Note that each state s t can be obtained by recursively calling the dynamic function like Eq. (19). As a result, we can write the V π (s t ) as a function of s t , (η t , ξ t , η t+1 , ξ t+1 , . . . ), parameterized by θ, φ: V π (s t ) = F (s t , η t , ξ t , η t+1 , ξ t+1 , . . . ; θ, φ) .
(21) As the objective of RL is maximizing V π (s t ), the policy gradient at s t is −∇ θ V π (s t ). In SVG(1), SVG(∞) [Heess et al., 2015], and SVG-H [Amos et al., 2021], the value function is estimated with 1, ∞, and H-step return. Moreover, the estimation is based on real-world trajectories. It will introduce a likelihood ratio term for the model predictions and increase the variance of the gradient estimate. Model-augmented actor-critic (MAAC) [Clavera et al., 2020], dreamer [Hafner et al., 2020], and imagined value gradients (IVG) [Byravan et al., 2019], instead, entirely rely on the predictions of the model, removing the need for likelihood ratio terms. Particularly, to estimate the action or state values, MAAC will sample an H-step rollout in the model with the current policy. Additionally, MAAC estimates the action-value function, i.e. Q-function Q π (s, a), rather than the state value function V π (s). It has been proved that the gradient error of MAAC can be bounded by model and Q-function errors. The authors further give the lower bounds of improvement for MAAC in terms of model error and function error, which implies that the policy can be improved monotonically with a precise dynamic model and an accurate Q-function.
As neural network models are broadly used for model learning, the white box model-based methods can be naturally applied to these models. These methods can directly calculate the gradient of the RL objective w.r.t. the policy of action sequences. As a result, these methods have the potential to alter the trials-and-errors exploration and policy improvement paradigm to gradient descent. However, these methods currently suffer from gradient bias because of the model error. How reduce the gradient bias and variance is a future direction of these kinds of methods.

Value-aware and Policy-aware Model Learning
Previous MBRL works mainly treat model learning and model usage separately, which may result in a mismatch of learning objectives between models and policies. That is, the model is trained to give accurate predictions on all training data, while the policy is optimized to achieve high performance in the true environment. Therefore, a model with a small prediction error on the training dataset does not always imply a policy with high rewards [Lambert et al., 2020]. To this end, Farahmand et al. [2017] proposed the value-aware model learning (VAML) framework to address this problem by incorporating value function information into model learning. Intuitively, when the model-generated data is used to update value functions, we should focus more on the estimation error of the value target rather than the error of the next state. To be more specific, VAML optimizes the model to minimize the one-step value estimation difference between using environment and model: By minimizing the above loss, the bootstrap target calculated using the model will be close to that using the true environment. Voelcker et al. [2021] further improved VAML by taking the gradient of value function into account, and proposed to learn a model that is more accurate on the state-action pairs with large value function gradients. Similarly, for policy gradient based algorithm [Abachi, 2020], the model should provide accurate estimate of policy gradient: and can be optimized by minimizing the difference between ∇ θĴ (θ) and the ground-truth ∇ θ J(θ). By integrating value or policy information into model learning, the learned model can be more suitable for current updates and more robust than traditional maximum likelihood methods, especially when the model capacity is insufficient to fully represent the environment [Voelcker et al., 2021].

Offline RL
Offline reinforcement learning studies the methodologies that enable the agent to directly learn an effective policy from an offline experience dataset without any interaction with the environment dynamics . In general, given a collected experience dataset D = {(s, a, r, s )}, the whole offline RL processing can be framed as min where the design of the loss function L is the focus of different offline RL works. With such a setting, the agent will not require to interact with the environment before a satisfying policy has been learned. Thus, offline RL techniques can be applied to a much wider range of real-world applications.
Despite the non-interaction nature of offline RL makes its training objective Eq.(24) similar to that of supervised learning, the key challenge of offline RL is the extrapolation error, also studied as an out-of-distribution (OOD) problem from the data perspective, caused by the discrepancy between the underlying behavior policy generating the dataset and the current learning policy .
Model-free offline RL mainly designs algorithms that are constrained by the offline dataset to avoid extrapolation errors [Fujimoto et al., 2019, Peng et al., 2019] without using extra data. As a result, the learned policies are usually conservative since the dataset itself always limits the appropriate generalization of the learning policy beyond the offline dataset [Wang et al., 2021].
Model-based offline RL, on the other hand, first builds an environment model based on the offline dataset and then trains the policy based on the model (and the data). The key advantage of building the environment model in offline RL is to leverage the model's generalization ability to perform a certain level of exploration and also to generate additional training data to improve the policy performance.
Nevertheless, since the offline data is often quite limited, the learned model is considered untrustable most methods take a conservative strategy. MORel [Kidambi et al., 2020] constructs a pessimistic MDP (P-MDP) using the offline dataset, where the state transition model is additionally trained and used for detecting whether the current state-action pair is OOD. If OOD is detected, the model will transit to a terminal state and outputs a negative reward. As such, the agent in the P-MDP tends to learn to avoid OOD situations and thus reduce the extrapolation error in the learning process. MOPO ] derives a policy value lower bound based on a learned model and incorporates a penalty term into the reward function based on the model uncertainty so as to discourage the agent from entering the OOD region.
To bypass the error caused by regarding uncertainty estimated via the deep neural networks as the guidance of avoiding OOD problems, COMBO  trains a value function based on both the offline data and the rollout data generated by the learned model. Moreover, the value function is regularized on the OOD data generated via model rollout.
Other than the conservative strategies that avoid entering into OOD regions, it is possible to generalize. MAPLE [Chen et al., 2021b] was the first to borrow the generalization ability of meta RL for offline RL. It derives an adaptable policy through a meta RL method to make adaptive decisions directly in OOD regions, which provided an alternative way to deal with OOD data.

Goal-conditioned RL
Goal-conditioned reinforcement learning (GCRL), also named as goal-oriented RL , deals with the tasks where agents are expected to achieve different goals [Pitis et al., 2020] in an environment or complete a complex task via achieving a series of goals. In GCRL, the observation (or the state) of the agent is usually augmented with a goal, which is normally represented as a mapped vector g ∈ G from a target state, i.e., g = φ(s target ). The mapping function φ : S → G can be designed based on specific tasks or just the identity function. The resulted goal can be regarded as being sampled from a distribution p g . Then, the reward function is defined based on the (state, action, goal) tuple as r : S × A × G → R. In such a setting, the agent policy π : S × G → Ω(A) is trained to maximize the expected goal-conditioned return as max π J(π) = E p,pg,π t γ t r(s t , a t , g) .
To efficiently train the agent to achieve various goals, goal relabeling techniques are widely used. In hindsight, experience replay (HER) [Andrychowicz et al., 2017], the goal is relabeled from the trajectories where the original goal may not be achieved, which is motivated by learning from failure cases. Specifically, in HER, the relabeled goals are built via mapping a randomly picked state in a trajectory of the replay buffer. Other following works seek different ways to generate the goal, including using GANs to generate goals with different difficulty scores [Florensa et al., 2018], planning the goals with search techniques based on experience data [Lai et al., 2020b, Eysenbach et al., 2019, etc.
To further enhance the diversity of the generated goals, thus the robustness and effectiveness of the trained goalconditioned policy, recent attempts have been made for goal planning via model-based methods [Nair and Finn, 2020] studied visual prediction models to build environment dynamics based on visual observations to enable subgoal generation and planning for robot manipulation tasks, which demonstrates substantial performance gain over the baseline model-free RL methods and planning methods without subgoals.  proposed foresight goal inference (FGI) method to plan goals based on a learned environment dynamics model, then the simulated trajectories are generated based on the goal, goal-conditional policy, and the dynamics model. With model-based RL methods, the training scheme achieves superior sample efficiency than model-free GCRL baselines.
With the high-fidelity environment dynamics model, it is promising to leverage various techniques such as graph search, model inference, and heuristics created by human domain knowledge to generate highly useful goals to train the goal-conditioned policy and guide the policy's decision-making at the inference stage.

Multi-agent RL
Multi-agent reinforcement learning (MARL) studies the sequential interaction strategies among a set of agents i = 1, 2, . . . , n in the environment, where each agent i is self-interested and aims to maximize its own payoff in terms of expected return as where the state transition dynamics p : S × A 1 × · · · × A n → Ω(S) now depends on the joint action (a i t , a −i t ) from all the interacting agents, A i denotes the action space of agent i, r i : S × A 1 × · · · × A n → R denotes the reward function for agent i.
Different from single-agent RL, an extra dynamics when seeking the solution in MARL comes from the non-stationarity of the multi-agent game [Papoudakis et al., 2019]. Ideally, in a Markov game, the Markov perfect equilibrium (MPE) is a profile of policies of the participating agents, where each agent i has no incentive to change its current policy π i since for each state s, J i (π i , π −i ) ≥ J i (π i , π −i ), ∀π i [Fink, 1964]. Ideally, the MPE is the solution sought by MARL algorithms, while an approximate α-MPE means in such a profile of policies, every agent achieves the value with the gap no larger than α compared with the value of its MPE policy [Subramanian et al., 2021].
In recent work, Subramanian et al. [2021] performed an early theoretic analysis on model-based MARL. Particularly, they first proved that if a Markov game (i.e., the real multi-agent environment) is approximated by another game (i.e., the model of the multi-agent environment), then the MPEs from these two games are close to each other. Then, they derived thatÕ(|S||A|(1 − γ) −2 α −2 ) samples are sufficient to achieve an α-MPE with high probability. More specifically, for the two-agent zero-sum Markov game, Zhang et al. [2020b] derived the sample complexity of the model-based MARL methods and showed that it is lower than the complexity of model-free MARL methods as derived in previous work [Bai and Jin, 2020].
From the perspective of one agent, the environment it interacts with consists of the opponent agents and the environment dynamics which transits the state according to the joint actions of all agents. As such, the task of learning the multi-agent environment can be decoupled as learning opponent models and the environment dynamics. Opponent modeling [He et al., 2016] is a well-studied topic in multi-agent RL, while the work on environment dynamics learning in multi-agent RL is rare.  studied the problem of dimension explosion issue of the action space caused by the number agents and proposed model-based Tesseract, where Bellman equation is built is a tensorized form while the reward function and state transition dynamics are realized by low-rank Canonical-Polyadic decomposition. The theoretic analysis shows that the model-based Tesseract achieves an exponential gain in sample efficiency of O(|A| n/2 ).
From the analysis of [Zhang et al., 2021b], the sample efficiency of MARL can be decomposed into two parts, i.e., dynamics sample complexity, which measures the amount of interactions with the real environment, and the opponent sample complexity, which measures the amount of interactions between the ago agent i and other agents {−i}. With this regard, it is natural to derive the value discrepancy of the agent policy in the multi-agent environment model (i.e., with the state dynamics model and the opponent models) and the real environment with respect to the error terms of the state dynamics model and opponent models when training the policy in via Dyna-style model rollout. The bound shows that the opponent models with higher modeling error contribute larger to the discrepancy bound, which motivates the design of the algorithm called adaptive opponent-wise rollout policy optimization (AORPO) [Zhang et al., 2021b]. Specifically, the rollout scheme of AORPO allows the opponent models with lower generalization errors to sample longer trajectories while the shorter sampled trajectories can be supplemented with a communication protocol with real opponents. Kim et al. [2020] proposed a communication mechanism called intention sharing (IS), where each agent builds the environment dynamics and opponent models and generates the rollout trajectory. Then a compressed representation is learned from the rollout trajectory to carry the intention, which is sent as a message to other agents for better coordination.
As stated in a recent survey on model-based MARL , the research in this direction has just started with only a few established works. The potential topics that are promising for the future development of model-based MARL include improving the scalability of centralized methods, and the new design of decentralized methods and communication protocols based on the learned models.

Meta RL
Meta reinforcement learning [Duan et al., 2016, Houthooft et al., 2018 studies the methodologies that enable the agent to generalize across different tasks with few-shot samples in the target tasks. In this process, we have a set of tasks for policy training, but the deployed tasks are unknown, can be OOD compared with the distribution of the training tasks [Lee et al., 2020a], and even can be varied when deployed [Luo et al., 2022]. Tasks have different definitions in different scenarios, e.g., differences in reward functions [Finn et al., 2017a, Rothfuss et al., 2019, or parameters of dynamics [Peng et al., 2018, Zhang et al., 2018a. The challenge is to design efficient mechanisms to extract suitable information for the tasks and adjust the behavior of the policy based on the information.
Model-based meta RL methods learn dynamics models from the training tasks, adapt the dynamics models to the target tasks via few-shot samples, and finally generate actions via model predictive control (MPC) [Williams et al., 2015] algorithms or a meta-policy (also called contextual policy) trained with RL methods [Lee et al., 2020b]. Nagabandi et al. [2019a] considered the task distribution is non-stationary when deployed, e.g., legged robots might lose a leg, face to novel terrains and slopes when deployed. It solves the problem by learning an adaptive predictive modelp θ (s t+1 |s t , a t ) with parameters θ , where θ = u φ (D test , θ) corresponds to model parameters that were updated using an adapter u φ parameterized by φ and the collected dataset D test . φ and θ are trained to use the passed M -step data points to compute an optimal θ which will minimize the negative log-likelihood L of future K-step data points: min where τ (t − M, t + K) ∼ D corresponds to trajectory segments from t − M timestep to t + K timestep sampled from our previous experience. It implements two adapters, i.e., gradient-based adaptive learner (GrBAL), which uses a gradient-based meta-learning as in [Finn et al., 2017b] to perform online adaptation, and recurrence-based adaptive learner (ReBAL), which utilizes a recurrent model to learn to adapt via the gradient of L. When deployed, it runs an MPC to generate actions using the adapted modelp θ . MOLe [Nagabandi et al., 2019b] extends the approach to lifelong learning scenarios, i.e., continual online learning from an incoming stream of data. MOLe develops and maintains a mixture of models to handle non-stationary task distributions. The mixture of models is a set of dynamics models split by a task indicatorp θ(Ti) (s t+1 |s t , a t ), where T i denotes a task. It designs an expectation-maximization (EM) algorithm to update all of the model parameters. When deployed, new models will be instantiated for task changes, and old models will be recalled when previously seen tasks are encountered again. CaDM [Lee et al., 2020b] defines the tasks via the dynamics parameters c (e.g., friction) and aims to learn a forward dynamics model from a set of training environments with contexts sampled from p train (c) that can produce accurate predictions for test environments with unseen contexts sampled from p test (c). CaDM solves the problem via learning a context-aware dynamics modelp θ (s t+1 |s t , a t , z t ), where z t = u φ (τ (t − M, t − 1)), which is similar to the framework of ReBAL. CaDM proposes three auxiliary tasks, including forward prediction, backward prediction, and future-step prediction, to regularize the representation of z for better generalization ability. Belkhale et al. [2021] considered a specific application that a policy should control a flight with suspended unknown payloads. As a solution, a context-aware dynamics modelp θ (s t+1 |s t , a t , z t ) is also constructed to be aware of different payloads. Belkhale et al. [2021] inferred the context via a Gaussian with diagonal covariance N (µ t , Σ t ) ≈ p φ (z | τ :t−1 ) and formulated the meta-objective based on variational inference [Kingma and Welling, 2014].
The basic idea of learning to adapt has been used to solve the dynamics gap, also called reality gap, between training and test in many real-world applications. OpenAI et al.
[2019] taught an adaptive controller to solve a Rubik's cube with a humanoid robot hand in a real-world environment with disturbances. Miki et al. [2022] learned an adaptive controller for quadrupedal robots which can make robust perceptive locomotion in an assortment of challenging natural and urban environments over different seasons. All of these works rely on a latent state z to achieve adaptation. However, the generalization ability of z itself is seldom considered, which can be further investigated in future work. Recent applications of model-based meta RL also have shown its generalization ability in complex tasks [Chen et al., Zhang et al., 2020a]. These works also show that model-based meta RL with MPC is easy to introduce extra constraints of safety to action generation, which can be a potential advantage of model-based meta RL compared with model-free methods.
In particular, when the agents have access to a simulator and deal with tasks from both simulation and reality, it relates to Sim2Real [Peng et al., 2018, Tan et al., 2018, Rusu et al., 2017, Chen et al., 2021a, which focuses on how to transfer a policy trained in the simulator to the real world. In such a case, model learning can be easier by making use of the off-the-shelf simulator. For example, Golemo et al. [2018] proposed training a neural network to predict the difference between real data and simulated data. The output of the network was then used to compensate for the unreal parts of the simulator. Experiments have shown this neural-augmented method can be more efficient than directly learning a model to predict the next state. In vision-based RL, Chen et al. [2021a] trained a mapping function to align the representation space of high-dimensional observations in the real environment to low-dimensional state space in the simulator, then a policy can be trained in the simulator and deployed in the real world directly, by mapping observed images from the real world to aligned states and feeding the inferred states into the trained policy. Moreover, Hwangbo et al. [2019] trained an actuator network to produce reasonable predictions for the actuator of real robots since the actuator model of the simulator is not accurate enough. Furthermore, the SimGAN framework  utilized GAN [Goodfellow et al., 2014] to generate the simulation parameters, e.g., actual motor forces or contact forces, which were then used to replace the corresponding components of the simulator. As a result, the simulated data can be closer to the real data compared with an original simulator or fully learned dynamics models. In more complicated real-world scenarios, learning an accurate model can be a big challenge due to the high-dimensional state-action space and complex interactions between different objects.
In the future, it is tempting to build more realistic hybrid models combining analytical simulators and neural networks, which can seamlessly take advantage of innovations in both fields.

Automated Methods on Model Learning and Usage
Compared to MFRL, the design and tuning of MBRL methods tend to require more human effort due to their complex algorithm procedure and sensitivity to different hyperparameters. Take Dyna-style methods as an example. Besides designing the model-free counterpart, Dyna-style methods should also consider alternate optimization of model and policy, model planning steps, and the ratio of simulated data to real data [Lai et al., 2021]. To this end, automated MBRL methods have been investigated to automate the MBRL pipeline and search for better hyperparameters. For example, The reinforcement on reinforcement (RoR) framework proposed in Dong et al. [2020] additionally trained a high-level controller through DQN [Mnih et al., 2013] to control the sampling and training process of a Dyna-style MBRL method.  utilized population-based training (PBT) to optimize the hyperparameters of the PETS algorithm [Chua et al., 2018] during the training process.
In recent work, Lai et al. [2021] theoretically analyzed the role of automated hyperparameter scheduling in Dyna-style MBRL, which reveals that a dynamic schedule of data ratio can be more effective than the fixed one. Motivated by such an analysis, they proposed the AutoMBPO framework to automatically schedule the key hyperparameters of the MBPO [Janner et al., 2019] algorithm. Empirical results show that MBRL methods with automatic hyperparameter optimization can achieve higher sample efficiency compared with those tuned manually , Lai et al., 2021. How to better incorporate advanced techniques of AutoML  into MBRL is a promising direction to investigate further.

Applications of Model-based RL
MBRL is of particular interest because of its potential to be applied in the real world, where a common feature is the intolerance of errors. This feature contradicts the fundamental mechanism, i.e., trial-and-error, of reinforcement learning methods. Therefore, between real-world applications and reinforcement learning, there must be a playground for training policies. The playground must have high fidelity to the real world and a high error tolerance for freely training reinforcement learning.
Building hand-crafted simulators has been a widely adopted approach in cost-sensitive scenarios, such as autonomous driving [Zhou et al., 2021], industrial control [Hein et al., 2017], decision optimization traffic control [Zhang et al., 2019a], electricity allocation [Vázquez-Canteli et al., 2019] in smart cities, financial trading , control of tokamak plasma [Degrave et al., 2022], etc. A hand-crafted simulator can resemble the overall functionality of the real-world task, but it is hard to achieve high fidelity. The policy trained in a hand-crafted simulator may not be able to apply to the real-world task directly. This reality-gap can be overcome by the meta-RL methods introduced above, where a meta-policy can be trained to adapt to the task on-the-fly. A single unrealistic simulator can also be used to facilitate policy training using some data collected in real-world task . Simulators are also useful for generating specific situations that are a rarity in real-world environments for learning robust policies [Zhou et al., 2021, Chou et al., 2018, Sun et al., 2021.
Hand-crafted simulators are still expensive to build, costing huge expert time. Learning environment models from data can be a more efficient and lower-cost alternative to hand-crafted simulators. Shi et al. [2019] were the first to learn an environment model, Virtual-Taobao, for recommender systems. The environment model consists of detailed customer behaviors, i.e., click, buy, turn next page, and leave after reading the recommended items, which is believed to be extremely difficult to learn. It was shown in [Shi et al., 2019] that the customer behavior can be well modeled by the proposed adversarial model learning method MAIL, which was later proved to have smaller compounding error as introduced in Sec. 2.3.2. Shang et al. [2021] extended the MAIL method to model hidden factors, leading to a better model learning ability. Both the two studies show that the policies trained in the learned models can be deployed in the real-world tasks while maintaining similar performance as in the learned models, validated by real-world A/B tests.
From the above real-world applications, we also observe practical advantages of model-based methods: • Full release of reinforcement learning power. A simulator or a learned model allows any reinforcement learning algorithm to use sufficient explorations to train a good policy. Even if the model can be unrealistic, it is possible to constrain the exploration (e.g., [Shi et al., 2019, Degrave et al., 2022) to maintain the effectiveness of the learned policies. • Pre-deployment assessment. It is crucial that a policy has been fully assessed before it can be deployed.
However, assessing an improved policy is extremely difficult. Unlike supervised learning scenarios that commonly employ an identically distributed dataset to validate prediction models, an improved policy can easily derive a state-action distribution different from that of the collected data. The off-policy evaluation aims to evaluate a policy using historical non-identical distributed datasets. However, current off-policy evaluation methods have not shown reasonable effectiveness in benchmarks . While a recent study starts to combine off-policy evaluation and model-based policy evaluation [Jin et al., 2022], running a policy in a simulator/model might be the most straightforward way to assess the performance.
• Decision explanation. Running a policy in a simulator/model can not only assess the performance of the policy but also allow us to see the specific decisions at states. These decisions themselves are also very useful for the decision-maker to evaluate the confidence of the policy in subjective ways. When the decisions show good rationality or even better ideas, the policy can gain more trust from the decision-maker, which is important in practice.

Conclusions and Future Directions
In this survey, we took a review on model-based reinforcement learning, which was a classic tabular RL method in the 1990s and has just got a renaissance for deep RL in recent years. Sample efficiency has always been the target to optimize in RL, particularly in the deep learning era. Model-based methods play an important role in achieving state-of-the-art sample efficiency in deep RL. From our survey, we have noticed some occurring developments of MBRL. We summarize the directions below: • Learning generalizable models. As a playground, models should be tolerant of the running of arbitrary policy. The generalization ability is the key to the success of MBRL. Recent progress includes introducing causal learning into model learning. A correct causal structure, [Zhu et al., 2022a] as well as better modeling causal effect, [Chen et al., 2022] can help build good models. Causal model learning shows a way toward strong model generalization.
• Learning abstract models. State abstraction [Dietterich, 1999] and temporal abstraction [Sutton et al., 1999] can map the original MDP to a low dimensional and compact MDP where the reinforcement learning task can be much simplified. Leveraging state and temporal abstraction, model-learning can happen in low dimensional space and thus becomes an easy task. We have observed some possibilities of learning abstract models [Jiang et al., 2015, Zhu et al., 2022b, while much more need to be done. Abstractions naturally lead to hierarchical reinforcement learning, which we find is almost an untouched topic.
• Training generalizable policies. Meta reinforcement learning, as discussed above, relies on model randomization and produces a meta-policy that can generalize to similar environments. The generalization ability of the meta-policy is rooted in model variations. However, the question of how to generate models such that the trained meta-policy adapts to the target environment is largely overlooked.
• Model-based multi-agent RL. Planning in various multi-agent scenarios with the multi-agent environment model is just in its infancy. By observing the recently emerging works, it is of high potential to incorporate model-based methods to improve the coordination among the team agents and increase the sample efficiency of training. More investigation shall be dedicated to multi-agent environment learning, planning, and communication mechanism design with the model.
• Foundation models. In the general machine learning community, learning foundation models is a recent emerging learning paradigm [Bommasani et al., 2021] that shows strong performance in a large range of vision and natural language processing tasks. This paradigm is also shifting in decision-making tasks by learning a single policy model [Reed et al., 2022]. Other than foundation policy models, foundation environment models is a large region to be explored.
Other possible directions include improving value discrepancy bounds, automatic scheduling in MBRL, adaptive model usage, life-long model learning , etc. It is reasonable to expect that there will be a series of breakthroughs towards more efficient and applicable RL techniques along the direction of model-based RL in the near future.