AIFH Volume 3, Chapter 3: Boltzmann Machine TSP Weight Grid

Generate TSP Boltzmann Machine Weight Matrix

Number of cities:

The columns represent source city, by cities (2nd row) inside of the tour position (1st row). The rows represent [neuron index]([tour position],[city #]). Gamma is a learning-rate like value provided to the algorithm. The function d(x,y) returns the distance between city x and city y. The diagonal is set to zero, and is indicated by a slash (\).

Weights

Biases

Biases are always -g/2.