Interactive textbook · embodied AI, from scratch

Build a robot brain.No robot required.

Embodied AI from scratch, one runnable file per chapter, from a bare simulation loop to a policy you train, export, and drive in your browser. No framework to excavate, no black boxes. Free on a Colab T4 or your laptop.

No account, no setup, and your place is remembered locally in your browser.

See it work

live
PushT behavior-cloning policy — covariate-shift toyThe demonstrated-coverage region (dashed) is the set of block positions the training demos actually visited, derived from real scripted-expert rollouts. Inside it the policy pushes the block onto the target; dragged outside it, the policy makes small, confident, wrong movements.where the demos pushed the blocktargetdrag me out of distribution →
drag the block (or arrow-keys when focused) · poster reads with JS off
pusherT-blocktarget

Drag the block out of the region the demos covered, and watch a confident policy fail. Why it fails →

Why this course is built the way it is

  • the code is the product

    One file you can read top to bottom

    Every chapter builds a single runnable script: a few hundred lines, no framework to excavate. You read it like a textbook, and every line you read is a line that runs.

  • runs on the free tier

    A laptop or a free Colab T4 is enough

    Every learner-facing path completes on CPU or a free T4. The wall-clock times on each page are measured on real hardware, never estimated; where a tier hasn't been measured yet, the page says so.

  • honest by construction

    Real sims, real policies, real numbers

    The browser demos run the same code you train locally. Seeds are mandatory, results reproduce within a recorded band, and every number you read traces back to a run, including the ones that show a method failing.

The arc

Six phases, one runnable file at a time.

43 chapters are live and readable today, across six phases, from a bare simulation loop to a from-scratch practitioner's stack and a real-arm graduation.

  1. Phase 0 · Foundations

    6 live

    Make the simulator behave. Step physics by hand, author a scene, get frames and rotations right, and record your first teleoperated dataset.

  2. Phase 1 · Imitation

    9 live

    Teach a policy from demonstrations. Behavior cloning, exactly why it breaks, and the models built to stop it from breaking.

  3. Phase 2 · Reinforcement

    8 live

    Learn from reward instead of examples: for when demonstrations run out and the robot has to try, fail, and improve.

  4. Phase 3 · Depth (optional)

    9 live

    Off the main line, taken when the itch strikes. Learn a world model, build a physics engine from scratch (dynamics, constraints, contact), compare it against the simulator you have trusted all along, then plan through your own engine with sampling-based MPC. The main line needs none of it.

  5. Phase 4 · Post-Training

    3 live

    Take an already-trained policy and make it reliable. An offline-RL primer that learns from logged data, DAgger corrections that close the gaps demonstrations left, and human-in-the-loop RL (HIL-SERL) that turns a decent policy into a dependable one.

  6. Phase 5 · Practitioner

    8 live

    Build the practitioner's stack from scratch. A ViT and contrastive vision-language for perception, the two-tower VLA shape and a FAST action tokenizer, LoRA and INT8 quantization by hand, then the real-arm teleop → record → train → deploy loop that graduates you off the simulator.

What you'll build

Six things you build, not six demos you watch.

One runnable file per chapter, and this is the range: a learned gait, a reaching arm, a planner, a physics engine written from scratch, a language-conditioned policy, and the deploy loop for a real arm. Every tile replays a real recorded run. Hover one, or tab to it, to watch it move.

  • A quadruped walks

    ch2.5

    SAC finds a forward gait nobody scripted, and the torso travels.

  • An arm reaches

    ch2.2

    Off-policy SAC solves the reach in far fewer samples than PPO.

  • Plan through your engine

    ch3.9

    Sample action plans, roll each through your model, swing the pole up.

  • Build a physics engine

    ch3.5

    From-scratch numpy contact: one solver holds, the naive one sinks.

  • A language-driven policy

    ch1.8

    A language-conditioned policy pushes the T-block onto its target.

  • Deploy on a real arm

    ch5.8

    Teleoperate, record, train, deploy: the graduation loop, on the SO-101 body.

Newsletter

A weekly newsletter on Physical AI.