**4. Stochastic fractal search algorithm**

SFS is inspired by the background process of development. This algorithm is a computational search method that utilizes a mathematical principle known as a fractal [22]. Fractal search uses 3 rules to come up with a solution: (a) every particle has an electrical potential energy, (b) every particle spread and induces the generation of more random particles, and the starting particle's energy is shared among the newly formed particles, and (c) just a small amount of the better particles stay in the next round, and the remaining particles are skipped. The **Figure 3** illustrates the diffusion

**Figure 3.** *Particle diffusion.*

*Intelligent Local Search Optimization Methods to Optimal Morocco Regime DOI: http://dx.doi.org/10.5772/intechopen.105600*

of the particle *Ei* . This strategy works well in identifying the solution; however, the method has its drawbacks.

The major problem is the high number of parameters required to be properly managed, and the additional issue is that the interchange of knowledge is not taking place between the individual. To overcome the above challenges, Salimi, H. introduced another version of fractal search called stochastic fractal search [22].

In the SFS algorithm, two main operations take place: the diffusion operation and the updating operation. In the first operation, each particle scatters around its current position to satisfy the intensification (exploitation) property. In the latter operation, the algorithm mimics the way an individual updates his location depending on the position of the remaining individual in this cluster.

To generate new individual from the scattering operation, Lévy and Gaussian flight are investigated as two statistical methods. Generally, a sequence of Gaussian treads participating in the scattering operation were listed in the next equations:

$$\text{GW}\_1 = \text{N}(\mu\_{\text{BP}}, \sigma) + \varepsilon \text{BP} - \varepsilon' \text{P}\_1 \text{ and } \text{GW}\_2 = \text{N}(\mu\_{\text{P}}, \sigma) \tag{4}$$

Here *ε*, *ε*<sup>0</sup> � *U*ð Þ ½ � 0 1 , *BP* denotes the global best position, *Pi* is the position of the current particle, *<sup>μ</sup>BP* <sup>¼</sup> *BP*, *<sup>μ</sup><sup>P</sup>* <sup>¼</sup> *Pi*, and *<sup>σ</sup>* is given by *<sup>σ</sup>* <sup>¼</sup> *log g*ð Þ *<sup>g</sup>* ð Þ *Pi* � *BP* ; *<sup>g</sup>* represents the number of iterations and *log g*ð Þ *<sup>g</sup>* permits to reduce the size of the normal step.

To ensure a good exploration of the research domain, two statistical strategies are considered:

(a) A uniform probability weight is attributed to each individual *i* in the group:

$$P a\_i = \frac{\text{the rank of the point i in the group}}{\text{the number of the points in the group}} = \frac{rank(P\_i)}{N}. \tag{5}$$

**Figure 4.** *Diagram of SFS algorithm.*

In this sense, *Pai* is less than a given threshold, the position of the ith point, from the group G, is updated using the equation:

$$P\_i' = P\_{rand1\_{-}G} - \varepsilon (P\_{rand2\_{-}G} - P\_i) \text{ such that } \varepsilon \sim U([0.1]) \tag{6}$$

As in the first process, if the *Pai* ≤*ε* holds, the current particle is changed: If *ε*<sup>0</sup> ≤ *:*5, then *P*<sup>00</sup> *<sup>i</sup>* ¼ *P*<sup>0</sup> *<sup>i</sup>* � ^*ε P*<sup>0</sup> *rand*1\_*<sup>G</sup>* � *PB* , else *<sup>P</sup>*<sup>00</sup> *<sup>i</sup>* ¼ *P*<sup>0</sup> *<sup>i</sup>* � ^*ε P*<sup>0</sup> *rand*1\_*<sup>G</sup>* � *P*<sup>0</sup> *rand*2\_*G* , Where ^*ε* � *U*ð½ � 0 1

The **Figure 4** illustrates different steps of SFS algorithm; for more details, the reader can see the paper of Salimi [22].
