## 2 Materials and Methods
### Ant Colony Algorithm  
The ACO is a search technique inspired by the collective behavior of ants in finding short paths to a food source. Ants initially move randomly until they discover food, then return to their colony while depositing pheromones along their path. These pheromones serve as a guide for other ants to follow the same route, allowing them to find the food source without moving randomly. If multiple paths to the food source exist, shorter paths will accumulate higher pheromone concentrations, making them more attractive. Conversely, longer paths will gradually lose pheromones due to their volatility. In this way, the ants collectively determine the shortest route [29].  
In an ACO, artificial ants search for solutions within a defined search space. Pheromones are represented as numerical values that reinforce the best solutions, while suboptimal ones are discarded through an evaporation process. With successive iterations, the algorithm converges towards the optimal or near-optimal solution, emulating the cooperative and adaptive behavior of a colony of ants. Mathematically, the problem is represented as a graph, where nodes correspond to states and edges represent transitions between them. An initial uniform amount of pheromone is assigned to all edges. A set of artificial ants constructs solutions by traversing the graph, starting from an initial node and building a complete solution. The probability of selecting an edge depends on the higher pheromone levels and problem-specific information, such as distance or cost [29].  
The probability \(P_{ij}\) of an ant selecting edge (_i,j_) is calculated as [30]  
\[P_{ij}=\frac{\left[\tau_{ij}\right]^{\alpha}\left[\mu_{ij}\right]^{\beta}}{ \sum_{k\in candidates}\left[\tau_{ij}\right]^{\alpha}\left[\mu_{ij}\right]^{ \beta}} \tag{1}\]  
where  
\(\tau_{ij}\): pheromone level on edge (_i,j_);  
\(\mu_{ij}\): heuristic value associated with edge (_i,j_);  
\(\alpha\): importance of pheromones;  
\(\beta\): importance of heuristics.  
Figure 2: The GA cycle illustrates the core stages of the evolutionary process: initialization of the population, evaluation of individuals, selection of the best candidates, application of genetic operators (crossover and mutation), and generation of a new population. This cycle is repeated iteratively until a predefined stopping criterion is satisfied.  
This probabilistic selection ensures a balance between exploration of new paths and exploitation of existing high-quality solutions. Once the ants complete their solutions, the quality of each solution is evaluated based on the problem's objective function. The pheromone levels on the transitions used in the best solutions are updated by adding pheromones. Meanwhile, the pheromone levels on other transitions are reduced by an evaporation factor, preventing stagnation in suboptimal solutions. The pheromone update is mathematically expressed as [30]  
\[\tau_{ij}=(1-\rho)\tau_{ij}+\Delta\tau_{ij} \tag{2}\]  
where  
\(\Delta\tau_{ij}\): increment in pheromone on edge (_i,j_), typically proportional to the inverse of the solution cost or another performance metric.  
\(\rho\): evaporation rate, controlling the reduction in pheromone levels.  
The above steps are repeated for a fixed number of iterations or until a stopping criterion is met, such as reaching an optimal solution. Figure 3 illustrates the ACO cycle through a circular flowchart, highlighting the main stages of the process.