The fireflies+ program is described in the Info window which you can access after you have started up the program. What follows is a copy of the text from the Info window of the program.
OVERVIEW This program implements a system of coupled oscillators rougly analogous to a group of fireflies of the type which synchronize their flashes. The oscillators will hereafter be referred to as "fireflies". A firefly couples with other fireflies only when those fireflies are "flashing". Flashes happen just before and after a firefly's zero phase angle. The program has two modes, "spatial" and "non-spatial". In spatial mode, the position of the fireflies matters. A firefly can "see", that is, can couple with, other fireflies only when it is close enough to them; how close depends on the "flashing radius" of the fireflies. In spatial mode, the fireflies move in random directions around their world. You can control how often they move. In non-spatial mode, a firefly sees (couples with) any other firefly which is flashing; that is, the fireflies have no position, and hence they do not move. Fireflies are represented in the Graphics window by blue dots which turn white when the fireflies are flashing. Beyond this detail, however, the display for the two modes is completely different. In spatial mode, the fireflies are shown in their current locations. When a firefly flashes, the flashing radius around it is displayed, and any firefly within the flashing radius, that is, any firefly which couples with the flashing firefly, turns temporarily pink. In this mode, there is also a display option which indicates the current phase angle and period of each firefly. These are represented by a brown line whose direction indicates the phase angle (3 o'clock is 0 and the movement is counter-clockwise), and whose length indicates the period (a length of 10 is a period of 100). In non-spatial mode, fireflies trace paths in circles around the center of the Graphics window. Their position on the path indicates their phase angle (again 3:00 is 0 phase, and movement is counter-clockwise), and their distance from the center indicates their period. To make it easier to see the firefly periods, gray bands on the background indicate period increments of 20. The edge of the outermost gray band represents a period of 200 (twice the average). When the period of a firefly goes beyond 200, it is displayed in red, and it remains at the outer edge of the largest band, no matter what how great its period, until its period drops below 200 again. Where there is more than one firefly on a particular square, they are displayed in a lighter blue color. The phase angle and period of each firefly is updated on each "time slice". Each time slice represents a time of length 2. The average period of fireflies is 100, that is, 50 time slices. An option allows the user to have information printed out about the fireflies on every 10th time slice. Both phase angle and period coupling are implemented. Since coupling only takes place when a firefly flashes near its 0 phase, the relevant variable is the current phase angle of the affected firefly. The coupling function is the negative sine of this phase angle; the value of this function goes to zero at a phase angle of .5. The period of fireflies does not decay to a resting period. BUTTONS setup This button creates a new set of fireflies and initializes the display according to the value of the "spatial" slider. go This forever button repeatedly updates the phase angles and periods of the fireflies and redraws the display. SLIDERS You can change some of the sliders (clock, mv-prob, flash%, output?, pa-C, and pd-C) even when the fireflies are running. To change the other sliders (spatial, howmany, fl-rad, and pd-rng), you need to first stop the fireflies if they are running (by clicking on the go button), then move the slider, and then click on the setup button to create a new set of fireflies. spatial This slider determines whether spatial or non-spatial mode is to be used. A value of 0 indicates spatial mode, a value of 1 non-spatial model. As discussed above, the two modes differ in the behavior of the fireflies and in the type of display which appears. With this slider, you must click on setup for its new value to take effect. clock This slider is only relevant for spatial mode (spatial = 1). When it is set to 1, the "clock hands" indicating phase angles and periods of fireflies are displayed. output? When this slider is set to 1, information about the fireflies (number flashing; phase angle, period, and resting period of each firefly) is display in the Output Window on every 10th time slice. howmany This value of this slider determines the number of fireflies in the system. With this slider, you must click on setup for its new value to take effect. fl-rad This slider is relevant only in spatial mode. It indicates the "flashing radius" of the fireflies, that is, the maximum distance from a flashing firefly at which another firefly is affected. With this slider, you must click on the setup button for its new value to take effect. mv-prob This slider is also relevant only in spatial mode. It indicates the probability with which each firefly moves on each time slice. When it is 0, the fireflies never move; when it is 100, they always move. flash% The value of this slider is the percentage of a firefly's cycle during which it flashes. If this is set to 10, for example, each firefly flashes from a phase angle of .95 until a phase angle of .05. pd-rng The value of this slider indicates the range of initial periods of the fireflies. The average period is 100. If this slider is set to 100 (its maximum), the initial periods of the fireflies range from 50 to 150. With this slider, you must click on the setup button for its new value to take effect. pa-C This slider sets the phase angle coupling factor. When it is set to 0, there is no phase angle coupling. pd-C This slider sets the period coupling factor. When it is set to 0, there is no period coupling.
When you start up the program, it will be in non-spatial mode. That is, each firefly will respond to any other firefly which flashes, and a firefly's position in the Graphics window indicates its phase and period. You should set the sliders to the following positions if they are not already there
spatial 0 howmany 20 flash% 10 pd-rng 0 pa-C 20 pd-C 0The settings of the other sliders don't matter, but if you set output? to 0, the program will run much faster. These settings create a set of 20 fireflies all with the same initial period (100). Period coupling is turned off, but phase angle coupling is turned on, with the relatively low value of 20. This value controls the amount of influence each flashing firefly exerts on the other fireflies. The flash% setting of 10 means that fireflies flash for 10% of each cycle (5% before and 5% after their 0 phase).
Click on the setup button to initialize the fireflies. Notice that their phase angles are random but that their periods are the same.
Set the sliders to the following values.
spatial 0 howmany 20 flash% 10 pd-rng 50 pa-C 20 pd-C 0This situation is just like that in Problem A.1., except that fireflies with different initial periods will be created because of the pd-rng setting.
spatial 0 howmany 10 flash% 10 pd-rng 100 pa-C 24 pd-C 16This creates a system with 10 fireflies that have very different initial periods and that interact with both period and phase-angle coupling. Set up and run the fireflies 5 or so times, each time waiting until the system seems to have stabilized. (This may take 5 minutes or so.)
Set the sliders to the following values:
spatial 1 clock 1 howmany 40 fl-rad 10 mv-prob 0 flash% 10 pd-rng 0 pa-C 100 pd-C 0This creates a set of 40 fireflies whose locations matter for coupling but which do not move at all (because of the mv-prob setting). The initial periods are all the same, and there is very strong phase-angle coupling, but no period coupling.
[Go to the Rhythm and Cognition Home Page]
URL: http://www.indiana.edu/~gasser/activity3.html
Last updated: 26 September 1995
Comments: gasser@salsa.indiana.edu
Copyright 1995, The Trustees of
Indiana University