The statistical mechanics of learning a rule | Synapse