The firefly’s
attractiveness is proportional to the light intensity as seen by adjacent fireflies.
It can be defined as
. Initially
at r = 0.In the
implementation, the actual form of attractiveness function
can be any monotonically decreasing function such as
the following generalized form :