Skip to contentScholarGate
LibraryBookshelfDeskReview StudioAssistant
Sign in
On this page
IntuitionHow it worksWhen to use itStrengths & limitationsCommon pitfallsApplicationsFrequently asked🔒 Read the full methodSourcesRelated methods
Cite this pageSpotted an issue on this page? Report or suggest a fix →
Home›Optimization›Firefly Algorithm — Swarm Optimization via Bioluminescence
Process / pipeline

Firefly Algorithm — Swarm Optimization via Bioluminescence

Firefly Algorithm (FA) · Also known as: FA, Firefly Optimization, Ateşböceği Algoritması (Firefly Algorithm)

The Firefly Algorithm (FA), introduced by Xin-She Yang in 2008 and formally published in 2010, is a nature-inspired swarm metaheuristic that models the bioluminescent attraction behaviour of fireflies. Each candidate solution is a firefly whose brightness represents its objective-function value; dimmer fireflies move toward brighter ones with an attraction force that decays with distance, driving the swarm toward optima without gradient information.

ScholarGate
  1. Process / pipeline
  2. v1
  3. 2 Sources
  4. PUBLISHED
Cite this page →
Tools & resources
Download slides
Learn & explore

Read the full method

Members only

Sign in with a free account to read this section.

Sign in

Method map

The neighbourhood of related methods — select a node to explore.

Firefly Algorithm
Cuckoo SearchDifferential EvolutionGenetic AlgorithmGrey Wolf OptimizerParticle Swarm Optimizat…Bat Algorithm

When to use it

The Firefly Algorithm suits continuous, gradient-free optimization problems — particularly multimodal landscapes where several competing optima exist. It requires no distributional assumptions and works with any population size and iteration budget, making it applicable without minimum sample constraints. It is well-suited to engineering design, hyper-parameter tuning, and scientific model fitting where the objective is expensive or non-differentiable. It is not appropriate for purely discrete or combinatorial problems without modification.

Strengths & limitations

Strengths
  • Automatic sub-swarm formation: fireflies naturally cluster around multiple optima simultaneously, making it inherently suited to multimodal problems.
  • Gradient-free: the algorithm requires only objective-function evaluations, not derivatives, so it applies to black-box and non-differentiable problems.
  • Conceptually simple: only two key parameters (β₀ and γ) govern the search, keeping tuning tractable.
  • No distributional assumptions on the search space or objective function.
Limitations
  • Scales poorly to very high-dimensional spaces (typically beyond a few hundred variables) because the all-pairs attraction calculation grows quadratically with population size.
  • Performance is sensitive to the choice of the light-absorption parameter γ; a poorly chosen γ collapses the swarm prematurely or prevents convergence.
  • Suitable only for continuous optimization; discrete or combinatorial variants require non-trivial modification and are not directly supported.

Frequently asked

How do I choose the light-absorption parameter γ?

γ controls how quickly attraction decays with distance. A practical starting rule is to set γ so that the characteristic distance 1/√γ is on the order of the search-space diameter. Then sweep γ over a small grid and pick the value that gives the best convergence on a representative test run.

How does the Firefly Algorithm compare to Particle Swarm Optimization?

Both are swarm metaheuristics, but PSO uses global and personal best memories to guide movement, while FA uses pairwise attraction. FA's pairwise mechanism allows natural sub-swarm formation around multiple optima, giving it an intrinsic advantage on multimodal landscapes; PSO often converges faster on unimodal problems.

Can the Firefly Algorithm handle discrete or combinatorial problems?

Not directly in its standard form, which is defined over continuous spaces. Discrete variants exist in the literature (using permutation representations or binary encodings), but they require problem-specific adaptation and are not part of the original formulation.

How many fireflies (population size) should I use?

The original papers suggest 25–40 fireflies for moderate-dimensional problems. For higher dimensions, increase the population proportionally. Bear in mind that the all-pairs attraction step is O(n²) in population size, so very large populations increase computation time substantially.

Sources

  1. Yang, X.S. (2010). Firefly Algorithm, Stochastic Test Functions and Design Optimisation. International Journal of Bio-Inspired Computation, 2(2), 78-84. DOI: 10.1504/IJBIC.2010.032124 ↗
  2. Yang, X.S. (2014). Nature-Inspired Optimization Algorithms. Elsevier. ISBN: 978-0-12-416743-8

How to cite this page

ScholarGate. (2026, June 1). Firefly Algorithm (FA). ScholarGate. https://scholargate.app/en/optimization/firefly-algorithm

Related methods

Cuckoo SearchDifferential EvolutionGenetic AlgorithmGrey Wolf OptimizerParticle Swarm Optimization

Which method?

Set this method beside its closest kin and read them side by side — the library lays the books on the table; the choice is yours.

  • Cuckoo SearchOptimization↔ compare
  • Differential EvolutionOptimization↔ compare
  • Genetic AlgorithmOptimization↔ compare
  • Grey Wolf OptimizerOptimization↔ compare
  • Particle Swarm OptimizationOptimization↔ compare
Compare side by side →

Referenced by

Bat AlgorithmCuckoo Search

Similar methods

Bat AlgorithmParticle Swarm OptimizationGrey Wolf OptimizerAnt Colony OptimizationCuckoo SearchStochastic Particle Swarm OptimizationWhale Optimization AlgorithmArtificial Bee Colony

Related reference concepts

Stochastic OptimizationHyperparameter OptimizationK-Means ClusteringOptimization for StatisticsHeuristic Search and A*Nonlinear Programming

Spotted an issue on this page? Report or suggest a fix →

ScholarGate — Firefly Algorithm (Firefly Algorithm (FA)). Retrieved 2026-07-21 from https://scholargate.app/en/optimization/firefly-algorithm · Dataset: https://doi.org/10.5281/zenodo.20539026
Quick facts
Originator
Xin-She Yang
Year
2008
Type
Swarm intelligence metaheuristic
Inspiration
Bioluminescent flashing behaviour of fireflies
SearchMechanism
Attraction proportional to brightness (fitness), attenuated by distance
KeyParameters
Attraction coefficient β₀, light absorption γ
NotableProperty
Natural subgroup formation enables simultaneous discovery of multiple optima
ContinuousSpace
Yes
GradientFree
Yes
Difficulty
2
Related methods
Cuckoo SearchDifferential EvolutionGenetic AlgorithmGrey Wolf OptimizerParticle Swarm Optimization
ScholarGate

A content-first reference library for research methods — what each one is, how it works, and where it comes from.

Open data (CC-BY)

Explore

  • Library
  • Search the library…
  • Browse by field
  • Fields
  • Journey
  • Compare
  • Which method?

Reference

  • Subjects
  • Atlas
  • Glossary
  • Methodology
  • Philosophy

Your tools

  • Bookshelf
  • Desk
  • Chat

Company

  • About
  • Pricing
  • Contact
  • Suggest a method

Entries are compiled from published sources for reference. Verifying the accuracy and suitability of any information for your own use remains your responsibility.

© 2026 ScholarGate · A research-method reference library
  • Privacy
  • Cookies
  • Terms
  • Delete account