Mastering Diverse Domains through World Models

Danijar Hafner, Jurgis Pasukonis, Jimmy Ba, Timothy Lillicrap

2023 · arXiv

Mastering Diverse Domains through World Models

Problem

Framing

Deep RL still needs domain-specific tuning when tasks shift across action spaces, observation types, and reward scales. DreamerV3 argues that a single world-model agent can remove most retuning by making optimization scale-robust through symlog transforms, twohot value heads, KL balancing, and return-range normalization. It then outperforms specialized baselines across 150+ tasks and solves Minecraft diamond from scratch.

Currently Used Methods

Foundational

Proposed Method

Architecture

DreamerV3 keeps the Dreamer template: an RSSM world model, a critic over imagined returns, and an actor trained only in latent space. The encoder maps xt\mathbf{x}_t to discrete zt\mathbf{z}_t; a recurrent model updates ht\mathbf{h}_t; predictions for observation, reward, and continuation are decoded from (ht,zt)(\mathbf{h}_t, \mathbf{z}_t).

Training diagram: world-model learning autoencodes observations into discrete latents, while actor-critic learning rolls forward latent states to predict actions, rewards, and values.

Loss / Objective

The world model minimizes reconstruction, reward, continuation, dynamics, and representation losses with KL free bits and asymmetric stop-gradient placement:

L(ϕ)=Eqϕ[t=1T(βpredLpred(ϕ)+βdynLdyn(ϕ)+βrepLrep(ϕ))]L(\phi)=\mathbb{E}_{q_\phi}\Big[\sum_{t=1}^{T}\big(\beta_{\mathrm{pred}}L_{\mathrm{pred}}(\phi)+\beta_{\mathrm{dyn}}L_{\mathrm{dyn}}(\phi)+\beta_{\mathrm{rep}}L_{\mathrm{rep}}(\phi)\big)\Big] Lpred(ϕ)=lnpϕ(xtzt,ht)lnpϕ(rtzt,ht)lnpϕ(ctzt,ht)L_{\mathrm{pred}}(\phi)=-\ln p_\phi(\mathbf{x}_t\mid \mathbf{z}_t,\mathbf{h}_t)-\ln p_\phi(r_t\mid \mathbf{z}_t,\mathbf{h}_t)-\ln p_\phi(c_t\mid \mathbf{z}_t,\mathbf{h}_t) Ldyn(ϕ)=max(1,KL(sg(qϕ(ztht,xt))    pϕ(ztht)))L_{\mathrm{dyn}}(\phi)=\max\Big(1,\mathrm{KL}\big(\mathrm{sg}(q_\phi(\mathbf{z}_t\mid \mathbf{h}_t,\mathbf{x}_t))\;\|\;p_\phi(\mathbf{z}_t\mid \mathbf{h}_t)\big)\Big) Lrep(ϕ)=max(1,KL(qϕ(ztht,xt)    sg(pϕ(ztht))))L_{\mathrm{rep}}(\phi)=\max\Big(1,\mathrm{KL}\big(q_\phi(\mathbf{z}_t\mid \mathbf{h}_t,\mathbf{x}_t)\;\|\;\mathrm{sg}(p_\phi(\mathbf{z}_t\mid \mathbf{h}_t))\big)\Big)

Sampling Rule / Algorithm

Actor learning uses imagined trajectories and return-range normalization with a floor at 11:

L(θ)=t=1Tsg(Rtλvψ(st))max(1,S)logπθ(atst)+ηH[πθ(atst)]L(\theta)=-\sum_{t=1}^{T}\frac{\mathrm{sg}(R_t^{\lambda}-v_{\psi}(\mathbf{s}_t))}{\max(1,S)}\log \pi_{\theta}(\mathbf{a}_t\mid \mathbf{s}_t)+\eta\,\mathcal{H}\big[\pi_{\theta}(\mathbf{a}_t\mid \mathbf{s}_t)\big] S=EMA(Per(Rtλ,95)Per(Rtλ,5),0.99)S=\mathrm{EMA}\big(\mathrm{Per}(R_t^{\lambda},95)-\mathrm{Per}(R_t^{\lambda},5),0.99\big)

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Ablations

Results plot: Minecraft item-discovery curves show Dreamer reaching diamond discovery while PPO, Rainbow, and IMPALA stall earlier.

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers

No vault papers identified as further work yet.