AI Glossary / Mathematics and optimization / Advanced
Fireworks algorithm
Definition
The fireworks algorithm, or FWA, is a population-based optimization method that generates candidate solutions around several current solutions using an explosion metaphor. Current solutions are called fireworks, and generated candidates are called sparks. Their objective values guide search effort and selection for subsequent generations. Proposed by Ying Tan and Yuanchun Zhu in 2010, the method is a stochastic optimization heuristic rather than a guarantee of finding the global optimum within a fixed evaluation budget.
What it means
The algorithm searches several regions at once. A promising current solution can receive concentrated local exploration, while a poorer solution can generate candidates across a wider neighborhood. Selection keeps useful candidates and can preserve diversity for further search.
In an AI project, the method could search numerical settings evaluated by an objective function, but whether it is useful depends on the problem, implementation, and available evaluation budget.
How it works
The original framework initializes fireworks, generates explosion sparks, generates mutation sparks, and selects the next population. Better objective values generally lead to more explosion sparks within smaller amplitudes; poorer values lead to fewer sparks over wider amplitudes.
The original algorithm also uses a Gaussian mutation operator and a rule for mapping out-of-bounds candidates back into the allowed domain. Selection retains the best candidate and uses distances among candidates to help select others.
Later variants change these operators, so a reproducible description should identify the version. Spark allocation, amplitude handling, boundary treatment, and stopping criteria are substantive algorithm choices. Implementations must also handle degenerate cases, such as equal objective values, without undefined arithmetic.
Three practical examples
1. Simulation tuning: A developer searches a bounded set of numerical simulator parameters. Each candidate requires a simulation run. The cost of objective evaluations can dominate the optimizer's own computation, making the total number of evaluations an important comparison measure.
2. Model configuration: A researcher explores continuous settings using validation performance as an objective. Repeatedly optimizing that validation score can overfit the selection process, so the final model still needs a separate evaluation strategy.
3. Algorithm comparison: A team compares a chosen FWA variant with random search and another optimizer under the same evaluation budget. It repeats runs with different random seeds rather than treating one favorable trajectory as proof of general superiority.
Think of it this way
Think of several search teams examining different neighborhoods. Teams near promising findings inspect the surrounding area more closely, while other teams cover wider ground. The metaphor helps explain concentrated and dispersed search, but the actual behavior comes from the numerical rules governing where candidates are generated and retained.
Worked example
Consider an original illustration of spark generation and evaluation for minimizing f(x) = (x - 2)^2 on [0,6]. Start with fireworks at x = 1 and x = 5, whose objective values are 1 and 9.
For clarity, stipulate a teaching allocation of three explosion sparks within amplitude 0.5 around x = 1 and one within amplitude 3 around x = 5. These chosen counts and amplitudes illustrate the search pattern; they are not a calculation of a particular implementation's adaptive allocation formulas.
Suppose the first firework generates x = 1.1, 1.4, and 0.8. Their displacements are 0.1, 0.4, and -0.2, all within the stipulated amplitude. Their objective values are 0.81, 0.36, and 1.44.
Suppose the second firework generates x = 2.5, a displacement of -2.5 within its amplitude. Its objective value is 0.25. The wider search from the initially worse firework has produced the best explosion spark.
For an illustrative mutation draw, multiply x = 1 by a factor of 1.2, producing x = 1.2 with objective 0.64. All illustrated candidates remain inside [0,6], so no boundary mapping is needed.
The best candidate among the original fireworks and these sparks is x = 2.5, with value 0.25. Elitist retention would preserve it. Other survivors depend on the specified selection rule and random draws; they cannot be inferred just by sorting objective values if a diversity-based rule is used.
The known optimum is x = 2 with value zero. Finding 0.25 improves the best observed value from 1, but does not establish optimality.
Illustrative case study
In a fictional engineering team, a researcher tries an FWA variant to reduce a simulator's mismatch score. One run improves quickly, and the researcher initially proposes replacing the existing tuning method.
The review asks for the exact variant, parameter bounds, evaluation budget, and handling of failed simulation runs. The team repeats the comparison across multiple seeds and includes a simple random-search baseline. It also separates time spent evaluating the simulator from time spent selecting candidates.
The resulting decision rests on performance for the actual workload rather than the fireworks metaphor or a single successful run.
Common misconceptions and mistakes
Fireworks optimization is distinct from the firefly algorithm. More sparks do not automatically mean more efficient search because they also consume evaluations. A lower objective value in one generation does not prove that the global optimum has been found.
Do not describe every FWA variant as using identical mutation or selection rules. Do not ignore parameter scaling: a search amplitude appropriate for one coordinate can be inappropriate for another. Boundary repair also changes where candidates are evaluated and should be documented rather than treated as an invisible implementation detail.
Business use
FWA can be considered as one candidate method for derivative-free numerical search. Its value should be established through comparisons on the intended objective and constraints. Teams should record the variant, seeds, evaluation budget, termination rule, and result variability. Feasibility checks remain necessary when business constraints extend beyond simple coordinate bounds.
People also ask
Does FWA require objective derivatives?
Its basic search operators use evaluated objective values rather than gradients.
Can the initially worst firework help?
Yes. The worked example's wider search finds the best new candidate.
Does keeping the best candidate remove randomness?
No. Candidate generation and other selection steps can remain stochastic.
Check your understanding
Answer: Which illustrated explosion spark is best? x = 2.5, with value 0.25.
Answer: Why is that result not globally optimal? x = 2 gives the lower value zero.
Why are the remaining survivors unspecified?
Answer: Their identities depend on the chosen selection rule and random draws.
Related terms
- Objective function
- Mutation
- Derivative-free optimization
- Population-based optimization
- metaheuristic
- exploration and exploitation
Learn next
Recalculate the worked objective values, then vary the stipulated amplitudes to see which regions can be reached. Before implementing an actual FWA variant, study its allocation, mutation, mapping, and selection rules together and compare it with simpler baselines.
More in Mathematics and optimization
- Absolute error loss - Absolute error loss measures a numerical prediction's error as the absolute difference between its predicted and reference values: L(y,y-hat)=|y-y-hat|.
- Active-set method - An active-set method is an optimization approach that works with a changing subset of constraints believed to be tight at the solution.
- Adjoint state method - The adjoint state method computes how a chosen objective changes when the parameters of a mathematical model change.
- Σ-algebra
- Algebraic connectivity - Algebraic connectivity is the second-smallest eigenvalue of a graph's Laplacian matrix.
- Algorithm IMED - Algorithm IMED, short for Indexed Minimum Empirical Divergence, is a method for choosing actions in a stochastic multi-armed bandit problem.
Work in finance? Get the free CFO AI Prompt Pack: 7 prompts for finance leaders.
Sources
Junzhi Li and Ying Tan, A Comprehensive Review of the Fireworks Algorithm (2019), creator-coauthored account of the original framework and variants: https://iasei.org/pkucil/fwa-forum/pdfs/20191122165028292062.pdf
The spark illustration and fictional case are original. The 2010 paper was not directly accessible during this check; the creator-coauthored account was consulted.
Previous: Firewall (computing) Next: Firmly non-expansive operator