Self-organization using synaptic plasticity