1 简介
吉萨金子塔建造优化算法(Giza Pyramids Construction,GPC)是于2020年提出的一种,新型智能优化算法,其仿照金字塔建造的过程,具有寻优能力强,精度高的特点。
Nowadays, many optimization issues around us cannot be solved by precise methods or that cannot be solved in a reasonable time. One way to solve such problems is to use metaheuristic algorithms. Metaheuristic algorithms try to find the best solution out of all possible solutions in the shortest time possible. Speed in convergence, accuracy, and problem-solving ability at high dimensions are characteristics of a good metaheuristic algorithm. This paper presents a new population-based metaheuristic algorithm inspired by a new source of inspiration. This algorithm is called Giza Pyramids Construction (GPC) inspired by the ancient past has the characteristics of a good metaheuristic algorithm to deal with many issues. The ancient-inspired is to observe and reflect on the legacy of the ancient past to understand the optimal methods, technologies, and strategies of that era. The proposed algorithm is controlled by the movements of the workers and pushing the stone blocks on the ramp. This algorithm is compared with five standard and popular metaheuristic algorithms. For this purpose, thirty different and diverse benchmark test functions are utilized. The proposed algorithm is also tested on high-dimensional benchmark test functions and is used as an application in image segmentation. The results show that the proposed algorithm is better than other metaheuristic algorithms and it is successful in solving high-dimensional problems, especially image segmentation.
2 部分代码
% Giza Pyramids Construction (GPC) Algorithm % ------------------------------------------------- clc; clear; close all; %% Problem Definition CostFunction=@(x) Sphere(x); % Cost Function nVar=30; % Number of Decision Variables VarSize=[1 nVar]; % Decision Variables Matrix Size VarMin=-5.12; % Decision Variables Lower Bound VarMax= 5.12; % Decision Variables Upper Bound %% Giza Pyramids Construction (GPC) Parameters MaxIteration=1000; % Maximum Number of Iterations (Days of work) nPop=20; % Number of workers G = 9.8; % Gravity Tetha = 14; % Angle of Ramp MuMin = 1; % Minimum Friction MuMax = 10; % Maximum Friction pSS= 0.5; % Substitution Probability %% Initialization % Empty Stones Structure stone.Position=[]; stone.Cost=[]; % Initialize Population Array pop=repmat(stone,nPop,1); % Initialize Best Solution Ever Found best_worker.Cost=inf; % Create Initial Stones for i=1:nPop pop(i).Position=unifrnd(VarMin,VarMax,VarSize); pop(i).Cost=CostFunction(pop(i).Position); if pop(i).Cost<=best_worker.Cost best_worker=pop(i); % as Pharaoh's special agent end end % Array to Hold Best Cost Values BestCost=zeros(MaxIteration,1); % Show Iteration Information disp(['It:' num2str(it) ', Cost => ' num2str(BestCost(it))]); end figure; %plot(BestCost,'LineWidth',2); semilogy(BestCost,'LineWidth',2); xlabel('Iteration'); ylabel('Best Cost'); %grid on;
3 仿真结果
4 参考文献
[1]Sasan Harifi et al., A Giza Pyramids Construction: an ancient‑inspired metaheuristic algorithm for optimization [J]. Evolutionary Intelligence. 2020.