Fuzzy Fireworks Algorithm Based on a Sparks Dispersion Measure

: The main goal of this paper is to improve the performance of the Fireworks Algorithm (FWA). To improve the performance of the FWA we propose three modiﬁcations: the ﬁrst modiﬁcation is to change the stopping criteria, this is to say, previously, the number of function evaluations was utilized as a stopping criteria, and we decided to change this to specify a particular number of iterations; the second and third modiﬁcations consist on introducing a dispersion metric (dispersion percent), and both modiﬁcations were made with the goal of achieving dynamic adaptation of the two parameters in the algorithm. The parameters that were controlled are the explosion amplitude and the number of sparks, and it is worth mentioning that the control of these parameters is based on a fuzzy logic approach. To measure the impact of these modiﬁcations, we perform experiments with 14 benchmark functions and a comparative study shows the advantage of the proposed approach. We decided to call the proposed algorithms Iterative Fireworks Algorithm (IFWA) and two variants of the Dispersion Percent Iterative Fuzzy Fireworks Algorithm (DPIFWA-I and DPIFWA-II, respectively).


Introduction
At the present time, computer science is used for solving problems through its different areas (fuzzy logic, neural networks, evolutionary computing, among others).Depending on the type of problem, the aim may be minimizing or maximizing (optimization) the expected results, which is the main idea in this area.There are many bio-inspired metaheuristics that are based on behaviors found in nature, for example, swarm behavior of birds and insects [1].
As with all things in life, the optimization algorithms have advantages and disadvantages.One of the disadvantages of these algorithms is that in early versions, or conventional versions, almost all the parameters are constant, that is, relevant parameters in the mathematical formulas of each algorithm remain statics during their performance.Thus, the performance of the exploration and exploitation into the algorithm is chaotic, that is, the static parameters do not allow for control of the balance between exploration and exploitation.Sometimes the algorithms just explore, and so, move away from the goal, or the algorithm could just exploit and become stagnate without allowing for a search for better solutions to achieve of the goal.
We know that in a computational algorithm, the mathematical representation is very important; this is why we opted for representations (formulas) based on existing mathematics to modify the fireworks algorithm (FWA).We decided to use one of the dispersion measures that already exists in the mathematical area, which is the standard deviation, and based on this dispersion measure, we obtained a parameter which we call the dispersion percent that will be explained in Sections 4 and 5.The dispersion percent is one of the parameters that were used as an input variable in the fuzzy inference system to achieve the dynamic adaptation of the two parameters (explosion amplitude and number of sparks).We achieved this adaptation based on fuzzy logic, because nowadays fuzzy logic has been shown to have a relevant impact in the area of control.
With the intention to overcome the inconveniences above mentioned, we present the implementation of two fuzzy inference systems (FIS); in the first FIS, we have two input variables (Iteration and Dispersion Percent) and one output variable (Amplitude Explosion), and in the second FIS, we have the same two input variables as that of the first FIS, but we have two output variables (Amplitude Explosion and Sparks).With this work, we simulate the control, both automatically and sequentially, of the balance between exploration and exploitation into the algorithm.
The remainder of the paper is organized as follows: we start with a literature review in Section 2. In Section 3 we present the original Fireworks Algorithm (FWA), and the Iterative Fireworks Algorithm is proposed and explained in Section 3. In Sections 4 and 5 we describe the proposed modifications (Dispersion Percent Iterative Fuzzy Fireworks Algorithm (DPIFFWA-I and II, respectively)), the obtained results are presented in Section 6, and finally, we conclude the paper by mentioning possible future work in Section 7.

