We propose an imitation learning algorithm where the imitator (learner) estimates the intention of the demonstrator. The agent can imitate even if there are differences in dynamics and kinematics by acting according to the estimated intention. We tested the algorithm for a cart-pole swingup task where the body of the imitator is bigger than for the demonstrator. Fig. 1 shows the trajectory of the demonstrator, and fig. 2 shows the trajectory of the imitator. After several observations, the imitator could succesfully swing up. The control law of the imitator uses only the estimated intention of the demonstrator, leaving the dynamics unaffected by the difference in size.