Efficient teaching and effective learning for robot learning from demonstration