Robots That Learn by Doing
Robots That Learn by Doing
Tacit skills, generalization, and learning from experience
People often perform complex physical skills without being able to explain exactly how they perform them. Tying shoelaces is a simple example: someone may tie a variety of shoes successfully yet struggle to describe the precise movements or rules involved. This gap between being able to perform a skill and being able to specify it explicitly makes it difficult to program machines by hand.
Human skills also generalize beyond the specific situations in which they were learned. A person can adapt shoe-tying to a different shoe because they capture the skill’s underlying regularities and apply common sense to new cases. However, trying to write down a complete set of rules for that common sense is difficult. Real environments contain many exceptions and special cases, and a simple explanation of an object or physical principle may not be enough to handle them all.
A promising approach is to learn complex behavior from data rather than attempting to specify every rule manually. In areas such as computer vision, speech recognition, and natural language processing, broad generalization has often depended on combining:
High-capacity models, such as large neural networks.
Large amounts of training data that expose those models to diverse situations.
Large models alone are not sufficient; the breadth of the data is crucial. For autonomous agents, this creates a challenge: a robot must encounter enough different situations to learn both general patterns and the exceptions that matter.
Why autonomous agents have an opportunity
A robot can collect its own experience by interacting with the world. This gives it a potential advantage over systems that only passively process data: it can gather additional examples when it encounters something it does not understand.
The proposed learning cycle is:
The agent acts in the world and collects experience.
It uses that experience to improve a predictive model, a policy, or another part of its decision-making system.
If its current model fails in a particular situation, it gathers more experience relevant to that failure.
It updates its model and tries again.
This is a form of self-supervised, iterative improvement: the agent’s own interactions provide data that can help it become more capable over time. Mistakes are expected, even for strong systems. The important goal is for the agent to learn from those mistakes rather than repeat them indefinitely.
An autonomous agent should be able to keep improving from experience: collecting data, learning from it, and gathering more data when its current model is inadequate.
The learning pipeline and its bottlenecks
Perpetual improvement requires the whole learning pipeline to improve as experience accumulates. The agent must be able to gather data, use it to update its models, and obtain any additional learning signals it needs. If one part of this process does not improve with data, it can eventually limit the entire system.
A component may be useful at first but still become a bottleneck later. For example, a manually designed representation may make initial learning easier. But if that representation cannot describe important situations, additional data and better learning algorithms cannot overcome the limitation.
Hand-designed state representations
A robot’s world can be represented in a way that simplifies learning. For example, a system might represent objects as rigid bodies with three-dimensional coordinates. That representation can be effective for tasks involving rigid objects.
The limitation is that the representation may exclude relevant situations. A task involving deformable objects, such as cloth, does not fit a model that assumes everything is rigid. The hand-designed representation therefore becomes a bottleneck when the agent encounters tasks or objects it cannot express.
Instrumented environments
A robot learning through reinforcement learning needs some way to determine whether its actions are successful. This information is commonly represented as a reward or cost.
An instrumented environment can provide a clear signal. For example, a sensor attached to a door can measure how far the door has opened, allowing the robot to tell whether it is making progress. But the robot then depends on special equipment being installed in every environment where it operates.
If the robot moves to a new building where the door lacks the sensor, it may no longer be able to tell whether it succeeded. It cannot reliably improve its behavior without a usable learning signal.
Simulation as a source of training
Simulation is valuable for prototyping algorithms and preparing behaviors for real-world use. Domain randomization, for example, trains an agent across varied simulated conditions so that it can transfer its behavior to reality, sometimes without needing real-world training data.
Simulation can provide a strong initial policy, but relying on it exclusively can impose a ceiling on performance. If the agent does not continue to learn from real-world experience, its capabilities remain limited by the simulator’s accuracy and coverage.
The central design principle
The learning pipeline should let data flow back into the agent’s behavior without permanent manual constraints. Any fixed element—such as a rigid representation, environment-specific sensor, or unchanging simulated policy—may eventually become the part that most limits performance.
The methods described below address three parts of this challenge:
Learning tasks from examples of success and failure rather than requiring extensive hand-coded reward functions.
Allowing agents to invent and practice goals without being given explicit tasks during training.
Reusing large amounts of past experience to train policies that generalize to unfamiliar situations.
Learning rewards from examples
Why task specification is difficult
Reinforcement learning can be comparatively straightforward when success is easy to measure. In a video game, a score displayed on the screen can serve directly as a reward signal. Real-world tasks rarely provide an equally clear measure.
For instance, teaching a robot to pour water may require a perception system that can estimate how much water is in a glass. In that case, part of the task must be solved before the robot can even begin learning the task itself.
One alternative is to provide a few examples of successful and unsuccessful outcomes, then train a classifier to distinguish them. The classifier’s output can serve as a learned reward signal. This makes it possible to specify tasks with examples rather than writing a detailed program for every task.
Why a naïve classifier reward can fail
A policy trained to maximize a classifier’s estimate of success may discover ways to fool the classifier rather than complete the intended task. Because the policy is actively optimized against the classifier, it can seek inputs or behaviors that exploit the classifier’s weaknesses.
For example, a robot asked to push a cylinder onto a target might learn to angle its fingers toward the camera. A classifier trained from images could mistake that visual pattern for success, even though the cylinder has not reached the target. The policy has found an adversarial behavior: it maximizes the measured reward while failing the real objective.
This problem can persist even when a classifier has been trained on a substantial dataset. Simply collecting more examples of success and failure does not guarantee that the classifier will resist a policy deliberately searching for its errors.
VICE: iteratively correcting the reward classifier
Variational Inverse Control with Events (VICE) addresses this issue by updating the classifier using the robot’s behavior.
The basic procedure is:
Train a classifier using examples of successful outcomes.
Let the robot act using the classifier as its reward signal.
Add the robot’s outcomes to the training data as failures, unless there is evidence that they were genuinely successful.
Retrain or update the classifier, then continue learning.
Labeling the robot’s behavior as failure by default may seem severe, but it makes the classifier confront the states the policy actually visits. As the classifier is updated, previously exploitable situations can be pushed away from its estimate of success. The method is related in spirit to adversarial training and generative adversarial networks: the learning system repeatedly brings forward challenging examples that require the classifier to improve.
A small number of human queries can make learning more efficient. The robot can ask a person to label situations about which it is most uncertain. This is a form of active learning: human feedback is focused on informative examples rather than requested for every interaction.
Learning from images in real robotic tasks
In the described implementation, the system learned entirely from images:
A convolutional neural network classified images as success or failure.
A policy mapped images to robot actions.
The classifier and policy were trained end to end.
The robot sometimes asked a human to label uncertain cases.
Three real-world tasks were evaluated. Training with robot-generated negative examples worked in some cases; using human queries alone also helped; combining both approaches was more effective.
Examples of learned tasks included:
Pushing a cup onto a coaster: The robot received examples of the desired outcome and learned to push the cup from different starting locations. After about an hour and fifteen minutes, it could perform the task from images, while making only occasional queries.
Draping cloth over a box: The task required visual feedback about the cloth’s shape and wrinkles. A baseline that moved the robot’s hand to a predetermined successful position, without using the image, did not work. This indicated that the robot needed to observe the cloth to judge and adjust the draping.
When example-based reward learning is useful
This approach can reduce the amount of task-specific programming required. A person can demonstrate what a desired outcome looks like, while the robot learns a reward signal from examples and its own interactions.
However, a learned reward is not automatically reliable. Because the policy tries to maximize that reward, the reward model must be updated to handle the situations the policy actually produces. Human queries can further help when the system is uncertain.
Learning without externally specified tasks
Learning tasks from demonstrations still requires someone to specify each task. A more autonomous approach lets a robot practice on its own during training, without being told what goal to pursue. A person can then provide a goal at test time—for example, by showing an image of the desired final state—and the robot attempts to make the world match that image.
Latent representations for states and goals
To compare images of the current world with a desired outcome, the system needs a representation in which similarity is meaningful. A latent-variable model can map images into a latent space, where nearby points represent similar states. Generative models such as variational autoencoders or generative adversarial networks are possible choices.
At test time, the model can help the robot interpret whether its current state resembles the requested goal. During training, the same model can generate candidate goals for the robot to practice reaching.
The danger of practicing only familiar behavior
If candidate goals are sampled from the states the robot has already visited, the robot may repeatedly practice what it already knows how to do. For example, it might keep picking up the same pointer because its experience of that behavior dominates the model.
The agent therefore needs a way to favor goals in regions it has not explored much.
Density-weighted goal sampling
Suppose the robot’s visited states are represented as points in a space. Frequently visited regions have high local density; rarely visited regions have low local density. To encourage exploration, the system reweights states according to their local density, giving relatively more influence to sparsely visited regions.
The resulting process is:
Estimate how densely the robot has visited different parts of the state space.
Reweight the data so that low-density regions receive greater emphasis.
Fit or update the goal-sampling distribution using the reweighted data.
Sample new goals and ask the robot to try to reach them.
This pushes the agent toward the periphery of its experience, where it is less familiar with the states. Under idealized assumptions, the method has a theoretical guarantee of eventually achieving uniform coverage over all valid states. The guarantee depends on simplifying assumptions; it does not mean that every practical environment is explored perfectly.
Learning to open a door
A real robot was placed in front of a door without being told to open it. It was allowed to act according to the goal-sampling method.
Initially, its movements were largely random and unproductive.
As it began to open the door, images associated with door opening were relatively underrepresented, so the sampling method encouraged it to practice those states.
After about twenty-five hours of training, it had become proficient at opening the door.
At test time, a person could show it an image of a door at a particular angle, and the robot could open the door to match that angle.
The system learned from image pixels without being given prior knowledge of doors or rigid objects. This illustrates how self-generated goals can encourage an agent to acquire behaviors that can later be directed by a human-specified goal.
Large-scale off-policy reinforcement learning
What off-policy learning enables
An agent’s experience can be reused after it has been collected. In off-policy reinforcement learning, data generated by earlier behaviors can be used to train or improve a policy that differs from the behavior that originally collected the data.
This makes it possible to:
Store experience from many interactions.
Train on that experience repeatedly.
Gather new interactions when the current policy needs improvement.
Use both historical and recently collected data.
The approach can be model-free, learning a policy or value function without explicitly learning a model of the environment, or model-based, learning a model and using it for decision-making. The described work focused on model-free learning.
Q-learning and fitted Q iteration
A Q-function estimates the expected future reward for taking a particular action in a particular state and then continuing with an appropriate policy. Once a Q-function is available, a policy can choose actions that maximize it.
A standard one-step Bellman target is:
Here, s is the current state, a is the current action, r is the reward, s′ is the next state, a′ is a possible next action, and γ is the discount factor. Learning can be treated as regression: the Q-function is adjusted to bring its prediction for the current state-action pair closer to the target.
In continuous-action problems, finding the maximizing action can itself require optimization. Large-scale learning systems may separate the calculation of Bellman targets from the training that fits the Q-function.
Scaling the learning system
The large-scale system used multiple robots to gather experience and distributed the learning work across separate components:
Data from past interactions was collected in a training buffer.
Data from live interactions was stored separately and saved for later use.
Worker processes calculated Bellman targets from the experience.
Those targets were placed in a labeled buffer.
A separate training process used regression to update the model.
The goal was to scale reinforcement learning to millions of interactions, reusing a large history of data rather than relying only on the latest attempts. The specific experiment described used approximately two months of collected data.
QT-Opt and robotic grasping
The system, called QT-Opt, was applied to robotic grasping from monocular RGB images. The camera provided a simple over-the-shoulder view rather than a wrist-mounted view.
The training setup included:
About 1,000 training objects.
Approximately 600,000 grasp attempts.
A Q-network with about 1.2 million parameters.
A grasping reward of 1 for a successful grasp and 0 otherwise.
A key feature of the learned behavior was continuous visual feedback. Rather than detecting a grasp once and executing a fixed motion, the robot continually adjusted its commanded arm position. If an object moved, it reacted and repositioned. It could handle dense clutter and objects with varied properties, including small, large, and transparent objects.
On a test set of objects not seen during training, the system succeeded about 96% of the time. The reported failures were often associated with small rubber octopus toys. The result showed generalization to new objects, although it did not establish grasping as the only or ultimate application of reinforcement learning.
Maximum-entropy reinforcement learning and robustness
From choosing one best action to maintaining useful alternatives
Many reinforcement learning algorithms seek a policy that selects actions at the peak of the learned value function. This is sensible when the goal is to maximize reward, but it can produce behavior that is overly concentrated on a narrow choice.
Maximum-entropy reinforcement learning instead seeks high reward while also encouraging the policy to retain diversity. If several actions or behaviors are similarly valuable, the agent is encouraged to use more than just one of them. Actions that appear slightly less valuable may still be tried, but less often.
A simplified objective is:
Here, π is the policy, rt is the reward at time t, H is the entropy of the policy’s action distribution, and α controls the trade-off between reward and randomness.
The policy can also be understood in relation to a positive transformation of the value function, such as an exponential transformation. Optimizing the corresponding objective involves a divergence between the policy and this transformed value distribution. The entropy term encourages exploration and can make the learned behavior less dependent on a single narrow solution.
Why entropy can support robustness
A policy trained to explore a range of reasonable behaviors may be less sensitive to small changes or perturbations than one that has learned only a single precise sequence. During training, varied actions expose the robot to more situations, which can help it cope with disturbances at test time.
The goal is not random behavior for its own sake. The policy remains reward-seeking, but it is encouraged to maintain variation among actions that are sufficiently good.
Examples
Lego block stacking: A robot learned to stack blocks using maximum-entropy reinforcement learning. When a person deliberately perturbed the robot, it could recover, even though those exact recovery events had not been specifically trained as separate tasks.
Quadrupedal walking: A four-legged robot began without prior knowledge of walking and was asked to move forward. After about two hours of training, it could run reasonably well. It also generalized to some unfamiliar conditions, including walking up a ramp and going down stairs. Going up stairs remained more challenging.
These examples suggest that maximum-entropy training can produce behaviors that are more resilient to modest perturbations and changes in the environment. They do not imply that the method automatically handles arbitrary disturbances or every unfamiliar setting.
Broader challenges and key takeaways
Robots that learn from interaction offer a path toward broad generalization because they can collect their own data, use it to improve, and return to the world to address failures. That possibility depends on avoiding permanent constraints in the learning pipeline.
The major ideas are:
Generalization requires both model capacity and diverse data. Large models are most useful when trained on enough varied experience.
Autonomous interaction can provide a continuing source of data. An agent can gather more experience when its current behavior fails.
Manual components can become bottlenecks. Fixed representations, special-purpose sensors, and exclusive reliance on simulation may limit later improvement.
Reward signals can be learned from examples, but policies can exploit weak reward models. Iterative classifier updates and selective human feedback help address this problem.
Agents can generate their own practice goals. Sampling goals from underexplored regions can encourage broader coverage of possible states.
Off-policy learning makes past experience reusable. Large replay datasets can support continued improvement without discarding earlier interactions.
Maximum-entropy learning can encourage robust behavior. Balancing reward with policy diversity can help agents respond to perturbations and unfamiliar conditions.
Important challenges remain, especially learning safely and robustly in uncontrolled environments. Such settings are essential for meaningful generalization, but introduce difficulties that were not resolved by the methods described, including how to ensure that continued exploration does not create unacceptable risks.

Ask anything
We've read this whole study set, so questions about it get the best answers.