An engineering notebook · robotics & reinforcement learning
Understanding Physical AI from First Principles.
From physics engines and robot dynamics to reinforcement learning and real-world humanoid locomotion, explained step by step and backed by simulations you can run in your browser.
- Chapters
- 10
- Experiments
- 47
- Reference robot
- 12 + 2
One connected system, not separate topics
A walking policy is only as good as the physics, sensors, timing and interfaces it was trained against. Each chapter covers one link in that chain and shows how it connects to the next.
Chapters
Read in order. Each chapter starts with the intuition, then the equations, data formats and code.
- 01Introduction to Physical AIWhat it means for intelligence to have a body: perception, decision-making and action in a world governed by physics.
- 02Understanding Physics EnginesFrom Newton's laws to numerical integration: how software predicts the next physical state of a robot.
- 03How MuJoCo Works InternallyRobot description formats, mjModel and mjData, and what actually happens inside mj_step().
- 04Robot Sensors and Data InterfacesIMUs, encoders, coordinate frames, projected gravity, and why real sensor data is noisy, biased and late.
- 05Robot Communication and FirmwareCAN bus, SocketCAN, virtual CAN, UDP and binary serialization — how bytes move between a robot computer and its motors.
- 06Understanding Asimov's Simulation EnvironmentA lower-body humanoid in MuJoCo: parallel ankles, passive toes, multi-rate timing and processor-in-the-loop validation.
- 07Reinforcement Learning FundamentalsAgents, rewards, policies and value functions from first principles — with algorithms that actually learn in your browser.
- 08Reinforcement Learning for Asimov LocomotionThe 45-dimensional observation, the 45→512→256→128→12 actor, and how a neural network becomes a walking controller.
- 09Actor-Critic and Privileged LearningWhy the critic sees 64 values while the deployed actor sees 45 — and what privileged information can and cannot fix.
- 10Research Exploration: Learning to Walk with Less InformationA proposed experiment: progressively masking privileged observations from the actor during training.
Experiments, not illustrations
Every experiment shows its equations, its core source code and its limitations. Learning demos run real algorithms. Nothing is a pre-recorded animation.
- Perception–action feedback loopHow sensing, observation, control, actuation and the physical environment form a closed loop, and what happens when the loop is broken, delayed or noisy.
- Falling ball with adjustable gravityConstant acceleration under gravity, the exchange between potential and kinetic energy, and how a coefficient of restitution turns an impact into energy loss.
- Single-joint arm laboratoryHow a MuJoCo-style model (one body, one hinge joint, one actuator, jointpos/jointvel sensors) turns a control value in data.ctrl into torque, motion and sensor readings, and how motor, position and velocity actuators interpret the same ctrl number differently.
- IMU orientation viewerHow roll, pitch and yaw define the orientation of an IMU's body frame relative to the world frame, and how the same orientation is written as a rotation matrix, a quaternion and a projected-gravity vector.
- Virtual CAN bus with motor controllersHow a single shared CAN bus carries commands to, and feedback from, several motor controllers, how bus load grows with motor count and control rate, and why motors with higher identifiers get their feedback later.
- Multi-rate timing: 200 Hz physics and IO, 50 Hz policyHow Asimov's documented rates fit together: physics and IO-side state handling every 5 ms, the policy every 20 ms, so each policy action is held for four physics steps.
How this site treats facts
Robotics writing often blurs what a source states, what is general knowledge, and what is a guess. Here every Asimov-specific claim is attributed to Menlo’s documentation. Example values are marked as examples. My own ideas are marked as proposals.
Learning to walk with less information
Can an actor that starts with all 64 privileged observations, and gradually loses 19 of them, learn faster or more robustly than one restricted to the 45 deployable inputs from day one? Methodology, baselines and an interactive masking playground. No results yet, and none are claimed.
Read the proposal