Algorithm 2 The pseudocode of the BGO algorithm. |
Input: , , ,
Output: Global optimal solution:
1. Initialize the population using and evaluate
while do
%Learning phase:
for to N do
Find two random individuals that are different from : and
Compute , by Equation (4)
Compute , according to Equation (5)
Compute according to Equation (6)
Compute , according to Equation (8)
Complete the learning process for the i-th individual once according to Equation (7)
Complete the update of the i-th individual according to Equation (9)
Real-time update
end for
%Reflection phase:
for to N do
Complete the reflection process for the i-th individual once according to Equations (10) and (11)
Complete the update of the i-th individual according to Equation (9)
Real-time update
end for
%Two-Step Binarization:
for to N do
Compute the transfer function of the i-th individual
Complete the binarization of the i-th individual based on the binarization function selected
end for
end while
Output:
|