Loading…
Glossary term
Learning a behavior by copying demonstrations from an expert.
In imitation learning an agent learns by copying demonstrations from an expert, such as a human driving or operating a robot arm. The simplest version, behavior cloning, treats it as supervised learning: predict the expert's action given the situation.
It avoids having to design a reward but can fail in situations the expert never showed.
Behavior cloning loss
import torch.nn.functional as F
loss = F.mse_loss(policy(observation), expert_action)It is a practical way to teach robots and agents skills that are easy to demonstrate and hard to specify.