Learning Legible Motion from Human–Robot Interactions