Learning Motion Skills for a Humanoid Robot