How far must a firefly see for the whole field to flash together? Yellow flashes start scattered, gather into local clusters that flash together, and end as whole-field pulses with fully dark gaps between them.
Try this Set sense-radius to 8 and press Reset (the radius itself takes effect live). 90% of the fireflies now flash together within about 400 to 800 ticks, against roughly 800 to 2,600 at the default of 4; at 2, most runs don't get there in 3,000 ticks. Raising nudge instead does not speed things up.
About this model Where it ends up The run never stops by itself. Once the field is in step, flashing-now jumps to nearly all 150 fireflies for two ticks, drops to 0, and repeats about every 20 ticks.
Uri Wilensky's Fireflies from the NetLogo Models Library, a model of the synchronous flashing that John and Elisabeth Buck studied in Southeast Asian fireflies. Each insect adjusts its own flash clock only when it sees a nearby flash, yet a scattered field falls into step, a mechanism Mirollo and Strogatz (1990) analyzed for identical pulse-coupled oscillators.
Each tick runs in three stages. First every firefly, in random order, turns randomly by up to 40° either way, steps forward 1 and advances its clock by 1, wrapping to 0 at cycle-length. Then, all at once, each dark firefly whose clock is in the second half of the cycle and that sees a flashing firefly within sense-radius adds nudge to its clock, up to cycle-length. Last, fireflies whose clock reads 0 or 1 flash, so each flash lasts two ticks. population is read only at setup; cycle-length, nudge and sense-radius are read every tick.
NetLogo's version resets a firefly's clock when it sees enough flashes, with a choice of phase-advance or phase-delay strategy. This port has only the advance, as a fixed nudge forward.