Live data from Hacker News

Fireflies

ncase.me

81–90 of 93 posts

Re: Fireflies

#81

I did the same thing a few years ago! My fireflies didn't move around though. https://www.michaelfogleman.com/static/fireflies/

Nice. I saw your comment: "The cells need not have identical individual frequencies to reach sychronization." This seems counter-intuitive to me.

They can't be too out of whack, but they can vary.

Re: Fireflies

#82
post #18

Earlier quoted context omitted.

If you're so passionate about it, you should go implement these changes to show how the model fails. I would read that, if it were done well. It's not obvious to me that simply changing the radius or grid geometry would have the effect you claim. Your objection is just that the model is too simple, but everyone knows linear regression predicts quite a lot, quadratic polynomials estimate physical motion very well, etc…

Yes, absolutely. Also worthwhile to note that it's based on Thomas Schelling's model of segregation: http://nifty.stanford.edu/2014/mccown-schelling-model-segreg...

Its interesting to see how the simulations looks like they are modeling society, and reminds me strongly on how game of life tries to be a model of artificial life. however, if someone want it to mean more then they really need to test the model and get data on how well it can predict.

Re: Fireflies

#83
post #75

Earlier quoted context omitted.

Right- but the explanation in the 'explorable' is that the effect happens due to the simple pattern of Step 1: When you see a nearby firefly flash, nudge your clock a little bit forward, Step 2: That's it. Problem is, the description of what's happening and what is actually happening doesn't match.

Another poster here showed their own, similar demo of this. There they had each firefly charging like a capacitor. Triggering the light causes the capacitor to deplete. This seems like the better analogy, but more people know what clocks are.

In addition to being a better analogy, I am told it is possible to replicate the effect with a physical capacitor and a gas-discharge lamp: https://news.ycombinator.com/item?id=4600996

Re: Fireflies

#84
Not on the coding side, but the inspiration. . . For those of us in the USA, there is a much more accessible version of synchronous fireflies at Great Smoky Mountains National Park in Tennessee. I lived there for a few years and went multiple times[1].

The dates get announced a month or so beforehand, and tickets are based on a lottery system since it only[2] occurs on one side of one river for less than a mile. You can technically also hike in if you're ok with 8 or so miles near sunset and then the same amount out in the pitch black. I believe that is frowned upon, but very few people do it that way (I was the only one the year I couldn't get tickets and decided to hike).

[1] https://www.flickr.com/photos/23215983@N02/albums/7215764507...

[2] Not exactly only, but certainly the most strongly.

Re: Fireflies

#87
post #82

Earlier quoted context omitted.

Yes, absolutely. Also worthwhile to note that it's based on Thomas Schelling's model of segregation: http://nifty.stanford.edu/2014/mccown-schelling-model-segreg...

Its interesting to see how the simulations looks like they are modeling society, and reminds me strongly on how game of life tries to be a model of artificial life. however, if someone want it to mean more then they really need to test the model and get data on how well it can predict.

I recall a study with LA demographic data that showed the statistical distribution of LA matches the distribution output by the Schelling model. Hazy on the details though :(

Re: Fireflies

#88
post #34
post #18

Earlier quoted context omitted.

If you're so passionate about it, you should go implement these changes to show how the model fails. I would read that, if it were done well. It's not obvious to me that simply changing the radius or grid geometry would have the effect you claim. Your objection is just that the model is too simple, but everyone knows linear regression predicts quite a lot, quadratic polynomials estimate physical motion very well, etc…

FWIW, the majority of the first page of this user's comment history (6/10) are complaining about feminism in some fashion. (I don't generally like looking at people's comment history, but one, you're absolutely spot-on that it would be easy to change the simulation - it's public domain and it's in JavaScript, this is Hacker News, if you don't know how to edit the JS console yourself there are tons of people who will…

Since I wrote that comment I feel the itch to do it myself :) He said topology, but I don't think he meant what I'm thinking of: a torus! A Mobius band! The projective plane! My curiosity is getting the better of me.

Re: Fireflies

#89

Nature has the best algorithms, don't it folks? I have a question about a detail. The rule is: 1. When you see a nearby neighbour flash, nudge your own clock forward. 2. That's it. My question is -- when the fireflies are firing at the same time, they see each other flash, so they all nudge their clocks forward, correct? Assuming they don't nudge their clocks forward at the same amount, they would fall out of sync, c…

At least in the Kuramoto model, it's a little more complicated than the OP makes it sound (but not much). Step 1 is more like "if you see a flash, bump your clock closer to midnight." Specifically, an ODE is given for firefly $i$'s phase angle $ \theta_i$ $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ This gets interesting because the flies natural frequencies $\omega_i$ are also assumed t…

> $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$

What's the quickest way to preview that (without needing a hosted service)?

I just made this small LaTeX document (I'm amazed I knew this by heart, I typed this manually maybe thrice in my life):

    \documentclass{paper}
    \begin{document}
    $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$
    \end{document}
    :wq
    pdflatex tmp.tex && evince tmp.pdf && rm tmp.*
but that's still quite a bit of extra work just to view it. Do you know a better way to do it?

Re: Fireflies

#90
post #89

Earlier quoted context omitted.

At least in the Kuramoto model, it's a little more complicated than the OP makes it sound (but not much). Step 1 is more like "if you see a flash, bump your clock closer to midnight." Specifically, an ODE is given for firefly $i$'s phase angle $ \theta_i$ $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ This gets interesting because the flies natural frequencies $\omega_i$ are also assumed t…

> $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ What's the quickest way to preview that (without needing a hosted service)? I just made this small LaTeX document (I'm amazed I knew this by heart, I typed this manually maybe thrice in my life): \documentclass{paper} \begin{document} $$\dot\theta_i = \omega_i + K / N \sum_{j=1}^N \sin(\theta_j - \theta_i)$$ \end{document} :wq pdflatex tmp.t…

I use this solution sometimes.

http://www.HostMath.com/Show.aspx?Code=%5Cdot%5Ctheta_i%20%3...

Post reply on HN