This project implements the Firefly Algorithm (FA), a nature-inspired optimization metaheuristic proposed by Xin-She Yang (2008).
The algorithm is inspired by the bioluminescent flashing behavior of fireflies, where brighter fireflies attract others. This natural behavior is modeled to solve complex optimization problems.
Each firefly represents a candidate solution.
- Brightness corresponds to solution quality (objective function value)
- Less bright fireflies move toward brighter ones
- Attraction decreases with distance
- Random movement allows exploration and avoids local optima
The algorithm is demonstrated using benchmark optimization functions such as the Sphere function, and results are visualized to show convergence.