• No results found

2.3 A More Specific Model

3.1.4 Simulation Results on a Virtual Cellular Machine

Before the actual implementation I would like to show, that the theory described in the previous section is right and it can be used in case of real life and implemented on existing architecture.

I simulated a virtual version of the CNN-UM in order to test my algorithm on the previously described test case. The simulated CNN-UM was a virtual machine containing 64 processing cores similarly to the Xenon architecture. The neighborhood radius of every processor could be set to any arbitrary number. The core of the virtual machines were able to execute regular CNN operations (templates), but also arithmetical and logical operations as well. This way we could easily check the validity of the architecture, without facing the difficulties of random number generation or the limited number of supported operations in the cores.

As a measure of performance I used the average number of iterations until the best entity reaches the previously known solution of the problem. I have repeated every setup 1, 000 times and calculated the average from as the result of these independent experi- ments. I carried out the calculations for various parameter values (neighborhood radius, mutation factor for single point mutation, population size) to find out optimal settings. I identified the best combination for mutation factor/neighborhood radius parameters for our test cases.

The qualitative measurement of this results is quite complex, because this kind of convergence can be measured in more ways: On one hand we can measure the average convergence speed 16. On the other hand, and this is a more practical consideration, we can measure the average of the best element after a given number of iterations. In practice we usually have a constraint about the execution time, also about the number of iterations and our aim is to achieve the best result possible in this time.

I have made the simulations with the following parameters: 1024 elements were simu- lated in every population in case of the N-queen and knapsack problem, this number was 2048 for the TSP. The initial distribution was generated according to uniform distribution in the state space.

As a metric to the measurements I have used the average number of iterations until the best entity will reach the optimal solution of the problem to measure the quality of a parameter setup.

I have tried to identify the best mutation factor, and the best Neighborhood radius parameters for every test case. As it can be seen from Table 3.1, 3.2, 3.3 the exploita- tion/exploration ratio can be set by the tuning of this two parameters and larger neigh- borhoods induce a higher level of implicit migration.

16the number of iterations in average until we will find the optimal solution

Table 3.1: Average number of iterations for the 16-queen problem

The table contains the average number of iterations for the 16-queen problem for different parameters as a function of the neighborhood radius and the mutation factor for single point mutation. The results are obtained by taking the average of 1000 independent runs. The columns represents different mutation factors while the rows are showing different neighborhood radii. As it can be seen from this results (with these parameters) the best convergence speed can be obtained with mutation factor 0.2 and neighborhood radius 3 and in this case the algorithm requires 52.23 iterations in average to find the optimal solution. N/pm 0.1 0.2 0.3 0.4 0.5 0.6 1 143.47 72.15 75.93 87.37 95.83 113.42 2 120.30 58.95 71.66 85.48 89.83 102.39 3 125.28 52.23 64.97 83.82 85.87 95.56 4 132.67 54.16 54.81 81.91 83.24 87.00 5 147.53 54.32 57.57 79.91 82.54 84.56 6 158.67 54.73 57.94 75.20 80.13 81.64

Table 3.2: Average number of iterations for the Knapsack problem

The table contains the average number of iterations for the Knapsack problem for different parameters as a function of the neighborhood radius and the mutation factor for single point mutation. The results are obtained by taking the average of 1000 independent runs. The columns represents different mutation factors while the rows are showing different neighborhood radii. As it can be seen from this results (with these parameters) the best convergence speed can be obtained with mutation factor 0.4 and neighborhood radius 4 and in this case the algorithm requires 29.06 iterations in average to find the optimal solution. N/pm 0.1 0.2 0.3 0.4 0.5 0.6 1 162.14 104.26 87.74 56.73 61.59 70.64 2 154.22 92.59 80.69 37.02 58.68 52.70 3 148.85 85.25 61.63 35.80 41.70 40.06 4 140.39 76.52 54.46 29.06 34.14 42.17 5 138.91 68.31 46.93 33.07 38.24 43.83 6 133.12 62.39 51.76 38.35 42.88 45.32 39

Table 3.3: Average number of iterations for the traveling salesman problem

The table contains the average number of iterations for the traveling salesman problem for different parameters as a function of the neighborhood radius and the mutation factor for single point mutation. The results are obtained by taking the average of 1000 indepen- dent runs. The columns represents different mutation factors while the rows are showing different neighborhood radii. As it can be seen from this results (with these parameters) the best convergence speed can be obtained with mutation factor 0.7 and Neighborhood radius 4and in this case the algorithm requires 129.20 iterations in average to find the optimal solution. N/pm 0.3 0.4 0.5 0.6 0.7 0.8 1 267.05 232.97 194.50 167.86 156.87 152.69 2 237.10 215.90 189.05 163.18 144.57 141.79 3 224.33 190.02 181.38 157.48 137.93 134.33 4 204.87 178.77 139.17 133.00 129.20 137.82 5 229.69 182.71 164.28 133.01 124.32 136.73 6 225.92 188.23 172.85 137.24 127.92 135.05

After identifying the best parameters, from a more theoretical point of view I have examined the average fitness of the population for the best parameters.

As it can be seen in Figure 3.1 the average entity is getting closer and closer to the optimal solution the value of its fitness is getting closer to the value of the solution, this means that this setup and the virtual cellular UM is capable of solving this type of opti- mization problems, which makes it a good architecture candidate in certain optimization tasks. I have to note, that the fitness of the average entity will not reach the optimal solution, hence the mutation and recombination operators, but the convergence of the tra- jectories are easily detectable. The function of the fitness values is almost monotonic. More experiments 17 would probably result a monotonic function. I do not think such a large number of experiments is necessary because the improvement of the average population can clearly be seen from the figures.