Literature Review
Swarm intelligence is the study of computational systems inspired by 'collective intelligence'.Collective intelligence emerges through the cooperation of large numbers of homogeneous agents in the environment.Examples include schools of fish, flocks of birds, and colonies of ants.Such intelligence is decentralized, self-organizing, and distributed throughout an environment.In nature, such systems are commonly used to solve problems such as effective foraging for food, prey evasion, or colony re-location.The information is typically stored throughout the participating homogeneous agents, or is stored or communicated in the environment itself such as through the use of pheromones in ants, dancing in bees, and proximity in fish and birds [2].
In recent years, swarm intelligence (SI), has been very popular among researchers working on optimization problems around the world [3].Some examples of SI are the following algorithms [4]: Particle Swarm Optimization (PSO) is inspired by the social foraging behavior of some animals such as flocking behavior of birds and the schooling behavior of fish.The goal of the algorithm is to have all the particles locate the optima in a multi-dimensional hyper-volume.This is achieved by assigning initially random positions to all particles in the space and small initial random velocities.The algorithm is executed like a simulation, advancing the position of each particle in turn based on its velocity, the best known global position in the problem space, and the best position known to a particle.The objective function is sampled after each position update.Over time, through a combination of exploration and exploitation of known good positions in the search space, the particles cluster or converge together around optima, or several optima [5].
The Ant Colony System (ACO) algorithm is inspired by the foraging behavior of ants, specifically the pheromone communication between ants regarding a good path between the colony and a food source in an environment.Ants initially wander randomly around their environment.Once food is located, an ant will begin laying down pheromone in the environment.Numerous trips between the food and the colony are performed, and if the same route is followed that leads to food, then additional pheromone is laid down.Pheromone decays in the environment, so that older paths are less likely to be followed.Other ants may discover the same path to the food and in turn may follow it and also lay down pheromone.A positive feedback process routes more and more ants to productive paths that are in turn further refined through use [6].
The Bees Algorithm (ABC) is inspired by the foraging behavior of honey bees.Honey bees collect nectar from vast areas around their hive (more than 10 km).Bee Colonies have been observed to send bees to collect nectar from flower patches relative to the amount of food available at each patch.Bees communicate with each other at the hive via a waggle dance that informs other bees in the hive as to the direction, distance, and quality rating of food sources.The strategy of this algorithm is the information processing to achieve the objective, which is to locate and explore good sites within a problem search space.Scouts are sent out to randomly sample the problem space and locate good sites.The good sites are exploited via the application of a local search, where a small number of good sites are explored more than the others.Good sites are continually exploited, although many scouts are sent out in each iteration in search of additional good sites [7].
The Genetic Algorithm (GA) is inspired by population genetics (including heredity and gene frequencies) and evolution at the population level, as well as the Mendelian understanding of the structure (such as chromosomes, genes, alleles) and mechanisms (such as recombination and mutation).This is the so-called new or modern synthesis of evolutionary biology.The objective of the Genetic Algorithm is to maximize the payoff of candidate solutions in the population against a cost function from the problem domain.The strategy for the Genetic Algorithm is to repeatedly employ surrogates for the recombination and mutation genetic mechanisms on the population of candidate solutions, where the cost function (also known as objective or fitness function) applied to a decoded representation of a candidate governs the probabilistic contributions a given candidate solution can make to the subsequent generation of candidate solutions [5].
On the other hand, we should mention in a general way that fuzzy logic is a methodology that provides a simple way to obtain a conclusion from ambiguous, imprecise, or linguistic information inputs.Of course, it is well known that in 1965, Zadeh proposed the formal definition of fuzzy sets [8].
A fuzzy set A in X is characterized by a membership (characteristic) function f A (x), which associates with each point in X a real number in the interval [0, 1], with the value of f A (x) at x representing the "degree of membership" of x in A. Thus, the closer the value of f A (x) to unity, the higher the degree of membership of x in A. When A is a set in the ordinary sense of the term, its membership function can take on only two values, 0 or 1, with f A (x) = 1 or 0 according to whether x does or does not belong to A. Thus, in this case, f A (x) reduces to the familiar characteristic function of a in set A. When there is a need to differentiate between such sets and fuzzy sets, the sets with two-valued characteristic functions will be referred to as ordinary sets or simply sets [9].

Fireworks Algorithm (FWA)
The Fireworks Algorithm (FWA) is a swarm intelligence method, which was developed by Ying Tan and Yuanchun Zhu in 2009, based on the explosion behavior of fireworks [10].
For each firework, we begin a process of explosion, and a shower of sparks fill the local space around the firework.The recently generated sparks represent possible solutions in the search space [11].
To mimic the above mentioned process, the algorithm is represented mathematically as described below.

