Recurrent World Models Facilitate Policy Evolution

David Ha, Jürgen Schmidhuber

2018 · NeurIPS

Recurrent World Models Facilitate Policy Evolution

Problem

Framing

Model-based RL usually learns dynamics but still trains policies in the real environment, because learned simulators are exploitable. This paper closes that gap with a compact controller over a learned latent world model: a VAE for spatial compression, an MDN-RNN for stochastic dynamics, and CMA-ES for policy search. It solves CarRacing-v0 with 906±21906 \pm 21 and trains a VizDoom policy entirely inside the learned simulator, then transfers it to 1092±5561092 \pm 556 in the real game.

Currently Used Methods

Foundational

Proposed Method

Architecture

The agent factorizes into vision VV, memory MM, and controller CC. VV is a ConvVAE that maps each frame to latent zt\mathbf{z}_t; MM is an LSTM-MDN that models the next-latent distribution; CC is a linear policy over [zt;ht][\mathbf{z}_t; \mathbf{h}_t]. CarRacing uses 256 LSTM units, Doom uses 512, and both use 5 Gaussian mixtures.

Flow diagram of the world-model agent: environment feeds observations to a VAE, the MDN-RNN updates hidden state, and a linear controller acts from latent and memory.

Loss / Objective

The method trains reconstruction, latent regularization, and next-state density modeling in separate stages.

LVAE=Eqϕ(zx)[logpψ(xz)]+DKL(qϕ(zx)p(z))\mathcal{L}_{\mathrm{VAE}} = \mathbb{E}_{q_{\phi}(\mathbf{z}\mid \mathbf{x})}\big[-\log p_{\psi}(\mathbf{x}\mid \mathbf{z})\big] + D_{\mathrm{KL}}\big(q_{\phi}(\mathbf{z}\mid \mathbf{x})\,\|\,p(\mathbf{z})\big) M:  p(zt+1at,zt,ht)=k=1KπkN(zt+1;μk,diag(σk2))M:\; p(\mathbf{z}_{t+1}\mid \mathbf{a}_t, \mathbf{z}_t, \mathbf{h}_t) = \sum_{k=1}^{K} \pi_k\, \mathcal{N}\big(\mathbf{z}_{t+1}; \boldsymbol{\mu}_k, \operatorname{diag}(\boldsymbol{\sigma}_k^2)\big)

Sampling Rule / Algorithm

Rollouts sample the next latent from the MDN-RNN, with temperature τ\tau controlling simulator stochasticity.

zt+1pτ(zt+1at,zt,ht),at=Wc[zt;ht]+bc\mathbf{z}_{t+1} \sim p_{\tau}(\mathbf{z}_{t+1}\mid \mathbf{a}_t, \mathbf{z}_t, \mathbf{h}_t), \qquad \mathbf{a}_t = \mathbf{W}_c [\mathbf{z}_t; \mathbf{h}_t] + \mathbf{b}_c

Training Procedure

Evaluation

Datasets

Metrics

Headline results

Results figure: CarRacing training curves across CMA-ES generations and a histogram of 100 rollout returns centered near 906.

Ablations

Method Strengths and Weaknesses

Strengths

Weaknesses

Suggestions from the authors

Links

Prior Papers

Further Papers