FIREWORKS ALGORITHM FOR UNCONSTRAINED FUNCTION OPTIMIZATION PROBLEMS

Modern real world science and engineering problems can be classified as multi-objective optimisation problems which demand for expedient and efficient stochastic algorithms to respond to the optimization needs. This paper presents an object-oriented software application that implements a firework optimization algorithm for function optimization problems. The algorithm, a kind of parallel diffuse optimization algorithm is based on the explosive phenomenon of fireworks. The algorithm presented promising results when compared to other population or iterative based meta-heuristic algorithm after it was experimented on five standard benchmark problems. The software application was implemented in Java with interactive interface which allow for easy modification and extended experimentation. Additionally, this paper validates the effect of runtime on the algorithm performance.


INTRODUCTION
Function optimisation problems have been solved by many different techniques.Optimization in operation research explains a process of finding the high value of a function in a domain definition which is subject to numerous constraints on the variable values.As a rule of thumb, function optimization problem finds the optimal solution of an objective function definition by means of iteration (Ren & Wu, 2013).Characters of these optimisation problems are mostly identified as linear or non-linear, continuous or discrete, concave or convex functions etc.
In such instances conversion from constraint function optimization problem into an unconstrained problem is implemented by focusing on the designed special operators and penalty functions so as to enable the feasibility of the solution at all times.
There are a wide range of mathematical programming algorithms which offer various techniques to control various optimization problems as numerical, discrete or combinatorial optimization problems, but most of the methods at most times fail to return satisfactory results.In operations research, as an alternative to the mathematical programming methods, bio-inspired optimization algorithms have become very popular.Over the last decade, researchers are paying attention to nature-inspired heuristics.These algorithms centre on the cooperative intellectual behaviours of animal groups, insects, bee or ant colonies etc and its problem solution abilities.Swarm system as mostly referred have lots of advantages in finding solutions to many optimization problems (Bonabeau, Dorigo & Theraulaz, 1999).As applied in many technical fields, such as data mining, signal processing, network routing, pattern recognition and others, this system is a kind of random search algorithm that simulates the biological population evolution and hence solves complex stochastic optimization problems through cooperation of individuals and species competition (Yuan, de Oca, Birattari & Stutzle, 2012).Typical among the swarm intelligence algorithms are the ant colony optimization (ACO) algorithm (Chandra et al., 2012), the bee colony (ABC) algorithm (Karaboga & Basturk, 2007) particle swarm optimization (PSO) algorithm (Kennedy & Eberhart, 1995), and the genetic algorithm (GA) (Tang, Man, Kwong & He, 1996) enthused by the Darwinian law.Among the listed SI algorithms, PSO is one of the largely accepted algorithms for probing optimal locations in an undefined dimensional space.
A new swarm intelligence algorithm which aroused worldwide concern in 2010 with an excellent optimisation performance was one proposed by Ying Tan.This algorithm which inspired by the emergent swarm behaviour of fireworks is referred to as Fireworks algorithms.This algorithm follows in the tradition of swarm intelligence (Tan & Zhu, 2010).
In this paper an object-oriented implementation of fireworks algorithm is tested on unconstrained function optimization problems.A software program was developed in Java to solve the function optimisation problem, test the results of benchmark functions and also to test the system robustness and performances.The remaining of the paper is organised as follows: In section 2 Fireworks algorithm is introduced followed by section 3 with a brief explanation of five standard unconstrained Benchmark functions.Section 4 details the software implementation of the fireworks algorithm with Section 5 presenting the simulation experiment and results.Finally the paper concludes with Section 6.

