Neural Networks
Ludovic Hilde
Email: [email protected]
Summer 2008
06/25/08
Assignment 2
A.
An
introduction that describes the TSP problem and the general idea for the neural
network approach. Include observations
you made after seeing the simulations, including any ideas you have for what
made, or could make, the network better (get shorter tours more consistently in
fewer iterations, etc.).
The Traveling Salesman Problem (TSP) is defined with the following question: What is the shortest possible tour for a salesman to visit all cities once [Ci…Cj], starting and returning at city Ci? The neural network approach demonstrates how a highly interconnected network of simple processing units can solve a complex problem such as TSP. The local interactions of such neural networks lead to a particular global effect.
B. Post a copy of the code.
Click on the link below to access the source code of the TSP neural network simulation:
TSP neural network source code
C.
Show the
specific results for running the network twice for each case (case1, case2),
with the following:
Case 1, initial activations
in the 10^-10 range, and N= 20
1.
City
positions.
city0 at 0.7500, 0.5000
city1 at 0.7378, 0.5773
city2 at 0.7023, 0.6469
city3 at 0.6469, 0.7023
city4 at 0.5773, 0.7378
city5 at 0.5000, 0.7500
city6 at 0.4227, 0.7378
city7 at 0.3531, 0.7023
city8 at 0.2977, 0.6469
city9 at 0.2622, 0.5773
city10 at 0.2500, 0.5000
city11 at 0.2622, 0.4227
city12 at 0.2977, 0.3531
city13 at 0.3531, 0.2977
city14 at 0.4227, 0.2622
city15 at 0.5000, 0.2500
city16 at 0.5773, 0.2622
city17 at 0.6469, 0.2977
city18 at 0.7023, 0.3531
city19 at 0.7378, 0.4227
The position of each city is shown in the graph below:

2. Tour that resulted.
The shortest tour resulted at iteration 10.
Visited
Cities: 13 19 3 17 11 18 10 12 14 15 16 20 9 5 6 1 7 4 2 8
The tour started at city 13, moved to 19, moved to 3, so on, and ended at 8. Clearly the fuzzy read out did not find an optimum solution, which would have been 13, 14, 15 … 11, and 12 for example.
3. Drawing of the tour.

