Research Article

An Improved Hybrid Encoding Cuckoo Search Algorithm for 0-1 Knapsack Problems

Algorithm 3

The main procedure of ICS.
Step1: Sorting.  According to value-to-weight ratio   in descending order,
a queue of length n is formed.
Step2: Initialization.  Generate m cuckoo nests randomly { , , .
Calculate the fitness for each individual, , , determine .
Set the generation counter . Set mutation parameter .
Step3: While  (the stopping criterion is not satisfied)
   for   to m
    for to n
     
     Apply new position updating formula of ICS  (Algorithm 2)
     Repair the illegal individuals and optimize the legal individuals  (Algorithm 1)
    end for
   end for
Step4: Keep best solutions; Rank the solutions and find the current best .
   
Step5: end while