% IN THE NAME OF GOD % ASBO:A New Optimization Algorithm Based on Average and Subtraction of the Best and Worst Members of the Population for Solving Various Optimization Problems % PeerJ 2021 % M. Dehghani,P.Trojovský1, and S. Hubálovský %% Instructions % Instructions: % To use ASBO , you must specify the following: % 1: The interval of variables (lo, hi) and as well as number of variables (m). % use the [lo,hi,m]=test_functions_range(F_index); % % 2: Define the objective function. objective function or fitness % use the fit(i)=test_functions(L,F_index,m); % L: is the population member %% clc;clear;close all; for F_index=1:23 % objective functions display(['PLEASE WAIT, The program is running for F',num2str(F_index)]) N=50; % Number of population [lo,hi,m]=test_functions_range(F_index); lo=ones(1,m).*(lo); % Lower limit for variables hi=ones(1,m).*(hi); % Upper limit for variables T=1000; % Number of iterations fit=[]; % objective function vector X=[]; % population matrix X_new=[]; % new suggestion population Matrix %% for i=1:m X(:,i) = lo(i)+rand(N,1).*(hi(i) -lo(i)); % Initial population end for i =1:N L=X(i,:); fit(i)=test_functions(L,F_index,m); % Fitness evaluation end for t=1:T % algorithm iteration %% update Best and Worst member (Xb and Xw) [best , blocation]=min(fit); if t==1 X_b=X(blocation,:); % Optimal location fbest=best; % The optimization objective function elseif best F1 X_new(i,:)=X(i,:)+rand(1,m) .* (L1-I.*X(i,:)); else X_new(i,:)=X(i,:)+rand(1,m) .* (1*X(i,:)-L1); end X_new(i,:) = max(X_new(i,:),lo);X_new(i,:) = min(X_new(i,:),hi); L=X_new(i,:); fit_new(i)=test_functions(L,F_index,m); if(fit_new(i)