Robot Learning Basics: Demonstrations, Rewards, and Models
Published:
Start with what the dataset actually contains
Intuition first. For a cup-picking task, a demonstrator might supply camera images paired with gripper commands. Another dataset might contain trial trajectories labelled by task success. A third records state transitions and actions for learning a predictor. Each supports a different immediate training objective.
A demonstration’s action is an example of what someone did. A reward is an assessment of an outcome. A next-state observation describes what happened. They are not interchangeable labels.
Behaviour cloning: predict the demonstrated action
For observation-action pairs \((o_i,a_i)\) and a deterministic continuous-action policy, a simple objective is
This is supervised learning applied to action prediction. Stochastic policies can instead maximise demonstration likelihood. The choice matters when several actions are valid for the same observation. Imitation-learning notes.
Worked example: a reasonable average can be a bad command
Suppose two demonstrations contain effectively identical observations but choose lateral displacement commands of \(-0.1\) and \(+0.1\) metres. A scalar prediction \(u\) has loss
The minimum is \(u=0\). If the demonstrations steer around opposite sides of an obstacle, their average may head into it. This example explains why a small regression error alone does not establish a useful policy, and why history, task conditioning, or a multimodal action distribution may matter.
Reinforcement learning: improve expected return
RL trains using a reward objective and interaction data, either collected during learning or supplied in a fixed dataset. Its basic goal is to choose a policy with high expected accumulated reward. A reward may be sparse, so identifying which earlier actions helped can be difficult.
Read the RL introduction before interpreting an algorithm’s success rate as a statement about its objective. For example, rewarding motion towards a cup can encourage approach without establishing a secure grasp.
Model learning: predict consequences before choosing
A dynamics model learns a relationship such as \(\hat x_{t+1}=f_\phi(x_t,a_t)\). A planner can then compare proposed action sequences. Predicting next state and selecting actions are separate computations; good one-step predictions do not guarantee accurate long rollouts or useful planning costs.
The categories can be combined. Demonstrations can initialise a policy, rewards can refine it, and a learned model can support planning or data generation.
Evaluate complete executions
A cloned policy’s small mistake changes its next observation. Repeated mistakes can lead to situations missing from the demonstrations. This distribution shift is central to imitation learning. Split data by complete trajectories rather than neighbouring frames, then test closed-loop execution from varied starts.
Also preserve action semantics. A displacement in the gripper frame, a position in the base frame, and a joint torque require different labels and interfaces even if each is stored as a vector of numbers.
Next read learned MPC for model-based action selection, ACT for demonstration-based sequences, and residual RL for reward-based corrections.
References
- Tedrake, R. Underactuated Robotics: Imitation Learning.
- OpenAI. Spinning Up: Key Concepts in RL.
