10 weird algorithms

แชร์
ฝัง
  • เผยแพร่เมื่อ 8 พ.ค. 2024
  • Top 10 most interesting algorithms ever created in computer science. Learn how software engineers have innovative techniques to solve real world problems.
    #science #programming #top10
    💬 Chat with Me on Discord
    / discord
    🔗 Resources
    Wave Function Collapse demo jaxry.github.io/wave-function...
    Cryptography concepts • 7 Cryptography Concept...
    10 Sorting Algorithms Explained • Sorting Algorithms Exp...
    🔥 Get More Content - Upgrade to PRO
    Upgrade at fireship.io/pro
    Use code YT25 for 25% off PRO access
    🎨 My Editor Settings
    - Atom One Dark
    - vscode-icons
    - Fira Code Font
    🔖 Topics Covered
    - Algorithms every programmer should know
    - How does wave function collapse work
    - Quantum computer algorithms
    - How do distributed systems stay secure?
    - Sorting algorithms explained
  • วิทยาศาสตร์และเทคโนโลยี

ความคิดเห็น • 1K

  • @Yhoshua_B
    @Yhoshua_B 4 หลายเดือนก่อน +4174

    I don't always understand everything being talked about. I just appreciate being exposed to the knowledge.

    • @liffidmonky1216
      @liffidmonky1216 4 หลายเดือนก่อน +94

      U can get far then mate

    • @rubncarmona
      @rubncarmona 4 หลายเดือนก่อน +83

      that's the mindset

    • @drtydsh
      @drtydsh 4 หลายเดือนก่อน +31

      that's because you only watch it once, watch it one time on a faster speed then again on a slower. now you actually understand

    • @pajemx8569
      @pajemx8569 4 หลายเดือนก่อน +6

      Same here😅

    • @Mikolaj_Kapusta
      @Mikolaj_Kapusta 4 หลายเดือนก่อน +86

      Don't worry, probably there is a parallel universe where you understand this video.

  • @wlockuz4467
    @wlockuz4467 4 หลายเดือนก่อน +942

    Fireship was helping programmers to add tech to their resumes with 100 second series, now he is helping interviewer with new questions for the interviews.

    • @abhishekpankar
      @abhishekpankar 4 หลายเดือนก่อน +14

      🤣 I literally thought of asking these questions in interviews

    • @curious_banda
      @curious_banda 4 หลายเดือนก่อน +4

      Better than memorizing leetcode

    • @Jubinmail
      @Jubinmail 4 หลายเดือนก่อน +4

      Or maybe the programmer can do a reverse uno on the interviewer.

  • @Equalisys
    @Equalisys 4 หลายเดือนก่อน +236

    *Algorithm* (noun) :
    Word that programers use when they don't want to explain what they are doing

    • @capta1nseal
      @capta1nseal 4 หลายเดือนก่อน +42

      These days it's getting increasingly common that the programmer doesn't know either

    • @pedrobigboss
      @pedrobigboss 4 หลายเดือนก่อน +4

      LMAO
      @@capta1nseal

    • @javabeanz8549
      @javabeanz8549 4 หลายเดือนก่อน +4

      ​@@capta1nseal"that's what they taught us to do, I don't know why it works..."

    • @user-yp4wt8yq9b
      @user-yp4wt8yq9b 3 หลายเดือนก่อน

      algorithms are just a bunch of finite instructions to solve some problem, you actually know what they are and how they work since you might use them all of the time like the steps you follows to divide two numbers, the concept and use of algorithms is of a mathematical nature, when programers tells you that the reason why something works is because of algorithms it's like asking an engineer why doesn't the bridge fall and then he just tells you that it is because of math he is telling you the truth but not giving any actual insights which is the most important part for understanding algorithms since in order to create an algorithm you must first understand how to solve the problem and then give the instructions to the computer so that it follows them and solves the problem for you the reason why many programers can't explain what they are doing is because in order to use an algorithm you don't need to understand it you can divide 2 numbers whithout knowing what is division or what are numbers if you just follow the steps so there are some times when programers use other programers algorithms to make their own and they end up solving problems by just using a bunch of algorithms that they don't understand and neither the general instrctions since they can also copy them from somewhere else without getting any real insights

  • @madhououinkyoma
    @madhououinkyoma 4 หลายเดือนก่อน +676

    0:00 - Intro
    0:43 - Wave Function Collapse
    1:41 - Diffusion
    2:40 - Simulated Annealing
    3:40 - Sleep Sort
    4:19 - Quantum Bogosort
    4:59 - Shor's
    6:10 - Marching Cubes
    6:48 - Byzantine Fault Tolerance
    7:46 - Boids
    8:17 - Boyer Moore

    • @yash1152
      @yash1152 4 หลายเดือนก่อน +3

      thanks a lot

    • @Suman-bd1tc
      @Suman-bd1tc 4 หลายเดือนก่อน +3

      Ahh so much better with your comment thank you so much ❤❤❤

    • @tylrfilms
      @tylrfilms 4 หลายเดือนก่อน +2

      Video isn't that big that you need timestamp tho

    • @limpiadora
      @limpiadora 4 หลายเดือนก่อน +1

      Here is the other legend, thanks a lot

    • @studybuddy7060
      @studybuddy7060 4 หลายเดือนก่อน +1

      For the sleep sort one, what if we take the biggest element and scale all elements down by that number. Then, it would take atmost 1 second to sort. Though still it would leave the sorting to the CPU scheduler.

  • @GSBarlev
    @GSBarlev 4 หลายเดือนก่อน +696

    My favorite algorithm is probably Perlin Noise. You touched on procedural generation in your wavefunction collapse portion, but the fact that the result is _deterministic_ (based on the initial seed) and independent of the order of the observations is just mind-blowning.

    • @sjoerdev
      @sjoerdev 4 หลายเดือนก่อน +13

      simplex noise is far better

    • @112BALAGE112
      @112BALAGE112 4 หลายเดือนก่อน +20

      Perlin (and Simplex) Noise work by using a pseudo random generator such as Mersenne Twister.

    • @nicolasreinaldet732
      @nicolasreinaldet732 4 หลายเดือนก่อน +32

      Haaa yes here we have a minecraft enjoyer.

    • @madhououinkyoma
      @madhououinkyoma 4 หลายเดือนก่อน +17

      Using a seed for procedural generation is mind blowing?

    • @paladynee
      @paladynee 4 หลายเดือนก่อน +10

      @@sjoerdev Ken Perlin invented them both.

  • @awiewahh
    @awiewahh 4 หลายเดือนก่อน +135

    Diffusion was not first developed at openai. Diffusion as we know it as an image generation technique started as the Denoising Diffusion Probabilistic Models (DDPM) paper that came out from UC Berkley with Ho et al in 2020. Dall-e 1 wasn't even diffusion, it wasn't until far later that openai joined the diffusion scene.

    • @en9717
      @en9717 4 หลายเดือนก่อน

      Wrong

    • @awiewahh
      @awiewahh 4 หลายเดือนก่อน +18

      @@en9717 My other comment seems to have been deleted, so I wont try to link the paper again. But the original image generating diffusion model has the arxiv code of arXiv:2006.11239
      There have been previous diffusion models before that too, but not to the same extent as the DDPM paper. Regardless, none of them were through OpenAI.

    • @PrintScreen.
      @PrintScreen. 3 หลายเดือนก่อน +11

      @@awiewahh yeah i don't think someone that only replied "wrong" knows what they're talking about, just a troll

    • @Audisknfj
      @Audisknfj 3 หลายเดือนก่อน +1

      Pieter Abbeel, the doctoral advisor of Ho was one of the main advisors of OpenAI. While diffusion models were developed in Berkeley, it didn’t take long for openAI to join the party even though dalle took some time to release

  • @welcomespiritual
    @welcomespiritual 4 หลายเดือนก่อน +133

    As a mechanical engineer that later became software developer, it's nice for once to see concepts i actually studied like thermodynamics or metallurgy being related to programming

    • @cristophermoreno2290
      @cristophermoreno2290 4 หลายเดือนก่อน +3

      same

    • @devon9374
      @devon9374 4 หลายเดือนก่อน +2

      Same here

    • @3xpl0i79
      @3xpl0i79 4 หลายเดือนก่อน +5

      Mechanical engineers work as anything but mechanics.

    • @mubx4323
      @mubx4323 4 หลายเดือนก่อน +2

      actually, every engineering problem/topic can be somehow be related to programming

    • @MarkEichin
      @MarkEichin 4 หลายเดือนก่อน +2

      Videos like this show why developers really need to pay more attention to the *history* of computer science - Simulated Annealing was a cool new idea in *1983*, Boyer-Moore is from the late 70s, Marching Cubes is from 1987 - I recently coded up the Shoelace Formula for something because I learned it from an architect doing concrete-foundation estimation back in the 1980s, but it goes back to 1769 :-)

  • @AdidasDoge
    @AdidasDoge 4 หลายเดือนก่อน +140

    I might have to memorise all these algorithms in case it comes up in an interview

    • @abhijeetas7886
      @abhijeetas7886 4 หลายเดือนก่อน +20

      its never a problem if you never knew, but its a problem now that you know these exist but cant remember when need comes to be

    • @BlueJDev
      @BlueJDev 4 หลายเดือนก่อน +1

      @@abhijeetas7886 soo , it's better to have it and not need it, than need it and not have it?

    • @lowzyyy
      @lowzyyy 4 หลายเดือนก่อน +2

      doubt you will ever understand this algos, let alone remember...

    • @alastairtheduke
      @alastairtheduke 4 หลายเดือนก่อน

      I'll just use the boyer moore algorithm to searh this channel for the word 'algorithm' @@abhijeetas7886

    • @HT79
      @HT79 4 หลายเดือนก่อน

      If you get these algorithms asked in the interview, you're either secretly getting hired by the Illuminati or you're not getting hired at all

  • @amitnakash1642
    @amitnakash1642 4 หลายเดือนก่อน +7

    Sleep-Sort made me pause, smile, and go “f*king genius” 😂😂😂

  • @Gaak967
    @Gaak967 4 หลายเดือนก่อน +60

    Loving the consistency of these videos. Keep up the good work.

  • @kbobkpop
    @kbobkpop 4 หลายเดือนก่อน +57

    Happy to see you covering algorithms! I feel like that is an area of software engineering / computerscience that deserves more love!

    • @gus473
      @gus473 4 หลายเดือนก่อน

      🍻 Thinking it's about time the Cooley-Tukey FFT algorithm had its own special commemorative day, with festivities! 😎✌️

  • @andrewallbright658
    @andrewallbright658 4 หลายเดือนก่อน +220

    My favorite algorithms ATM are ones for video games. You see, video games are in the category of “real time simulation” meaning what you see is actually being computed live. That means that there really isn’t a bunch of resources to use; algorithms must be highly effective.
    The work of optimization is handled by trying to pre-compute things or fake things. My favorite example are oceans. The best water simulation (like in Sea of Thieves) is faked by pulling past data from real science buoys and essentially replaying real water (lol). Otherwise computing water in real time is terribly expensive. It’s a hack but an example of how a resource constrained environment produces creative solutions.

    • @ric6611
      @ric6611 4 หลายเดือนก่อน +35

      That's actually hilarious, so often nowadays we just forget the simplest solution.

    • @kashifahmed9821
      @kashifahmed9821 4 หลายเดือนก่อน +9

      That acerolas video on it is amazing

    • @yoloswaginator
      @yoloswaginator 4 หลายเดือนก่อน +14

      I hope the field will make a huge leap once generative AI has been incorporated into NPC behavior, 3D texture generation, on-the-fly adjustments of the vibe/music/storyline/difficulty levels etc. Soon games could come out that may play out in ways totally unexpected to the developerts due to the increased degrees of freedom.

    • @LuisSierra42
      @LuisSierra42 4 หลายเดือนก่อน +4

      I used a similar hack for my mobile 2d game

    • @Vaeldarg
      @Vaeldarg 4 หลายเดือนก่อน +8

      @@yoloswaginator A.I model-training combined with the algorithms behind 3D photogrammetry/light-fields has been leading to some magical results lately.

  • @teddy_gramz
    @teddy_gramz 4 หลายเดือนก่อน +3

    One of your most fascinating videos yet! The fact that you relate so many of these to other fields (quantum physics, medicine, thermodynamics, metallurgy) is really cool. I'd love to see more videos of you relating computer science/programming concepts to other fields and real-world phenomena!

  • @icitry
    @icitry 4 หลายเดือนก่อน +27

    I've actually had bogosort run successfully a couple of times and even showed it to others, but for some reason nobody seems to remember that...

    • @marcelreiter181
      @marcelreiter181 9 วันที่ผ่านมา

      Just choose n = 1 then to repeat your success :)

  • @GameWorldRS
    @GameWorldRS 4 หลายเดือนก่อน +105

    Apprently a guy named Oded Regev just discovered a major improvement to Shor's algorithm. Shor himslef agreed that it vastly improved on his original method.

    • @muraliavarma
      @muraliavarma 4 หลายเดือนก่อน +24

      Right, the TH-cam channel "Quanta Magazine" just released a video about Computer Science Breakthroughs of 2023 and this improvement was one of them. But like mentioned in both videos, it is not yet practical from what I could understand.

    • @oggolbat7932
      @oggolbat7932 4 หลายเดือนก่อน +18

      Shor, Mara, Dibella, Kynareth, Akatosh. Divines, please help me.

    • @mihailovasic4623
      @mihailovasic4623 4 หลายเดือนก่อน +3

      ​@@oggolbat7932I love you 😂

    • @devon9374
      @devon9374 4 หลายเดือนก่อน

      Make sure you frequent Quanta's website. It's one of the best for tech and science​@@mihailovasic4623

    • @hedlund
      @hedlund 4 หลายเดือนก่อน +5

      @@mihailovasic4623 That's gotta be the best random-ass lore snippet insertion I've seen in years.

  • @holthuizenoemoet591
    @holthuizenoemoet591 4 หลายเดือนก่อน +286

    wave form collaps is not really related to quantum physics but is cool anyway. An algorithm that i miss is the stochastic gradient descent algorithm, what propelled us into the AI area.

    • @brucewayne2480
      @brucewayne2480 4 หลายเดือนก่อน

      Any good course about it ?

    • @isodoubIet
      @isodoubIet 4 หลายเดือนก่อน +33

      Yeah it's just monte carlo sampling of a distribution defined implicitly in terms of local consistency rules. The quantum BS probably helped its marketing though.

    • @chaotickreg7024
      @chaotickreg7024 4 หลายเดือนก่อน +29

      It might be more accurate to call it something like "Random field collapse" because it's unrelated to the quantum wave function. But still cool!

    • @dukemagus
      @dukemagus 4 หลายเดือนก่อน +5

      I was expecting something related to Signed Distance Fields... Graphics programming has some insanely ways of overcoming challenges

    • @carljones9640
      @carljones9640 4 หลายเดือนก่อน +33

      Pedantry warning: SGD is an amazing optimization algorithm, but it is not correct to say that SGD is what propelled us into the current AI era - that would be backpropagation. If you want to assign credit to a single algorithm, it would be more appropriate to assign it to backprop, since backprop is what allows SGD to solve the credit assignment problem in the first place. Without backpropagation, a network cannot learn. Backprop is the algorithm that SGD relies on in neural networks to actually train them. So, it's not SGD but backprop that let us do AI.
      That being said, the real winner is raw compute power. Things like SGD and backprop have been around for 40+ years (backprop over 50) and were already used in AI as far back as the 1980's. The problem is that you couldn't handle anything with any meaningful depth until the mid-to-late 2000's because the compute power and memory just weren't there. The explosive advancement of AI really is just a matter of hardware advancement, especially anything that allows for parallel computing. Thank you, video games, for getting someone to invent discrete GPUs.

  • @nikkehtine
    @nikkehtine 4 หลายเดือนก่อน +226

    This might be my favorite Fireship video to date. The quality, the explanations, the humor, the subject, they are all near-perfect!

    • @kielbarry1789
      @kielbarry1789 4 หลายเดือนก่อน

      I agree - high quality, low bs! How TH-cam should be. 11 -> fire ship info/density algo

    • @senzmaki4890
      @senzmaki4890 4 หลายเดือนก่อน +5

      Let's see Paul Allen's favourite fireship video

    • @Cristopherdreamer
      @Cristopherdreamer 4 หลายเดือนก่อน

      Based ena pfp

    • @mathematicsclub961
      @mathematicsclub961 4 หลายเดือนก่อน

      same

    • @lpsinko9705
      @lpsinko9705 4 หลายเดือนก่อน +2

      because its ai ,its hard for humans .WAKE UP FROM THE MATRIX!!!!!

  • @KimOyhus
    @KimOyhus 4 หลายเดือนก่อน +27

    I actually did invent a simpler improved variant of the marching cubes algorithm, while sleeping.
    And the dream was so vivid I thought I had programmed it, but I could not find the code when awake.
    So I had to write the code again while awake, and it was so easy the second time.

    • @HT79
      @HT79 4 หลายเดือนก่อน +13

      r/thathappened

    • @Fran-kc2gu
      @Fran-kc2gu 4 หลายเดือนก่อน +9

      Link to the repo or didn't happen

    • @KimOyhus
      @KimOyhus 4 หลายเดือนก่อน

      I use it on my own 3D-printer projects. Code is secret for now@@Fran-kc2gu

    • @lgbtthefeministgamer4039
      @lgbtthefeministgamer4039 4 หลายเดือนก่อน +2

      you aren't special, Kim.

    • @KimOyhus
      @KimOyhus 4 หลายเดือนก่อน

      I have several world records.@@lgbtthefeministgamer4039

  • @hashdankhog8578
    @hashdankhog8578 4 หลายเดือนก่อน +13

    that graphic you showed which explains the difference between scalers, vectors, matrices, and tensors is incredibly underrated.

    • @binarymystic
      @binarymystic 4 หลายเดือนก่อน +1

      scalar* (even though the video itself made this typo several times!)

    • @lolatmyage
      @lolatmyage 2 หลายเดือนก่อน

      @@binarymystic scales

  • @TheSnero3
    @TheSnero3 4 หลายเดือนก่อน +17

    I love the fact that he continues the simulation story line through every video!

  • @R2D21111W
    @R2D21111W 4 หลายเดือนก่อน +13

    In the lecture 'Logic of living systems' that included Boids we also covered so called 'Core Wars'. Basically its about different assembler code fighting over memory via replication and 'killing' other code. Maybe you are also interested in this subject 😊

  • @sandorvasas611
    @sandorvasas611 4 หลายเดือนก่อน +11

    I DID have dreams about extracting polygonal meshes from isosurfaces when I was 15! Worked on a destructible pseudo-infinite 3D landscape first-person "game" at the time. Marching tetrahedrons was the answer.

  • @linuxguy1199
    @linuxguy1199 4 หลายเดือนก่อน +58

    I think i'm gonna start using sleep sort in my production apps, wpuld work wonders to minimize the CPU usage of my apps. I currently use quantum bogosort, but it's a little too CPU intensive.

    • @HT79
      @HT79 4 หลายเดือนก่อน +9

      Hey look, it's the I Hate Myself Dev!

    • @nomadshiba
      @nomadshiba 4 หลายเดือนก่อน

      sleep sort is basically counting sort

  • @edbrito-swdev
    @edbrito-swdev 4 หลายเดือนก่อน +14

    I was listening to this on my car on my way back home. This was the kind of stuff that made me love learning computer science and made me go to masters and then PhD (which I never finished).
    Nowadays I work doing bullshit software that I hate 99% of the time. Doing enterprise software development is atrocious for the mind and soul.

    • @o0QuAdSh0t0o
      @o0QuAdSh0t0o 4 หลายเดือนก่อน +1

      What made you stop the PhD? Curious as a CS major working towards Bachelor’s atm

    • @edbrito-swdev
      @edbrito-swdev 4 หลายเดือนก่อน +9

      @@o0QuAdSh0t0o I was with heavy clinical depression and probably burn out, too. I was completely disillusioned with the bureaucracy of research grants, the "office politics " at the university, the way my supervisors didn't support or supervise, having to teach first year students (which I liked) while doing all else, including review papers that were supposed to be reviewed by my supervisor... Everything was just too much.

  • @augustday9483
    @augustday9483 4 หลายเดือนก่อน +8

    Wave function collapse is awesome, procedural-generation in general is a really interesting topic of computer science to me.

  • @josephmalham725
    @josephmalham725 4 หลายเดือนก่อน +5

    Just a footnote for anyone who sees it, real world wavefunction collapse isn’t dependent on looking at particles. The word observation is used but that’s a catch all term for some form of physical interaction with the particle. Human vision and perception doesn’t have the ability to magically cause collapse, but if we want to look at it, it has to first collapse.

  • @ardavanansari
    @ardavanansari 4 หลายเดือนก่อน +1

    Awesome video as always, I didn't know about Boids and its exactly what I needed in my Threejs project! I would love it if you could make a video about different kinds of noise, like Voronoi or Perlin!

  • @monkeibusiness
    @monkeibusiness 4 หลายเดือนก่อน +13

    Shors Algo has recently been improved by Oded Regev. It was basically out of nowhere!

  • @Linkman8912
    @Linkman8912 4 หลายเดือนก่อน +4

    The speedcubing reference with CFOP is perfect

  • @brainxyz
    @brainxyz 4 หลายเดือนก่อน +7

    Particle Life is another amazing algorithm. It's similar to boids but it's simpler and produces way more complex and emergent behaviors.

  • @anmolsharma9539
    @anmolsharma9539 4 หลายเดือนก่อน +2

    This is overwhelming amount of information in just 10 min.
    Thanks Fireship for such quality content.

  • @JoshuaGottlieb-oz4er
    @JoshuaGottlieb-oz4er 4 หลายเดือนก่อน +5

    High quality content sir. That was a tasteful blend between memes and informative information

  • @mediumrarechicken837
    @mediumrarechicken837 4 หลายเดือนก่อน +23

    Don’t forget about the algorithm that controls us all

  • @112BALAGE112
    @112BALAGE112 4 หลายเดือนก่อน +8

    Here's a string search algo faster that Boyer-Moore: the FM-index. For searching pattern P in text T, Boyer-Moore has runtime O(|P|+|T|) but FM-index is O(|P|). That's right, it doesn't depend on the length of the text. You can search gigabytes of text just as fast as kilobytes, provided that you've built the FM-index for it.

  • @Coudnt_think_anything
    @Coudnt_think_anything 3 หลายเดือนก่อน +2

    I like the idea that there’s a universe where pogosort works every single time and nobody knows why

  • @julians3danimations
    @julians3danimations 4 หลายเดือนก่อน +2

    4:14 that's clever as hell

  • @jsjeevasaravanan9298
    @jsjeevasaravanan9298 4 หลายเดือนก่อน +3

    Weird algorithms summary:
    Wave Function Collapse (0:43):
    Procedurally generates maps for video games by collapsing possibilities upon observation. Represents an initial map in superposition, selecting tiles based on consistent rules.
    Diffusion Algorithm (1:41):
    Derived from thermodynamics, reverses the process of spreading particles to generate coherent images. Used in image generators like DALL·E and Stable Diffusion, with potential for audio and video generation.
    Simulated Annealing (2:40):
    Optimization algorithm inspired by metallurgy, balances exploration and exploitation. Offers a metaphor for a developer's journey from exploring diverse technologies to specializing in one.
    Sleep Sort (3:40):
    Unconventional sorting algorithm that delegates sorting to the CPU scheduler through thread sleep times. Genius yet impractical, as it relies on the scheduler to execute the sorting process.
    Quantum BOGO Sort (4:19):
    Theoretical sorting algorithm leveraging quantum mechanics and multiverse theory. Hypothetically relies on observing parallel universes to find a pre-sorted array, requiring a portal gun.
    Shor's Algorithm (4:59):
    Quantum algorithm for integer factorization, potentially threatening RSA encryption. Leverages quantum concepts like qubits, superposition, and entanglement to perform parallel calculations.
    Marching Cubes Algorithm (0:00 & 6:10):
    3D mesh generation algorithm used for rendering MRI data in 3D. Processes a 3D scalar field to create a mesh by considering neighboring points and predefined polygons.
    Practical Byzantine Fault Tolerance (PBFT) (6:48):
    Distributed consensus algorithm essential for maintaining network integrity in the face of node failures. Enables nodes to reach a consensus on executing changes despite up to one-third of nodes behaving unpredictably.
    Boyd's Artificial Life Program (7:46):
    Simulates flocking behavior of birds using three simple rules: avoid crowding, align with the average heading, and move towards the center of mass. Demonstrates emergent complexity and beauty arising from simple rules, reflecting natural phenomena.
    Boyer-Moore String Search Algorithm (8:17):
    Efficient string search algorithm that becomes faster with larger search strings. Scans text from right to left, utilizing pre-processed tables for skipping characters based on bad character rules and mismatch occurrences.

  • @DrakiniteOfficial
    @DrakiniteOfficial 4 หลายเดือนก่อน +5

    I actually used Wave Function Collapse recently, helping a friend with his project. It was a machine learning class, and the project involved training a neural network to create the *rules* for wave function collapse to do its thing. It wasn't very successful 😆

    • @HT79
      @HT79 4 หลายเดือนก่อน

      Thank God it failed. Otherwise that would've been the first step to create the Generals for our AI overlords

  • @icoudntfindaname
    @icoudntfindaname 4 หลายเดือนก่อน

    Tbh best fireship video ever...
    Pls make more of such videos

  • @latenightenjoyer
    @latenightenjoyer 4 หลายเดือนก่อน +2

    when it comes to the factorization problem and other mathematical problems that most modern cryptographic systems use, there are already out there new algorithms that will replace what is currently in use and that are not breakable/exploitable by paralell/quantum computing (these new algorithms use lattice theory).

  • @0e0
    @0e0 4 หลายเดือนก่อน +3

    I believe this year someone improved Shor's algorithm by making it multi-dimensional

  • @desmond-hawkins
    @desmond-hawkins 4 หลายเดือนก่อน +4

    The input to the marching cubes algorithm is a *scalar* field, not a *scaler* field. A scalar field is just a set of numbers associated to points in space. Each scalar can be a vector, like if you knew the measurements of wind speed and direction at regular intervals within a 3D area you'd be dealing with scalar fields. If it's about 3D modeling the number could be 1 or 0 to represent the presence of an object, or a quantity representing its color or texture, etc. A scaler is something that scales (resizes) something.

    • @gerardmccalloe4049
      @gerardmccalloe4049 3 หลายเดือนก่อน +1

      A field of vector isn’t a scalar field, it’s a vector field

  • @nazramirez
    @nazramirez 4 หลายเดือนก่อน +1

    Soooo much content that by the end of your videos I can’t remember what you said at the beginning of the video.
    Pretty entertaining! Thanks!

  • @isbestlizard
    @isbestlizard 3 หลายเดือนก่อน +1

    Nature-inspired optimisation is SO COOL i love things like ant colony and particle swarms and genetic algorithms o.o

  • @hisshame
    @hisshame 4 หลายเดือนก่อน +3

    Fireship is the tinfoil-hat-wearing older brother we all need.

  • @YounesWinter
    @YounesWinter 4 หลายเดือนก่อน +6

    While watching this video i had a panic rithms!

  • @user-gk8jm7tg8j
    @user-gk8jm7tg8j 3 หลายเดือนก่อน

    Loving the consistency of these videos. Keep up the good work.. Loving the consistency of these videos. Keep up the good work..

  • @CameraShounen
    @CameraShounen 4 หลายเดือนก่อน

    This video is great! More weird algorithms videos in the future?

  • @isodoubIet
    @isodoubIet 4 หลายเดือนก่อน +3

    The figure at 6:22 is incorrect. A tensor is not a 3d matrix, it's a more general concept. A scalar is a type of tensor. A vector is a type of tensor. A matrix is a type of tensor. A 3d array is a type of tensor. Tensors are, very informally, objects with n indices that satisfy certain transformation rules.

    • @Jang09
      @Jang09 4 หลายเดือนก่อน

      You're confusing the definitions for math and computer science. They are all essentially arrays of numbers in programming and are just given the names scaler, vector and tensor because they are representations of those objects.
      In math, a matrix is a linear transformation, and a tensor is a multilinear map (given a basis).
      The "informal" definition you mentioned is the one usually given in physics and it's only for the components of a tensor (which is typically all you have to worry about since physics should be background independent) but not the object itself.

    • @isodoubIet
      @isodoubIet 4 หลายเดือนก่อน

      @@Jang09 No, I am not. First of all, there isn't really a "definition" of tensor specific for computer science, since the term was just lifted from math and physics without much thought and no further theory was developed, and secondly, even if there was, it would still be the case that a tensor has an arbitrary number of indices _because that is the practice where the term tensor is used_ e.g. in machine learning. If you really want to drop the transformation properties, go ahead, but it's pretty silly to come up with a synonym for array. What you cannot do is say it must be 3d, because nobody uses it that way and that's a definition used only by you.
      " it's only for the components of a tensor"
      That is incorrect. It is the definition of the object. A single component of a tensor is not a very useful object.

    • @Jang09
      @Jang09 4 หลายเดือนก่อน

      @isodoubIet The transformation law is for the components of a tensor the indices are labeling the components this is pretty standard in physics. The word tensor in computer science is used for multidimensional arrays.

    • @isodoubIet
      @isodoubIet 4 หลายเดือนก่อน

      @@Jang09 "The "informal" definition you mentioned is the one usually given in physics and it's only for the components of a tensor "
      Is what you said above. You said it's _only_ for the components and not for the whole object, which is definitively incorrect. The transformation laws obviously operate on the components, but that's not what you said, nor is it something relevant or useful to bring up.
      "The word tensor in computer science is used for multidimensional arrays."
      I literally just explained this. 1. The word tensor is not used productively, its just a cute word that people who don't understand what tensors are decided to use for multidimensional arrays 2. computer science already had multidimensional arrays and 3. "multidimensional" means with an arbitrary number of indices, not just 3, precisely as I stated.
      You're trying to be absurdly pedantic, which I can appreciate, but you're also failing miserably. Just stop.

    • @Jang09
      @Jang09 4 หลายเดือนก่อน

      @isodoubIet I'm literally just stating that the same word is used in different fields to mean different things 😅 so your first comment doesn't make sense since your trying to use the physics definition on a CS video.
      And yes the transformation law only refers to the components of the tensor as the tensor itself is invariant to a change of basis.

  • @itsmemario1298
    @itsmemario1298 4 หลายเดือนก่อน +3

    Me scared af because some of the "Interesting" algorithms are in my Syllabus

  • @realchrishawkes
    @realchrishawkes 4 หลายเดือนก่อน

    Fireship, you're killing it.

  • @perpetu
    @perpetu 4 หลายเดือนก่อน +3

    Ive realised Algorithm designing first easens coding step instead of directly going to code

  • @phoneix24886
    @phoneix24886 4 หลายเดือนก่อน +4

    My favourite is fast inverse square root. Never seen a more weird algorithm than that in my life. Its just so random but also so useful.

    • @desmond-hawkins
      @desmond-hawkins 4 หลายเดือนก่อน +3

      The one used in Quake III Arena? It's dark magic, the original code even has a line in this function that's commented out with a note that says // 2nd iteration, this can be removed.

  • @marshallcapps3084
    @marshallcapps3084 4 หลายเดือนก่อน +1

    Crazy to see Boyer-Moore mentioned. I fondly remember their CS class at UT.

  • @abhilashbandi3866
    @abhilashbandi3866 4 หลายเดือนก่อน

    One of your best yet

  • @jafrex
    @jafrex 4 หลายเดือนก่อน +6

    Am I trippin or does Fireship's voice sound AI generated?

    • @thomasedwardpeterson
      @thomasedwardpeterson 4 หลายเดือนก่อน +1

      I'm high as hell right now, you got feeling paranoid now lol

  • @draido-dev
    @draido-dev 4 หลายเดือนก่อน +3

    there is no way jeff is using algorithms, it's all AI, right?

  • @urban8499
    @urban8499 2 หลายเดือนก่อน

    Dude I absolutely love your humor and you need to do programmer stand up , such a unique humor I love it !

  • @faithcyril513
    @faithcyril513 2 หลายเดือนก่อน

    i love this channel so much!!! True definition of edutainment

  • @Adomas_B
    @Adomas_B 4 หลายเดือนก่อน +3

    Hey Jeff, since you mentioned weird algorhitms any ideas about extraciting readings in a base-plate of prefabulated aluminite surmounted by a malleable logarithmic casing?

  • @cip0llo
    @cip0llo 4 หลายเดือนก่อน +1492

    i have a bot that likes every one of my comments

    • @umbreonben
      @umbreonben 4 หลายเดือนก่อน +196

      your comment has one like - seems accurate

    • @Eddio0141
      @Eddio0141 4 หลายเดือนก่อน +103

      I'd like to imagine there's only 1 bot and it likes your comments once and nothing else

    • @pixiedev
      @pixiedev 4 หลายเดือนก่อน +6

      realy ?

    • @abhijay_hm
      @abhijay_hm 4 หลายเดือนก่อน +14

      no wonder the video mentions most algorithms worth going into dumpsters 🫠

    • @AdidasDoge
      @AdidasDoge 4 หลายเดือนก่อน +3

      Lol

  • @AyanAlam
    @AyanAlam หลายเดือนก่อน

    Hey I used the BOIDS algorithm to design a student-faculty management system for our uni glad to see it mentioned here

  • @filiformis
    @filiformis 4 หลายเดือนก่อน +1

    I've actually been looking for something like simulated annealing to help me solve a problem I've been working on. Thanks.

  • @morijin6903
    @morijin6903 4 หลายเดือนก่อน

    Yo, these algorithm videos are dope dude

  • @sirflimflam
    @sirflimflam 4 หลายเดือนก่อน

    Wave function collapse has been my favorite algorithm for a while now. It's really neat, and it has a badass name.

  • @roelwestrik2956
    @roelwestrik2956 4 หลายเดือนก่อน

    For my major at uni I studied the WFC, Simulated Annealing, Marching Cubes and boids. I never thought I would hear about those ever again but here we are.

  • @Pepso8P
    @Pepso8P 4 หลายเดือนก่อน

    I was really struggling with trying to understand marching cubes a week ago, what a timing.

  • @stockandoptionstrading
    @stockandoptionstrading 4 หลายเดือนก่อน +1

    @stephanenouafo
    1 day ago
    0:00 - Intro
    0:43 - Wave Function Collapse
    1:41 - Diffusion
    2:40 - Simulated Annealing
    3:40 - Sleep Sort
    4:19 - Quantum Bogosort
    4:59 - Shor's
    6:10 - Marching Cubes
    6:48 - Byzantine Fault Tolerance
    7:46 - Boids
    8:17 - Boyer Moore

  • @edoesvasta
    @edoesvasta 4 หลายเดือนก่อน

    Wow thank you man, that double slit aws finally makes sense.

  • @trevorsg
    @trevorsg 4 หลายเดือนก่อน

    Moore was one of my college professors. Loved seeing him pop up at the end!

  • @d7ffab979
    @d7ffab979 4 หลายเดือนก่อน +2

    Oh yeah, Boyer Moore Horspool, had that one in first semester in Informatics. We also programmed Haskell lol.

  • @chillydoog
    @chillydoog 4 หลายเดือนก่อน

    Brilliantly done sir.

  • @alexdev5734
    @alexdev5734 4 หลายเดือนก่อน

    Man I really love that sense of humor in your videos

  • @Ulissescars
    @Ulissescars 4 หลายเดือนก่อน +1

    Wow, what a coincidence, I was reading about Boyer-Moore algorithm yesterday.

  • @lupirite6373
    @lupirite6373 3 หลายเดือนก่อน

    Immediately my favorite 2 algorithms of all time, I'm definitely watching through this video.

  • @plusplus940
    @plusplus940 4 หลายเดือนก่อน

    this was great, more vids like this please!

  • @aaishikdutta290
    @aaishikdutta290 4 หลายเดือนก่อน

    one of the best fireship video.

  • @RajA-me9cl
    @RajA-me9cl 4 หลายเดือนก่อน

    Quality stuff. Thank you

  • @zaytham760
    @zaytham760 4 หลายเดือนก่อน +2

    Could you apply that last one to the library of babel algorithm and find anything? Seems like an interesting project.

  • @Daniil-gs2wt
    @Daniil-gs2wt 4 หลายเดือนก่อน +1

    Love this video, very educational

  • @MrAbrazildo
    @MrAbrazildo 4 หลายเดือนก่อน

    Wow. 6:50, I didn't know about the Byzantine stuff, but I reached a similar conclusion when talking about plain crashes, and how I would code its sensors.

  • @thesleepykoala
    @thesleepykoala 4 หลายเดือนก่อน +1

    Sweet Roguelike Tutorial my dude

  • @HelloKittyFanMan
    @HelloKittyFanMan 4 หลายเดือนก่อน

    Cool video. Happy Christmas!

  • @eatfruitsalad345
    @eatfruitsalad345 4 หลายเดือนก่อน +1

    I remember reading a comment on some other CS related vid that said that back in the old days of coding, programs were like masterful works of art kind of like Baroque music - meant to fulfill a certain task as efficiently and basically not be touched after creation. Probably this led to some really great algorithms being created during that time (though I’m not saying we should revert back to unmaintainable obscure “art” code)

    • @conradmbugua9098
      @conradmbugua9098 4 หลายเดือนก่อน +1

      so this is where the saying "if it works don't fix it" originates from

  • @b3rgundy
    @b3rgundy 4 หลายเดือนก่อน

    That was some spicy interesting content, bravo!

  • @hfa7927
    @hfa7927 4 หลายเดือนก่อน

    Cutting down on AWS bill is highly compelling explanation for the collapse of the wave function; it makes perfect sense.👏

  • @TheInvestmentCircle
    @TheInvestmentCircle 4 หลายเดือนก่อน

    Boyer Moore is quite interesting, nice find Sir Ship of Fire.

  • @thegreensphere
    @thegreensphere 4 หลายเดือนก่อน

    Dude, your humor is amazing

  • @ghosts857
    @ghosts857 3 หลายเดือนก่อน

    You are really good at computer science not only creating website you understand deeply inside of computer science

  • @Hakermaker
    @Hakermaker 4 หลายเดือนก่อน

    I remember how Wave Function Collapse was theme of my first course work i ever made. It's so much easier to understend then other generative algorithms

  • @-uz
    @-uz 4 หลายเดือนก่อน

    Id love another video like this !😊

  • @nightfantasygirl
    @nightfantasygirl 4 หลายเดือนก่อน +1

    Came to watch as soon as I got the notification!

  • @mcmoneyleswag
    @mcmoneyleswag 4 หลายเดือนก่อน

    A fireship video that doesn't fill me with existential dread? I'm still full of it, but liking the change of mood.

  • @lancemarchetti8673
    @lancemarchetti8673 4 หลายเดือนก่อน +1

    Cool upload!
    I've been working on a new digital image Steganography idea that doesn't rely on an algorithm, but leaves the target image untouched and applies a given co-ordinate reference to the target bytes for extraction in the correct sequence. So technically, I could extract a 300KB GIF image of a fishing boat from a 124KB Jpeg image of a wedding dress. So basically you could never extract the boat bytes without the coordinate sequence.
    Because the boat has not been algoritmically 'worked into' the target image (wedding dress).
    I'm pretty excited about my findings...

  • @ExpensivePizza
    @ExpensivePizza 4 หลายเดือนก่อน

    When I realized sleep sort actually sorts it blew my mind. It might not be fast but at least it runs the same speed on an old computer vs a new one.

  • @adamswartz6598
    @adamswartz6598 4 หลายเดือนก่อน

    Cheeky DTFT equation in the thumbnail love it!

  • @praveenraj9713
    @praveenraj9713 4 หลายเดือนก่อน

    This channel is gold! 🔥

  • @corster8221
    @corster8221 4 หลายเดือนก่อน +2

    I was hoping you would cover bloom filters

  • @flipperiflop
    @flipperiflop 4 หลายเดือนก่อน

    This was really interesting!

  • @matthewbarr8986
    @matthewbarr8986 4 หลายเดือนก่อน

    Early fireship vids hit different