Introduction - If you have any usage issues, please Google them yourself
% Firefly Algorithm by X S Yang (Cambridge University) %
% Usage: firefly_simple([number_of_fireflies,MaxGeneration])
% eg: firefly_simple([12,50]); %
% ======================================================== %
% This is a demo for 2D functions; for higher dimenions, %
% you should use fa_ndim.m or fa_mincon.m %
% Parameters choice:
% Gamma should be linked with scales. Otherwise, the FA %
% the efficiency will be significantly reduced because %
% the beta term may be too small. %
% Similarly, alpha should also be linked with scales, %
% the steps should not too large or too small, often %
% steps are about 1/10 to 1/100 of the domain size. %
% In addition, alpha should be reduced gradually %
% using alpha=alpha_0 delta^t during eteration t. %
% Typically, delta=0.9 to 0.99 will be a good choice.