Minimize
where x i , i = 1, 2, . . ., d indicates a location in the search space, x imin ≤ x i ≤ x imax represents the bounds of the same space, and f (x i ) refers to the objective function [12].After, using the following equation, the number of sparks for each firework is generated.
where m represents a constant parameter which controls the numbers of sparks of the n fireworks and y max = max( f (x i ))(i = 1, 2, 3, . . ., n) is the maximum value, that is, the worst value of the objective function in the n fireworks and indicates a constant representing the smallest number in the computer, and it is utilized with the goal that an error with a division by zero cannot occur [13].
With Equation (3), we can define the bounds for the number of sparks, with the goal of keeping a balance within a range of number of sparks.The bounds are defined for s i as follows: where a and b are constant parameters [14].

Amplitude of Explosion
On the contrary, to calculate the number of sparks, an explosion is better if the amplitude is small.The explosion amplitude for each firework is calculated as follows: where Â is a constant parameter that controls the maximum amplitude of each firework, y min = min( f (x i )) (i = 1, 2, 3, . . ., n) indicates the minimum value (best) of the objective function among n fireworks, and indicates the smallest constant in the computer, and it is used with the goal of not making an error with the division by zero [15].

Generating Sparks
In this part of the algorithm (FWA), we consider two other more specific algorithms, called Algorithms 1 and 2, which are used to obtain the location of the sparks, and these algorithms are described in previous works of the authors [16,17].However, before obtaining the location of the sparks, we should know that the sparks can take on different directions (in random dimensions), and these dimensions are obtained as expressed below: Here, d is the dimension of the location for each spark x and rand(0, 1) is a random value between 0 and 1.

Selection of the Locations
Below, we present the equations that are used in this algorithm to select the best current location.
where K is the set of all current locations from both fireworks.Then, the probability for selection of a location at x i is defined as: When calculating the distance, any distance measure can be used including the Manhattan distance, Euclidean distance, or Angle-based distance, among others [18][19][20].
Figure 1 shows the pseudocode of the conventional Fireworks Algorithm (FWA).

Iterative Fireworks Algorithm
Some optimization algorithms use the number of iterations as the stopping criteria, alternatively, other algorithms use the number of function evaluations.Based on the literature, we have noticed that some algorithms do not take into account that both stopping criteria are not exclusive, the number of iterations is based on the number of solutions to evaluate for each iteration.
We should also mention that in some algorithms the number of solutions to evaluate are static per iteration, and in others, the number of solutions to evaluate changes, such is the case of the Fireworks Algorithm (FWA) in which the number of sparks (solutions) changes per iteration.
If we want to compare two or more methods, we must consider the methods under equal circumstances.For example, if we compare two methods with 200 iterations, an important point is to show how many function evaluations are made per iteration and in total.In other words, if in one method we used 100 solutions per iteration and a total of 20,000 function evaluations, and in the other method we used 50 solutions per iteration and a total of 50,000 function evaluations, then these would not be equivalent to do a comparison between both methods.It is important mention that the total number of function evaluations is calculated by multiplying the total number of iterations by the number of solutions per iteration.
Before going into a detailed explanation of the methods that we propose, we mentioned the previous algorithm (Iterative Fireworks Algorithm) because it was the first modification that we proposed.However, now we change the stopping criteria; before, it was the number of function evaluations, now, it is the number of iterations.The reason for making this change is because in this form, we can now control parameters in a more sequential form, and it is worth mentioning that this is the conventional fireworks algorithm but with the unique change in the stopping criteria.

