**3. Understanding ant colony optimization**

Ant colony optimization (ACO) was inspired by the observation of the behaviour of real ants. Real ants, which use pheromones as a communication medium to find the shortest path to food from the colony [11]. As in the case of real ants, the problem is to find the food, in the case of artificial ants, it is to find a good solution to a given optimization problem.

One ant (either a real or an artificial one) can find a solution to its problem, but only cooperation among many individual ants through stigmergy enables them to find good solutions [12]. In real ants stigmergic communication happens via the pheromone that ants deposit on the ground. Artificial ants live in a virtual world, hence they only modify numeric values (called for analogy artificial pheromones) associated with problem states they visit while building solutions to the optimization problem. Real ants simply walk, choosing a direction based on local pheromone *An Innovative Maintenance Scheduling Framework for Preventive, Predictive Maintenance… DOI: http://dx.doi.org/10.5772/intechopen.103094*

concentrations and a stochastic decision policy. Artificial ants also create solutions step by step, moving through available problem states and making stochastic decisions at each step.

The ACO metaheuristics has an initialization step and then a loop over three basic components. In one iteration of the loop, there are steps to construct the solution by all ants, improve (optional) the solutions with local search also and then an update of the pheromones.

Algorithm for ant colony optimization metaheuristic

In the next section ACO is explained using travelling salesman problem example.