Background
A novel swarm intelligence algorithm, Fireworks Algorithm (FA), over the past decade has been implored to solve universal optimisation problems although research of various works according to survey, have shown few implementation.Proposed by Tan and Zhu, this algorithm mimics fireworks explosion activity and behaviour.Its first implementation was to identify its superior performance over Standard PSO and Clonal PSO (Tan & Zhu, 2010).Zheng et al. (2012) put forward a hybrid fireworks-differential evolution (FWA-DE) algorithm.They use the crossover, mutation and selection operators in the Differential evolution algorithm.An enhanced fireworks algorithm (EFWA) presented by Zheng et al. (2013) was used to improve the least radius detection rate, the rules of mapping and spark selection approach of the explode sparks.In 2014, a Hybrid approach which put together FWA and differential mutation (FWA-DM), was formulated.Having successfully experimented on CEC 2014 benchmark functions, it proves to be a good solution.Another proposed solution is the dynamic search firework algorithm (DFWA) (Zheng et al., 2014).This algorithm works by dividing the fireworks population into basic fireworks with optimal fitness value and non-core fireworks.This strategy enables the algorithm to undertake local search and global search efficiently and effectively.As put forward by Ding et al. (2013), the parallelized GPU-based Fireworks Algorithm (GPU-FWA) proficiently exploit graphical processing unit (GPU), to solve large-scale problems.In a research paper by Li et al. (2014), they propose the adaptive firework algorithm (AFWA) to carry out self-tuning of blast radius.They measure the distance involving the best individual and the discussed individual by setting the distance as the next blast radius of the best individual.From this kind of technique, the adaptive step size adjustment shows good optimization performance on the improved FWA.
The focal source of motivation for the FA is the process of starting out a firework.Any time a firework is start out, shower of sparks consume the local space in the region of it.Tan disclose that, the explosion progression of a firework can be analyse as an exploration in the local space about an exact point where the firework left through the sparks created in the explosion (Tan & Zhu, 2010).The explosion of Firework reveals two specific behaviours.A healthy created fireworks, presents numerous sparks and the sparks tends to be engulf in the centre of the explosion.The fireworks is mostly found in areas in the search space which tends to promising and may possibly be close to optimal solution.Therefore it is ideal to produce enough sparks to locate the best spot in the region of the firework.In contrast, poor quality fireworks demonstrate divergent behaviour.Mostly in such instances, sparks generated are relatively few and scattered in the local space.This activity indicates that, the best solution to the problem is distant away from the spot of the firework and for that matter, the radius of the search could be larger.

Algorithm attitude
The fireworks algorithm (FA) is a novel iterative-based disperse optimization algorithm approach that imitates the behaviour of fireworks explosion that identifies the equilibrium between global search and local exploration by means of regulating the explosion method of fireworks bombs.The overall algorithm is stochastic in nature.When there is an explosion of fireworks, the sparks produced spread in the air filling their immediate region.For this matter to locate a point x in the specified function f(x) = y, fire explosion can be created in the area which is possible to search continually until sparks locates the point close to x or find the x space.In every generation of explosion, N positions of the fireworks are chosen.Then after N other positions are chosen from the recent sparks and fireworks positions for the next firework explosion.From the results obtained after the explosion, a rough estimation of the position is recorded until the finest position is recorded else fireworks explosions are continued with explosion locations of N selected again.A graphical clarification is expressed in figure 1.

Algorithm Structure
Two important elements of the FA are the number of sparks and the amplitude of explosion.To illustrate the first element of the algorithm, assuming that FA is intended for some kind of optimisation problem: in this casex = x 1 , x 2 … , x n represent a probable solution, with f(x) being the objective function and x min and x max denoting extent of the solution search space.So therefore the number of sparks that can be produced by each single firework x i can be stated as: Where m symbolize a parameter which take care of the general number of sparks generated by n fireworks, with y max = max ( f(x i )) ( i = 1, 2, … , n) being the worst value of the target function amongst the n fireworks, and ξ, is the least computer constant exploited to evade zero-division-error.From experimentations by (Tan & Zhu, 2010), S i needs to be smaller so as to avoid devastating outcomes under terrible firework explosions, therefore bounds on S i are created as expressed in 3.
where a and b represent preset constant parameters.The second important element of FA defines the amplitude of explosion.A well created firework amplitude usually is smaller compared to that of a terrible one.The expression defined in 4 illustrates the amplitude of each explosion.
where  ̂ refers to the value of the highest explosion amplitude with   =  ((  ))(  = 1, 2, … , ) representing best firework of the target function in n fireworks.In the course of an explosion, the z direction (dimension) of sparks is affected.The number of randomly affected directions is obtained by where d denotes the optimisation problem number dimension of location x, with  being a uniform distribution of a random number ranging from 0 and 1.
With the aim of determining the   firework location of a spark, a spark location   is first generated.The entire process is made known in pseudo-code 1.

Pseudo-code 1
Find the initial spark's location:   =   Choose random z dimensions of   by adopting Eq. ( 5 From the pseudo-code 1,  represent a random number of intervals (-1, 1).To maintain the goal of diversity of sparks, a second approach to establishing sparks generation is implemented -Gaussian explosion as illustrated in Pseudocode 2. A Gaussian (1, 1) function which refers to the Gaussian distribution with a single standard deviation and mean is adapted to describe the explosion coefficient.With this approach mˆ sparks are generated in every Gauss explosion.

