Firefly
What is it?
This program simulates the self-organized synchronization of firefly flashing. In the region from India east to the Philippines and New Guinea, enormous aggregations of fireflies gather in trees and flash in near-perfect synchrony. While different species have slightly different methods for flashing in rhythm, the behavior that is modeled here is governed by the following rules: *each firefly has an intrinsic flashing frequency, and when left alone it will flash at periodic intervals. *the flashes are timed by the progressive excitation of a chemical within each firefly; the excitation increases until it reaches a certain threshold, at which point a flash is emitted and the excitation is reset to zero. *if a firefly senses a certain amount of luminescence from its neighbors, it will reset its excitation to zero in order to flash simultaneously with those neighbors in the future; however, if the excitation is close enough to the flashing threshold, the flash has already been started and will proceed as planned even though the excitation is reset to zero. (The signal to flash is initiated when the excitation is 80% of the way to the threshold value.)
How to Use It
The SETUP button arranges the fireflies randomly within a circle, assigns them random excitation levels, configures the plot to monitor the flashing, and displays a color key. The GO button cycles through time, executing the rules stated above. The NUMBER slider controls the number of fireflies in the simulation. The THRESHOLD slider sets the excitation threshold at which point a firefly will flash and reset its excitation to zero. Because excitation is incremented once per time step, this slider also represents the number of time steps between flashes of an (uninfluenced) firefly. The TRIGGER slider controls the amount of luminescence required for a firefly to reset its excitation prematurely. Each firefly's flash is counted as 100 units of light, and the program assumes that perceived light decreases with the inverse square of the distance from source. The BUFFER slider controls how many time steps are necessary for the flashing signal to evolve and terminate in a flash; if a firefly is triggered to reset its excitation when the excitation is within "buffer" of the threshold, the flash will proceed as planned despite the resetting. |
Things to Notice
The cluster of fireflies will often establish two phases of flashing before synchronizing completely; this phenomenon is also observed in the field. If there is a rift of empty space between the two groups (due to a random density difference), they might never completely coordinate. However, when they do move to complete synchronization, the group flashing a step later often prevails because its flashes have been started by the time it perceives the other group's luminescence. Each of the slider variables affects the simulation; generally, faster synchronization is favored by high numbers, low thresholds, intermediate triggers, and low buffers.
### We welcome your feedback and suggestions! Please send us email.