A biologically inspired robotic model for learning by imitation