An Improved Electromagnetic Field Optimization for the Global Optimization Problems

Electromagnetic field optimization (EFO) is a relatively new physics-inspired population-based metaheuristic algorithm, which simulates the behavior of electromagnets with different polarities and takes advantage of a nature-inspired ratio, known as the golden ratio. In EFO, the population consists of electromagnetic particles made of electromagnets corresponding to variables of an optimization problem and is divided into three fields: positive, negative, and neutral. In each iteration, a new electromagnetic particle is generated based on the attraction-repulsion forces among these electromagnetic fields, where the repulsion force helps particle to avoid the local optimal point, and the attraction force leads to find global optimal. This paper introduces an improved version of the EFO called improved electromagnetic field optimization (iEFO). Distinct from the EFO, the iEFO has two novel modifications: new solution generation function for the electromagnets and adaptive control of algorithmic parameters. In addition to these major improvements, the boundary control and randomization procedures for the newly generated electromagnets are modified. In the computational studies, the performance of the proposed iEFO is tested against original EFO, existing physics-inspired algorithms, and state-of-the-art meta-heuristic algorithms as artificial bee colony algorithm, particle swarm optimization, and differential evolution. Obtained results are verified with statistical testing, and results reveal that proposed iEFO outperforms the EFO and other considered competitor algorithms by providing better results.


Introduction
Nowadays, the use of metaheuristic algorithms has surprisingly increased for solving various problems due to their flexibility, gradient-free mechanism, and local optima avoidance structures [1]. Although they do not guarantee the optimal solution for an optimization problem, they mostly have a capability of finding the near-optimal solution. During the last few decades, various algorithms have been proposed to solve different real-life problems. In spite of the fact that most of them show similar behavior while searching the solution space, each algorithm may have superior performance on a specific problem as described in "No Free Lunch" theorem, which states that no single algorithm can perform well on every optimization problem [2].
Nature-inspired optimization algorithms have been widely adopted in the area of computer science, mathematics, control, or decision making due to their efficient performance on solving complex optimization problems since the last few decades [3]. Considering the existing literature, different classifications for the nature-inspired metaheuristic algorithms are given based on a specific philosophy. ese algorithms are simply classified into three main groups: evolution-inspired, physics-inspired, and swarm-inspired [4][5][6]. Among this classification, physicsinspired algorithms simulate physical laws in the universe, and they are different from other approaches because of their search agents based on physics rules [7,8]. A considerable number of metaheuristic algorithms in the literature have taken inspiration from physical phenomena. A detailed review of the physics-inspired metaheuristic algorithms are given in the study of Can and Alatas [9] and Tahani and Babayan [10], where the list of the algorithms reviewed in these studies is presented in Table 1. Moreover, Table 1 also includes the algorithms, which are not given in both the studies. Considering the list of the physics-inspired Table  1: List of the physics-inspired algorithms.

Concepts of fluid mechanics
Hydrological cycle algorithm Wedyan et al. [11] 2017 e continuous movement of water in nature ermal exchange optimization Kaveh and Dadras [12] 2017 Newton's law of cooling Weighted superposition algorithm Baykasoglu and Akpinar [13] 2017 Superposition principle and attraction Electromagnetic field optimization Abedinpourshotorban et al. [14]. 2016 Attraction-repulsion forces among electromagnets Rain water algorithm Biyanto et al. [15] 2016 e pattern of physically rain water movements Ion motion algorithm Javidy et al. [16] 2015 Ions motion in nature ✓ ✓

Ray optimization
Kaveh and Khayatazad [20] 2012 e transition of ray from one medium to another from physics ✓ ✓ Water cycle algorithm Eskandar et al. [21] 2012 Water cycle process and how rivers and streams flow to the sea in the real-world ✓ ✓ Galaxy based search algorithm Shah-Hosseini [22] 2011 e arm of spiral galaxies in the outer space ✓ ✓