Dispersion Percent Iterative Fuzzy Fireworks Algorithm (DPIFFWA-I)
The Dispersion Percent Iterative Fireworks Algorithm (DPIFFWA-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 logic [16,17].Figure 2 illustrates the proposed DPIFFWA using a flow chart that illustrates the information processing in this algorithm.

Iterative Fireworks Algorithm
Some optimization algorithms use the number of iterations as the stopping criteria, alternatively, other algorithms use the number of function evaluations.Based on the literature, we have noticed that some algorithms do not take into account that both stopping criteria are not exclusive, the number of iterations is based on the number of solutions to evaluate for each iteration.
We should also mention that in some algorithms the number of solutions to evaluate are static per iteration, and in others, the number of solutions to evaluate changes, such is the case of the Fireworks Algorithm (FWA) in which the number of sparks (solutions) changes per iteration.
If we want to compare two or more methods, we must consider the methods under equal circumstances.For example, if we compare two methods with 200 iterations, an important point is to show how many function evaluations are made per iteration and in total.In other words, if in one method we used 100 solutions per iteration and a total of 20,000 function evaluations, and in the other method we used 50 solutions per iteration and a total of 50,000 function evaluations, then these would not be equivalent to do a comparison between both methods.It is important mention that the total number of function evaluations is calculated by multiplying the total number of iterations by the number of solutions per iteration.
Before going into a detailed explanation of the methods that we propose, we mentioned the previous algorithm (Iterative Fireworks Algorithm) because it was the first modification that we proposed.However, now we change the stopping criteria; before, it was the number of function evaluations, now, it is the number of iterations.The reason for making this change is because in this form, we can now control parameters in a more sequential form, and it is worth mentioning that this is the conventional fireworks algorithm but with the unique change in the stopping criteria.

Dispersion Percent Iterative Fuzzy Fireworks Algorithm (DPIFFWA-I)
The Dispersion Percent Iterative Fireworks Algorithm (DPIFFWA-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 logic [16,17].Figure 2 illustrates the proposed DPIFFWA 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: where is the Dispersion Percent, is the Current Standard Deviation and 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 ( ), we illustrate this in Figure 3 with a plot in two dimensions.In some cases, is greater than 100, and then to avoid an unbalanced situation, we can keep a range of between 1 and 100, and for this reason we have added the following requirement shown in Figure 4.In this modification, we have added a parameter that we can calculate by using the following equation: 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.In this modification, we have added a parameter that we can calculate by using the following equation: where is the Dispersion Percent, is the Current Standard Deviation and 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 ( ), we illustrate this in Figure 3 with a plot in two dimensions.In some cases, is greater than 100, and then to avoid an unbalanced situation, we can keep a range of between 1 and 100, and for this reason we have added the following requirement shown in Figure 4.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].
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 (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 .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).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].
Figure 5 shows the general structure of the fuzzy system for DPIFFWA-I: Algorithms 2017, 10, 83 7 of 21 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].
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 (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 .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).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 .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).As we can note in Figure 6 .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).As we mentioned above, the fuzzy inference system is used to control the explosion amplitude of each firework, and this control consists of 25 fuzzy rules that are listed in Table 1.
With the 25 rules described in Table 1, we can sequentially control the exploration and exploitation within the algorithm (DPIFFWA).The exploration will be performed when the Iteration is Lower and DP is Smaller, Small, etc. (rules 1 to 5), the DPIFFWA algorithm also will explore when the Iteration is Low and DP is Smaller, Small, etc. (rules 6 to 10).The rule numbers 10, 11, 12, 13, 14, and 15 will enable having a balance between exploration and exploitation.With the last rules (16 to 25), the DPIFFWA algorithm will exploit.Although we have 25 fuzzy rules, we consider only 5 fuzzy rules as the main rules, and these are the rules 1, 7, 13, 19, and 25.The reason why we have 25 fuzzy rules and we only consider 5, is because the fuzzy inference system is symmetric, this is to say, it has 5 membership functions in each variable.
When we introduce the fuzzy inference system and are able to control the explosion amplitude, we can also eliminate Equation (4) of the conventional fireworks algorithm (FWA); in this form, we can dynamically control the parameter (explosion amplitude) and omit Equation ( 4) so that we do not have the extra computational overhead.As we mentioned above, the fuzzy inference system is used to control the explosion amplitude of each firework, and this control consists of 25 fuzzy rules that are listed in Table 1.
With the 25 rules described in Table 1, we can sequentially control the exploration and exploitation within the algorithm (DPIFFWA).The exploration will be performed when the Iteration is Lower and DP is Smaller, Small, etc. (rules 1 to 5), the DPIFFWA algorithm also will explore when the Iteration is Low and DP is Smaller, Small, etc. (rules 6 to 10).The rule numbers 10, 11, 12, 13, 14, and 15 will enable having a balance between exploration and exploitation.With the last rules (16 to 25), the DPIFFWA algorithm will exploit.Although we have 25 fuzzy rules, we consider only 5 fuzzy rules as the main rules, and these are the rules 1, 7, 13, 19, and 25.The reason why we have 25 fuzzy rules and we only consider 5, is because the fuzzy inference system is symmetric, this is to say, it has 5 membership functions in each variable.
When we introduce the fuzzy inference system and are able to control the explosion amplitude, we can also eliminate Equation (4) of the conventional fireworks algorithm (FWA); in this form, we can dynamically control the parameter (explosion amplitude) and omit Equation ( 4) so that we do not have the extra computational overhead.As we mentioned above, the fuzzy inference system is used to control the explosion amplitude of each firework, and this control consists of 25 fuzzy rules that are listed in Table 1.
With the 25 rules described in Table 1, we can sequentially control the exploration and exploitation within the algorithm (DPIFFWA).The exploration will be performed when the Iteration is Lower and DP is Smaller, Small, etc. (rules 1 to 5), the DPIFFWA algorithm also will explore when the Iteration is Low and DP is Smaller, Small, etc. (rules 6 to 10).The rule numbers 10, 11, 12, 13, 14, and 15 will enable having a balance between exploration and exploitation.With the last rules (16 to 25), the DPIFFWA algorithm will exploit.Although we have 25 fuzzy rules, we consider only 5 fuzzy rules as the main rules, and these are the rules 1, 7, 13, 19, and 25.The reason why we have 25 fuzzy rules and we only consider 5, is because the fuzzy inference system is symmetric, this is to say, it has 5 membership functions in each variable.
When we introduce the fuzzy inference system and are able to control the explosion amplitude, we can also eliminate Equation (4) of the conventional fireworks algorithm (FWA); in this form, we can dynamically control the parameter (explosion amplitude) and omit Equation ( 4) so that we do not have the extra computational overhead.

