Solving the "Lights Out" Problem

  Рет қаралды 137,708

Physics for the Birds

Physics for the Birds

Күн бұрын

Ever run into this funny little puzzle? It appears in Legend of Zelda: Link's Awakening, LEGO Star Wars: The Skywalker Saga, and in a 1995 electronic toy called Lights Out. It turns out that this game has some pretty rich math. In this video, we'll learn about modular arithmetic and the matrix inverse. We'll also learn about substitution ciphers in cryptography, including the Hill Cipher.
Become a Patreon member: / physicsforthebirds
0:00 Intro
1:58 The Problem
6:10 Some Cryptography
8:52 Solving Each Puzzle
11:07 Your Linear Algebra Professor Was Wrong
14:38 Conclusion
Jaap's Puzzles Lights Out: www.jaapsch.net/puzzles/lomat...
Turning Lights Out With Linear Algebra: people.sc.fsu.edu/~jburkardt/...
Lights Out Online: www.chiark.greenend.org.uk/~s...
Modular Matrices: "Cryptography: A Primer", Alan G. Konheim Chapter 3.14-3.17
Hill Cipher Summary: www.math.utah.edu/~gustafso/s...

Пікірлер: 333
@mrphlip
@mrphlip 4 ай бұрын
<a href="#" class="seekto" data-time="875">14:35</a> - "I'll leave it up to you to figure out of there are any more" When you try to Gauss-Jordan the matrix, you have a single row of zeros, so our null-space should have 1 dimension. Where, in this case, "1 dimension" means 3 options. The result is that only 1/3 of the initial starting states are solvable, and those that are solvable, are each solvable in 3 ways. You already mentioned the solutions [0, 1, 1, 2] and [2, 0, 0, 1], the third solution for our given starting state is [1, 2, 2, 0]. These are all achieved by taking any solution and repeatedly adding [1, 1, 1, 1], which has no net effect on the result.
@thecwd8919
@thecwd8919 4 ай бұрын
Brilliant
@memesalldayjack3267
@memesalldayjack3267 4 ай бұрын
i checked it, 0221 is a representation of how the puzzle looks like red blue blue yellow hit the 1st and all but the last change, hit the 2nd and all but the 3rd change, hit the 3rd and all but the 2nd change, hit the last and all but the 1st change 1st solution 1st column 0221 1022 1001 1001 2000 2111 2102 2111 2222 0200 2222 1211 2222 it checks out, nicely done i even repeated the 1111 solution 0221 1001 2102 0110 0221 it keeps resetting to 0221
@somegaiden
@somegaiden 4 ай бұрын
I got super interested in the math behind these puzzles exactly from the Color Dungeon puzzle, so it's really cool to see it solved so easily and elegantly by linear algebra, including figuring out how and when multi-solution states like this pop up. Undertale Yellow has a 1x5 Lights-Out puzzle, and since it was just 32 states I found them by hand. I found half of the states were unsolvable and the other half had 2 solutions (Each pair linked by hitting all but the center switch [1,1,0,1,1]), which fascinated me, but I didn't know how to prove it. (My lin algebra is quite rusty and I didn't think to use it for this). But just now after doing some quick Gaussian elimination, sure enough the row [0,0,0,0,0|1,1,0,1,1] popped up like clockwork Big takeaway from this video: Never underestimate linear algebra. You never know when it'll make a problem 10x easier
@ValkyrieTiara
@ValkyrieTiara 4 ай бұрын
I'm not much of a math person, but I do notice that if 1/3rd of states are valid and each state has 3 potential solutions, the result is still the "correct" number of solutions; ie the total solutions is the same as if ALL states were valid and had exactly ONE solution. I think that's pretty interesting!
@mrphlip
@mrphlip 4 ай бұрын
@@ValkyrieTiara Yep, because the number of possible starting states is 3^4 = 81 (there are four lights, each of which can be one of three colours). And the number of possible solutions is also 3^4 = 81 (there are four things to hit, each of which you can hit 0, 1 or 2 times). The two are very closely related.
@joehart3481
@joehart3481 4 ай бұрын
Oh golly. I was really excited to finally learn the general solution for these puzzles. Unfortunately, the part of my brain dedicated to linear algebra is deteriorating in a darkened basement with no stairs in a disused lavatory with a sign that reads "beware the leopard"
@gamemeister27
@gamemeister27 2 ай бұрын
Leper, as in someone with leprosy
@boraturan5652
@boraturan5652 4 ай бұрын
I hope to take your linear algebra class one day. It sounds fun.
@adrianbik3366
@adrianbik3366 4 ай бұрын
That assignment almost sounded like a threat :D
@pluieuwu
@pluieuwu 4 ай бұрын
same here!
@uselesscommon7761
@uselesscommon7761 4 ай бұрын
It is not
@a_soulspark
@a_soulspark 4 ай бұрын
​@@adrianbik3366 to me it sounded like a treat!
@Blancinnoir
@Blancinnoir 3 ай бұрын
I had no idea this would turn out to be a maths class, so I initially found this comment confusing lol
@mekafinchi
@mekafinchi 4 ай бұрын
About the outro, there's something of a fundamental shortcoming of education in that it's very difficult for most people to appreciate pure math. For most, you need to know what some mathematical tool does before you could appreciate it for what it is. But it's completely impractical to teach the applications before the tools they use - without the guarantee of preexisting knowledge of the tools, they'd have to be taught over and over during each application's course. But then to teach the tools in an application-agnostic way, no particular application can be explored in depth, and appreciation is left behind.
@TheMightyDozen
@TheMightyDozen 4 ай бұрын
counterpoint: not every person is a pure mathematician most STEM undergrads, when they go to learn, they expect to learn whatever field they're enrolled in, not some random math topic they may have never heard of so at best such a student would believe there's a reason they're learning the math they're given, and that they'll use it later, and at worst they think they're wasting their time and energy on an irrelevant topic usually the truth is somewhere in the middle, and of course i neglected the M of that STEM: when you have a mathematics undergrad they don't necessarily care about application, and would usually be more about learning math for leaning math's sake, and then there's no problem now the question is what about pre-college math...
@mekafinchi
@mekafinchi 4 ай бұрын
@@TheMightyDozenWe are in agreement. The typical student isn't going to see the applications when being taught the tools, and are thus disillusioned.
@flambambam3578
@flambambam3578 4 ай бұрын
I learned a lot of calc 3 in my intro physics course (as a physics major) before I took the actual class the next semester. Literally all that I remember (and still currently use) is what I was taught in that first class.
@danieljensen2626
@danieljensen2626 4 ай бұрын
I don't really think that's true though, in fact a lot of the applied math classes I took did include examples of why you might want to use a certain math tool, although some did that better than others. You can draw examples from any of the areas where the math topic is likely to be useful, and then it's more likely everyone will have at least one example that sticks with them. When I first took calculus our teacher set it up so we basically rediscovered calculus for ourselves. We started out by discussing some problem where we either needed to know the rate of change of something, or take a rate of change and figure out the total amount. We even started figuring out how we could approach the problems, and maybe started to figure out the answer for some simple case, and only then was he like "Just in luck, it turns out there already a tool for this, it's called a derivative/integral." I had almost not taken calculus because I didn't need it to graduate highschool. That teaching approach made me like math enough to go to college specifically to learn more math. Ended up double majoring in math/physics, and now I'm getting ready to schedule my dissertation defense for me physics PhD. All because of that teacher taking the time to show us why calculus was useful.
@elvinwisp
@elvinwisp 4 ай бұрын
​@@danieljensen2626Usually that's not the way math is taught, or at least in my experience. You're usually just taught what steps to do after other steps to get certain results, and it's not usually explained well enough to leave any lasting impression, sadly. It sounds like you got some great teachers and classes, though :]
@TheGodOfInsanty
@TheGodOfInsanty 3 ай бұрын
Man math is great, it takes something you instinctually completely understand, and makes it totally incomprehensible
@ohurspecial5404
@ohurspecial5404 4 ай бұрын
I am too excited for this silly number bird video
@rzeqdw
@rzeqdw 4 ай бұрын
The ending of this video resonated with me. In college, linear algebra was the only math course I got bad grades in. It just didn't make any sense to me But over time, through watching channels such as this one, playing around with computer stuff, and reading some free online textbooks, I have built something of an intuition for it. It turns out that math is just taught really poorly in a lot of places, and when you can instead get intuitive explanations, anchored by practical applications, it's a lot easier to learn something
@MarioMastar
@MarioMastar 3 ай бұрын
This. I flunked out of STEM and CS in undergrad (I do suspect racism may have been part of why but I won't get into that. One of the required professors did say "I will not pass his kind in my class" though), yet for 10 years I've been working in IT as a web developer and even a cloud developer for Microsoft for a few years with a Liberal Arts Degree. Personally I think that STEM should not be taught separately from Social Science, and in fact should better be mixed like my Masters program did. As if people don't know WHY we do the things we do and only teach the "WHAT" part, you fall into a lot of assumptions about the students that boil a logic class down to "Memorization and brute force". and all those math symbols fel more like gibberish at best and deliberately misleading for the sake of exclusion at worst. Though golly I will NEVER get the hang of matrix multiplication....and as a guy with a personal passion for image manipulation, I need to learn quick cause that's a MAJOR part of AI programming when it comes to images. Thank god for Python and people way smarter than me, but it's the rare case where I know how and why I need to use it, just not how...and fortunately that makes it easier to learn........ if videos would explain it better. XD (still not sure how vectors work in 3D space....how 3 numbers translate to an angle, length and direction. and GOSH do I need that for 3D stuff I want to build.)
@Agrajag819
@Agrajag819 4 ай бұрын
I’ve been using 5x5 Lights Out in the linear algebra class I’m teaching! What great timing for this video :D
@qwfp
@qwfp 4 ай бұрын
Once again, you show how an advanced and seemingly abstract mathematical concept can be applied to situations encountered on the daily basis. That's why I'm here! So, thanks!
@itsd0nk
@itsd0nk 4 ай бұрын
As a producer and video editor, I’d usually say something like “this is some great content, but if you added some chill background beats, it would really elevate the project and make it more complete”, but these videos have such a distinct style by *not* including this element. It seems intentional, due to how well it works with your videos. So, bravo for knowing the rules before artistically breaking one... or for accidentally finding a distinct style 😂. Nicely done either way. It has a strikingly chill vibe the way you produce these.
@fonesrphunny7242
@fonesrphunny7242 3 ай бұрын
We got a domestic series about crafting. Just some first hand explanation about the craft and usually some machine noises. No other audio. Music is just a distraction for people who can't focus on the presentation.
@itsd0nk
@itsd0nk 3 ай бұрын
@@fonesrphunny7242 There’s a big difference between distracting background music and a properly edited music bed. Point was that he still has pristine audio in these vids, where you’d usually here soft well bedded music underneath, but that it works in a special way here.
@davidshi451
@davidshi451 4 ай бұрын
It's funny that in practice, people avoid inverting (large) matrices, mostly due to time, memory, and numerical accuracy. John D. Cook wrote a nice blogpost on this, "Don't invert that matrix".
@05degrees
@05degrees 4 ай бұрын
Yep when you have an equation it’s better not to invert the matrix but solve the particular equation. And if there are many equations A x = b₁, A x = b₂ and so on, then all bₖ can really be bundled into a big matrix and you again solve an equation A X = B just once. Which is also good when A is actually non-invertible (due to numerical shenanigans or other things), but you can use a method that gives you the closest thing to a solution which itself is unattainable.
@jyke321
@jyke321 4 ай бұрын
Despite already knowing some of this as a comp sci student, I really enjoyed how this video was put together. Especially the very end when you describe your relationship with linear algebra. I am definitely not at the point where "I get it", and its frustrating, I'm actually taking the class for a second time, and although how to solve for things mechanically, I don't understand it all conceptually still. Honestly, the part on the determinant (something we just got to last week) was something I hardly understood the importance of with respect to invertible matrices, but it is neat seeing its application here.
@origamikatakana
@origamikatakana 6 күн бұрын
This would have been my favorite video when I was in high school
@AlphaPhoenixChannel
@AlphaPhoenixChannel 4 ай бұрын
I'm going to date myself here by saying LA was my first Zelda game and I played it on a GBC, but I STILL remember that color dungeon puzzle. it was hard! after the previous room was so much simpler to teach you the mechanics, I think I went in pretty gung ho and just started hitting stuff in a horrible asymmetric way and got the whole board state completely messed up. once I finally got it back to symmetric, I think I just took random 2-fold or 4-fold actions until it happened to work by chance, not that i knew what "2-fold" or "4-fold" meant... At least once I think i got it to all red and was very happy with myself until realizing it actually needed to be all blue. There was this moment where I sat and tried to figure out how to invert the entire board from red to blue, and I want to say I attempted hitting every node once, then realized that they all have different connectivity and that didn't do it. Considering I was probably like 8 and still remember this thought process - the puzzle made an impression xD Great analysis!
@101arrowz
@101arrowz 4 ай бұрын
Modular arithmetic with matrices also appears in the quadratic sieve, the fastest prime factorization algorithm for numbers under 100ish digits. One of the steps is essentially finding a linear dependency among a set of N vectors, each of length N, in GF(2). This boils down to finding the nullspace of an NxN matrix modulo 2, often using Gaussian elimination. I love that this silly-looking puzzle has so deep a connection to genuinely difficult fields in math :)
@tormodhag6824
@tormodhag6824 4 ай бұрын
I love difficult math, it makes everything so much more interesting to work with
@angeldude101
@angeldude101 4 ай бұрын
Integers modulo 2 is always fun to work with when programming since the bitwise AND and XOR operations are just component-wise (or one might say "SIMD"? 😉) multiplication and addition of vectors of integers mod 2.
@tormodhag6824
@tormodhag6824 4 ай бұрын
@@angeldude101 i always loved how you can find the modulo 2 of a binary number without any calculations
@angeldude101
@angeldude101 4 ай бұрын
@@tormodhag6824 Of course. It's as easy as finding the modulo ten of a decimal number. Or the modulo N of a base-N number. :P
@tormodhag6824
@tormodhag6824 4 ай бұрын
@@angeldude101 yeah but computers, which are binary already have numbers in base 2 format so for base 2 its always that easy, just as easy as doing a odd or even check
@StopChangingUsernamesYouTube
@StopChangingUsernamesYouTube 4 ай бұрын
As a kid I actually got a Lights Out for Christmas instead of a Gameboy (I wasn't the type to ask and was happy enough with it.) That thing prepared me for so many games down the line.
@thespeedyyoshi
@thespeedyyoshi 4 ай бұрын
I’m very lost but somehow watched the entire video before I realized it was done…so clearly you’re doing something right.
@AnimatedPlayer
@AnimatedPlayer 25 күн бұрын
Same man, but I have set out to understand it . I will understand it and make it simpler for others , enabling the sharing of maths knowledge that had been previously locked behind complex algorithm and numbers
@hdswashere
@hdswashere 4 ай бұрын
I'm glad you approached these puzzles formally. I've built Lights Out-style puzzles in Minecraft, but I didn't know they could be approached in this way. Well done!
@amazingdragon2767
@amazingdragon2767 4 ай бұрын
love every single video you put out! I took linear algebra recently, and a lot of the applications seemed boring but important, and you retaught this to me in a way that was both fun and useful!
@ivanjermakov
@ivanjermakov 4 ай бұрын
Computer graphics with affine transformations is a very intuitive application of linear algebra.
@blue_birb
@blue_birb 4 ай бұрын
I love your videos; just wanted to say that. I really do appreciate the things you upload; it's entertaining and thought provoking. I wish that some day I could look at the math problems I find in day to day life, gaming, or just thoughts of my own, and solve them the way you manage to do. I just need to acquire the right tools.
@Alceste_
@Alceste_ 4 ай бұрын
Yes.
@TrashyDork
@TrashyDork 4 ай бұрын
your videos have always (lovingly) been an exercise in seeing how far I can make it in before my understanding starts to fall off of a cliff. The parting segment makes me wonder if I should look into actually improving that for myself
@DaPigMasta
@DaPigMasta 4 ай бұрын
Do it. What could it hurt?
@MarioMastar
@MarioMastar 3 ай бұрын
I thought this would be a meme about zelda puzzle games. DId NOT expect a math lesson, but hey, I heavily respect it and did watch the whole video. Kind of a nice treat when these videos about games turn into an impromptu high level STEM lesson cause it's really fun to learn how these games work and realize there's some powerful logic behind it. Not just trivia like most game videos talk about. I think I learned more about memory manipulation from watching videos like "what happens after you beat tetris?/How do the slots work in Mario 3?/What determines RNG (numerous RNG videos)? etc).
@theawecat27
@theawecat27 4 ай бұрын
i loved this, your final explanation was really beautiful. matrices always scare me when they come up in math class and it's cool to see some ways they can be used, as well as seeing how they work in mod.
@user-zo1kn8ob7h
@user-zo1kn8ob7h 4 ай бұрын
very much like this. cadence, sonics, easement into deep concepts. this makes me feel hug
@Tumbolisu
@Tumbolisu 4 ай бұрын
Disclaimer: I'm not American, so my school experience is fundamentally different. I first learned about linear algebra in 12th grade. It was simplified, only talking about 2D or 3D math. We were just solving things like "What's the shortest distance between this point and this plane?". We rarely had to work with matrices, and one of the teachers only taught us about inverse matrices because there wasn't anything else left to do. Similarly, we learned about derivatives and integrals, always with the idea of solving specific questions. Using derivates as a tool to maximize/minimize a function, and that function could be the length of a curved fence given a few parameters. Stuff like that. In university, things quickly became simultaneously boring and stressful. I only had to take two purely mathematical courses, but they were by far the worst courses I have ever taken. Nothing but solving equations and writing proofs (ESPECIALLY writing proofs) without even a hint of a practical situation. I wrote 5 pages worth of proofs every week. My proofs were way too long, but there was no way to know what you can skip over without angering the prof, so it was always better to just write literally everything you could think of. I can imagine that anybody who was introduced to linear algebra this way will completely hate it. I love **using** math, but I still don't see why I had to do all of this nonsense of writing proofs. Like, I genuinely feel like I didn't learn anything in these math courses that I didn't already learn in school beforehand or learned by watching 3blue1brown's video series. I study computer science, btw.
@spacenoodle8207
@spacenoodle8207 4 ай бұрын
I am learning linear algebra for the first time right now, and your videos are one of the few things encouraging me not to give up Thanks It is pure suffering for now though
@forever_stay6793
@forever_stay6793 4 ай бұрын
Me too! I'm also suffering 😔
@mose3775
@mose3775 4 ай бұрын
Real
@puckie643
@puckie643 4 ай бұрын
Best of luck you guys!! Be the bright future we need :)
@MarioMastar
@MarioMastar 3 ай бұрын
When you have something "fun" to apply the logic to, it's easier to learn the concept because you can think about these examples that interest you. Computer science got a lot more fun at the memory and hex manip level when took an AI corse in robotics and one of the assignments was using it to manipulate images. As an artist it was SUPER useful cause i could apply that to animation projects and save time on coloring. So that's where it really clicked for me and then it becomes cake.
@anubhavkumarc
@anubhavkumarc 4 ай бұрын
Linear Algebra is such a beautiful mathematical, when I first learnt about I thought it was just a tool to solve equations but every time you learn more about it it feels so much deeper. I also recommend people watch Gilbert Strang's 18.06 lectures on MIT OCW if they're starting Linear Algebra out, a lot of professors end up not teaching the concept well.
@physics3632
@physics3632 4 ай бұрын
You’d be an amazing linear algebra teacher, each video you make helps open my eyes to more and more of maths true beauty. Thank you for this!
@Metros23
@Metros23 4 ай бұрын
This channel is gold! Great video and great explanation ❤
@grayfox2600
@grayfox2600 3 ай бұрын
That was a really cool video, thank you. I loved linear algebra when I took it in electrical engineering (and Link's Awakening is one of my all time favorite games). Thanks for reigniting my passion for the subject 😁
@tedandzedrock
@tedandzedrock 3 ай бұрын
“I can’t help but think that there’s some kind of interesting math here” and similar phrases get an instant sub from me because I know I’m about to learn something genuinely cool
@bitten1406
@bitten1406 4 ай бұрын
I cannot describe how cool this is. I've already loved the lights out puzzle since a kid, and now I get this beautiful video with pretty drawings and a cool guy explaining the math (I love math) to me clearly!!!
@plarfee
@plarfee 4 ай бұрын
Man i just saw your video for the first time and im blown.i love how you know the fun of math and physics as i do a bit and nobody understands me
@dotkomist
@dotkomist 4 ай бұрын
Me: gets home at 2am after a 20hr day, prepares to sleep for another 20 Also me: *checks KZfaq, sees new PftB video is out* Me: sleep is for the weak
@JerryFlowersIII
@JerryFlowersIII 3 ай бұрын
Took me 60% of the video before I fully grasped how to understand the matrix. Might have to rewatch to fully grasp the rest of it. Interesting. My math education ends at 3rd year of Highschool with pre-algebra and I don't think I've heard of linear math before but I watch a few math channels on KZfaq and have a knack for math in general, just never pursued it.
@aurelia8028
@aurelia8028 4 ай бұрын
oh my god. I have been wondering about the math behind these kinds of puzzles for, like a year, and only now I just happen to find a video randomly about exactly this topic. Also the linear algebra here is pretty cool. I totally agree with you about only getting linear algebra once I took QM.
@sabotagedgamerz
@sabotagedgamerz 3 ай бұрын
This video was really interesting and informative. I loved it
@mose3775
@mose3775 4 ай бұрын
I’m taking linear algebra for the first time right now; only a couple of weeks into the semester. It seems interesting, but like you said it’s kinda hard to see the big picture. I’m really glad I saw this video when I did. I’ll make sure to take the course again later from different perspectives!
@TheDoctorAndALobster
@TheDoctorAndALobster 4 ай бұрын
excellent ! you taught me modular right there, and the only other creator who made me "get" the maths that i got through cursus, was Michael Stephens. so thank you and congrats for the great vid as always
@Ri-ver
@Ri-ver 4 ай бұрын
Same experience! Linear algebra through math...then electrical engineering..then quantum mechanics and beyond! So glad to see other people share that journey
@yasurikressh8325
@yasurikressh8325 4 ай бұрын
Very clear explanation. I love this vid 😊
@rabbitweasel
@rabbitweasel 3 ай бұрын
I really enjoyed this. I came across the modulo issue of inversion in a non cryptography domain and found the referenced lights out paper as a solid reference. Then had the mentioned inverse issue that I was able to "handle" with linear combinations of the null space vectors to search through (some heuristical help too but not a deterministic process). It technically won't scale well with large null spaces but was consistent at solving problems in modulo space of non prime numbers for what I needed.
@RobBot00
@RobBot00 4 ай бұрын
Amazing. I took linear algebra about a year ago and this reinforced some of the fundamentals :)
@HotSauceBear
@HotSauceBear 4 ай бұрын
The timing on this is really funny... just a couple weeks ago I learned about this area of linear algebra, and a few days ago, (around the time this video was uploaded!), I was watching a streamer struggle to complete one of those puzzles, and I thought that it can be applied... I didn't get any further than realizing that you don't need to press any more than once or that the order doesn't matter, though, before I got distracted and moved on. Great video, though.
@42Tacos
@42Tacos 4 ай бұрын
Right now I’m in Highschool so a lot of this goes over my head, but OMG ITS SO COOL! I enjoy watching your videos so much and I can’t wait until university when I’ll actually be able to understand them :)
@spaceface2918
@spaceface2918 4 ай бұрын
Taking math methods for physics and DEs rn and in math methods we are doing linear algebra review. I found this insightful and enjoyable, thanks!
@RoryDavidWatts
@RoryDavidWatts 4 ай бұрын
Man this was a fantastic video, thanks
@reccaman
@reccaman 4 ай бұрын
Once math can be applied, it just clicks for me. Sadly, i always had to go outside of school for it make sense. Im glad for channels like
@samuelumbaugh
@samuelumbaugh 3 ай бұрын
I understood very little of Linear Algebra. Failed the course in undergrad, then had to work with it again in grad school for medical imaging. It finally clicked when I found a video about how they put the Line of Scrimmage and First Down Line on a football broadcast :) It's wonderful to see a similar experience from Zelda
@deltad3592
@deltad3592 4 ай бұрын
I can totally back the second bit, I started seeing linear algebra EVERYWHERE after my 1350 class in first year. It really put into perspective how useful any skill can be in seemingly unrelated fields!
@qwe123337
@qwe123337 2 ай бұрын
Hey, thanks for this video! I was able to finally solve my Rubik's Clock after all these years with the help from you and the paper you linked.
@umbra7859
@umbra7859 8 күн бұрын
Hello Mr.Bird, recently I found out about the "coffee ring effect" and it felt like the perfect fit for your channel. A simple concept based on a visible phenomenon that took decades for scientists to figure out and has applications to crazy stuff like DNA sequencing and microstructures. Just thought it would be a cool video idea!
@3g0st
@3g0st 4 ай бұрын
Another awesome video! I think you are a great teacher!
@nameistaken
@nameistaken 4 ай бұрын
Decades of playing games with this kind of puzzle has made me a genius of them to the point I can walk in and get the answer with the minimal number of moves brute force
@cheychc
@cheychc 4 ай бұрын
This was such an interesting video!!!
@danielh8261
@danielh8261 4 ай бұрын
After learning days for my algebra test tommorow, I get this zelda puzzle matrix video, thanks to the matrix videos i watched before. This is so funny and makes me a little bit happy to have this inbetween my math chaos.
@NOMASTER1021
@NOMASTER1021 4 ай бұрын
Thanks so much, this was an amazing vid
@TheBabelCorner
@TheBabelCorner 4 ай бұрын
Although I understood Light Out game well beforehand, I still learnt new stuff in cryptography, thanks for your amazing video
@StephenRansom47
@StephenRansom47 4 ай бұрын
Excellent Lesson Mr Bird 🐦 The idea of teaching a thing till a student GETS IT, is a beautiful idea- the end of all teaching, really. 🥂
@ebwvanced590
@ebwvanced590 4 ай бұрын
For my electronics project in college I made the lights lights out game with wires, lights, and basic logic gates! Also my linear algebra experience was very similar to yours. Hated the class and it felt very contrived, but then it showed up in pretty much every class I took afterwards
@PeperonyChease
@PeperonyChease 3 ай бұрын
Great video. I think I first came across this puzzle in Black and White on PC
@Buphido
@Buphido 4 ай бұрын
There‘s a similar puzzle in Sonic Frontiers, at the end of World 1, with the light beam emitting pillars you have to rotate, and it has a nice mathematical solution as well. I commented the solution from any starting constellation under some video, along with the proof of why it works, and a KZfaqr (I believe it was "Nintendo Switch Unboxing") saw it and asked for my permission to make a video on it, so that’s floating around youtube somewhere. But there are still people who don’t seem to be able to follow the instructions and claim that it doesn’t work. xD
@user-bw8ny3qg7i
@user-bw8ny3qg7i 4 ай бұрын
Thank you, I never get to the 2nd part feeling about linear algebra. But I love all your video.
@AZALI00013
@AZALI00013 4 ай бұрын
youre so cool thank you for making this video !!
@777themoose
@777themoose 4 ай бұрын
I had a very similar experience with linear algebra. Once I used it for forward kinematics in robotics it all clicked for me. I really hope some engineers stumble upon your video as they're learning linear algebra so they can appreciate what they're learning.
@malcolmgruber8165
@malcolmgruber8165 4 ай бұрын
I started building a game around the lights out mechanic, changing patterns for what neighbors are affected. I added to the puzzle, non-affected blocks, and that was an interesting problem to solve for as the original maths solution will not solve for it.
@dswcartoons
@dswcartoons 4 ай бұрын
My sisters had that Lights Out handheld when we were kids. that thing was awesome. It also had modes were you could make your own design iirc.
@benruniko
@benruniko 4 ай бұрын
Nice!! Beautiful work :)
@ducktormonty4603
@ducktormonty4603 4 ай бұрын
I failed last semester's Linear Algebra course and have to take it again this semester so it's interesting to see it applied to videogame puzzles... It certainly gives a new perspective to it...
@kylepiddington6556
@kylepiddington6556 4 ай бұрын
Two minutes in and I’m hooked. I love games math
@klikkolee
@klikkolee 4 ай бұрын
I've never been able to reason through a lights-out puzzle but I've always had an easy time with puzzles like the statues in Lego Star Wars. So it's pretty wild to see that they are variants of the same idea
@asdfghyter
@asdfghyter 3 ай бұрын
one fun thing i discovered when playing around with the puzzle is that a component of the solutions make up a cellular automation, where the number of clicks in each cell depends on the number of clicks in the cells in a plus shape above them. specifically, it’s what gives the answer to “if i click some of the top squares and then propagate it down, what pattern will the bottom squares have and what squares did i click on the way to make that pattern?”, which in turn can be used to find the LU-factorization or the inverse of the matrix, by using the fact that the matrix is already almost upper triangular you don’t actually have to solve the full matrix to get the optimal solution if the matrix is invertable, you only need to solve one of the edges and after that you can intuitively propagate the rest to the opposite edge
@zirkq
@zirkq 4 ай бұрын
amazing work
@lucianchauvin8587
@lucianchauvin8587 4 ай бұрын
A beautiful video! In linear rn and have been shown some cool applications
@ThePenguinsKing
@ThePenguinsKing 4 ай бұрын
This is cool. It’s awesome seeing linear algebra applied to solve video game puzzles. I’ve encountered the same puzzle in Genshin impact where cubes need to face the same direction
@notjerrett
@notjerrett 4 ай бұрын
Great video as always! The only thing I would've liked to see you go more into depth with was how the modular inverse algorithm actually functions, though I know that wasn't really the point of the video.
@connorsturgeon8863
@connorsturgeon8863 4 ай бұрын
im a senior in mechanical engineering, and sometimes i think about how math was taught to me in high school. i had some teachers that were really good at not only explaining how to do the math, but also its applications (i particularly really appreciated my old calc teacher). but i had some teachers who did such a bad job giving any kind of motivation as to why we were doing the kind of math we were doing. i remember learning the basics of linear algebra in 10th grade and wondering why on god's green earth we were doing numbers in boxes, and it wasn't until college that i realized how important and cool all that math was. but i look back now and wish that some of my teachers had done a much better job of conveying the importance and profundity of the subject they were teaching
@DolphinRepublic
@DolphinRepublic 4 ай бұрын
love your videos!
@squorsh
@squorsh 4 ай бұрын
Another very similar puzzle to this that shows up in many games is the rotary puzzle wheel. You need to line up all the rings in the same way but rotating one rotates some of the others
@jasminepsiidmon321
@jasminepsiidmon321 4 ай бұрын
Another example of a modulo 3 puzzle in videogames is the death game escape room series Zero Escape - its third game Zero Time Dilemma has one with limited moves available in the 'relaxation room' escape room. You change flowers on a holographic calendar (a 3 x 4 grid) between seeds, budding and blooming - with a limited move counter if I recall correctly.
@EtienneDeguine
@EtienneDeguine 4 ай бұрын
What a great video, it reminded me of undergrad thanks for sharing. I am wondering now what kind of cool applications could be for linear algebra in shader design or mesh generation
@U.Inferno
@U.Inferno 3 ай бұрын
This feels like a good segue into an RSA followup, which is also cryptography and modular arithmetic. But unlike Hill ciphers you cannot (easily) derive the decryption key from the encryption. Or more accurately, the encryption/decryption are not symmetric operations. I didn't take a cryptography class but it was a part of my compsci curriculum.
@Amonimus
@Amonimus 4 ай бұрын
I did think about it, but instead of matricies I was thinking closer to chart graphs. Similar to solving Tic-Tac-Toe, I was considering backwards what moves would turn the solution to the current configuration and going from there. It also helps that if one piece has all neighbours in the right position, unlike the sliding puzzles you no longer need to be concerned with them, so you can work on smaller scale first.
@chillyman1459
@chillyman1459 4 ай бұрын
I loved matrix math in theory of elastic stability. What a beautiful merger of matrix math and calculus
@H0mework
@H0mework 4 ай бұрын
There's a game that teaches programming called lightbot that does this too. I got stuck and hopefully after this I'll get the math for it too! Love your videos, I talk about turing patterns all the time now !
@migmegnezes
@migmegnezes 4 ай бұрын
you convinced me to give linear algebra another try
@TheUndeadFish1
@TheUndeadFish1 4 ай бұрын
I always brute forced the solution by memorizing the 2 lights on solutions on the 3x3, and for the 5x5 I solved from top to bottom by turning all the lights off, looking at the lights left on at the bottom and memorizing which lights to hit on the first row, then solved to the bottom lighting everything up on the way down. It might seem daunting, but using this method made only 7 configurations for child me to memorize for the 5x5, and 6 configurations for the 3x3. I played it way to much as a child, but was really fun solving the puzzle infront of friends later in life in other games by looking at the layout and "pressing" the lights in my head then hitting only the lights needed in seconds after finding what needed pressing.
@dreadpiratery
@dreadpiratery 4 ай бұрын
I did a computer science degree and it clearly wasn't enough to fully grasp this, but this is awesome
@stagelights_
@stagelights_ 3 ай бұрын
i remember playing the mario rpg remake a few months back with a friend watching me play it, and i jokingly was like "hey its that puzzle thats in literally every video game on earth" when we got to the lights out puzzle. i've seen so many games with this puzzle, its ridiculous
@tzimmermann
@tzimmermann 4 ай бұрын
I came upon this problem when I was a kid in an old Sega Genesis game called Light Crusader (and in Landstalker too, I believe). There's a grid of "switches" that can be in two states (cross and circles), when you hit them they swap symbol and so do their neighbors. And you have to put them all in the same state. I did not know linear algebra at the time of course, but I invented an algorithm to solve these puzzles. Just memorize which switches are not in the target state at step n, and hit them (independently of how they might change in the process), you get to step n+1 after hitting all the switches in your list. Iterate till done. Always works. I don't know how I came up with this, but it seemed natural at the time. Maybe I'll write a proof when I have some free time!
@ludomine7746
@ludomine7746 4 ай бұрын
this leaves me wanting a video where you explain linear algebra more thoroughly...
@shockthetoast
@shockthetoast 3 ай бұрын
In Skywalker Saga, there is another Lights Out type puzzle. It's in the Yavin 4 base. I want to say it's 9x9 grid of tiles. The two positions for each tile are part of either the imperial crest or the rebel alliance crest. There's actually two puzzles on the same grid, to complete each crest, but with two different starting positions.
@sleepynuigurumiamalgamation
@sleepynuigurumiamalgamation 4 ай бұрын
Amazing video. Didnt think lights out got so interesting xD
@fawchm8053
@fawchm8053 4 ай бұрын
I ended up taking linear algebra twice in college, and like your experience, I really didnt get it. Never really went further with it but this video was a neat little glimmer of its application; Especially since links awakening was the first zelda game I played.
@ParadoxProblems
@ParadoxProblems 4 ай бұрын
Love the animation of a bird flapping in space and bobbing up and down, not because there is air, but because of conservation of momentum between its boy and wings.
@noahdoss1967
@noahdoss1967 4 ай бұрын
I will share this with my proper linear algebra class next time. I teach a very basic linear algebra class every year and a proper linear algebra class once every 2 years or so
@diegoramirez7901
@diegoramirez7901 4 ай бұрын
Structural engineer here. Same thing happened to me with L.A. as freshman, then I had Structural Dynamics, Vibration Modes and Earthquakes. Later, the Jigsaw fell into place. Cool video
@cantcommute
@cantcommute 4 ай бұрын
nice ending!
@umbaupause
@umbaupause 4 ай бұрын
That outro made me remember once more: EVERYTHING can be broken down into math eventually, if you are crazy enough.
@puckie643
@puckie643 4 ай бұрын
Yeah, I was (and still am) one of that kind of students. A Physics student that never got past that part of Algebra. I never got matrixes, I never got the determinant, I never got inverses and the applications. So much so that I failed the same class 5 years in a row and I couldn't get that subject ever again, so I unfortunately had to drop out from college. And to be honest, I kinda still don't, even though I can faintly grasp just how important it is for literally every other subject and outside of Physics (programming, engineering, and I guess cryptology now too, goddamn) This video at least did give me a small spark of hope that eventually "getting it" was possible, something I had completely given up on. Hope to become part of that other kind one day.
What do LEGO bricks and celestial bodies have in common?
13:12
Physics for the Birds
Рет қаралды 182 М.
Turing's Cake (and other wrinkly math)
13:38
Physics for the Birds
Рет қаралды 136 М.
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 14 МЛН
Is it Cake or Fake ? 🍰
00:53
A4
Рет қаралды 18 МЛН
The Statistics of Microwave Popcorn
12:05
Physics for the Birds
Рет қаралды 749 М.
In Video Games, The Player Never Moves
19:21
Josh's Channel
Рет қаралды 459 М.
Anything is savable in celeste
2:14
Chosen
Рет қаралды 50 М.
The Most Useful Curve in Mathematics
23:43
Welch Labs
Рет қаралды 305 М.
James Webb Space Telescope and the Traveling Salesman Problem
10:48
Physics for the Birds
Рет қаралды 242 М.
So, space isn't a 4D Pringle... Maybe a donut?
13:25
Physics for the Birds
Рет қаралды 137 М.
The Minecraft boat-drop mystery
16:41
Stand-up Maths
Рет қаралды 913 М.
The Double Bubble Theorem
11:51
Physics for the Birds
Рет қаралды 175 М.
How to turn a circle inside out (Visual Calculus and the Tractrix)
8:52
Physics for the Birds
Рет қаралды 90 М.
When Optimisations Work, But for the Wrong Reasons
22:19
SimonDev
Рет қаралды 823 М.
Как быстро замутить ЭлектроСамокат
00:59
ЖЕЛЕЗНЫЙ КОРОЛЬ
Рет қаралды 14 МЛН