Gravitational interactions optimization
Flores et al. [23] 2011 Gravitational forces produced by the interaction of the masses of a set of bodies ✓ Spiral optimization algorithm Tamura and Yasuda [24] 2011 e analogy of spiral phenomena in nature ✓ Water flow algorithm HIEU [25] metaheuristic algorithms, cumulative numbers of the algorithms by the years are given in Figure 1. It should be noted from Figure 1 that most of these algorithms have been proposed in the last decade.
Regarding the physics-inspired metaheuristic algorithms given in Table 1, the electromagnetic field optimization (EFO) is one of the relatively new physics-inspired metaheuristic algorithms, which is first proposed by Abedinpourshotorban et al. [14]. e EFO is inspired by the behavior of electromagnets with different polarities and takes advantage of a nature-inspired ratio, known as the golden ratio. In EFO, the population consists of electromagnetic particles made of electromagnets corresponding to variables of the optimization problem and is divided into three fields: positive, negative, and neutral. In each iteration, a new electromagnetic particle is generated based on the attraction-repulsion forces among these electromagnetic fields, where the repulsion force helps the particle to avoid the local optimal point and the attraction force leads to find global optimal point.
Since the EFO is a recently proposed algorithm, the number of studies that consider this approach is limited. Yurtkuran and Kucukoglu [44] used the original version of the EFO and also other three different physics-inspired metaheuristic algorithms such as electromagnetism-like algorithm, gravitational search algorithm, and weighted superposition attraction algorithm for the solar cell parameter estimation problem to optimize the performance of solar systems. e authors compared the performance of the algorithms on a well-known benchmark problem set. eir computational studies show that EFO outperforms the other three algorithms and provides better results. Bouchekara et al. [45] proposed a modified version of the EFO to identify optimal coordination of directional overcurrent relays for power systems protection, which is a nonlinear and highly constrained optimization problem. e authors applied two simple modifications on the algorithm by changing the uniformly distributed random generation procedure (used in the search equation) to the normal distributed random generation and boundary check procedure of the electromagnets. In computational studies, the efficiency of the modified version of the EFO is shown. Talebi and Dehkordi [46] introduced a binary version of the EFO for the sensitive association rules hiding for personal information protection. Performance of the algorithm is evaluated by doing experiments on both real-world and synthetic datasets. Better results are observed by binary EFO comparing with four different algorithms.
In general, metaheuristic algorithms are established to balance two important factors for their performance, which are exploration and exploitation. e exploration means the ability to investigate in the unvisited regions of the search space, whereas exploitation refers to the ability to search around better solutions [47]. However, the lack of the right balance between these factors leads to poor convergence when solving complex problems. erefore, many studies have been made to improve the performance of metaheuristic algorithms based on three strategies [48]: (i) hybridization of the algorithms [49][50][51], (ii) adaptation mechanism [52][53][54], and (iii) introducing new operators for generating new solutions [55][56][57]. In this manner, this paper introduces an improved version of the EFO, which is called improved electromagnetic field optimization (iEFO). Concerning the original EFO, the iEFO has two novel changes: new solution generation function for the particles and adaptive control of algorithmic parameters. With the new solution procedure, the selection probability of the better solutions in the candidate particle generation step is increased. Furthermore, by an adaptive control mechanism, it explores the search space effectively, especially in the early stages of the search process, whereas exploitation is emphasized in the latter phases. In addition to these major improvements, the boundary control and randomization procedures for the newly generated particles are modified.
A modified version of the EFO is introduced by Bouchekara et al. [45]. However, the modified version of the EFO proposed by the authors includes minor changes in random number generation and boundary condition in the new electromagnet generating step. To the best of our knowledge, this paper is the first improved version of the EFO with major changes on the search mechanism, new solution generation, and control of search parameters. e main contributions of the proposed study can be summarized as follows: (i) a new search equation is defined to balance the exploration and exploitation performance, (ii) in order to further improve the exploitation behavior, the parameters of the new search equation are controlled adaptively, and (iii) a detailed literature review of physicsinspired metaheuristic algorithms is presented. In computational studies, the performance of the proposed iEFO is analyzed on a well-known global optimization benchmark problems into three cases. First, the proposed iEFO is compared with the original version of the EFO and also four recent physics-inspired population-based metaheuristic algorithms. Second, the proposed iEFO is compared with original version of the well-known artificial bee colony (ABC) algorithm [58], differential evolution (DE) algorithm [59], and particle swarm optimization (PSO) algorithm [60].
ird, the proposed iEFO is compared with the improved variants of PSO and DE, and detailed statistical analyses for the performance comparisons are given in the computational studies. e remainder of the paper is organized as follows. In Section 2, the original version of the EFO and its main steps are described. Section 3 introduces the proposed iEFO for global optimization problems. Computational results are given in Section 4. Finally, a conclusion part of future research perspectives is provided in Section 5.

