Implemented generic learning rule