I'm implementing flower pollination algorithm, but I find Yang's original code not to be in accordance with the results presented in the paper. Following is the Levy function defined in his code:

function L=Levy(d)

% Levy exponent and coefficient

% For details, see Chapter 11 of the following book:

% Xin-She Yang, Nature-Inspired Optimization Algorithms, Elsevier, (2014).

beta=3/2;

sigma=(gamma(1+beta)*sin(pi*beta/2)/(gamma((1+beta)/2)*beta*2^((beta-1)/2)))^(1/beta);

u=randn(1,d)*sigma;

v=randn(1,d);

step=u./abs(v).^(1/beta);

L=0.01*step;

Please comment on the correctness of this code. Thank you.

More Mohit Mishra's questions See All
Similar questions and discussions