Electromagnetic Field Optimization (EFO)
e EFO is a relatively new metaheuristic algorithm inspired by attraction-repulsion forces among electromagnets with different polarities and nature-inspired ratio called the golden ratio [14]. In EFO, a solution is represented by electromagnetic particle (EMP) made of electromagnets, and the number of electromagnets is equal to the number of variables in the optimization problem. Different from Computational Intelligence and Neuroscience permanent magnets, each electromagnet in EMP has the same single polarity (positive or negative), and each electromagnet can apply a force of attraction or repulsion among other neighbor electromagnets. Table 2 summarizes the notations used in the EFO. In this context, the main steps of the algorithm are described in this section.

Initialization.
As in most of the population-based metaheuristic algorithms, the EFO starts by randomly generating a population of electromagnetic particles by using equation (1). Each electromagnet of an EMP is randomly generated within its lower and upper bounds. After a population randomly generated, EMPs are sorted based on their fitness value in descending order: (1)

Classification.
In the classification phase of the EFO, the EMPs are classified into three groups with different polarities: positive field that contains the best EMPs, negative field that contains worst EMPs, and neutral field that contains small negative polarities. e number of EMPs of these three groups is determined by using two control parameters: P field and N field. e P field and N field represent the percentage of the allocated solution for positive and negative Random index from neutral field generated for each electromagnet for the candidate solution, j � 1, . . . , N var P field Portion of population, which belongs to positive field N field Portion of population, which belongs to negative field Ps_rate Probability of selecting variables of generated particle R rate Probability of changing one variable of a generated particle φ Golden ratio rand Uniform random number rand ∈ (0, 1) rand_int Integer random number RI Index of one electromagnet of generated particle used for randomization step  Computational Intelligence and Neuroscience part, respectively. e remaining solutions form the neutral part. According to the classification of the population, selection of one EMP from each field for the new electromagnet generation procedure is made by using the following equations: (2)

New Solution Generation.
New solution generation procedure is the most important step of the EFO. After specifying the randomly selected indexes from positive, neutral, and negative fields, a new electromagnet for the candidate solution is generated by using equation (5) as follows. If a uniformly distributed random number is lower than the Ps_rate, then the corresponding electromagnet of the candidate solution is set to the randomly selected electromagnet from the positive field. Otherwise, the corresponding electromagnet of the candidate solution is generated based on the randomly selected electromagnet from the neutral field, which is affected by the randomly selected electromagnets from positive and negative fields: After an electromagnet is generated for the new solution, its bounds are checked whether it is in the range of lower and upper limit. If the new electromagnet violates its bounds, then it is regenerated randomly within its bounds as in the initialization step.

Randomization.
In each iteration, the randomization step is applied to change only one electromagnet of generated EMP with randomly generated electromagnet within its range as follows: where RI is an integer counter used to identify the index of the electromagnet for randomization. RI is initialized with 1 or randomly generated integer number between [1, N var] at the beginning and is increased by 1 in each randomization process. In case the RI reaches to its upper limit N var, then it is set to 1 again.

Selection.
At the end of each iteration, the fitness function value of the new solution is determined. If the generated EMP provides a better solution than the worst EMP (N emp th particle) in the population, then the new solution is inserted into the sorted population according to its fitness function value and the worst EMP is removed from the population.

