DESCRIPTION OF FLASH

Pendulum clocks, chirping crickets, and flashing firelies are all examples of oscillators. In certain circumstances, oscillators can become coupled, with the result that, for instance, a group of fireflies--each initially flashing at random--become synchronized.

Ian Stewart describes some of the mathematical analysis of this phenomenon, with specific reference to fireflies, in his article "The Synchronicity of Firefly Flashing," which appeared in the Mathematical Recreations section (pp 104 - 106) of the March 1999 edition of Scientific American. A firefly is an example of an integrate-and-fire oscillator: "some quantity builds up (that is, the phase increases) until it reaches a threshold. Crossing this value triggers a sudden action--fire (or, in the case of fireflies, flash)--after which the quantity resets to zero and starts to accumulate again." In some cases the quantity might be a charge (as in a capacitor in an electronic device). However, what the specific quantity is which builds up is less important than where it is in the building up process, i.e., what its phase is.

Coupling occurs through a firefly's flashes (and so fireflies are examples of "pulse-coupled" oscillators): the flash increases the phase of any firefly which sees the flash, bringing it nearer to its threshold, and over time causing the fireflies to become synchronized.

In his article, Stewart describes a game called "Flash", which provides a simplified model of integrate-and-fire pulse-coupled oscillators and allows experimentation with various parameters affecting the system. The program, Flash, is based on the game Flash and was originally written in March 1999 by Harold W. Baldwin and first revised by him in November 1999.

THE GAME

Flash is played on a square board, such as an 8 by 8 chessboard, using only the outer squares. Other sized boards can be used, and the following will be based on a 6 by 6 board with the squares numbered as follows:
                           0  1  2  3  4  5
                           19             6
                           18             7
                           17             8
                           16             9
                           15 14 13 12 11 10
0 is the flash or threshold square. You place counters (fireflies) randomly on the squares; the number of counters is up to you. The squares are grouped into segments and each segment assigned a value as follows:
                           Segment     Value
                            1 - 4        1
                            5 - 9        2
                            10 - 14      3
                            15 - 19      4

The following rules for the game are from Stewart's March 1999 article:

STEP 1. Move each firefly one square clockwise. Although you may have to reposition the flies one at a time, think of them as moving simultaneously. (This step represents an incremental increase in the phase.)

STEP 2. If any firefly has landed on the flash square, move every other firefly clockwise by a number of squares equal to the number of the side of the board on which it sits [i.e., by the value of the segment in which it sits]. . . . do not allow any firefly to pass over the flash square; stop it instead on that square. (This step represents pulse coupling. The other flies notice the one that flashes, which makes them move closer to threshold. Fireflies with a bigger phase move more squares, which is how the real insects behave.)

STEP 3. If any firefly lands on the flash square as a result of step 2, go back to the beginning of that step and again move all the other counters accordingly.

STEP 4. Return to step 1.

Note that if two or more fireflies land on the same square, they have synchronized and should be moved thereafter as a single unit.

THE PROGRAM

The program can run a standard game using your choice of board size (6 by 6 through 24 by 24). In addition, by changing certain parameters you can create a variety of non-standard games. In particular, you can specify the board size (i.e, the number of squares on the board), the number of segments (sides) the board should have, and the value of each segment (i.e., the size of the phase increase, or number of moves, for a counter in that segment). These sorts of games would in effect be played on polygonal boards. Regardless of the kind of board chosen, you specify the number of counters and their placement. In any game you can get data about the progress of the game.

(Here you can read a discussion of my resolution of four situations or aspects of the rules which initially I found unclear. The program behaves in keeping with these resolutions, which are based on a close examination of Stewart's description of the game. Also helpful were the following references and others contained in them.)

ADDITIONAL REFERENCES: Both appeared in Scientific American, Vol. 269, No. 6; December 1993. Both have further references which are quite good.

"Coupled Oscillators and Biological Synchronization." Steven H. Strogatz and Ian Stewart, pp. 102 - 109.

"Electronic Fireflies." Wayne Garver and Frank Moss, in The Amateur Scientist section, pp. 128 - 130.