4. Length of the tour.
The distances between each city
of the tour depicted in 3 are as follows:
distance between cities 13 and 19: 0.4045084971874737
distance between cities 19 and 3: 0.2938926261462367
distance between cities 3 and 17: 0.4045084971874738
distance between cities 17 and 11: 0.4045084971874737
distance between cities 11 and 18: 0.4455032620941839
distance between cities 18 and 10: 0.47552825814757677
distance between cities 10 and 12: 0.15450849718747367
distance between cities 12 and 14: 0.15450849718747373
distance between cities 14 and 15: 0.07821723252011549
distance between cities 15 and 16: 0.07821723252011538
distance between cities 16 and 20: 0.29389262614623657
distance between cities 20 and 9: 0.49384417029756894
distance between cities 9 and 5: 0.29389262614623657
distance between cities 5 and 6: 0.07821723252011543
distance between cities 6 and 1: 0.3535533905932738
distance between cities 1 and 7: 0.4045084971874737
distance between cities 7 and 4: 0.22699524986977346
distance between cities 4 and 2: 0.1545084971874737
distance between cities 2 and 8: 0.40450849718747367
The total length of the tour is 5.597821884501222
5. Final activations of
the network.
V0 contains the activation
values of the first city (first row of the nxn
matrix), V1 contains the activation values of the second city, and so on.
v0<
2.8122e-11, -6.8734e-11, -5.1469e-11, -5.7901e-11, -6.5325e-11,
4.3064e-12, 1.2549e-11, 1.8601e-11, 2.0914e-11, -4.1939e-11,
-7.5969e-12, 2.9033e-11, 1.6346e-11, -3.0572e-11, -1.1930e-11,
-3.9891e-11, -3.6278e-11, -4.0852e-11, -5.6820e-11, 3.0702e-11<
>
v1<
5.3852e-12, 1.4159e-12, -1.6419e-11, -5.5662e-11, -2.4749e-11,
1.9279e-13, -5.1314e-11, -4.1244e-11, 2.3695e-11, -3.5921e-11,
2.3235e-11, -1.6363e-11, -4.2910e-11, -2.3820e-11, 2.1512e-11,
-1.5666e-11, -3.5722e-11, -1.8121e-11, -4.8709e-11, -3.4464e-11>
>
v2<
4.2770e-12, -4.8791e-11, 4.1275e-12, -5.7651e-11, -3.3703e-11,
-9.2528e-12, -2.3930e-11, -4.4195e-11, -6.7118e-11, -2.9326e-11,
-5.9651e-11, 3.2411e-11, -2.2304e-11, 2.2159e-11, -4.1004e-11,
-1.8840e-11, 1.4341e-11, -3.2398e-11, 1.4870e-11, 2.6056e-11/p>
>
v3<
1.1132e-11, 1.6541e-11, -3.3445e-11, 3.9676e-12, 6.7387e-12, >
4.4943e-12, 1.3097e-11, -5.3355e-11, 1.5665e-11, -5.3818e-11,
1.4788e-11, -4.9066e-11, 4.9757e-12, -3.6930e-11, -6.2769e-11,
-5.8185e-11, -3.2066e-11, -4.0395e-11, -3.4497e-11, -3.1343e-11>
>
v4<
-4.1902e-11, 5.8237e-12, 2.5541e-11, -6.8705e-12, -9.3335e-12,
-4.9393e-11, -5.2560e-11, -5.6821e-11, -3.8746e-11, 1.3761e-11,
2.2793e-11, -4.6476e-11, -3.7313e-11, -4.1347e-11, -5.7991e-12,
6.6801e-12, -2.7603e-11, 5.3378e-12, -3.3537e-11, -2.6311e-11
>
v5<
-2.1208e-12, -1.7832e-11, -4.5654e-11, 1.2777e-11, -3.9160e-11,
-1.0896e-11, -1.3874e-11, 7.0229e-13, -2.0454e-11, -7.9971e-12,
2.6747e-11, -1.8055e-11, -2.8860e-11, -5.5674e-11, 2.3767e-11,
-3.1571e-11, -5.9105e-11, -3.7098e-11, -3.3059e-12, -3.6068e-11>
>
v6<
8.8782e-12, -4.8899e-11, -4.3797e-11, -9.2222e-12, -2.2641e-11,
-1.7801e-11, -3.3843e-11, 2.4875e-11, 1.7594e-11, -5.6057e-11,
-4.0217e-11, -4.2212e-11, 1.5854e-11, -3.8928e-11, -6.8900e-11,
2.9235e-12, 3.6602e-11, -5.3127e-12, -1.7512e-11, -4.0929e-11>
>
v7<
-3.4915e-11, -1.5263e-11, -8.4984e-12, -4.5013e-11, 3.5883e-12,
-2.9947e-11, 2.9080e-12, -6.5938e-11, -4.6286e-11, 1.3157e-11,
-1.3382e-11, -5.5043e-11, 1.3251e-11, -2.3485e-11, 1.8476e-11,
-2.2296e-11, -3.4946e-11, -3.4955e-11, 1.9623e-11, 1.0073e-11
>
v8<
3.6072e-12, -2.4568e-11, -1.5751e-11, -3.0846e-11, 1.6619e-11,
3.8326e-12, -4.3756e-11, -1.5112e-11, -3.6366e-11, -4.6759e-11,
-3.9851e-12, -4.2025e-11, -4.6853e-11, 5.7986e-12, -1.3060e-11,
-1.8044e-11, -4.8727e-11, -1.3402e-11, -5.2458e-11, 3.5500e-11<
>
v9<
3.4152e-11, 1.9796e-13, -1.8623e-11, -6.0957e-12, -1.8231e-11,
8.0062e-12, -3.1473e-11, -3.3945e-11, -4.6245e-12, -6.5121e-11,
2.1267e-11, -6.1816e-11, -4.4908e-11, -3.6464e-11, -6.8556e-11,
-8.4006e-12, 3.5131e-11, 7.5097e-12, -1.9298e-12, -5.2567e-11
>
v10<
-7.3372e-12, -5.1978e-11, -5.9294e-11, -3.6417e-11, 7.0352e-12,
-5.4260e-11, 7.3736e-12, -1.9762e-11, -1.9702e-11, -3.6721e-11,
1.2579e-11, 2.0930e-11, -1.6339e-11, -4.5196e-11, 1.7302e-11,
-2.1683e-11, -4.6501e-11, -3.3896e-11, 1.3861e-11, 3.6826e-11/p>
>
v11<
-2.1671e-11, 2.6281e-11, -4.4059e-11, -5.5314e-11, -6.0618e-11,
-2.6837e-11, 2.8266e-11, -1.0159e-13, -2.8502e-11, -1.4759e-11,
-4.7138e-11, -2.1686e-11, -5.6362e-11, 1.1950e-11, -5.4057e-11,
2.1691e-11, -3.2699e-11, -2.6841e-11, 1.7947e-11, 3.2094e-11/p>
>
v12<
-3.8644e-11, -3.0147e-11, 1.8562e-11, 9.7555e-12, -6.7565e-11,
1.8022e-11, -5.6280e-11, -6.2838e-11, -1.1925e-11, -4.5918e-11,
-6.1549e-11, -3.4178e-11, -1.5473e-11, 1.4186e-11, 1.6251e-11, >
1.7996e-11, 6.4485e-12, 3.8989e-11, -1.5313e-11, -3.2938e-11
>
v13<
2.8998e-11, -6.3371e-11, -5.6138e-12, 1.9261e-11, 8.6597e-12, >
7.8634e-12, 1.9306e-11, 2.3791e-11, -5.5945e-11, -4.1649e-11,
-6.3419e-11, -5.6660e-11, -4.6916e-11, -8.8792e-12, -4.6316e-11,
1.3647e-11, -5.4048e-11, -4.3994e-12, -1.6580e-11, 2.3616e-11<
>
v14<
-3.8680e-11, 1.0649e-11, -3.7190e-11, 9.4983e-12, -1.3558e-11,
-4.0117e-11, -4.3240e-11, -1.5170e-11, 4.9719e-12, -5.4488e-11,
-4.8153e-11, 3.0341e-11, 2.1031e-11, -3.8548e-12, -4.9788e-11,
-2.9238e-11, 1.9030e-11, -4.0807e-11, 1.4871e-11, -2.5618e-11<
>
v15<
-2.6511e-11, 3.6062e-12, 2.7418e-12, -4.4909e-11, -9.4810e-12,
-4.1009e-11, -7.0201e-11, -3.8710e-11, -7.4558e-12, 1.5038e-11,
-7.5724e-12, 1.1361e-12, -5.7759e-12, 2.5418e-12, -7.5230e-12,
3.9666e-12, -2.8786e-11, 9.4653e-12, -4.7258e-11, -8.7460e-12
>
v16<
-2.9370e-11, 9.8231e-12, -3.1888e-11, 6.6332e-13, -3.8765e-12,
-5.7133e-11, -5.0269e-11, -5.2495e-11, -1.4857e-11, 1.2636e-11,
1.6733e-11, -5.6403e-11, -2.6690e-11, -1.4424e-11, 5.8470e-12,
-5.4664e-11, 3.5374e-11, 7.1321e-13, 1.8267e-11, -2.6575e-11
>
v17<
-3.1420e-11, -2.5432e-11, -4.2041e-12, -3.4631e-11, -1.6260e-11,
-3.4332e-11, 2.2769e-11, 5.1254e-12, 2.0256e-11, 2.5595e-11,
-2.2646e-11, -2.0170e-11, -1.3388e-11, -4.3867e-11, -4.9773e-11,
-4.8601e-11, -1.3496e-11, -3.8593e-11, -4.9818e-12, 9.7297e-12<
>
v18<
-5.6609e-12, -1.6920e-11, -1.4183e-12, -6.7014e-11, -4.8228e-11,
3.5297e-12, 1.6683e-11, 2.5034e-11, -2.1636e-11, 2.5913e-11,
9.1312e-12, -4.7396e-11, 2.2511e-11, 5.8173e-13, -7.8208e-12,
-3.1027e-11, -6.0199e-11, -1.7334e-11, -5.9261e-11, -2.0315e-11>
>
v19<
4.0531e-12, -5.0540e-11, 8.6964e-12, 1.7360e-11, -2.4594e-11,
-2.9914e-11, -4.9065e-11, -3.0844e-11, -2.9018e-12, -5.1454e-11,
-2.9870e-11, 2.8413e-11, -3.4810e-11, -3.8110e-11, 7.1807e-12,
5.8280e-12, -4.1314e-11, -1.3730e-12, -5.0551e-11, 1.8862e-11<
>
6. Number of iterations for convergence.
The convergence criteria defined in section D1 was reached after 10 iterations.
7. A plot of the energy as a function of
iteration.
The energy function is given by: E = -1/2 { åi åx åj åy aix ajy wixjy }