Dispersion Percent Iterative Fuzzy Fireworks Algorithm II (DPIFFWA-II)
DPIFFWA-II is the third modification that we have made to the FWA and FFWA.This modification is almost the same as the second modification, but the unique difference is that we have now added another output variable to the fuzzy inference system; the new output variable is called "Sparks".This output variable (Sparks) will allow controlling the number of sparks for each firework during the exploitations phase.Figure 9 illustrates the general structure of the fuzzy system for the DPIFFWA-II:

Dispersion Percent Iterative Fuzzy Fireworks Algorithm II (DPIFFWA-II)
DPIFFWA-II is the third modification that we have made to the FWA and FFWA.This modification is almost the same as the second modification, but the unique difference is that we have now added another output variable to the fuzzy inference system; the new output variable is called "Sparks".This output variable (Sparks) will allow controlling the number of sparks for each firework during the exploitations phase.Figure 9 illustrates the general structure of the fuzzy system for the DPIFFWA-II:  As we mentioned in previously, of the 25 rules, only 5 rules have a weighting (rule 1, 7, 13, 19, and 25), which we will explain in more detail below.
We start the Sparks with a small value and an "ExplosionAmplitude" with a big value, this is to say, while the range of the Iteration is maintained in LOWER [−0.25, 0.25] and the "DispersionPercent" is SMALLER [−0.25, 0.25], the "ExplosionAmplitude" will be BIGGER in a range of [34,56], and the sparks are VERYFEW in a range of [−11.25, 13.25].
The rule number 7 states that if iteration is LOW [0, 0.5] and "DispersionPercent" is SMALL [0, 0.5], the "ExplosionAmplitude" is BIG [22,45] and the sparks will be FEW [1, 25.5].In the same way, we can achieve the exploration in the algorithm with rules 1 and 7, following with the rules, the next rule (number 13) provides a balance between exploration and exploitation in the algorithm, because if the Iteration is MEDIUM [0.25, 0.75] and the "DispersionPercent" is also MEDIUM [0.25, 0.75], then the "ExplosionAmplitude" will be MEDIUM [11,34] and the Sparks will be SOME [13.25, 37.75], and this will make the algorithm sometimes explore and other times exploit.
Finally, the algorithm only exploits with rules 19 and 25, knowing that if the Iteration is HIGH [0.5, 1] and the "DispersionPercent" is SMALL, then the "ExplosionAmplitude" will be SMALL [2, 2 3] and the Sparks is MANY [25,50] (rule 19), and the last rule (rule 25) states that if the Iteration is HIGHER [0.75, 1.25] and the "DispersionPercent" is BIGGER [0.75, 1.25], then the Sparks will be In Table 2 we present the fuzzy rules of the third modification (DPIFFWA-II).As we mentioned in previously, of the 25 rules, only 5 rules have a weighting (rule 1, 7, 13, 19, and 25), which we will explain in more detail below.
We start the Sparks with a small value and an "ExplosionAmplitude" with a big value, this is to say, while the range of the Iteration is maintained in LOWER [−0.25, 0.25] and the "DispersionPercent" is SMALLER [−0.25, 0.25], the "ExplosionAmplitude" will be BIGGER in a range of [34,56], and the sparks are VERYFEW in a range of [−11.25, 13.25].
The rule number 7 states that if iteration is LOW [0, 0.5] and "DispersionPercent" is SMALL [0, 0.5], the "ExplosionAmplitude" is BIG [22,45] and the sparks will be FEW [1, 25.5].In the same way, we can achieve the exploration in the algorithm with rules 1 and 7, following with the rules, the next rule (number 13) provides a balance between exploration and exploitation in the algorithm, because if the Iteration is MEDIUM [0.25, 0.75] and the "DispersionPercent" is also MEDIUM [0.25, 0.75], then the "ExplosionAmplitude" will be MEDIUM [11,34] and the Sparks will be SOME [13.25, 37.75], and this will make the algorithm sometimes explore and other times exploit.
Finally, the algorithm only exploits with rules 19 and 25, knowing that if the Iteration is HIGH [0.5, 1] and the "DispersionPercent" is SMALL, then the "ExplosionAmplitude" will be SMALL [2, 2 3] and the Sparks is MANY [25,50] (rule 19), and the last rule (rule 25) states that if the Iteration is HIGHER [0.75, 1.25] and the "DispersionPercent" is BIGGER [0.75, 1.25], then the Sparks will be ENOUGH [37.75, 62.25] and the "ExplosionAmplitude" is SMALLER [−8.5, 12.5] having great relevance in the explosion amplitude from each firework, thus, we can omit both Equations ( 2) and (4).

