PaperLeet

DeepMimic Four-Component Motion Imitation Reward

DeepMimic · ACM TOG / SIGGRAPH 2018 · Medium · 30 minutes

DeepMimic Four-Component Motion Imitation Reward: implement the interfaces below and verify numerical, boundary and experimental behavior.

Implement pose, angular-velocity, end-effector and center-of-mass imitation rewards. Pose inputs are precomputed quaternion geodesic angle errors; omit PPO, pose parsing and physical simulation.

Functions to implement

DeepMimic Four-Component Motion Imitation Reward

1. Exercise goal

DeepMimic Four-Component Motion Imitation Reward: implement the interfaces below and verify numerical, boundary and experimental behavior.

Implement pose, angular-velocity, end-effector and center-of-mass imitation rewards. Pose inputs are precomputed quaternion geodesic angle errors; omit PPO, pose parsing and physical simulation.

2. Core equations

$$ r^I=.65e^{-2\sum_j\theta_j^2}+.10e^{-.1\sum_j|\Delta\dot q_j|^2}+.15e^{-40\sum_e|\Delta p_e|^2}+.10e^{-10|\Delta c|^2}. $$

3. From equations to code

  • imitation_reward(pose_angles: Tensor, velocity_errors: Tensor, end_errors: Tensor, com_errors: Tensor) -> Tensor

Within each component, sum squared joint/end-effector coordinates before applying its paper-specific exponential scale. The four weights sum to one, so perfect matching yields reward one. Equal end-effector errors are penalized more sharply than angular-velocity errors.

4. Contract and boundaries

Pose angles are (B,J) in [0,pi], velocity_errors (B,J,3), end_errors (B,E,3), com_errors (B,3), same dtype/device. Return (B,) rewards without batch averaging. Preserve error gradients.

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:1804.02717

Related exercises