A robot learned to complete tasks with up to 12 steps using just five minutes of demonstrations and can recover from failures.