# Fuzzy Fireworks Algorithm Based on a Sparks Dispersion Measure
## 9 Dispersion Percent Iterative Fuzzy Fireworks Algorithm (DPIFWA-I)  
The Dispersion Percent Iterative Fireworks Algorithm (DPIFWA-I) is what we call the second modification that we performed to the conventional Fireworks Algorithm (FWA) and the Fuzzy Fireworks Algorithm (FFWA) to control the explosion amplitude of each firework using fuzzy  
Figure 1: Pseudo code of Fireworks Algorithm (FWA). logic [16; 17]. Figure 2 illustrates the proposed DPIFWA using a flow chart that illustrates the information processing in this algorithm. In this modification, we have added a parameter that we can calculate by using the following equation:  
\[DP=\frac{CSD\times 100}{CM} \tag{8}\]  
where \(DP\) is the Dispersion Percent, \(CSD\) is the Current Standard Deviation and \(CM\) is the Current Mean of each iteration, and every above mentioned parameter is calculated based on the fitness of each seed (sparks). We introduced this parameter with the goal of evaluating the separation of each seed (spark) to confirm that the exploration and exploitation are working in a balanced way [21; 22], in other words, in the initial iterations we explore and in the last iterations we exploit. To show the current mean (\(CM\)), we illustrate this in Figure 3 with a plot in two dimensions. Figure 3: Current mean of the = fitness of the sparks. Figure 2: Flow chart of Dispersion Percent Iterative Fireworks Algorithm (DPIFWA). In some cases, \(DP\) is greater than 100, and then to avoid an unbalanced situation, we can keep a range of \(DP\) between 1 and 100, and for this reason we have added the following requirement shown in Figure 4.  
With the requirement for \(DP\) shown in Figure 4, we can obtain a value between 0 and 1; this value (\(DP\)) is an input variable of the fuzzy inference system (Figure 5), which is explained in more detail in the following sections. Another input variable is the \"Iteration\", and to streamline and enhance the process of the fuzzy inference system and of course the general process of the algorithm, we normalized the input variable, which is called the Iteration; the normalization is calculated with the following equation [23]. \[Iteration=\frac{Current\ Iteration\ Number}{Total\ Iteration\ Number} \tag{9}\]  
Figure 5 shows the general structure of the fuzzy system for DPIFFWA-I:  
The system that we used has the following characteristics: two input variables, the number of iterations (Iteration) and \(DP\) (DispersionPercent), and one output variable. The output variable is defined to control the amplitude explosion (AmplitudeExplosion) of each firework; this fuzzy inference system is of Mamdani type [24]. As we can note in Figure 6, the input variable (Iteration) has five linguistic values, called _LOWER_ [\(-0.25\ 0\ 0.25\)], _LOW_ [\(0.25\ 0.5\)], _MEDIUM_ [\(0.25\ 0.5\ 0.75\)], _HIGH_ [\(0.5\ 0.75\ 1\)], and _HIGHER_ [\(0.75\ 1\ 1.25\)] (membership functions), of triangular form in a range of [0, 1]. We used the range between 0 and 1 (because of the normalization) to work with smaller numbers, and in this way, the calculations of the fuzzy system are faster, as we mentioned above and was represented in Equation (9). Figure 7 shows the input variable (DispersionPercent), and this linguistic variable has five values that are called _SMALLER_ [\(-0.25\ 0\ 0.25\)], _SMALL_ [\(0.25\ 0.5\)], _MEDIUM_ [\(0.25\ 0.5\ 0.75\)], _HIGH_ [\(0.5\ 0.75\ 1\)], and _HIGHER_ [\(0.75\ 1\ 1.25\)], and the partition is formed by the membership functions of triangular form with a range of [0, 1]. Figure 4: Requirement for dispersion percent \((DP)\). Figure 5: Graphical representation of the Fuzzy System for DPIFFWA-I. Figure 8 illustrates the output variable (AmplitudeExplosion) that has five linguistic values in a range of [2; 45], and the reason we use this range is for keeping the amplitude explosion between 2 and 40, approximately.