Proposed iEFO
Generally, metaheuristic algorithms try to balance the two important factors for their performance as exploration and exploitation. e candidate solution generation mechanism (search equation) plays an important role in determining the performance of a metaheuristic algorithm [61]. Up to now, researches have focused on different search equation modifications to improve the performance of well-known algorithms such as ABC, PSO, and DE. Inspired by these studies, a novel search equation is defined for iEFO in this study. As can be seen in equation (5), the original EFO uses the EMP from the neutral field and generate a new candidate solution using this EMP with positive feedback from the positive field, whereas negative feedback from the negative field. In the iEFO, a new search equation is proposed as follows: Similar to the original EFO, P j , N j , and K j are the indexes of the selected EMPs from positive, negative, and neutral parts, respectively. φ is the golden ratio constant, which is used to guide the candidate solutions towards the Computational Intelligence and Neuroscience positive part. Here, RW j depicts the selected EMP using the roulette wheel method, which is different from P j , N j , and K j . In other words, in the iEFO, the candidate EMP is constructed based on the EMP, which is selected from the roulette wheel. Equation (7) can generate the candidate solution not only around the neutral field but also positive and negative fields, while better EMPs have higher probability to be selected. It is clear that guiding the search by RW j will improve the exploitation ability of EFO.
Next, to further improve the exploitation performance of iEFO, an adaptive mechanism is employed. It is well known that integrating adaptive control mechanisms into metaheuristic algorithms is a very popular technique in the related literature [52,54,62]. In iEFO, two main control parameters, i.e., Ps_rate and R rate, are controlled adaptively over the course of a run. As mentioned in the previous section, Ps_rate is responsible for the probability of copying the index of the EMP from the positive field, whereas R rate is the probability of the randomization procedure. In the iEFO, Ps_rate and R rate are updated at the end of each iteration as follows: where Iter and MaxIter refer to the current iteration value and the maximum iteration value, respectively. As can be seen from equation (6), Ps_rate is increased from Ps RMin to Ps RMax during the search process. Similarly, R rate is reduced adaptively from R RMax to Ps RMin . Here, Ps RMin , Ps RMax , R RMax , and R RMin are the new control parameters of iEFO, which will be set before the search process. In a word, the two new control equation of Ps_rate and R rate will improve the exploration-exploitation balance by giving a higher probability to random search mechanism in the early phase, while candidate EMPs are more likely to be derived from the positive field at the latter phases of the search as Ps_rate increases. In other words, iEFO will efficiently explore the search space during the early stages and will favor exploitation around the better solutions in the latter phases. Finally, the iEFO employs a modified boundary check and a randomization mechanism. In the modified boundary check procedure, the electromagnets that are generated outside the boundaries are set back to the boundary values. In addition to the modification on boundary check procedure, in the random search step of the iEFO, the randomly selected EMP is regenerated within limits instead of a sequence-based approach.
As a result of the descriptions given above, Figure 2 shows the flow chart of the iEFO and illustrates the main steps of the algorithms, i.e., initialization, classification, candidate EMP generation, randomization procedure or random search, selection, and re-sorting, and the adaptive control mechanism of Ps_rate and R_rate.
Before comparing iEFO against various algorithms, the distribution of EMP's during the search process at various stages of EFO and iEFO on the sphere function (f(X → ) � D i�1 x 2 i ) is analyzed and shown in Figure 3. It should be noted that here, the parameter settings of EFO are set as described in [14], whereas preliminary parameter settings are used for iEFO. From Figure 3, it can be concluded that the convergence performance of iEFO is better than the EFO. Specifically, the guidance of RW j and the adaptive mechanism of iEFO improve the convergence behavior of the population.

Computational Results
In this section, the performance of the iEFO is analyzed and tested against various well-known metaheuristic algorithms using three sets of experiments. First, iEFO is compared with the original EFO and other recent physicsinspired algorithms, such as gravitational search algorithm (GSA) [29], electromagnetism-like algorithm (EMA) [40], central force optimization algorithm (CFO) [34], and weighted superposition attraction algorithm (WSA) [13] on different benchmark problems with various dimensions. Second, iEFO is tested against ABC, PSO, and DE using the same problem set. In order to make fair comparisons, all algorithms used in the first two sets of experiments are coded and executed in the same environment. All algorithms conduct 30 independent runs on each benchmark function, and the maximum number of function evaluation (MaxFE) is employed as the termination criterion, which is set to 320,000 for all simulations. Further, all algorithms have been simulated in the MATLAB environment and executed on the same computer with Intel Xeon CPU (2.67 GHz) and 16 GB of memory. In the last part of the experiments, the performance of the iEFO is tested against powerful variants of PSO and DE. For this part, the competitor algorithms are fully informed particle swarm (FIPS) [63], self-organizing hierarchical PSO with timevarying acceleration coefficients (HPSO-TVAC) [64], comprehensive learning PSO (CLPSO) [57], self-adapting DE (JDE) [52], adaptive DE with optional external archive (JADE) [65], and self-adaptive DE (SaDE) [62]. In this subsection, the reported results from the corresponding studies are used for comparisons.

