Main steps of the ABC algorithm
(1) cycle = 1
(2) Initialize the food source positions (solutions) ,
(3) Evaluate the nectar amount (fitness function ) of food sources
(4) repeat
(5)  Employed Bees’ Phase
   For each employed bee
    Produce new food source positions
    Calculate the value
    If new position better than previous position
    Then memorizes the new position and forgets the old one.
   End For.
(6)  Calculate the probability values for the solution.
(7)  Onlooker Bees’ Phase
   For each onlooker bee
    Chooses a food source depending on
    Produce new food source positions
    Calculate the value
    If new position better than previous position
    Then memorizes the new position and forgets the old one.
   End For
(8)  Scout Bee Phase
   If there is an employed bee becomes scout
   Then replace it with a new random source positions
(9)  Memorize the best solution achieved so far
(10)  cycle = cycle + 1.
(11) until cycle = Maximum Cycle Number
Algorithm 1: Pseudocode for ABC algorithm.