Simulated annealing and codebook design | Synapse