Results and Discussion
To evaluate the performance of the calculations involved for a new number of sparks and the new explosion amplitude, in Equations ( 2) and ( 4) we performed tests with 14 benchmark functions, with different ranges (search and initialization) and optimal values.
In Table 3 we list the names of all functions that were used with optimal values equal to 0, as well as their ranges of initialization and number of dimensions.Where f 1 is the Ackley function, f 2 is the Griewank function, f 3 is the Rastrigin function, f 4 is the Rosenbrock function, f 5 is the Schwefel function, and f 6 is the Sphere function, and the function numbers 1 to 6 are presented in Table 3.
Table 4 illustrates the equations and surfaces of every benchmark function with optimal values equal to zero.
In Table 5 we show the surface of every benchmark function with optimal values different from zero.Table 4. Equations and plots of the benchmark functions with optimal values equal to zero.

Results and Discussion
To evaluate the performance of the calculations involved for a new number of sparks and the new explosion amplitude, in Equations ( 2) and ( 4) we performed tests with 14 benchmark functions, with different ranges (search and initialization) and optimal values.
In Table 3 we list the names of all functions that were used with optimal values equal to 0, as well as their ranges of initialization and number of dimensions. is the Schwefel function, and is the Sphere function, and the function numbers 1 to 6 are presented in Table 3.
Table 4 illustrates the equations and surfaces of every benchmark function with optimal values equal to zero.