Pseudo-code 2
Establish the initial spark's location:  ̂ =   Choose arbitrary z dimensions of  ̂ by adopting Eq. ( 5 At the start of every iteration, n fireworks locations are chosen.The finest position  * according to the best target function ( * ) is always kept and reassigned for the next iteration.At this point, the selection of n-1 locations are chosen rooted on their distance with other locations to maintain sparks diversity.The measure of distance between a location or spot and other spots/locations is generally determined in FA as: where K is the set of all present locations of both fireworks and sparks.At this point the probability of selecting location   can be expressed in (7) as: where (  ) indicate the probability that the location   will be chosen.Putting all together Pseudo-code 3 illustrates the build up of Fireworks algorithm in high level language.

Pseudo-code 3 in High level language
Arbitrarily establish n location of fireworks iterate until complete for every individual firework determine the firework amplitude determine the total of regular sparks Create the regular sparks end for create special Gauss sparks calculate every individual spark from sparks list, choose n to serve as new fireworks locations generate n new fireworks end iteration present the finest spark location found The function estimations of the FA are such that there are about n + m + m ̂ carried out by each generation.Assuming the optimum of a target function can be identified in generation T, the FA complexity will be ο(n + m + m ̂).A further explanation of the behaviour of the algorithm process is demonstrated in the graph in Figure 2 taken from James McCaffrey (2016).

Fig. 1. Fireworks optimization algorithm
In summing up, pseudo-code 1 and 2, presents two sorts of sparks which are respectively generated in each of the iteration.In the first spark kind, the sparks number and explosion amplitude depend to a larger extent the worth of the fireworks.This is sharply in contrast with other sparks which are created using the Gaussian explosion process for firework searching in the local Gauss space.Subsequently, the n positions of the succeeding explosion are chosen once the two kinds of spark positions are obtained.Pseudo-code 3 put together the overall structure of FA.

BENCHMARK FUNCTIONS
Numerous benchmark functions have been reported in literature over the years yet; there have not been an accepted standard list.This paper experimented five rich set of popular benchmark functions with varied qualities in terms of valley landscape, separability, and modality to assess the character traits of the solution algorithm adoptedin this case check its correctness, toughness and general performance of the implementation program as adopted in Virtual Library of Simulation Experiments: "Test Functions and Datasets" (2016) and Bacanin et al (2014).In this paper the unconstrained function optimization problems used is of the form: Where, f(x) represent the objective function to be minimized, with x being the continuous vector variable of domain ω ⊂ R n and f(x): ω → R representing a continuous real-valued function.The lower and upper bounds defined within each function dimension is represented by ω.
The first is the Dixon-Price test function,  1 .This function is a continuous, non-separable and multimodal minimization test operation.It search domain lies in −10 ≤   ≤ 10,  = 1, 2, … ,  with its global minimum, f(x) at 0. Griewank function,  2 which has its global minimum value at 0 with the function initialization range from [−600,600], is second.It is a continuous and differentiable function which has a corresponding universal optimum solution as   = ( 1 ,  2 , … ,   ) = (100, 100, … , 100).This function although multimodal, its multimodality diminishes with high dimensionalities (n > 30) and therefore appears uni-modal.
Rosenbrock,  3 makes the list as third.It is a well-known traditional optimization problem with a 2 dimensional function which describe a deep valley with a parabola form of the shape  1 2 =  2 that results to the global minimum.Owing to the non-linearity of the valley, lots of algorithms converge slowly since they vary the direction of the search constantly and for this reason this problem has been repetitively used in assessing gradient-based optimization algorithms performance.Valley function is unimodal with the initialization interval of X [−30, 30].
The fourth test function is the Schwefel function,  4 .This function is complex, with many local minima.Initialization range for the function is [−500, 500].The surface of Schwefel function is made up of a large amount of peaks and valleys.It is a deceptive function which possesses two global minimum with its global minimum over the parameter space from the succeeding best local minima geometrically far-off.Thus its search algorithm is ably susceptible to converging in a wrong direction.It has its global minima  *  = = ±[(0.5+ )] 2 ,  4 ( * ) = −418.983.The difficulty with this test function is that its gradient cannot bend along their axis owing to the epitasis with their variables.For this reason, most algorithms that make use of the gradient leisurely converge.
The Sphere concludes the benchmark functions.This function has the properties of being separable, scalable, continuous and multimodal.Its interval range lies in the region of 0 ≤   ≤ 10 with its universal minimal value at 0 and optimum solution being  = ( 1 ,  2 , … ,   ) = ( 0, 0, … , 0).
The functions expression, its initialization and intervals are further expressed in Table 1.

