Mahir Shahriar Tamim

AI Researcher · Explainable & Responsible AI · Vision, Language & Agentic Systems

← All posts

A series · started October 2026

Learning World Models

Start with Part 1: What a world model is, and the tools to build one →
dreams

TL;DR

  • A world model is a learned stand-in for the environment. Observation and action go in, the next observation comes out.
  • I build V and M on a tiny game called MiniPong, then follow Ha & Schmidhuber (2018) for C.
  • Dreams drift because errors pile up, and a controller trained inside one will exploit its flaws.

These notes follow Build a World Model from Scratch by Dr. Rajat Dandekar, which is where the MiniPong build and the renderer / simulator / planner map come from. The original paper is Ha & Schmidhuber’s World Models (2018).

Every source I read meant something different by world models, e.g. video generators, reinforcement learning or Yann LeCun’s JEPA. So I started from the beginning and built the smallest working version myself. These are my notes.

The definition that finally stuck with me:

A world model is a learned stand-in for the environment. Give it what I see now and what I’m about to do, and it tells me what I’ll see next.

Learn it once from recorded play, and you can practise inside it as much as you like without touching the real world.

All the code is in one repo, learning-world-models. Each example reads in one sitting and runs on a laptop CPU.

Roadmap

  1. 1Published · Oct 2026 · 6 min read

    What a world model is, and the tools to build one

    The agent–environment loop, the renderer / simulator / planner map, state versus observation, and the four tools every paper assumes: compression, return, value and actor–critic.

    • What a world model actually is
    • The toolkit: compression, return, value
  2. 2Published · Oct 2026 · 7 min read

    MiniPong: building V and M from scratch

    Squeezing a 32×32 frame into 12 numbers, the four small decisions that make it work, a memory that works out velocity on its own, and why the dream drifts.

    • Building V: squeezing a frame into 12 numbers
    • Building M, and why dreams drift
  3. 3Published · Oct 2026 · 9 min read

    Learning inside a dream, and what breaks without the tricks

    A controller trained by evolution, how agents cheat a flawed dream, and my experiment removing each MiniPong trick one at a time. Plus a short appendix on the VAE.

    • C: learning to act inside a dream
    • My experiment: what breaks without the tricks
    • Appendix: the VAE and the reparameterisation trick
  4. 4
    Planned

    Dreamer: learning behaviour from imagination

    An actor–critic trained entirely on imagined rollouts in a learned latent space.

  5. 5
    Planned

    Tokens and transformers as world models

    IRIS: turning frames into discrete tokens and predicting them like language.

  6. 6
    Planned

    Diffusion world models

    DIAMOND: keeping long dreams sharp by generating each frame with diffusion.

  7. 7
    Planned

    Predicting without pixels

    JEPA: learning a world model that never has to redraw a single frame.