Research Article

Hierarchical Artificial Bee Colony Optimizer with Divide-and-Conquer and Crossover for Multilevel Threshold Image Segmentation

Pseudocode 1

Pseudocode for the HABC algorithm.
HABC algorithm
Set ;
INITIALIZE.
  Randomly divide the whole population into species () each possesses sub-populations (), each possesses bees;
Randomize ’s -dimensions food source positions ; , , .
  Each sub-population with dimensions (where is randomly chosen from a set , and ).
WHILE (the termination conditions are not met)
    for each species ,
    Initialize -dimensions complete vector = (),
    which consists of the -dimensions best solution .
    Randomly all dimension indices;
    WHILE (the termination conditions are not met)
     for each sub-population , do
       repeat
       Employed Bees’ Phase:
       For each employed bee :
             Produce a new solution by using (2)
            Evaluate the new solution
            Apply Greedy selection choosing the better solution
             end
             Calulate the probability values for the solution by using (2)
            Onlooker Bees’ Phase:
           for each employed bee
             Probabilistically choose a solution according to
             Produce a new solution by (2)
             Evaluate the new solution
             Apply Greedy selection choosing the better solution
             end
       Re-initialize solutions not improved for Limit cycles
       Memorize the best solution
       for each individual of ,   do
           Place best solution in the complete solution newGbest by:
              newGbest = ()
           Update complete solution if it improves:
            If (f(newGbest) < f(Gbest))
              Then  
             end
     end
    end WHILE
     Selct elites form neighborhood of
        = the top M best individuals of the ring topology
     Crossover & Mutation by (4)
     Update with applying Greedy selection mechanism from
    end
    find the global best solution gbest from the whole population
    memorize the best solution of each
    Set ;
  end WHILE