Beta

Sync to cloud

Uses your current signed-in YoolVi account. A Learn profile is not required.

Upload a snapshot of this browser’s saved lesson work across all subjects, including notes, experiments, journal and review history. Existing guest work is included only when you confirm below. This does not upload account credentials or award XP.

Sync uploads to your private account; it does not automatically merge or replace this device’s work. On another device, download the cloud copy and use My Learning’s backup import. The previous cloud snapshot is retained when a new one replaces it.

Export or import this device’s work

No background uploads. Edits made after a snapshot need another sync. On shared devices, work is bound to the first account observed by cloud sync; another account must use a separate browser profile. Keep your own downloaded backup too.

Learning preferences

Make learning more comfortable. Changes apply immediately.

Enlarges page content, including diagrams and their labels. You can also use your browser’s zoom.

Choose the colours that are easiest for you to distinguish. Applies to lesson diagrams and lab plots. Labels, shapes, hatching and line patterns also distinguish meanings. Source photographs and raw image brightness stay unchanged; mask-only views are available for image overlays.

ExampleComparisonSample link

Saved in this browser on this device. Preferences are separate from progress backups.

Back to World Models and Predictive Planning

World Models and Predictive Planning · Lesson 1 of 3 in this module

Understand imagined training

Imagined trainingFixed teaching example — not your saved experiment.
  1. Starting information

    A learned simulator predicts favorable outcomes

  2. Relationship or operation

    Train on its simulated transitions

  3. Consequence

    The policy may exploit model errors

Imagination can reduce real interactions but introduces model bias. Check learned behavior in the independent environment.

Learn actions inside a model

Collect examples of what a force does to a cart, then fit a small prediction rule. A policy can try imagined trajectories inside that rule before it acts in the external simulator. The same data can support many imagined trials, but model errors can also steer learning toward bad actions.

Follow what changes

The lab starts two policies at zero weights. One learns using fitted dynamics; the other learns using the exact simulator. Both optimize the full trajectory cost and update their two weights together. The fitted dynamics stay fixed. After training, freeze both policies and compare actual externally executed outcomes with doing nothing.

Count the work

Equal policy updates are not equal total resource costs. Each update uses sixteen trajectories. At five steps that is eighty transition calls, paid either to the model or to the simulator. Collection, fitting and evaluation add different work. The displayed counts are not measured time.

Explain the limitation

Compare short and longer imagination at matched updates. A longer horizon may expose useful consequences or amplify model error. The tiny deterministic experiment is public practice, not a reproduction of a large research system or proof of independent proficiency.

Full worked explanation, calculations and control definitions

Use this reference for the detailed mechanism and control meanings. Derivations explicitly marked optional are enrichment.

Practice inside a prediction

Suppose each real trial costs time. You collect transitions, fit a model and use its predictions to try different actions. The attraction is reuse: one collection supports many imagined trajectories. The risk is that optimization discovers actions where the fitted model is misleading.

The lab reuses the exact velocity-first cart with 0.1-second intervals, mass 1 kg, linear drag 0.2 and optional quadratic drag 0.6. An affine delta model fits the 96 measured training transitions. It is not handed the plant coefficients. Its weights stay frozen during policy improvement.

What changes during learning?

A two-weight policy chooses force u=2tanh⁡(w1x+w2v)u=2\tanh(w_1x+w_2v). Here x is position in metres, v is velocity in metres per second, and u is force in newtons; inputs use reference scales of 1 m and 1 m/s. The output always lies between −2 and +2 N. Initially both weights are zero, so no force is applied.

The objective averages x2+0.1v2+0.01(u/2)2x^2+0.1v^2+0.01(u/2)^2 after each predicted interval, using those reference units. The first term encourages reaching the origin; the second discourages residual speed; the third prices effort. These are declared design choices, not universal safety criteria.

For each weight, the optimizer evaluates the full trajectory cost at a small positive and negative perturbation. Their difference divided by twice the perturbation approximates the derivative. Both weights update from the same preceding policy, with rate 0.3 and bounds ±3. No imaginary state is silently replaced by a true state within a rollout.

A comparison with an explicit budget

One learner uses the fitted dynamics; another uses the exact simulator during optimization. They share four training starts, zero initialization, horizon and update count. Each update evaluates four candidate weight vectors, each on four starts: sixteen trajectories. At horizon five this is 80 transition calls per update. The simulator-trained comparator pays those calls to the environment; the imagined learner pays them to the model, plus initial data collection and fitting.

Both frozen policies then execute 20 exact intervals at two different public development starts. The initial zero policy is also evaluated. Evaluation uses 120 environment calls total. Fitting arithmetic and other overhead are additional; call counts are not measured time or claims of equal hardware cost.

Short imagination can still be wrong

Compare horizons five and fifteen at matched update counts. A longer rollout makes future consequences visible but also compounds model error. Gentle collection can leave action effects weakly represented. A lower imagined objective does not by itself support an external improvement claim.

The browser recomputes a bounded deterministic comparison, at most forty updates, on request. Exports retain recipes, policies, trajectories and counts. This two-weight experiment teaches the separation between data, model, policy and evaluator; it is not a reproduction of large latent actor–critic systems such as the named DreamerV3 paper.