Self-organisation: a derivation from first principles of a class of learning algorithms | Synapse