Function Equation and Surface
Algorithms 2017, 10, 83 13 of 21 In Table 5 we show the surface of every benchmark function with optimal values different from zero.
Table 5. Equations and plots of benchmark functions with optima different from zero.

Function
Equation and Surface Algorithms 2017, 10, 83 13 of 21 In Table 5 we show the surface of every benchmark function with optimal values different from zero.
Table 5. Equations and plots of benchmark functions with optima different from zero.

Function
Equation and Surface Table 5. Equations and plots of benchmark functions with optima different from zero.

Function Equation and Surface
Algorithms 2017, 10, 83 13 of 21 In Table 5 we show the surface of every benchmark function with optimal values different from zero.
Table 5. Equations and plots of benchmark functions with optima different from zero.

Function
Equation and Surface Table 5. Cont.

Function Equation and Surface
Algorithms 2017, 10, 83 16 of 21 In Table 6 we can find functions 7 to 14, where is the Styblinski-Tang function, is the Michalewicz  For each function, the initial range was set to /2, , where is the upper bound of the search space in the kth dimension.In the experiments, a number of shift values were added to these basic functions in order to shift the global optimum.We used three different shift indices in order to analyze the influence of different shift values on the performance of the algorithms as can be found in Table 7.The SI is the shift index and SV is the shift value used [11].
In Tables 8 and 9, we performed comparisons of the averages and standard deviations among Iterative Fireworks Algorithm (IFWA) and the two variations of FFWA with 0.05 and 0.1 for the Shift Index values, respectively.
In Table 6 we can find functions 7 to 14, where f 7 is the Styblinski-Tang function, f 8 is the Michalewicz (2-D) function, f 9 is the Michalewicz function (10-D), f 10 is the Easom function, f 11 is the Goldstein Price function, f 12 is the Penalized P16 function, f 13 is the Six Hump Camel-back function, and f 14 is the Trid Function [25,26].For each function, the initial range was set to X k max /2, X k max , where X k max is the upper bound of the search space in the kth dimension.In the experiments, a number of shift values were added to these basic functions in order to shift the global optimum.We used three different shift indices in order to analyze the influence of different shift values on the performance of the algorithms as can be found in Table 7.The SI is the shift index and SV is the shift value used [11].
In Tables 8 and 9, we performed comparisons of the averages and standard deviations among Iterative Fireworks Algorithm (IFWA) and the two variations of FFWA with 0.05 and 0.1 for the Shift Index values, respectively.Table 10 shows a comparison among the IFWA, DPIFFWA-I, and DPIFFWA-II algorithms.Tables 8-10 were obtained from the means of 30 independent runs; we considered the best result in each iteration, and, finally, we calculated the means of the 30 better obtained results.
For comparing the performance of every algorithm, we performed hypothesis tests (Z-test) with the following parameters: µ 1 = NewMethod, µ 2 = IFWA, the mean of the new method is lower than the mean of the centroid method (claim), H 0 : µ 1 ≥ µ 2 , H a : µ 1 < µ 2 (Claim), α = 0.05, and Z 0 = −1.645.We show some Hypothesis tests results in Tables 11-16, where we compare IFWA vs. DPIFFWA-I and II.In Tables 11 and 12 we compare with SI = 1, in Tables 13 and 14 we compare with SI = 2, and in Tables 15 and 16 we illustrate a comparison between the methods with SI = 3.We indicate in bold the cases where there is significant evidence that the proposed method is better.As we can note from Tables 11 and 12, the new methods (DPIFFWA-I and II) are better because in 7 benchmark functions we obtain better results.In Tables 13 and 14 we achieve better results because DPIFFWA I and II are better in 8 benchmark functions, and in the last two, Tables 15 and 16, we are better in 9 and 8 of 14 benchmark functions, respectively.
The parameters used to test the Iterative Fireworks Algorithm (IFWA) are the same that were used by the original author of the fireworks algorithm (FWA) and in the two variations of IFWA (DPIFFWA-I and DPIFFWA-II), we have only modified the explosion amplitude and number of sparks, that is to say, as we mentioned above, a static parameter was changed to be dynamic (in a specific range).The parameters are as follows: n = 5, S i = [1, 50], A i = [2,40], and 150 iterations.These parameters were utilized to test and show the simulation results.