I only showed the energy function for the first 200 iterations because my network converged very early (again based on the convergence criteria selected in 1D).
For Case 2, initial activations in the
10^-10 range, and N= 20
1. City positions.
city0 at 0.9785, 0.6582
city1 at 0.3009, 0.2213
city2 at 0.3835, 0.7523
city3 at 0.7291, 0.8414
city4 at 0.2581, 0.4346
city5 at 0.4865, 0.9485
city6 at 0.1658, 0.5352
city7 at 0.1804, 0.9600
city8 at 0.2171, 0.2859
city9 at 0.0660, 0.7274
city10 at 0.8053, 0.9515
city11 at 0.5761, 0.7838
city12 at 0.9963, 0.6768
city13 at 0.4041, 0.6005
city14 at 0.3086, 0.8276
city15 at 0.4623, 0.7483
city16 at 0.5192, 0.6259
city17 at 0.0117, 0.5886
city18 at 0.4287, 0.0708
city19 at
0.1398, 0.0112
The position of each city is shown in the graph below:

2. Tour that resulted.
The shortest tour resulted at iteration 12.
Visited
Cities: 19 3 4 15 7 20 10 16 11 12 13 17 18 1 14 6 9 2 5 8
The tour started at city 19, moved to 3, moved to 4, so on, and ended at 8.
3. Drawing of the tour.

