Initialize a population of N chickens and define the related parameters; |
Evaluate the fitness values for each individual, set current each individual’s |
position and fitness value, and set the current global best individual’s position |
and fitness value; |
for t = 1 to M |
if t % G == 1 |
Rank the chickens’ fitness values and establish a hierarchal order in the swarm; |
Divide the swarm into different groups, and determine the relationship |
between the chicks and mother hens in a group; |
end if |
Rank the chickens’ fitness values; |
for i = 1 to N |
if i == rooster Update its location using equation (4); end if |
if i == hen Update its location using equation (6); end if |
if i == chick Update its location using equation (9); end if |
Improved cross-border processing function; |
Evaluate the fitness values for i; |
If the new fitness value is better than the current individual’s fitness value, |
update the individual’s position and fitness value; |
If the new fitness value is better than the current global best individual’s |
fitness value, then update the current global best individual’s position |
and fitness value; |
If a stopping criterion is met, then output the current global best |
individual’s position and fitness value; |
end for |
end for |