1. A method for procedural memory learning to control a robot to perform a task, the method comprising: demonstrating the task to the robot by controlling the robot to perform an action of the task with a direct control command via a low-level interface; receiving a plurality of signals from the robot, wherein the signals are related to the action; computing a similarity matrix whose elements comprise values according to at least one function of similarity of the plurality of signals; inputting into an artificial neural network (ANN) controller of the robot: the direct control command; and the similarity matrix; receiving control signals from the ANN controller to control the robot; aggregating the control signals from the ANN controller by an aggregator according to a kinematics model of the robot; and sending aggregated control signals from the aggregator to the robot, to perform the task.