PaperLeet

TD-MPC2 Simplex Latents and Elite Trajectory Updates

TD-MPC2 · ICLR 2024 · Medium · 30 minutes

TD-MPC2 Simplex Latents and Elite Trajectory Updates: implement the interfaces below and verify numerical, boundary and experimental behavior.

Isolate SimNorm and MPPI weighted moments for already-selected elites. Candidate trajectories and values are supplied; omit learned dynamics/Q networks and real MPC.

Functions to implement

TD-MPC2 Simplex Latents and Elite Trajectory Updates

1. Exercise goal

TD-MPC2 Simplex Latents and Elite Trajectory Updates: implement the interfaces below and verify numerical, boundary and experimental behavior.

Isolate SimNorm and MPPI weighted moments for already-selected elites. Candidate trajectories and values are supplied; omit learned dynamics/Q networks and real MPC.

2. Core equations

$$ z_{g,:}=\operatorname{softmax}(x_{g,:}),\quad w_i=\operatorname{softmax}(\tau Q_i),\quad\mu=\sum_iw_i a_i,\quad\sigma=\operatorname{clip}(\sqrt{\sum_iw_i(a_i-\mu)^2},\sigma_{min},\sigma_{max}). $$

3. From equations to code

  • simnorm(values: Tensor, group_dim: int) -> Tensor
  • elite_moments(actions: Tensor, values: Tensor, temperature: float, min_std: float, max_std: float) -> tuple

SimNorm normalizes each group separately. Elite weights normalize E and are shared across the trajectory horizon. Official temperature multiplies values; compute variance around the weighted mean and clamp standard deviation afterward. Use exact normalization, omitting the source denominator epsilon 1e-9.

4. Contract and boundaries

Simnorm accepts rank>=1 floating inputs with last dimension divisible by group_dim>=2. Actions are (H,E,D), values (E,), temperature>=0 is a multiplier, 0<min_std<=max_std. Return mean/std of shape (H,D).

Validation helpers are provided. All floating inputs are finite CPU float32/float64; do not mutate inputs. Invalid shape, dtype, range or mask arguments raise ValueError.

5. Deterministic experiment and visualization

experiment.py calls every submitted interface on fixed inputs and records a learning or sampling curve and terminal metrics. T3 states the behavioral thresholds; the visualization uses the same outputs.

The visualization is generated by viz/gen.py; T3 runs the same experiment with your functions and records its actual metrics. These are small deterministic teaching results, not a robot benchmark.

6. Run your implementation

Complete the functions in the Python editor on the right, then click Run tests. Inspect each failed check, update your implementation, and run again. Passing every required check marks the problem as solved and unlocks the notes.

7. Sources and extensions

Verified 2026-10-28. Extending this operator to the full paper requires the omitted model, data and environment described in the scope above.

Read paper · arXiv:2310.16828

Related exercises