the ability to synchronize behaviors is
a common property seen in
self-organizing systems in nature some
examples are fireflies which in some
species are able to synchronize their
flashes or crickets which in some
species are able to synchronize their
chirping cicadas a kind of insect has a
synchronized development and emergence
from their larval states in certain
periods which are prime numbers of years
neurons in the brain are able to
synchronize their firing heart cells
synchronize their beating all these seem
to have some adaptive significance and
have been enabled via natural selection
in this subunit we're going to look at
one example the example of fireflies
flashing so if you're lucky you've seen
at some point this phenomenon of
synchronized Firefly flashing I'm going
to show you this little video so the
little points of light are individual
fireflies and you can see you very
quickly many of them start to flash in
unison and this synchronized flash gets
even stronger as more the fireflies are
recruited to flash in unison it seems to
be about one flash per second it's very
very striking so similar to our
discussion of flocking and schooling we
can ask why do these kinds of systems
synchronize well at least in the case of
the fireflies there seems to be an
explanation in terms of mating again
there's multiple hypotheses one
hypothesis is that the synchronized
flashing makes the male's location more
visible to the females so the females
can come and find the males it also
makes small groups of males appear
larger and perhaps that means they're
more attractive to females it reduces
noise that is males can more easily spot
females
in the dark between the flashes rather
than having to find them all while
everyone is flashing chaotically so
these are all hypotheses perhaps all of
them are correct perhaps some of them
nobody really knows for sure yet but it
does seem to be an adaptive trait then
there's the question of how to
synchronize so the assumption is that
there is no leader leading the
synchronization each individual firefly
only sees its neighbors flashing now
what has been discovered is that each
Firefly itself is a natural oscillator
that is it has a natural flashing
frequency of about one second that
occurs because of brain activity
excitation builds up in its neurons
reaching some threshold which leads to a
flash so there's a natural timing for
this however if the Firefly sees its
neighbor flashing then this either
resets its cycle that is its excitation
is set to zero
or speeds up its cycle perhaps depending
on the species but the result people
have shown of a group of these
oscillators that interact is synchrony
of the kind that we just saw and this is
called synchrony via coupled oscillators
so similar to the flocking example here
we have a very simple mechanism that
produces decentralized synchronization
and we can model it pretty easily using
that logo so let's look at a model we're
going to look at the net logo fireflies
model which is in the biology section of
the models library and what happens in
that model we'll look at it in a second
we're going to have a number of
fireflies each one is a natural
oscillator it has its own clock we're
after a number of ticks it's going to
flash let's say the cycle length is 10
whenever the clock reads zero the
Firefly flashes
and then after it flashes it counts up
to nine and then it hits zero again and
flashes so every time it reaches the
maximum it resets the clock to zero and
then flashes all the fireflies in the
model have the same cycle length but
each of them once you do setup is going
to begin at some random point in their
cycle so they're not going to begin at
zero they're going to begin at some
random point so let's take a look at
that so I'll open net logo I'm going to
go to the models library go to biology
go to fireflies and I open it up so to
illustrate how this works let's start
with just one Firefly so the thing to
look at now is how many fireflies we
have and the cycle length it's set to 10
ticks so we do setup here's our Firefly
right down here this little gray
triangle and let's do let's slow it down
a little bit and you go and what you're
going to see is it moving around you see
the world wraps around at the edges and
every 10 ticks it flashes so there's
nobody else for it to interact with so
it's just going to go along flashing
that that's in that same cycle okay I'm
going to stop it now let's at start with
two fireflies so here I start here's one
way over here you can't really see it
and this one note that they start at
different points in their cycle this one
by random chance started at the flashing
point in its cycle this one started at a
different point so now when I do go you
can see them flashing but at different
times
and similarly if I start with let's say
well we'll do 45 you're going to see
different ones flashing at different
times okay so let's look at how they
interact when a firefly perceives
another firefly or one or more fireflies
flashing near them and they look within
a radius of one patch so they can only
see one patch around them they're going
to use this information to reset their
own clocks so here's how that works
each Firefly has a parameter called
flash length which is how many ticks of
each flash in in the version we looked
at just a second ago it was one tick per
flash so you can think of it as one tick
for now we can reset it they also have a
parameter called flashes to reset which
gives the number of other fireflies they
need to see flashing in order to change
their clock so they have to look one
patch around them and they count at each
time step they count the number of other
fireflies they see that are flashing and
they can use one of two rules the first
one is called phase delay and that's it
here's how that works so if I'm a
Firefly if I saw enough flashes in my
vision radius that is you go back
flashes to reset gives that number how
many flashes I have to see in my vision
radius in order to change my clock if I
do see enough I'm going to reset my
clock to flash length so a flash length
is one tick I'm going to reset my clock
to one everybody flashes on zero in
their clock so when when my clock says
zero I flash so if I reset my clock to
one that means that I've
really gone backwards in some sense from
wherever I used to be back to just after
I would have flashed and so what that
does is it synchronizes me with the
flashes I just saw because everybody
else who I saw who was flashing had just
flashed so their clocks are all at 1:00
or 2:00 a flash length is 2 and so on so
it synchronizes me with the other
fireflies that I saw in my neighborhood
so that's called the delay because it
really effectively sets my clock back to
be in sync with the ones I saw there's
another possible rule called phase
advance which is if I saw enough flashes
in my vision radius I then reset my
clock to zero so I'm sort of advancing
my clock and I flash immediately so we
can experiment with those two rules but
let's look at what the behavior looks
like so notice that the strategy here is
set to delay the flash is to reset
that's the number I need to see in my
neighborhood in order to reset my clock
is one so I just need to see one the
flash length is one tick the cycle
length is 10 ticks okay show dark
fireflies just shows the gray ones the
ones who aren't flashing if I turn that
off
those ones disappear I won't do that for
now so now I'm going to set the number
up to let's say seven around 700 okay so
setup now there's a lot of them and go
and let's speed this up a little bit on
this plot you can see at each time step
how many are flashing that's what this
gives so they're all interacting with
each other and you'll start to see this
number increasing here which means that
more and more of them are getting into
synchronization
and it's growing quickly that's going
down a little bit the randomness comes
from the fact that they're moving around
at random so they interact in a random
way but they're definitely getting more
and more in sync for their flashes and I
think we can see that better if I slow
it down a little bit so now you can see
a really synchronized flashing so this
delay strategy seems to work all right
let's stop so now you can see that
there's a relatively simple set of rules
that each Firefly obeys each Firefly
only interacts with nearest neighbors
here one patch away and yet we can get
the whole group in almost perfect
synchrony if I went longer it would even
be better we would get to perfect
synchrony without any individual Firefly
having any global knowledge of what's
going on so let's do a little quiz where
you play with this model yourself