# Why does the firefly algorithm need an intensity function?

I am studying the firefly algorithm and I would like to ask about the Intensity function that is defined at the beginning of the algorithm.

What is it for? Some literature give different functions for $I$. Wouldn't it be easier if the intensity be just the function itself (for example in a maximization problem)?

• If it were just the function value you would get stuck in local optima very quickly. The idea is that the strength of the signal fades the further away you get is so that far away fireflies can effectively search their local neighborhood. – Nicholas Mancuso Jun 8 '15 at 4:38