Codes for free learning