Turn signals are actually intended to all blink at different rates and _not_ be in sync because if they were in sync the sight could become mesmerising (and thus distracting).
I’m thinking more along the lines of keeping every car from hitting another car. Let’s say, if every car has one of these bad boys in every corner, they could maybe purposely repel vehicles away from other vehicles or use brakes/turning/acceleration to steer clear of accidents ETC. Computers think and operate on the millisecond level, and can react SO much quicker than humans. If cars could automatically detect and avoid accidents, working together as machines to keep us safe, that would be an awesome place for these to be.
Depends on your definition of "to write". If you define "to write" as "tracing letters together with a pen or with a keyboard", then yes the second proposition does not necesserallly follows from the first. But if you define "to write" as "come up with a text and inscribe it with a pen or a keyboard", then writing does presupose understanding.
@@Karakta Trust me, nearly every programmer can tell you a story of having written a programm that, by all accounts, should not have worked but still did so for reasons beyond their comprehension.
@@maxireigl1919 If I refer strictly to what you said, what is beyond their comprehension are the reasons why what they have written works, not what they have written itself. In fact, if they had not understood what they have written, then they would not be surprised as to why it works.
"i understand how it works, i even wrote the code to make it work, but when i turn it on and it works, i am still shocked and amazed" -Basically every programmer
@@skyeshoe.223 I see what you did there. I just missed being #512, at 521. Sigh. After being retired for seven years, I can still look at an eight-digit hexadecimal number and see the bit pattern.
When they are in contact? Care to elaborate it, or could you just send some link to this phenomenon. I don't know what wording I should use to search for it on the internet
The synchronization is due to the Kuramoto coupling (a phase coupling in oscillators which you explained as the "urge"). The same phenomenon is behind fireflies flashing in sync or people applauding. I've spent a couple of years working on this and it's really great to see your enjoyment of discovering this by yourself :) Enjoy your experiments! en.wikipedia.org/wiki/Kuramoto_model
Edit: To be fair I think this is neat, I'm just making a nitpick. Further edit: Glad to see this generating so much discussion but keep it civil and remember there isn't one clear definition of complexity that's why it's a debate in the first place. :P Calling it complex emergent behavior doesn't seem right, the code used is literally designed to add a set value to each unit then reset to a ground state this behavior has no choice but to emerge based on that (it's designed by default to have emergent behavior but calling it complex is a stretch). It'd be a more fitting demonstration of complex emergent behavior if it was some random value that's added between 0-100% instead of just 10% then find consistent patterns emerge when they interact. (bit of a nit-pick I know)
This reminds me of a documentary I saw on fetal development. It showed how a few pulsating cells would connect together and their pulses would sync. Those cells would be the basis of the heart. Excellent work.
The algorithm is simple: each node runs circles, if it sees it's neighbor go trough start/finish, you jump forward 10% .. so in at most 10 cycles, you have caught up with your neighbor.
Agreed. I don't understand why the video is titled "complex emergent behavior" when it does exactly what it was intended to do and nothing more. It isn't even surprising behavior.
More than a decade ago, I wanted to use this concept for syncing microcontroller oscillators to generate properly timed polyphonic music among multiple little monophonic nodes (kind of like doing polyphonic midi music with each voice given to an independent device). I never did do it, but I might still tinker with it someday. Thanks for the reminder! :)
It is a well known synchronisation phenomenon that happens with coupled metronomes. Here the coupling between the modules is wireless with the condition that you mentioned.
I could have coded that in 329 lines (seat-of-the-pants guestimate), no sweat. But I'm an old-school bit-pusher. There would be not one extra unneeded clock cycle, though.
This is very well covered in the book SYNC by the mathematician Steven Strogatz who studied that kind of stuff. Btw great science communicator overall and host of the podcast The Joy of Y.
It is completely understandable that these converge within 10 cycles with 10% boost each time they see a peer flash. In the case of two units, they will each boost the other alternately by 10% each flash, and quickly close the gap to harmonized flashing. Starting out completely out of phase, 10 x 10% is 100% synchronized. Adding in a third, common to the two, one will sync and the other will catch up for the same reason, because each will boost twice in it's own cycle. If you changed to boost by 20% they would sync within 5 cycles, and if you changed to a 5% boost, they would sync within 20 cycles.
So for people who want to understand why they sync this may help: The code says: start counting from 0, every cycle add 1 to the counter, if the counter becomes 1000 (or more), then flash and start counting from 0 again. The other part says: if you see a neighbor nearby light up, increment the counter by 1/10th of its current value; this happens for each neighbor before starting a new cycle. So a few things to note here: 1. at the start of the cycle, each cycle only adds 1 to the power by itself 2. next if the power reaches 1000 or more it resets to 0 3. the last check to see if there are any nearby neighbors is the most important part - Least power scenario: if it just reached 1000 the power is now 0, seeing any amount of neighbors doesn't do anything because a 1/10th of 0 is still 0 - Most power scenario: the power just got to 999, there are 6 neighbors so it will end up at nearly 1600 power when it goes to add 1 and check if it's over 1000 on the next cycle - Exact power scenario with 6 neighbors: It can hit 1000 if it is currently at 625 and has 6 neighbors. Or: cycle + count of neighbors * (1/10 * cycle) = 1000. Solve for the cycle for the given amount of neighbors. - In any scenario, this has a substantial weight compared to the 1 power it obtains at the beginning. There are a couple important questions to wonder too: - How quick/often are the cycles? - Does a node always see its neighbor when nearby for every cycle? Is it only when lit up; how much lit up? I believe that once within range it always sees that neighbor and every cycle then increases at an exponential rate. It can go over 1000 when checking its neighbors but then will be reset to 0 on the next cycle. There must be a mathematical equation to prove out that taking 1/10 of the current power (if it's near another) will eventually sync them. One will be going faster, it will flash and reset to 0 now while the other increases faster, until eventually they flash at the same time and now have the same cycle parameters as one another. Someone mentioned a PLL zipcpu.com/dsp/2017/12/14/logic-pll.html
This is also how some species of fireflies blink synchronously! It's kinda magical to watch 1000s of them blinking almost together. Do visit Smokey mountains (those who live in the US) during summer when to watch them. :)
@Wulcrit is he correct though? what he says may be true for any two given tiles. but given n tiles in a random arrangement can you still say this is true? how is it only one pulse gets adapted? Couldnt there be two or three independent groups that are unable to synch bc the members of each group keep each other in their own beat? what about signal delay between the tiles? does it matter? will a chain of any length be able to synch? what about a ring? which of the pulses will be chosen as a common pulse? i wouldnt say he is correct. he has stated the principle of interaction between two tiles. sure. but the emergent behaviour of larger groups of tiles could be counter-intuitive or even chaotic
reminds me of John Conway's "game of life" where state of one cell is determined by the state of it's neighbors. there is something beautiful in emergent complexity :)
Jerzy, EXACTLY! GOL is a simple rule but causes amazing outcomes! You might really like some emergent behaviour videos I've been making, "heartbeats & blood flow". Come on over sometime and see what I'm working on.
its a behavior that emerges from a simple set of rules that don't specifically tell it to do that. So its the definition of emergent. Just like how a school of silverfish swims causing an emergent behavior the fish arn't aware of that trick predictors with their dazzling lights and swift movements.
This interests me on a mathematical level. I wonder if it can be proven mathematically that the system converges to synchronization. Perhaps it can be modeled by a Markov process?
Yeah, there is a model for this called the Kuramoto Oscillator, and it's pretty much the paradigmatic model for all synchronization phenomena. It's been studied in terms of ODEs, PDEs, and SDEs (diff eqs with Gaussian noise) for all different kinds of initial conditions including some with parameter variation.
This is how pacemaker cells work. Individually they randomly pulse, but in groups they communicate via simple chemical signals and eventually pulse together in rhythm, creating a heartbeat.
Am i missing something? What is special about this? If one panel blinking encourages another to blink, eventually they will blink together. Seems obvious to me.
@@bigjoshlevine idk, personally for me the smaller the code, the less movements is required to see more of it - the easier it could be read. Personally i prefer to write a comment in case i feel strong urge to make an empty line anywhere but between the functions) comment at least tells why those are separate blocks of code
But then you're missing the purpose of empty lines: to group things. Without grouping things together, there is no spacing things out. No empty lines is as spaced out as all empty lines.
I didn´t realize I had post-rock playing in the background. It made everything more dramatic, like this was going to be the beginning of the end for civilization
@/X/EN It's just elegant that such simple mathematics is powerful enough to describe this complex phenomenon. It's doesn't really jump out at first glance that this is what will happen, now does it?
@@dancoulson6579 I'm wondering if this idea would work generally for synchronizing clocks with arbitrary connection latency, probably the system would fine some non-synched equilibrium?
@@WilliamBarksdale Thats interesting. I wonder if they would phase in and out given the delay. By what ive been thinking they reach the same frequency when each one receives a signal at the same time. I would propose that if one had latency and the other hadn't they would indeed phase in and out. However if both did(or in this case all five of them did) I would propose they would reach and maintain the same frequency. Not sure...
theyd likely all still sync up unless they have different time periods of latency. If they are separate by the same amount then it should still sync id expect. Would be nice if he linked the code so ppl can try it.
@@ThePC007 I was in a bad emotional space last night. Seeing these guys be able to perfectly understand and sync-up with one-another made me feel better about things. These lil guys have a perfect sense of interpersonal unity - it's literally all they know.
Exactly. At the end of the 80's, I used to build light chasers for rock concerts. The drum acted as the trigger. If we modified the input to be a light sensor instead of a microphone, the exact same thing would happen. This model needs more complexity before it even approaches alife's emergent behaviour. For now, it is merely doing exactly what you'd expect it to do by reading the code - see a light, eventually reach 100% (in 10% increments) trigger rate. The way we built the light chasers purposely *avoided* this by simply randomizing the sensitivity instead of boosting each channel identically - otherwise it'd be quite a boring light show.
From networks to game theory to collective behavior, to all of it, the universe somehow wants order, maybe even entropy is a complex emergent system too.
@@ilayws4448 The cool thing is that there are lots of simple rules that *wouldn't* work. For example, "Blink when your neighbor blinks" would just descend into chaos as they all blink over and over rapidly. "Blink 10% sooner" wouldn't work -- you would see your neighbor blink so you'd speed up by 10% but then they'd see you blink so they'd speed up by 10% and you'd both just end up blinking 10% faster but still out of sync. "Increase your urge to blink by 10%" does work though and that's cool. It's a simple and symmetric law that causes asymmetric behavior: if you're behind your neighbors you speed up and if you're ahead you slow down despite both you and your neighbors running the same simple code.
@@OMGclueless I agree with you completely; I personally find the rule quite interesting, especially considering it seemed to be inspired by fireflies, but I still think the adjectives used in the video title are misleading.
I think the more "surprising" part is that it will not only blink together but actually synchronize. (As in, it's not a cascading effect but rather a blink in near unison.)
@@dannygjk Not sure if you meant that as "What you didn't understand" or "Missed from your explanation" but I did grasp that it wasn't coded to sync. What's I'm saying is more that the rule set forth as a tendency to lead to complete sync, where all the lights go at near exact same time, rather than very close.
@@Volvary My comment is for the OP of this thread. If your name is in the beginning of a comment then it's directed at you. If there is no name normally it means it is directed at the OP of the (sub)thread.
This behaviour can also be seen in fireflies that synchronize their firings. Look for a paper called “Synchronization of pulse-coupled oscillators on (strongly) connected graphs” by Núñez et. al. For an explanation on why this happens. Cheers.
It really is amazing that under simple rules a system can spontaneously synchronize... It's a universal phenomenon that occurs when two or more oscillators interact: a system of coupled oscillators. Depending on certain parameters like frequencies and coupling coefficients, there will be or not be synchronization. www.scholarpedia.org/article/Synchronization
Did the 1K like :> Anywho, AMAZING. Demonstrates how simple things can emerge into extremely complex and intricate behaviour. All dependant on one very simple thing, splitting itself against many things to create a complex rule.
What's amazing is it's elegance and decentralized design. There isn't some common clock that the "bots" are using to synchronize. Through emergent behavior, each one is individually and asymptomatically reaching consensus. I could see this being useful for scenarios where synchronizing frequencies is difficult for complex systems. Suppose, for example, you wanted to transfer power between two or more power grids. Those grids run on AC, so you can't just tie some wires together between the grids because if the waveforms are out of sync it would cause a short. So instead you need to synchronize the grid frequencies and phases to have them operate in unison. This is one way you could do that automatically.
I don't see any "amazing", "emergent", "behavior" or "complex" about it either. It's like the simplest imaginable feedback loop, what would you expect to happen if you define self-reinforcing rules like this? I suppose it only amazed him because of the physical devices that work by proximity and blinkenlights? Boring af if you just simulate or even think for 2 seconds about it.
My favorite kinda stuff! The RUclips recommendation algorithm knows me too well lol (this isn't quite the type chaotic emergent behaviour like the game of life of mandelbrot set or any of the chaos theory stuff I've been interested in lately, but I definitely see the common thread and why you're excited about it!). Just be careful not to make them group up into a world-ending Von Neumann machine next lol.
A O Rules by nature seldom vary, but in our case I think there is a case for rules that we don’t understand, under the control of a higher authority. Those rules are exactly what I want to know. Not merely the rules of physics which is a challenge indeed, but of the hierarchy, which must exist between all species.
TotallyCarbon Depends on who’s rules. Is nature natural? Division by who what how many..? 3 meter tall people with elongated skulls red hair transfixed on Orion roamed vast areas of Earth by sea and land, leaving a legacy of culture technology art science and theology.
And if instead you make them speed up if the other liight was after them, and slow down if it was before them, phase relative and can you model a more complex cellular automata? build a few with some proton, neutron, electron relationship characteristics and you can model the formation of stuff out in deep space
"Urge" is just a number that each keep track of internally. Normally it just slowly increases in value until it hits a maximum value, at which point the tile will blink and then reset the "urge" back to zero and start the process over again. But.. if a tile sees another nearby tile blink, then it will increase its current "urge" level by an amount that is proportional to the current amount of urge. This is where the magic happens! If it recently blinked, then its urge will be low and so seeing another tike blink will have little effect. But if it has been a while since it last blinked and its urge has grown pretty high, then seeing another tile blink will have a big effect and make its own urge grow by a lot. The closer it is to getting the urge to blink, the more likely seeing another tile blink with push it over the edge so it also blinks! Make sense?
It's been proven to be anecdotal. Given different frequency of girls living togethet, over time there will an instance where the frequency will seems like it is catchinh up and sync. But then it will get out of synch and start to get further way. It also make sense because otherwise girl dorminatory will need special bulk delivery if it does sync over time 😅
Reminds me of the phenomenon of clapping at any event-we all begin by clapping at different speeds, but in a few seconds' time, all the claps have ended up getting synchronized at the same speed!
I wouldn't say he discovered it. He studies it, for sure, and he's made a specific model of it. But this has been known for some time now. Add one more sensor and/or response, or a more complex rule for the increase in urge, and you'll be getting into alife and cellular automata.
Can we install this in cars so that at stop lights eventually every cars' blinkers will be flashing in unison?
god please
You’re thinking in the right direction. I’m sure this exact type of research is going to lead to all sorts of amazing tech like that!
That's actually an amazing idea
Turn signals are actually intended to all blink at different rates and _not_ be in sync because if they were in sync the sight could become mesmerising (and thus distracting).
I’m thinking more along the lines of keeping every car from hitting another car. Let’s say, if every car has one of these bad boys in every corner, they could maybe purposely repel vehicles away from other vehicles or use brakes/turning/acceleration to steer clear of accidents ETC. Computers think and operate on the millisecond level, and can react SO much quicker than humans. If cars could automatically detect and avoid accidents, working together as machines to keep us safe, that would be an awesome place for these to be.
"I understand the code, I even wrote the code" - one does not necesarilly follow from the other :)
code doesn't work: "but why?"
code works: "but WHY?"
@@alperbasar1639 sounds like engineer to me
Depends on your definition of "to write". If you define "to write" as "tracing letters together with a pen or with a keyboard", then yes the second proposition does not necesserallly follows from the first. But if you define "to write" as "come up with a text and inscribe it with a pen or a keyboard", then writing does presupose understanding.
@@Karakta Trust me, nearly every programmer can tell you a story of having written a programm that, by all accounts, should not have worked but still did so for reasons beyond their comprehension.
@@maxireigl1919 If I refer strictly to what you said, what is beyond their comprehension are the reasons why what they have written works, not what they have written itself.
In fact, if they had not understood what they have written, then they would not be surprised as to why it works.
"i understand how it works, i even wrote the code to make it work, but when i turn it on and it works, i am still shocked and amazed"
-Basically every programmer
Are you stupid? I make anything logical and nothing WORKS in the first place
I was the 256th like. :)
@@skyeshoe.223 I was 517th and I'm sad it wasn't 512th
ROFL, I resemble that remark. Particularly when working a particularly gnarly bit of logic, and you see it actually execute correctly the first time.
@@skyeshoe.223 I see what you did there. I just missed being #512, at 521. Sigh. After being retired for seven years, I can still look at an eight-digit hexadecimal number and see the bit pattern.
That is how heart cells work. They will beat but become in unison when they are in contact
Thanks, big brain.
Also that is how the fireflies synchronize their lighting. Good example showing simple rules to build complexity within nature.
When they are in contact? Care to elaborate it, or could you just send some link to this phenomenon. I don't know what wording I should use to search for it on the internet
Syncetium
Not exactly, if they out of sync like these before they sync .. u got urself an arrhythmia!
Imagine finding all your homies and blinking together and then getting reset
It's Monday again
lol, thanks debbie downer
such drama
They have the urge to blink... "GODDAMNIT LET ME BLINK ALREADY - AHHH that was great, OH PLS AGAAAIN"
I imagine it's more like trying to keep your eyes closed
Is that an SCP reference?
Awer Tyuiop “Clear” “Clear” *blinks*
What in the *[F U C K]* Is no one gonna talk about that obvious innuendo
@@eadweard2214 yeah let's talk about his obvious innuendo issues and make him feel more insecure. smh.
The synchronization is due to the Kuramoto coupling (a phase coupling in oscillators which you explained as the "urge"). The same phenomenon is behind fireflies flashing in sync or people applauding. I've spent a couple of years working on this and it's really great to see your enjoyment of discovering this by yourself :) Enjoy your experiments!
en.wikipedia.org/wiki/Kuramoto_model
"The Sky is falling!" - Chicken Little, from the movie Chicken Little. These things look like the panel that hit Chicken Little on the head.
You're right! Now just to coat it with an invisibility cloak.
@blindwillie99 yes
Woah! - Morcubine Porcupine
For those who didn't get the reference (like me!)...
ruclips.net/video/PPuk2JQgMkU/видео.html
Interestingly I thought of that too
Edit: To be fair I think this is neat, I'm just making a nitpick.
Further edit: Glad to see this generating so much discussion but keep it civil and remember there isn't one clear definition of complexity that's why it's a debate in the first place. :P
Calling it complex emergent behavior doesn't seem right, the code used is literally designed to add a set value to each unit then reset to a ground state this behavior has no choice but to emerge based on that (it's designed by default to have emergent behavior but calling it complex is a stretch). It'd be a more fitting demonstration of complex emergent behavior if it was some random value that's added between 0-100% instead of just 10% then find consistent patterns emerge when they interact. (bit of a nit-pick I know)
Completely agree
This concept is called the Kuramoto Oscillator, and I think there is an exact solution for Gaussianly distributed periods of oscillation.
@@robertmines5577 I understand some of those words
@@deoxal7947 Honestly whenever that happens to me I think "I'm so proud of myself for understanding at least half of that sentence"
Agree. The original video is "Hey, I designed things to sync their cycles. Watch this AMAZING video!" and then, the cycles sync. How is this amazing?
Who else thought the tiles were going to attach together when they were separate?
Straight up thought they had magnets that were gonna snap together in a specific pattern.
Yeah me too
Me! lol
Sshhh.. that one's for version 2.0
Me too
"5 lines of code" = an entire page. Wish it was that way for essays.
it's a way of saying it's an easy code
Its literally 5 lines of code, you dont count descriptions.
5 lines of active code. The rest is descriptions and for the light color.
an essay is likely way easier to write than that one page of code.
@@nickmagrick7702 Debatable. That depends on what you're coding.
When you write code for the first time and it doesn't break, everyone is shocked and amazed.
I've always heard that called a Programming Headshot.
This reminds me of a documentary I saw on fetal development. It showed how a few pulsating cells would connect together and their pulses would sync. Those cells would be the basis of the heart.
Excellent work.
2:17 the cry of satisfaction of every engineer, programmer, nerds, tinkerers ETC when their shit works flawlessly 😂😂
The algorithm is simple: each node runs circles, if it sees it's neighbor go trough start/finish, you jump forward 10% .. so in at most 10 cycles, you have caught up with your neighbor.
Agreed. I don't understand why the video is titled "complex emergent behavior" when it does exactly what it was intended to do and nothing more. It isn't even surprising behavior.
I wish i was this genius. Some day
Based on the title I thought it had somethhing to do with Conway's Game of Life or something related
@@rykehuss3435 Exactly my initial thoughts.
what if there are two neighbors with very different cycles?
imagine using this to sync sound, like they blink and emit a loud sound so eventually they will sync the sound to be super loud
And it would be like War of the Worlds
This is a must to do
@@saillively synesthesia?
More than a decade ago, I wanted to use this concept for syncing microcontroller oscillators to generate properly timed polyphonic music among multiple little monophonic nodes (kind of like doing polyphonic midi music with each voice given to an independent device). I never did do it, but I might still tinker with it someday. Thanks for the reminder! :)
I just realized you used move38, the modular electronic boardgame platform
would be interesting to see them move towards the direction where there are most blinks or something
It is a well known synchronisation phenomenon that happens with coupled metronomes. Here the coupling between the modules is wireless with the condition that you mentioned.
So they synced their periods, too
I see what you did there 😁
the urge to bleed increases when they see another one bleed.
Wait, what does it have to do with menstrual cycle?
@@ikagura period simply means a time interval. The menstrual cycle is also a time interval of 28 days (in average), hence a period :)
@@ikagura Well, the blinking things in the video synchronized their periods of blinking just like en.wikipedia.org/wiki/Menstrual_synchrony :^)
Dude I heard about this paper on Sean Carroll's podcast and instantly recognized the concept, such a cool implementation!
I have no idea how I ended here from a video about cats.
Build a set of these and trigger them in front of your cat. Obviously video the results. WIN!
That's the youtube experience for ya!
The fact that you managed to create them with such short code is awesome man. You’re a genius
I could have coded that in 329 lines (seat-of-the-pants guestimate), no sweat. But I'm an old-school bit-pusher. There would be not one extra unneeded clock cycle, though.
The algorithm smiles on you, sir.
You just got a new sub.
I like how you simply yet very accurately discribed the algorithm
2020: robots get the yawn reflex
I yawned just from scrolling past this comment
This is very well covered in the book SYNC by the mathematician Steven Strogatz who studied that kind of stuff. Btw great science communicator overall and host of the podcast The Joy of Y.
It is completely understandable that these converge within 10 cycles with 10% boost each time they see a peer flash. In the case of two units, they will each boost the other alternately by 10% each flash, and quickly close the gap to harmonized flashing. Starting out completely out of phase, 10 x 10% is 100% synchronized. Adding in a third, common to the two, one will sync and the other will catch up for the same reason, because each will boost twice in it's own cycle. If you changed to boost by 20% they would sync within 5 cycles, and if you changed to a 5% boost, they would sync within 20 cycles.
That's beautiful, man. Electronics and programming are awesome
'Surround yourself with people you would like to emulate', in code.
doncorleon9 what happens if you put face masks on them and plexiglass in between them?
What a good example of emergent behavior! I love it. It makes you think what rules are in our own minds that cause emergent behaviors...
So for people who want to understand why they sync this may help:
The code says: start counting from 0, every cycle add 1 to the counter, if the counter becomes 1000 (or more), then flash and start counting from 0 again.
The other part says: if you see a neighbor nearby light up, increment the counter by 1/10th of its current value; this happens for each neighbor before starting a new cycle.
So a few things to note here:
1. at the start of the cycle, each cycle only adds 1 to the power by itself
2. next if the power reaches 1000 or more it resets to 0
3. the last check to see if there are any nearby neighbors is the most important part
- Least power scenario: if it just reached 1000 the power is now 0, seeing any amount of neighbors doesn't do anything because a 1/10th of 0 is still 0
- Most power scenario: the power just got to 999, there are 6 neighbors so it will end up at nearly 1600 power when it goes to add 1 and check if it's over 1000 on the next cycle
- Exact power scenario with 6 neighbors: It can hit 1000 if it is currently at 625 and has 6 neighbors. Or: cycle + count of neighbors * (1/10 * cycle) = 1000. Solve for the cycle for the given amount of neighbors.
- In any scenario, this has a substantial weight compared to the 1 power it obtains at the beginning.
There are a couple important questions to wonder too:
- How quick/often are the cycles?
- Does a node always see its neighbor when nearby for every cycle? Is it only when lit up; how much lit up?
I believe that once within range it always sees that neighbor and every cycle then increases at an exponential rate. It can go over 1000 when checking its neighbors but then will be reset to 0 on the next cycle. There must be a mathematical equation to prove out that taking 1/10 of the current power (if it's near another) will eventually sync them. One will be going faster, it will flash and reset to 0 now while the other increases faster, until eventually they flash at the same time and now have the same cycle parameters as one another.
Someone mentioned a PLL
zipcpu.com/dsp/2017/12/14/logic-pll.html
Thanks for the explanation!
Synchronization due to nonlinear interaction is a ubiquitous physical phenomenon. Very interesting demonstration
me: chillin youtube: wanna see some tiles blink?!?!?!
Everybody gangsta till tiles start synching
This is also how some species of fireflies blink synchronously! It's kinda magical to watch 1000s of them blinking almost together. Do visit Smokey mountains (those who live in the US) during summer when to watch them. :)
I mean, if A blinks before B, B will decrease the offset between the two, sounds pretty obvious to me.
easy there big brain
@Wulcrit i was being sarcastic 🤦♂️
@Wulcrit k buddy
@Wulcrit is he correct though? what he says may be true for any two given tiles. but given n tiles in a random arrangement can you still say this is true? how is it only one pulse gets adapted? Couldnt there be two or three independent groups that are unable to synch bc the members of each group keep each other in their own beat?
what about signal delay between the tiles? does it matter? will a chain of any length be able to synch? what about a ring? which of the pulses will be chosen as a common pulse?
i wouldnt say he is correct. he has stated the principle of interaction between two tiles. sure. but the emergent behaviour of larger groups of tiles could be counter-intuitive or even chaotic
You missed the point. He didn't explicitly program the tiles to synchronize.
Thank you foe putting the paper in the description
_it's just one line here_
_actually a call to an entire ML library_
loss.backward() XD
The url looks like it was commented out if that's what you were referring to.
@@alexsiryj Nah, it's a common line of code in pytorch (a python ML toolkit ) that is used to start a very complicated calculation.
I'm really not tech savvy at all, but things like this truly fascinate me. This was beautiful.
reminds me of John Conway's "game of life" where state of one cell is determined by the state of it's neighbors. there is something beautiful in emergent complexity :)
Jerzy, EXACTLY! GOL is a simple rule but causes amazing outcomes! You might really like some emergent behaviour videos I've been making, "heartbeats & blood flow".
Come on over sometime and see what I'm working on.
are you talking bout corona mate?
Rizki Aprita No lol. Look up Conways Game of Life.
Really neat. Reminds me of the metronomes on a wobbly table experiment where they all become perfectly in time.
This arguably isn't emergent, and certainly isn't complex emergence
Yeah it's more like multiple pendulums which sync after a while
its a behavior that emerges from a simple set of rules that don't specifically tell it to do that. So its the definition of emergent. Just like how a school of silverfish swims causing an emergent behavior the fish arn't aware of that trick predictors with their dazzling lights and swift movements.
@@Gueppelol thats also emergent behavior.
It is emergent.
Me, a degenerate: Ah yes, that cursed code~
This man is on the brink of a revolution
This interests me on a mathematical level. I wonder if it can be proven mathematically that the system converges to synchronization. Perhaps it can be modeled by a Markov process?
as seen it was increased by 10 percent of its urge so the system is stable and convergence
You know the inherent rate which is constant, which makes everything else linear and lastly convergent because the change is constant.
If you want a paper this will probably do your fancy, www.clear.rice.edu/comp551/papers/MirolloStrogatz-TemporalSynchronization-SIAM1990.pdf
Yeah, there is a model for this called the Kuramoto Oscillator, and it's pretty much the paradigmatic model for all synchronization phenomena. It's been studied in terms of ODEs, PDEs, and SDEs (diff eqs with Gaussian noise) for all different kinds of initial conditions including some with parameter variation.
You don't seem to have much mathematical knowledge to write somethine like that.
This is how pacemaker cells work.
Individually they randomly pulse, but in groups they communicate via simple chemical signals and eventually pulse together in rhythm, creating a heartbeat.
Am i missing something? What is special about this?
If one panel blinking encourages another to blink, eventually they will blink together. Seems obvious to me.
Basically he recreated the heart cell.
He didn't code them to sync that's what's special about it.
What an interesting experiment you are showing.
you're almost leaving every other line empty
Code should be clear and easy to read - spaces are free! :)
@@bigjoshlevine idk, personally for me the smaller the code, the less movements is required to see more of it - the easier it could be read. Personally i prefer to write a comment in case i feel strong urge to make an empty line anywhere but between the functions) comment at least tells why those are separate blocks of code
@@bigjoshlevine It isn't clean at all when you do that. It's barely better than no newlines at all.
But then you're missing the purpose of empty lines: to group things. Without grouping things together, there is no spacing things out. No empty lines is as spaced out as all empty lines.
empty lines are to increase readability. the man finds it easier to read his code with every other line empty, what's wrong with that?
I didn´t realize I had post-rock playing in the background. It made everything more dramatic, like this was going to be the beginning of the end for civilization
For a few seconds I thought this would be an allusion to Stephen Wolfram
This is awesome!!!! I also plan to do a hexagon PCB LED project... and randomly found your video .....
From the rules he wrote them , isn't it inevitable they synch??
I know nothing about coding, only wondering.
Yes
Alternative title: man amazed by basic maths.
Cool devices tho
@@tahunuva4254 not amazed by the math itself per se. Amazed by the fact that such simple math describes such amazing phenomena.
@/X/EN It's just elegant that such simple mathematics is powerful enough to describe this complex phenomenon. It's doesn't really jump out at first glance that this is what will happen, now does it?
@/X/EN it's simple and efficient, therefore, elegant. Is that weird to be amazed ?
Sometimes less is more, or at least enough. Thanks for sharing. God bless
?? Seems predictable to me. It might be emergent but there is no mystery to it.
Just like life, with a few simple laws, complex patterns will eventually emerge out of seemingly randomness and chaos.
except when you consider this same principle applies to large systems and even animal behavior.
RUclipss algorithm seems to be fixed. It's recommending me some good stuff
“5 lines of code”
5 methods call 5000 lines each
Very Fascinating
I love it.
what would happen if you introduced latency between "seeing" the other ones blink?
Given enough tiles, there'd be a kind of mexican wave effect.
@@dancoulson6579 I'm wondering if this idea would work generally for synchronizing clocks with arbitrary connection latency, probably the system would fine some non-synched equilibrium?
@@WilliamBarksdale Thats interesting. I wonder if they would phase in and out given the delay. By what ive been thinking they reach the same frequency when each one receives a signal at the same time. I would propose that if one had latency and the other hadn't they would indeed phase in and out. However if both did(or in this case all five of them did) I would propose they would reach and maintain the same frequency. Not sure...
theyd likely all still sync up unless they have different time periods of latency. If they are separate by the same amount then it should still sync id expect.
Would be nice if he linked the code so ppl can try it.
Such an awesome display of coding and technology. It is surreal.
Well, the rule you implemented is just like a PLL!
It is. It would be interesting to increase the blink frequency and see at what point this becomes unstable.
Humanity can learn a lot from these about unity and compassion.
More about mathematics, or perhaps even computer science to some degree (I guess?). But this has nothing to do with compassion, lol.
@@ThePC007 I was in a bad emotional space last night. Seeing these guys be able to perfectly understand and sync-up with one-another made me feel better about things. These lil guys have a perfect sense of interpersonal unity - it's literally all they know.
So if you increase the urge to power/3, do they sync in 3 blinks?
Presumably.
You could just say that when you see your neighbor blink, immediately blink.
Exactly. At the end of the 80's, I used to build light chasers for rock concerts. The drum acted as the trigger. If we modified the input to be a light sensor instead of a microphone, the exact same thing would happen. This model needs more complexity before it even approaches alife's emergent behaviour. For now, it is merely doing exactly what you'd expect it to do by reading the code - see a light, eventually reach 100% (in 10% increments) trigger rate. The way we built the light chasers purposely *avoided* this by simply randomizing the sensitivity instead of boosting each channel identically - otherwise it'd be quite a boring light show.
From networks to game theory to collective behavior, to all of it, the universe somehow wants order, maybe even entropy is a complex emergent system too.
My man is gonna accidentally make the first sentient AI
I needed this today. Thank you.
Their behavior isn't surprising, "AMAZING" or "complex" at all, I cant tell if the title is clickbait or I'm missing something.
Yeah, he's pretty much just telling them "If a neighbour blinks, speed up your current cycle to blink sooner" why is he surprised
I agree, I'm not really sure I'd call this behavior "complex"
@@ilayws4448 The cool thing is that there are lots of simple rules that *wouldn't* work. For example, "Blink when your neighbor blinks" would just descend into chaos as they all blink over and over rapidly. "Blink 10% sooner" wouldn't work -- you would see your neighbor blink so you'd speed up by 10% but then they'd see you blink so they'd speed up by 10% and you'd both just end up blinking 10% faster but still out of sync. "Increase your urge to blink by 10%" does work though and that's cool. It's a simple and symmetric law that causes asymmetric behavior: if you're behind your neighbors you speed up and if you're ahead you slow down despite both you and your neighbors running the same simple code.
@@OMGclueless I agree with you completely; I personally find the rule quite interesting, especially considering it seemed to be inspired by fireflies, but I still think the adjectives used in the video title are misleading.
@@OMGclueless thanks for the great explanation, it seems there's definitely more here than I'd first thought
Pretty straight forward
Any random value bigger than 0 will go to 1 if multiplied by 1.1^10 so it is pretty obvious they will quickly sync.
So, basically a tile will want to blink when it's neighbor blinks? Seems logical that they would all start blinking together.
I think the more "surprising" part is that it will not only blink together but actually synchronize. (As in, it's not a cascading effect but rather a blink in near unison.)
@@Volvary yep
The point you are missing is he did not program them to sync.
@@dannygjk Not sure if you meant that as "What you didn't understand" or "Missed from your explanation" but I did grasp that it wasn't coded to sync. What's I'm saying is more that the rule set forth as a tendency to lead to complete sync, where all the lights go at near exact same time, rather than very close.
@@Volvary My comment is for the OP of this thread. If your name is in the beginning of a comment then it's directed at you. If there is no name normally it means it is directed at the OP of the (sub)thread.
This behaviour can also be seen in fireflies that synchronize their firings. Look for a paper called “Synchronization of pulse-coupled oscillators on (strongly) connected graphs” by Núñez et. al. For an explanation on why this happens. Cheers.
Can you show us the full code? I'm not sure how exactly it works from your description
A quick version of the code here...
forum.move38.com/t/cool-looking-synchronizing-firefly-demo/426
@@bigjoshlevine Nice, thanks
it is truly magical sir , well done ,great job.
Next episode:
Simple coding takeovers the world
It really is amazing that under simple rules a system can spontaneously synchronize... It's a universal phenomenon that occurs when two or more oscillators interact: a system of coupled oscillators. Depending on certain parameters like frequencies and coupling coefficients, there will be or not be synchronization. www.scholarpedia.org/article/Synchronization
Did the 1K like :>
Anywho, AMAZING. Demonstrates how simple things can emerge into extremely complex and intricate behaviour. All dependant on one very simple thing, splitting itself against many things to create a complex rule.
I aggree, simple code, simple behaviour, but very nice to watch and still very interesting effect. Great video :)
"I've programmed them to want to blink together and now they blink together, wow, that's like magic", seriously?
lmao literally this.
This is how the whole Replicator mess started. Next evolutionary step is to make them move and connect with each other to form a bug.
Why would you be surprised by this at all? There's only one way to go in the function which is up?
What's amazing is it's elegance and decentralized design. There isn't some common clock that the "bots" are using to synchronize. Through emergent behavior, each one is individually and asymptomatically reaching consensus.
I could see this being useful for scenarios where synchronizing frequencies is difficult for complex systems. Suppose, for example, you wanted to transfer power between two or more power grids. Those grids run on AC, so you can't just tie some wires together between the grids because if the waveforms are out of sync it would cause a short. So instead you need to synchronize the grid frequencies and phases to have them operate in unison. This is one way you could do that automatically.
Up to what? There is no roof, there is no sync pulse or clock. It's pretty amazing.
I don't see any "amazing", "emergent", "behavior" or "complex" about it either. It's like the simplest imaginable feedback loop, what would you expect to happen if you define self-reinforcing rules like this? I suppose it only amazed him because of the physical devices that work by proximity and blinkenlights? Boring af if you just simulate or even think for 2 seconds about it.
@@toffeethedev that is not the rule
I believe this is same emergent property that causes all the clocks in clock shops to sync up their second hands?
What? Clocks don't communicate between each other in any way so no. That's just whoever set them -.-
that’s a good one :D
it's doing exactly what you told it to
No the syncing is emergent. He did not explicitly program them to all sync.
@@dannygjk I disagree but its still cool
My favorite kinda stuff! The RUclips recommendation algorithm knows me too well lol (this isn't quite the type chaotic emergent behaviour like the game of life of mandelbrot set or any of the chaos theory stuff I've been interested in lately, but I definitely see the common thread and why you're excited about it!). Just be careful not to make them group up into a world-ending Von Neumann machine next lol.
Life is an emergent behavior.
but how many rules are being applied. do these different rules intersect? do the rules change?
A O Rules by nature seldom vary, but in our case I think there is a case for rules that we don’t understand, under the control of a higher authority. Those rules are exactly what I want to know. Not merely the rules of physics which is a challenge indeed, but of the hierarchy, which must exist between all species.
@@memyselfandi8544 hierarchy is an emergent behaviour, not the rules.
TotallyCarbon Depends on who’s rules. Is nature natural? Division by who what how many..? 3 meter tall people with elongated skulls red hair transfixed on Orion roamed vast areas of Earth by sea and land, leaving a legacy of culture technology art science and theology.
That is actually really cool. Thanks for sharing
And if instead you make them speed up if the other liight was after them, and slow down if it was before them, phase relative
and can you model a more complex cellular automata? build a few with some proton, neutron, electron relationship characteristics and you can model the formation of stuff out in deep space
Can anyone explain what the 'urge' is and how it works?
"Urge" is just a number that each keep track of internally. Normally it just slowly increases in value until it hits a maximum value, at which point the tile will blink and then reset the "urge" back to zero and start the process over again. But.. if a tile sees another nearby tile blink, then it will increase its current "urge" level by an amount that is proportional to the current amount of urge. This is where the magic happens! If it recently blinked, then its urge will be low and so seeing another tike blink will have little effect. But if it has been a while since it last blinked and its urge has grown pretty high, then seeing another tile blink will have a big effect and make its own urge grow by a lot. The closer it is to getting the urge to blink, the more likely seeing another tile blink with push it over the edge so it also blinks! Make sense?
affirm you just built the base of an energy shield...
Congratulations. You’ve invented the Christmas lights.
Now we know why when women live together their menstrual cycles sync.
This is so interesting to me.
Says *5 lines* of code shows a whole page
there is like 4 lines of whitespace between each line of code though
Most green lines are comments.....has no use just there for user understanding
stephen wolfram is happy with you
Nobody:
Menstrual cycles:
Why did you remind me of that... thing (the *sync* )
It's been proven to be anecdotal. Given different frequency of girls living togethet, over time there will an instance where the frequency will seems like it is catchinh up and sync. But then it will get out of synch and start to get further way. It also make sense because otherwise girl dorminatory will need special bulk delivery if it does sync over time 😅
Reminds me of the phenomenon of clapping at any event-we all begin by clapping at different speeds, but in a few seconds' time, all the claps have ended up getting synchronized at the same speed!
The moment when 5 lines of code are better at cooperation than the entire human race.
It's almost like computers aren't people
You know that "shocked" is used when you see something horrible happen, don't you? Anyway, beautiful synergy!
Oh my dude, wait till you try hanging 5 randomly oscillating pendulums on the same string
Thank YOU soooo much for this bro!!! WAYYYY UNDERSTAND AUTOMATA NOW
The guy who discovered this talks about it here...
ruclips.net/video/B7DxSTu4pzA/видео.html&t=1047
I wouldn't say he discovered it. He studies it, for sure, and he's made a specific model of it. But this has been known for some time now. Add one more sensor and/or response, or a more complex rule for the increase in urge, and you'll be getting into alife and cellular automata.
How dare this man feed these poor machines' blinking addiction.