# An Improvement of a Mapping Method Based on Ant Colony Algorithm Applied to Smart Cities
## 3 Algorithmic Simulation and Result Analysis
### Conclusions Derived from the Simulation Results  
(1) The ant colony algorithm can bring significant improvements relative to random mapping, as the performance improvement in Simulation 5 reached 61.10%.  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline
**Simulation** & **Number of** & **Number of** & **Node** & **Random** & **Ant Colony** & **The Average** \\
**Number** & **Nodes** & **Neurons** & **Capacity** & **\(\lambda\)** & **Average Hop** & **Average** & **The Improved** \\  & & & & & **Count** & **Hops** & **Ant Colony** \\ \hline
1 & 4 \(\ast\) 4 & 1000 & 100 & 0.02 & 12.62 & 9.66 & 8.43 \\ \hline
2 & 4 \(\ast\) 4 & 1000 & 100 & 0.10 & 14.98 & 12.67 & 11.74 \\ \hline
3 & 8 \(\ast\) 8 & 1000 & 20 & 0.02 & 45.38 & 35.65 & 33.96 \\ \hline
4 & 8 \(\ast\) 8 & 1000 & 20 & 0.10 & 61.82 & 52.85 & 51.04 \\ \hline
5 & 8 \(\ast\) 8 & 1000 & 100 & 0.02 & 45.14 & 16.49 & 8.78 \\ \hline
6 & 8 \(\ast\) 8 & 1000 & 100 & 0.10 & 61.88 & 33.00 & 12.09 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Simulation results of the ant colony algorithm.  
(2) Comparing Simulation 1 with Simulation 2, we find that when the number of neural connections increases, the performance improvement decreases because with more complex connections, it is more difficult to reduce the number of jumps through reasonable mapping.  
(3) Comparing Simulation 3 with Simulation 5, it is evident that when node capacity increases, the average jump number of the system will not be significantly reduced in the random mapping. However, based on the ant group algorithm and the improvement proposed here, the benefits brought by the total node capacity increase can be used, and the average jump number can be significantly reduced.  
(4) Comparing Simulation 1 with Simulation 5, and Simulation 2 with Simulation 6, in the case of the same node capacity and the same number of neurons, although the traditional ant colony algorithm can obtain certain performance benefits, the overall system performance will not decline when the number of nodes increases. On the other hand, the traditional ant colony algorithm is locally optimal in the iteration but cannot make full use of the performance benefits brought by the node increase. The improved ant colony algorithm utilizes this benefit, with the average number of jumps at \(8*8\) nodes, similar to \(4*4\) nodes.  
For Simulation 1, Figure 2 shows that the cost corresponding to the mapping selection of the individual ants varies with the number of iterations during the iteration process.  
As can be seen from the above figure, at the first iteration, when only heuristic information is adopted, the average jump number of individual ants was 10.30, with an 18.38% performance improvement relative to the average jump number of 12.62 of random maps. As the number of iterations increases, the colony releases more pheromones, and the cost of making decisions based on this information gradually decreases. When a sufficiently large number of iterations are performed, the decision gradually converges and the optimal solution is found by this algorithm.  
Figure 3 shows the change in the minimum and average jumps of the traditional and the improved ant colony algorithm with the number of iterations. As can be seen from the graph, the final convergence result of the improved ant colony algorithm is significantly better than that yielded by the traditional ant colony algorithm, and its convergence rate is also faster.  
Figure 2: Mapping cost of the improved ant colony algorithm varies with the number of iterations.  
As the CNDE algorithm was also reproduced for simulation comparison, Figure 4 depicts the change curve of the resulting cost with the number of iterations using the same parameter settings as in Simulation 1.  
It is evident that the CNDE algorithm requires a much greater number of iterations than the ant colony algorithm and does not yield adequate final convergence results.  
In conclusion, the newly proposed mapping algorithm can provide significant performance improvements.