Autonomous learning of 3D reaching in a humanoid robot