Learn AI.
P09 · OPTIONAL IMPLEMENTATION STUDIO

From commanded motion to actual dynamics.

In the browser arm, a velocity command produces exactly the requested movement. Here, torque accelerates a coupled two-link arm in MuJoCo: mass, inertia and damping affect what happens next. Download the runnable CPU starter, implement a controller, and compare a trained imitation policy with a strong feedback baseline.

1. Predict a failure, then inspect recorded evidence

These are actual recorded MuJoCo runs of the supplied reference, not live browser simulation or learner results. Predict whether bias, noise or an obstacle changes task completion. Select one scenario and compare both controllers under the same settings. A short failed run is not a faster successful controller.

Programmed feedback

success; 715 steps, 3.5750 simulated seconds. Failures: none recorded.

Final joint angles [-0.2190, 0.7954] rad; goal [-0.2000, 0.8000] rad. Final speeds [0.0132, 0.0032] rad/s.

Trained imitation

success; 631 steps, 3.1550 simulated seconds. Failures: none recorded.

Final joint angles [-0.2103, 0.7977] rad; goal [-0.2000, 0.8000] rad. Final speeds [0.0058, 0.0008] rad/s.

Final fitting loss 0.0054 on the fixed teacher grid. Fitting loss is not task success.

Success needs 100 consecutive samples (0.5 s) of target and speed agreement; a timeout is not success. Both controllers can fail. The cases are excluded from fitting but publicly exposed; repeating them does not create unseen evaluation. Baseline values repeat across training seeds because that controller is not trained. These recordings used MuJoCo 3.3.7, NumPy 2.3.5 and Python 3.12.12 on macOS ARM64.

2. Run the real simulator locally

Use Python 3.12. Unzip, open a terminal in the extracted folder, and create a separate environment. No GPU, viewer, account or paid API is needed. Package installation needs internet; experiments then run locally. Other platforms remain unverified.

python3.12 -m venv .venv
.venv/bin/python -m pip install -r requirements.txt
.venv/bin/python checks.py
.venv/bin/python run.py train --seed 7 --output policy-7.json
.venv/bin/python run.py evaluate --model policy-7.json --output evaluation-7.json

On Windows use .venv\Scripts\python.exe instead of .venv/bin/python. Repeat with seeds 19 and 41 and new filenames. Outputs never overwrite. Evaluation checks source/package identity and reproduces the training recipe before using the frozen weights.

3. Implement, inspect and challenge

  1. Implement torque and tip_position in learner.py; run .venv/bin/python learner_checks.py. The untouched exercise deliberately fails. Compare with the supplied reference only after attempting it.
  2. Read a receipt: delivered observation, requested torque, actual state after integration, and external acceptance. The controller must receive only the declared observation and goal.
  3. Add an observation-only estimator. Explain why predicting joint angle by adding torque times time is incorrect. Torque changes acceleration through coupled inertia.
  4. Reproduce the 114-parameter network's forward pass and gradients. The supplied policy imitates a teacher over 625 rows; it is not reward-trained. Check all parameters by finite differences and update from one common checkpoint.
  5. Freeze your implementation, add new scenarios before inspecting outcomes, and retain all failures. Ask a reviewer to supply unfamiliar settings and inspect your code. That independent review is separate from these public practice tests.

4. Explain the mathematical and operating boundaries

The baseline uses torque = clipped(8 × angle error − 3 × measured speed), in Nm. An error of 0.5 rad and speed of 1 rad/s gives 8 × 0.5 − 3 × 1 = 1 Nm. The motor limit is ±8 Nm; joint limits are ±2.6 rad and speed limits ±3 rad/s. Angles use radians here, while the browser arm uses degrees.

The horizontal 1 m / 0.8 m arm has coupled inertia, zero gravity, capsule links and RK4 integration at 5 ms. The checker recomputes whole-link obstacle distance at each integrated sample, plus operating limits. These are sampled checks, not the browser planner's continuous clearance certificate. Actual violations remain in the trace; ending an episode does not brake a physical arm.

Success requires 100 consecutive samples within 0.03 rad of both targets and 0.03 rad/s. Runs cap at 1,200 steps. Noise and unmodelled bias affect readings, never the external task definition. This model and its contact response do not establish hardware safety or real-world reliability.

5. Attach a reviewable artifact

Keep full source, environment, frozen models and simulator JSON locally. In the controller project, attach selected code or an artifact description and discuss frame arithmetic, estimation error, collision/limit failures and missing evidence. The browser does not execute this Python or import its scores as authenticated evidence. This optional studio does not inflate guided-path completion.

Human artifact review, learner pilots and broader platform/device profiling remain pending. See the official MuJoCo Python bindings and model reference for the simulator APIs. Teaching sources use the bundled MIT licence; installed dependencies retain their own licences.

Learn AI · Understand by doing.Loading local progress…Copyright (c) 2026 Mobi Weave, Inc. All rights reserved