Skip to content
StackDecode
AI & ML Atlas
Reinforcement LearningalgorithmAnimated walkthrough

Behavioural Cloning

Supervised learning of the expert's action for each state.

The idea

Treat the demonstrations as a labelled dataset: the state is the input, the expert's action is the label, and train a classifier or regressor. It is simple and fast, but the policy sees only states the expert visited. A small mistake puts it in an unfamiliar state where it makes bigger mistakes ("distribution shift").

minimise E[ ‖π(s) − a_expert‖² ]

Watch it run

The pipeline lights up one step at a time. Use the controls to pause or step through it.

  1. 1Record (state, action) pairs from the expert.
  2. 2Train a network to predict the action from the state.
  3. 3Deploy the network as the policy.

minimise E[ ‖π(s) − a_expert‖² ]

1/3

Step by step

  1. 1Record (state, action) pairs from the expert.
  2. 2Train a network to predict the action from the state.
  3. 3Deploy the network as the policy.

Where it is used

A first step for driving and robotics; used to initialise RL.

Watch out for

Compounding errors; needs diverse demonstrations or DAgger.

Related