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

| Initialize the first population of ants and antlions randomly |

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

| For (each antlion (*i*)) |

| Select an antlion using Roulette wheel algorithm [16]. |

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

| **then** |

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

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

| **else** |

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

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

| **end** |

| (a) Update *c* and *d* using equations: and |

| (b) Create a random walk and normalize it using: _{,} where *n* = 1, 2, 3, …, *n* and |

| (c) Update the position of antlions using |

| (d) Calculate the fitness of all ants according to the optimum solutions calculated earlier |

| **end** |