# Revised Gravitational Search Algorithms Based on Evolutionary-Fuzzy Systems
## 2 The Gravitational Search Algorithm
Therefore, the acceleration of the agents, their velocity and position at \(t\) time, are calculated by means of (7), (8) and (9), respectively. S5.4. Calculate the population diversity \(P_{d}(i)\) and the population progress \(P_{p}(i)\) as defined in (16) and (17). S5.5. The PSO (DE)-optimized fuzzy controller receives the inputs: iteration number \(i\), population diversity \(P_{d}(i)\), population progress \(P_{p}(i)\) and \(\alpha(i)\). The controller gives the fuzzy output \(\alpha(i+1)\), i.e. the \(i+1\) value of \(\alpha\). In this way, the value of \(\alpha\) is tuned. S6. Give to the output the best-so-far solution. ```

**Algorithm 7**

## 4 Simulation and Discussion

The proposed algorithms are tested with MATLAB software on a 2.20-GHz CPU hardware for the benchmark functions of Table 2. We firstly apply our algorithms to the unimodal functions, i.e., to the test functions from \(F_{1}\) to \(F_{7}\). Subsequently, we take into account the multimodal test functions from \(F_{8}\) to \(F_{13}\). In all of the cases the number \(n\) of agents is set to \(50\); the dimension of the functions \(r\) is \(30\); the maximum iteration \(k\) is \(1000\). Algorithms 2-5 give the optimal parameters to define the membership functions. For each benchmark function, different membership functions' slopes are obtained. As an example, Figure 1 shows the optimal membership functions for the test function \(F10\). By running Algorithm 6 with the best membership functions, we obtain the solid curve of Figure 2 for the benchmark function \(F1\). The dashed line represents the best so far solution of GSA [22]. Figure 1: Optimal membership functions for the benchmark function \(F10\). Note that FGSA-GA tends to find the global optimum faster than GSA, and hence, it has a higher convergence rate. The best so far solutions of GSA and FGSA-GA for \(F2\) are shown in Figure 3. Observing Figure 3, we note that up to the 30 th iteration, the trend of GSA and FGSA-GA is about the same. After this value, FGSA-GA is better than GSA. Note that the best so far solution achieved at the last iteration is \(4.2\times 10^{-13}\). The trend of the GSA and FGSA-GA best so far solution for \(F3\) is shown in Figure 4. The improvement of FGSA-GA with respect to GSA is about four orders of magnitude. Figure 4: Comparison of the performance of GSA and FGSA-GA for minimization of \(F3\). Figure 3: Comparison of the performance of GSA and FGSA-GA for minimization of \(F2\). Figure 2: Comparison of the performance of the Gravitational Search Algorithm (GSA) and Fuzzy Gravitational Search Algorithm (FGSA)-GA for minimization of \(F1\). From Figure 5, we observe that the trend of FGSA-GA is close to GSA: a relevant improvement is achieved at the end of the iterations. Quantitatively, for the function \(F4\), there is an improvement of two orders of magnitude. The multimodal functions are most difficult to optimize because they have many local minima. For multimodal functions, the final results are more important, since they reflect the ability of the algorithm to escape from poor local optima and locating a near-global optimum. Using Algorithm 6, significant improvements are achieved with the test functions \(F10\), \(F11\) and \(F12\). For the multimodal function \(F10\), FGSA-GA is better than GSA from the beginning to the end of the iterations (see Figure 6). In particular, the maximum difference is of 10 orders of magnitude. Observing Figure 7, we can note that FGSA-GA improves GSA by about eight orders of magnitude: FGSA-GA's best so far solution is \(9.61\times 10^{-9}\). Figure 5: Comparison of the performance of GSA and FGSA-GA for minimization of \(F4\). Figure 6: Comparison of the performance of GSA and FGSA-GA for minimization of \(F10\). Table 2.0 Comparison of the performance of GSA and FGSA-GA for minimization of \(F11\). Figure 8 shows the GSA and FGSA-GA trend over iteration number for function \(F12\). Note that the trend is about the same up to the 500 th iteration.