Benchmark Functions and Parameter Settings.
In order to evaluate the performance of iEFO, 13 commonly used benchmark functions [1,5,6,13,47,48,61,[66][67][68][69][70][71][72] with various dimensions, which are listed in Table 3, are used. In Table 3, D refers to the dimension of the problem. To be specific, F1 and F8 are unimodal and nonseparable functions (UN), F2, F3, F5, F6, F10, and F13 are multimodal and separable functions (MS), F4, F9, and F12 are multimodal and nonseparable (MN), and F7 and F11 are unimodal and separable functions (US). Unimodal functions have one local minimum as the global optimum, whereas multimodal functions have more than one local optimum and the number of their local optimums increases with the problem dimension exponentially. On the other hand, separable functions can be written as sum of n functions with one variable, while nonseparable functions cannot be reformulated as the sum of subfunctions [47]. Further, F7-F10 are shifted functions and o, a shifted vector, is generated randomly in the corresponding search range. e name, formulation, type, search space (range), and the global optimum objective function values (f(x * )) are given in Table 3.
Set control parameteters and initialize the EMPs using equation (1) Generate an empty canditade vector EMP New , with a length of N_var   Computational Intelligence and Neuroscience It is worth to mention that parameter settings play a vital role in the performance of a metaheuristic algorithm [73].  Table 4 presents the control parameters of all competitor algorithms. In Table 4, PopSize refers to population size of each algorithm. It should be noted that the parameter settings of the competitor algorithms are set as the original papers or published codes.

Comparison with Physics-Inspired Algorithms.
To demonstrate the effectiveness of iEFO, in this subsection, the iEFO is compared with physics-inspired algorithms as EFO, GSA, EMA, CFO, and WSA. Tables 5-7 present the experimental results on benchmark problems with D � 50, D � 100, and D � 200. In Tables 5-7, results are given in terms of mean and standard deviation (StdDev) achieved from 30 independent runs. For a precise and pairwise comparison, the statistical significance of the differences between iEFO and competing test algorithms are determined using t-tests with a significance level of 0.05. In Tables 5-7, "+" shows that iEFO is significantly better than the compared algorithm, "≈ " indicates that there is no significant difference between the algorithms. Last, "−" depicts that the competitor algorithms achieve better results at a level of 0.05 significance. Additionally, the overall results are given in the last rows of Tables 5-7.
As can be seen from Table 5, on the problems with D � 50, iEFO is better than the test algorithms on the majority of the benchmarks. To be more specific, iEFO performs significantly better than EFO, GSA, EMA, CFO, and WSA on 6, 8, 10, 9, and 9 out of 13 functions, respectively. On F7 and F11, all algorithms obtained statistically similar results. iEFO and EFO perform similar performance on F3, F4, F5, F7, F10, F11, and F13, whereas there is no significant difference between iEFO and GSA on F7, F8, F10, F11, and F12.
On the problems with D � 100 (Table 6), only WSA can outperform iEFO on F2 with D � 100, while iEFO achieves significantly better results than WSA on benchmarks F1, F3-F6, F8, F9, F11, and F12. iEFO outperforms EFO, EMA, CFO, and WSA on 8, 10, 12, and 11 out of 13 test problems. Further, as tabulated in Table 7, for larger problems where D � 200, the difference between the performance of iEFO and the competitor algorithms is more significant. From Table 7, iEFO is superior to EFO, GSA, and CFO on 11, 10, 13, 12, and 13 out of 13 problems, while iEFO outperforms EMA and WSA on all test instances. is also indicates the effectiveness of iEFO on large problem instances among well-known physicsinspired metaheuristic algorithms. On the other hand, iEFO yields smaller deviation on the majority of the problem with D � 50, D � 100, and D � 200. is also shows that iEFO surpasses all the competitor algorithms in terms of robustness.
Moreover, the convergence performance of iEFO and competitor algorithms are given in Figure 4 for selected benchmark problems. In Figure 4, the population means are plotted against function evaluation number. It can be concluded from Figure 4 that iEFO indicates better convergence performance than the test algorithms. e results also reveal that the proposed framework appears to be highly competitive in terms of convergence speed.
Lastly, the CPU time results of all algorithms are tabulated in Table 8. Table 8 summarizes the average of Step Furthermore, the average rankings based on nonparametric Friedman's test of all compared algorithms are given in Table 9. As shown in Table 9, iEFO ranks the first on all dimensions. e test statistics and the p-values also indicate the significant difference between iEFO and other algorithms. Overall, the experimental results in this subsection indicate the outperforming performance of iEFO against other physics-inspired algorithms.

Comparison with ABC, PSO, and DE.
In this subsection, the performance comparisons on the solution quality are conducted among iEFO and ABC, PSO, and DE. e results shown in Tables 10-12 in terms of mean and StdDev of the solutions obtained from 30 independent runs. Similar to the previous subsection, t-tests are carried out to test the significance of the results. As described in Table 10, for the benchmark functions with D � 50, it is worth noting that iEFO is significantly superior to all competitor algorithms on most of the cases. iEFO and ABC show similar performance on F1, F6, F7, F10, and F11, and iEFO performs significantly better than ABC on all other benchmarks. Further, iEFO outperforms PSO and DE on 8 and 6 out of 13 problems, respectively. For the functions with D � 100, according to the overall performance given in the last row of Table 11, it is clear that iEFO wins in 9, 10, and 10 problems against ABC, PSO, and DE, respectively. iEFO and ABC tie on four functions (F1, F7, F9, and F13), iEFO and PSO tie on three functions (F5, F7, and F10), and similarly there is no significance difference between iEFO and DE on F1, F7, and F10. As described in Table 12, where D � 200, iEFO superior to ABC, PSO, and DE on 11, 12, and 12 out of 13 functions, respectively. Further, iEFO generally reaches smaller deviations when compared to the test algorithms, which validates the robustness of the proposed iEFO. To intuitively verify the significance difference between iEFO and other three state-of-the-art algorithms, Friedman's tests are carried out similar to the previous subsection. Table 13 shows Friedman's test rankings test of all compared algorithms. From Table 13, it is clear that iEFO is the best algorithm among ABC, PSO, and DE. Further, the performance of iEFO is even better as the problem size increases.
Summarizing the above statements, iEFO achieves highquality results in terms of solution quality and robustness when compared to state-of-the-art algorithms, i.e., ABC, PSO, and DE. In other words, the exploitation and exploration of iEFO are well balanced.

Comparison with PSO and DE Variants.
is subsection covers the computational results of iEFO against state-ofthe-art PSO and DE variants. Since the reported results are taken directly from the corresponding papers, statistical significance tests between algorithms are not carried out. Tables 14 and 15 present computational results. e results for the test cases with D � 30 are listed in Tables 13 and 14. Some of the test problems are not covered in the comparisons, as corresponding results were not given in the original studies. In Tables 14 and 15, the best mean values are indicated in bold. As can be seen from

Conclusion
In this paper, an improved version of the EFO (iEFO) is introduced to solve the global optimization problem. e iEFO enriches the solution search strategy of the original EFO by improving two main steps of the algorithm. First, roulette wheel selection strategy embedded new solution generation function is used to provide more chance to use of fittest electromagnetic particles in the candidate solution generation step. Second, an adaptive control mechanism for the algorithmic parameters is used to increase the selection probability of better solution and reduce the selection probability of worse solution throughout the search process. Besides both two improvements, the boundary control and randomization procedure is modified. To test the performance of the proposed algorithm, a well-known benchmark problem set is used in computational studies. To show the efficiency of the iEFO, three sets of comparisons are carried out. First, the iEFO is compared with original EFO and existing physics-inspired metaheuristic algorithms. Second, three well-known metaheuristic algorithms (ABC, DE, and PSO), whose performances are demonstrated on global optimization problem in many researches, are taken into account. Finally, the iEFO is compared with the improved variants of the DE and PSO. As a result of Table 4: Parameter settings of algorithms.

Data Availability
e data used to support the findings of this study are included within the article.

Conflicts of Interest
e author declares that there are no conflicts of interest regarding the publication of this article.