Looking on the graph, the fuzzy
read out did not find an optimum solution based on the convergence criteria
defined in section 1D.
4. Length of the tour.
The distances between each city of
the tour depicted in 3 are as follows:
distance between cities 19 and 3: 0.6829095059821498
distance between cities 3 and 4: 0.3569464536555209
distance between cities 4 and 15: 0.42072371723885765
distance between cities 15 and 7: 0.3254523048456721
distance between cities 7 and 20: 0.524588489967892
distance between cities 20 and 10: 0.7199199024766738
distance between cities 10 and 16: 0.39684376112890585
distance between cities 16 and 11: 0.3986508010288919
distance between cities 11 and 12: 0.2839901453340677
distance between cities 12 and 13: 0.43353517684727
distance between cities 13 and 17: 0.4797354115107833
distance between cities 17 and 18: 0.5089401526517008
distance between cities 18 and 1: 0.9693596395085522
distance between cities 1 and 14: 0.57728434701347
distance between cities 14 and 6: 0.3575446722420205
distance between cities 6 and 9: 0.7152126666760608
distance between cities 9 and 2: 0.10576902706278865
distance between cities 2 and 5: 0.2174580167300065
distance between
cities 5 and 8: 0.5311281259636907
The total length of the tour is 9.005992317864974
5. Final activations of the network.
I used the same notation as in
CASE 1.
v0<
-3.4943e-11, -4.7956e-11, -4.0178e-11, -5.9744e-11, -6.7911e-11,
-6.2118e-11, 1.1693e-11, -3.9201e-11, -1.8415e-11, 1.8162e-11,
1.0666e-11, -9.8752e-12, -3.9794e-11, -2.8531e-12, -3.3535e-11,
-5.9131e-11, -1.1646e-11, -1.0498e-11, -4.3635e-12, -2.8287e-11>
>
v1<
8.0243e-12, 1.8407e-11, -4.1862e-11, -7.4636e-12, -3.4673e-12,
-4.2826e-12, -3.9620e-11, -4.8328e-11, 1.2075e-11, -4.9393e-11,
9.9087e-12, -6.3385e-11, -3.8725e-11, -3.9443e-11, 2.7122e-11,
3.1166e-11, -5.3593e-11, -3.1689e-11, -1.9138e-11, 1.9065e-11<
>
v2<
5.5526e-11, 1.7888e-11, -1.5763e-11, 4.5041e-12, -1.3747e-11,
-5.5365e-11, -8.5622e-12, -2.7769e-11, 3.6538e-11, -5.1956e-11,
-4.7301e-11, -3.0433e-11, 2.5776e-11, -4.7123e-11, 3.0754e-11,
-4.4256e-11, 1.2539e-11, 1.8429e-11, -4.3558e-12, 1.9869e-11
>
v3<
4.7156e-11, 2.6246e-11, -4.5213e-11, 6.7805e-13, -5.9383e-11,
-1.7010e-11, 2.6853e-11, -1.6572e-11, -6.5936e-12, -3.8174e-11,
-5.7926e-11, 1.0779e-11, 1.3586e-11, -6.0989e-11, -3.3974e-11,
-2.4184e-11, 1.4666e-11, -3.5613e-11, -3.6170e-11, 1.7153e-11<
>
v4<
-4.0870e-11, 2.3530e-11, -2.5465e-11, 8.4159e-12, -1.8713e-11,
2.7119e-11, -4.4589e-11, 8.7170e-13, -3.3363e-11, 1.0999e-11,
-4.3545e-12, 2.1541e-11, -1.8356e-11, -5.8968e-11, -1.6946e-11,
4.2236e-11, 3.8652e-11, -3.9804e-11, -1.7366e-11, -2.6694e-11>
>
v5<
1.1365e-11, -3.3741e-11, -6.3276e-11, 1.7001e-11, 1.7675e-11, >
-3.3421e-11, 1.8066e-11, -1.3410e-11, 9.6341e-12, 2.2095e-11, >
-2.8298e-11, 2.6425e-11, -1.6822e-12, 2.8604e-11, -4.9805e-12,
-2.2378e-11, -3.7776e-11, -1.5985e-11, -6.7816e-11, -4.5837e-11>
>
v6<
4.1640e-12, 2.6904e-11, 3.6128e-11, 2.3230e-11, -3.7014e-11,
-1.5823e-11, -2.9937e-11, -5.1548e-11, -5.5232e-11, 2.3459e-11,
-2.2011e-11, -3.5770e-11, -2.4316e-11, -1.5907e-11, 5.9955e-12,
2.7491e-12, -2.3610e-11, 1.8017e-12, 3.3989e-11, -7.0020e-12
>
v7<
-3.6808e-11, 2.2912e-11, -2.4169e-11, -1.5353e-11, -2.2734e-11,
6.3179e-12, -2.3851e-11, -4.2850e-11, -3.7713e-11, -4.9676e-11,
-5.3798e-11, -8.9774e-12, -5.2546e-12, -5.9909e-11, 1.3142e-12,
-5.3483e-11, -1.3283e-11, 1.4090e-11, -2.8667e-11, 5.5285e-11
>
v8<
3.0635e-12, 6.6163e-12, -5.7093e-11, -1.0789e-11, 1.0076e-11,
-3.0376e-11, -3.6236e-11, -6.0522e-11, -3.7995e-11, 1.4538e-11,
-6.2115e-11, 1.4203e-11, -1.1474e-12, 2.0701e-11, 9.4683e-13, >
-3.8470e-11, -2.7609e-12, 3.1167e-12, 1.9140e-11, 9.8117e-12
>
v9<
-3.0071e-12, -2.0356e-11, -4.6783e-11, 3.2327e-11, -3.9547e-11,
-7.0777e-11, -2.9128e-11, 7.2525e-12, 9.9622e-12, -2.7857e-11,
-2.2896e-11, -1.4496e-11, -1.9668e-12, -4.2116e-11, -2.7902e-11,
-5.7001e-13, -4.0556e-11, 3.1952e-11, 6.7848e-12, 4.4031e-12
>
v10<
-4.7505e-11, -3.3921e-11, -3.1465e-12, -7.3632e-11, 3.4553e-12,
1.0852e-12, 2.0264e-11, 1.2370e-11, -4.6261e-11, -4.9211e-11,
-4.5381e-11, -1.9016e-11, -1.0310e-11, -3.6264e-11, 1.5646e-11,
6.2487e-12, -5.2413e-11, 1.8592e-12, 2.0193e-11, -2.0588e-11
>
v11<
-1.5163e-11, -5.6563e-12, -5.2666e-11, -6.0306e-11, 2.6822e-11,
1.4640e-11, 2.8923e-11, -1.3040e-11, 3.4573e-11, 2.0366e-11, >
1.1698e-11, 2.0268e-12, -1.8469e-11, 1.8503e-11, -5.8161e-11,
-7.2413e-12, -2.1508e-11, -2.4879e-11, 2.1763e-11, -3.3071e-11<
>
v12<
-9.9662e-12, -5.4282e-11, -1.3621e-11, -2.1139e-11, -5.9411e-11,
1.6377e-11, -3.3798e-11, -4.4630e-11, 1.7938e-11, -5.0617e-11,
-2.9846e-11, -6.2852e-11, -2.2201e-11, -2.9910e-11, -3.7044e-11,
-8.9835e-12, -3.9033e-11, -5.5767e-11, -5.0111e-11, -2.9609e-11
>
v13<
-3.5575e-11, -1.8309e-11, -1.7904e-11, -5.3178e-12, -5.1810e-11,
2.3022e-11, 2.6172e-11, 1.2668e-11, -4.7810e-11, -2.8964e-11,
4.5323e-11, -1.6493e-11, -5.3118e-11, 4.0001e-11, -7.6457e-12,
-3.5119e-11, -3.8687e-11, 5.4255e-12, 2.7959e-11, 2.7476e-11
>
v14<
2.7061e-11, 4.1770e-11, -2.9786e-11, 7.9266e-12, 1.2658e-11, >
1.1320e-11, -4.1368e-11, -2.7473e-11, 1.6753e-11, -3.3941e-11,
-1.3846e-11, 3.8386e-12, -2.0796e-11, -1.9284e-11, -4.0477e-11,
-4.3302e-11, 3.4572e-11, -5.4660e-11, -2.7514e-11, -2.1662e-11>
>
v15<
-2.3487e-11, 6.0981e-12, -1.4972e-11, -5.1735e-11, -4.1098e-11,
3.9234e-11, -2.6812e-11, 7.4185e-12, -3.5453e-11, -4.3197e-11,
3.3984e-11, -2.6250e-12, 3.0173e-11, 2.4980e-11, 2.2356e-12,
-4.6318e-12, -8.7458e-12, -1.5617e-11, -3.4368e-11, -3.2458e-12>
>
v16<
4.0778e-12, -5.5503e-11, 2.2744e-11, 2.1621e-11, 7.1984e-12,
1.8609e-11, -5.0715e-11, 2.1894e-11, -1.4645e-11, 3.1672e-11,
-3.9991e-11, -3.0792e-11, -4.1031e-11, 2.4572e-11, 1.1432e-11, >
-1.3075e-11, -3.6558e-11, -3.2678e-11, -4.7320e-12, -2.4165e-12>
>
v17<
-2.8256e-11, -1.0553e-11, -4.9815e-11, -1.9501e-11, -1.6443e-11,
-6.4040e-11, -5.0433e-11, 1.7354e-11, -1.6345e-11, 3.4979e-11,
-2.7371e-11, -4.4215e-11, 5.1776e-12, -1.2216e-11, -7.3364e-12,
-1.7165e-11, -3.8375e-12, -3.9810e-11, -5.0602e-12, -1.1796e-11>
>
v18<
4.3354e-11, -1.8856e-11, -2.7439e-11, -5.2764e-12, -2.8890e-11,
7.8375e-13, -2.6994e-11, -2.5095e-11, -2.2664e-11, 3.6607e-12,
-1.7405e-11, 1.4596e-12, -6.4007e-11, -7.6054e-11, -9.7142e-12,
-5.3510e-11, -2.9582e-11, -2.1125e-11, -5.6257e-11, 1.2072e-12<
>
v19<
-4.0055e-11, -2.6177e-11, 2.3222e-11, 1.7804e-11, -4.5886e-11,
-6.2253e-11, -1.1593e-11, -4.9610e-11, -3.8283e-11, -5.5423e-11,
-4.5100e-11, -8.0029e-12, -5.3734e-11, -1.6457e-11, -6.7948e-11,
-3.3429e-11, -5.4524e-12, 7.8437e-12, -7.3913e-11, 4.6508e-12
>
6. Number of iterations for convergence.
The convergence criteria defined in section D1 was reached after 13 iterations.
7. A plot of the energy as a function of
iteration.

