Skip to main content
. 2022 Jan 27;14(3):512. doi: 10.3390/polym14030512
Initialize the first population of ants and antlions randomly
Calculate the fitness of ants and antlions
Find the best antlions and assume as the elite (determined optimum)
whilethe end criterion is not satisfied
    forevery ant
        Select an antlion using Roulette wheel
        Update c and d in Equation (5)
        Create a random walk and normalize it using Equations (1) and (3)
        Update the position of ant using Equation (7)
    end for
    Calculate the fitness of all ants
    Replace an antlion with its corresponding ant it if becomes fitter (Equation (8))
    Update elite if an antlion becomes fitter than the elite
end while
Returnelite