Conclusions
In this paper, we presented the Iterative Fireworks Algorithm (IFWA), which is an improvement to the original fireworks algorithm (FWA), and other variations, such as DPIFFWA-I and DPIIFWA-II.
We have witnessed the ability of fuzzy logic in control applications, however, in this work, fuzzy rules were used to control parameters within a metaheuristic algorithm, FWA in this case, with two proposed modifications: the first is a small modification to the FWA algorithm; we changed the stopping criteria of the function evaluations to iterations (IFWA).In the second modification, we took as input variables the iterations and the DP to obtain two output variables, which are the explosion amplitude and sparks mentioned in the previous section.This second modification is the more relevant and important one.As described above, the modifications can be justified as the results (Tables 11-16) are better with benchmark functions with optimums that are both zero and nonzero.
We can also state that the goal of this paper, which was to demonstrate that the Fireworks Algorithm works better (better results) based on iterations and when complemented by a fuzzy inference system, was successfully achieved.
The future work will be to test the Dispersion Iterative Fuzzy Fireworks Algorithm in neural networks to find the optimal number of neurons and layers, and in this way, optimize the neural network, inasmuch as the Fireworks Algorithm was optimized in this paper and previous papers [16,17].

Figure 3 .
Figure 3. Current mean of the = fitness of the sparks.

Figure 3 .
Figure 3. Current mean of the = fitness of the sparks.

Figure 3 .
Figure 3. Current mean of the = fitness of the sparks.

Figure 5 .
Figure 5. Graphical representation of the Fuzzy System for DPIFFWA-I.

Figure 5 .
Figure 5. Graphical representation of the Fuzzy System for DPIFFWA-I.

Figure 5 .
Figure 5. Graphical representation of the Fuzzy System for DPIFFWA-I.

Figure 8
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.The linguistic values have the names of SMALLER [−10 2 12], SMALL [2 12 23], MEDIUM [12 23 34], BIG [23 34 45], and BIGGER [34 45 56], and the form of each linguistic value is triangular (membership functions).

Figure 8 21 Figure 7
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.The linguistic values have the names of SMALLER [−10 2 12], SMALL [2 12 23], MEDIUM [12 23 34], BIG [23 34 45], and BIGGER [34 45 56], and the form of each linguistic value is triangular (membership functions).

Figure 8
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.The linguistic values have the names of SMALLER [−10 2 12], SMALL [2 12 23], MEDIUM [12 23 34], BIG [23 34 45], and BIGGER [34 45 56], and the form of each linguistic value is triangular (membership functions).

Figure 9 .
Figure 9. Graphical representation of the Fuzzy System for DPIFFWA-II.

Figure 9 .
Figure 9. Graphical representation of the Fuzzy System for DPIFFWA-II.

Table 4 .
Equations and plots of the benchmark functions with optimal values equal to zero.

Table 3 .
Benchmark functions utilized for the experiments (optimum equal to zero).

Table 3 .
Benchmark functions utilized for the experiments (optimum equal to zero).
Whereis the Ackley function, is the Griewank function, is the Rastrigin function, is the Rosenbrock function,

Table 6 .
Benchmark functions utilized for the experiments (optima different from zero).

Table 6 .
Benchmark functions utilized for the experiments (optima different from zero).

Table 8 .
Means and standard deviations of the fourteen benchmark functions with SI = 1.IFWA = Iterative Fireworks Algorithm.

Table 9 .
Means and standard deviations of the fourteen benchmark functions with SI = 2.

Table 10 .
Mean and standard deviation of the fourteen benchmark functions with SI = 3.