Function
Expression Initialisation

eFIREWORKS IMPLEMENTATION
This paper implements a software program which uses an object oriented approach to its execution of the fireworks algorithm.The developed software is named eFireworks (explosive Fireworks).When an objected oriented approach is adopted there is improvement in the software scalability and therefore there is lesser time execution even when there is an implementation of different optimization problems of new programming concept.Object oriented capabilities allow for addition of varying optimization functions and lots more benchmark problems with little or no effort.Additionally, object oriented implementation allows for easy modification of the behaviour of algorithm functions.Similar works have been suggested for artificial fish swarm algorithm in James McCaffrey (2016) and ABC in Virtual Library of Simulation Experiments: "Test Functions and Datasets" (2016).The developed software with its graphical user interface is created in Java programming language.Java was chosen partly due to the fact that its paradigm entirely imitates objectoriented and the ability that it is based on classes, concurrent and is general purposed.Additionally, its implementation dependencies can be as few as possible.An added advantage that java has is its ability to allow application developers to "write once, run anywhere."This consequently makes most Java application convenient and portable thus allowing software -eFireworksto be executed on varying computer system.The software adopts a graphical user interface.The graphical user interface among other qualities enables easier control of parameters and test function to optimize.
The software application is deeply adopts the theory of tightly connected abstract classes and inheritance.This concept enables easy adaptation to new functional problems and the future extendibility of the program.eFireworks is developed using java 1.7.0.25,NetBeans 7.1.2 with Windows 8 operating system of x64 bit. Figure 2 illustrate a Screenshot of the vital Graphical user interface (GUI) of eFireworks.

OPTIMIZATION TEST AND RESULTS
All tests were executed on intel(R) Core (TM_i3-3110M CPU@ 2.40GHz laptop equipped with 4GB RAM on Windows 8 x64 Operating System in NetBeans 7.1.2IDE.The NetBeans IDE and operating system were the only processes running during test execution.To validate the algorithm and examine runtime effects on the algorithm performance, two sets of test was conducted on each of the five benchmark functions.10 runs was set for the first execution and 30 runs for the second, each using different random seeds.The best, statistical mean and standard deviation results were the indicators that were observed from the problem solution.The bounds used for the upper and lower parameters were the default values from Table 1.The benchmark dimensionality for all functions is set to 10 (D = 10) with the maximum number of function evaluation perked at 600,000 for all functions.The parameter settings of FA used are same as in Tan and Zhu (2010)  As can be identified from Table 2 and 3, the optimization obtained with Fireworks algorithm presents satisfactory results for all under listed benchmark problems.Comparison can be drawn with other famous heuristic or bio-inspired algorithms and software systems such as Karaboga andBasturk (2007) &Bacanin (2014).The algorithm proves to be robust in its operations and presents optimal results.  2 and Table 3 it can be deduce that as the number of runs are increased, results obtained tends to be slightly better.It can therefore be concluded that the performance of the optimization solution, Fireworks algorithm is marginally affected by alteration of number of runs although it may be disregarded since the results presented is of tiny deviation.

CONCLUSIONS
In this paper, an implementation of a population based swarm intelligence algorithm, Fireworks algorithm was adopted to solve unconstrained function optimization problems using a developed object-oriented graphical user interface application.The application presents a much more expedient way to work and allows for easy modification for other optimization problems as compared to the original version.The algorithm was tested on five benchmark functions and performance recorded.The optimization solution algorithm demonstrated its ability to contain several benchmark problems but there is some margin of improvement.In future, the study can be extended to investigate and study other global and real life problems such as urban traffic regulation, job scheduling, parcel delivery etc.

Fig. 2 .
Fig. 2. Screenshot of eFireworks User interface : number of fireworks, n = 5, total number of regular sparks, m = 50, special Gaussian spark,  ̂ = 5, amplitude, A = 40, maximum spark of firework, b = 0.8 and minimum spark of firework, a = 0.04.Results of test values are shown in Table 2 for runtime of 10 and Table 3 for runtime of 30.