| **Result:** MPPT parameter to achieve MPP |

| Initialize the ACO parameters |

| **while** the termination criteria not achieved (MPP) **do** |

| For (each ant *i*) |

| Simulate and calculate the MPP and the cost Function. |

| **if **** then** |

| The Best Cost (*i*) = Cost Function (*i*) |

| The Best Solution (*i*) = The particle (*i*) |

| **else** |

| The Best Cost (*i*) = The Best Cost (*i* − 1) |

| The Best Solution (*i*) = The Best Solution (*i* − 1) |

| **end** |

| (a) Update pheromone for each ant: , |

| (i) Calculate the solution |

| (b) Apply evaporation and globally update the ants position, according to the optimum solutions calculated earlier |

| **end** |