In this paper, a robot learns different postures by imitating several partners. We assessed the effect of the type of partners, i.e., adults, typically developing (TD) children and children with autism spectrum disorder (ASD), on robot learning during an imitation game. The experimental protocol was divided into two phases: 1) a learning phase, during which the robot produced a random posture and the partner imitated the robot; and 2) a phase in which the roles were reversed and the robot had to imitate the posture of the human partner. Robot learning was based on a sensory-motor architecture whereby neural networks (N.N.) enabled the robot to associate what it did with what it saw. Several metrics (i.e., annotation, the number of neurons needed to learn, and normalized mutual information) were used to show that the partners affected robot learning. The first result obtained was that learning was easier with adults than with both groups of children, indicating a developmental effect. Second, learning was more complex with children with ASD compared to both adults and TD children. Third, learning with the more complex partner first (i.e., children with ASD) enabled learning to be more easily generalized.