CASE1 and CASE2 energy functions are very similar for the first 200 iterations of my network. Again, I only showed the energy function for the first 200 iterations because my network converged very early (based on the convergence criteria selected in 1D).
A.
Convergence
Issues:
1. What "convergence
criteria" did you use? (How did your program know when to stop the
simulation run?).
Initially, I adopted the convergence criteria described in the project, that is
If there is a unique neuron in each row and column with activation
above the threshold, then halt the simulation and declare the corresponding
permutation matrix to be the "output".
I set the threshold to axj = 0.7, and then checked for the existence of a permutation matrix.
The algorithm for the permutation matrix is as follows:
For each row
Check if one neuron has
an activation value greater than 0.7
If there is one make
sure that it is unique
For each column
Check if one neuron has
an activation value greater than 0.7
If there is one make
sure that it is unique
The algorithm of this convergence scheme is shown below:
For each iteration
If a permutation matrix
exists
Display
results of the shortest tour
End
Display the no
convergence error message
The simulation would have stopped and outputted the results after detecting a permutation matrix of the activation values, or when it would have exceeded 10000 iterations, in which case the network would not have converged.
This convergence scheme did not work because the activation values were always close to 0.
As a result, I chose the following convergence criteria scheme instead:
For each iteration
Calculate the fuzzy tour
as long as there are valid cms for each row
Record the shortest tour
End
Display results
2.
It is
assumed that you did more than a couple of simulation runs. Approximately what percent of the time did
the network converge to an ambiguous state (no clear winner in each row and
column)?
The network converged to an ambiguous state 100% of the time.
The center of mass calculations were defined for the first iterations because there were positive activation values in each row of the nxn matrix. However, these cms became undefined because the activation values became negative for all neurons after a few iterations. I was never able to reach the amount of iterations described in section 6 of “A Fuzzy Hopfield-Tank Traveling Salesman Problem Model”
The following table shows the number of iterations it took for the cms to become undefined based on the initial activations, number of cities, and the city positioning case.
|
Initial Activations |
Cities |
City Positioning |
Iterations |
|
10^-2 |
10 |
CASE 1 |
12 |
|
10^-5 |
10 |
CASE 1 |
9 |
|
10^-10 |
10 |
CASE 1 |
9 |
|
10^-20 |
10 |
CASE 1 |
9 |
|
10^-30 |
10 |
CASE 1 |
10 |
|
10^-2 |
20 |
CASE 1 |
22 |
|
10^-5 |
20 |
CASE 1 |
24 |
|
10^-10 |
20 |
CASE 1 |
22 |
|
10^-20 |
20 |
CASE 1 |
21 |
|
10^-30 |
20 |
CASE 1 |
22 |
|
10^-2 |
40 |
CASE 1 |
42 |
|
10^-5 |
40 |
CASE 1 |
46 |
|
10^-10 |
40 |
CASE 1 |
43 |
|
10^-20 |
40 |
CASE 1 |
60 |
|
10^-30 |
40 |
CASE 1 |
66 |
|
10^-2 |
10 |
CASE 2 |
9 |
|
10^-5 |
10 |
CASE 2 |
8 |
|
10^-10 |
10 |
CASE 2 |
10 |
|
10^-20 |
10 |
CASE 2 |
11 |
|
10^-30 |
10 |
CASE 2 |
10 |
|
10^-2 |
20 |
CASE 2 |
34 |
|
10^-5 |
20 |
CASE 2 |
22 |
|
10^-10 |
20 |
CASE 2 |
23 |
|
10^-20 |
20 |
CASE 2 |
28 |
|
10^-30 |
20 |
CASE 2 |
25 |
|
10^-2 |
40 |
CASE 2 |
42 |
|
10^-5 |
40 |
CASE 2 |
45 |
|
10^-10 |
40 |
CASE 2 |
45 |
|
10^-20 |
40 |
CASE 2 |
47 |
|
10^-30 |
40 |
CASE 2 |
45 |