The goal of this contribution article is to investigate the effect of the numbers of ants on the Ant Colony Optimization (ACO) metaheuristic's obtained solution while addressing the Traveling Salesman Problem. Within a restricted number of iterations, the purpose was to see how the duration of the calculated tours varied for various numbers of ants. Three well-known ACO algorithms: Elitist Ant System (EAS), Ranked Ant System (RAS), and Min-Max Ant System (MMAS), were developed and tested in this paper. The findings revealed comparable patterns across several test instances. EAS and RAS, both of which use specialized ants, demonstrated that the number of specialists had a significant impact on the duration of solutions. Normal ants, on the other hand, had no effect on the solutions. The response differed somewhat between EAS and MMAS, with a smaller number of ants being more preferred. When working with five specialists and ants, which are the same to the smart cities, however, RAS outperformed by a considerable margin.