An optimal unrestricted learning procedure