Superpositions, Sudoku, the Wave Function Collapse algorithm.

แชร์
ฝัง
  • เผยแพร่เมื่อ 16 พ.ย. 2024

ความคิดเห็น • 618

  • @tonogram
    @tonogram 2 ปีที่แล้ว +771

    With a name like Wave Function Collapse, I was expecting some really advanced mathematics, but this is actually beautifully simple and intuitive.

    • @aarondewindt
      @aarondewindt 2 ปีที่แล้ว +113

      A lot of things in mathematics are beautifully simple and intuitive. It's just that mathematicians are really bad at explaining things. Or to be more exact, they are really good at explaining things to other mathematicians.

    • @jessiejanson1528
      @jessiejanson1528 2 ปีที่แล้ว +3

      i dont know about beautiful, but simple for sure.

    • @Piotrek7654321
      @Piotrek7654321 2 ปีที่แล้ว +3

      Just like the Universe.

    • @rawallon
      @rawallon 2 ปีที่แล้ว +2

      @@Piotrek7654321 i dont know about Universe, but you for sure.

    • @Piotrek7654321
      @Piotrek7654321 2 ปีที่แล้ว +3

      @@rawallon A stranger on the Internet just called me beautiful? Aww, thank you

  • @morganlak4337
    @morganlak4337 2 ปีที่แล้ว +1415

    Never thought about comparing it to sudoku, that's such a smart way of describing it!

    • @m4rt_
      @m4rt_ 2 ปีที่แล้ว +11

      I thought of the game carcasone.

    • @ocaly
      @ocaly 2 ปีที่แล้ว +2

      @@m4rt_ 2D representation for something that looks complicated in 3D. Nice!

    • @lucadeacha
      @lucadeacha 2 ปีที่แล้ว +4

      @@ocaly Yes but interestingly, you can also see the sudoku as a 3d problem. You have an X and Y axis, but given that any number from 0 to 9 can be on the same space at the same time you can also represent this as a Z axis.

    • @ocaly
      @ocaly 2 ปีที่แล้ว +2

      @@lucadeacha you could look at it from that way and there are many sudoku variants even using that (f.e. "skyscraper sudokus").

    • @ocaly
      @ocaly 2 ปีที่แล้ว +2

      @@lucadeacha or cubedoku's which is precisely what you're describing. but skyscraper sudokus is more well-known example among the online sudoku peers.

  • @martinbecker2164
    @martinbecker2164 2 ปีที่แล้ว +521

    This is literally the best explanation for how this algorithm works.

    • @OMGclueless
      @OMGclueless 2 ปีที่แล้ว +19

      Well, the explanation is super simple because it completely glosses over/ignores what happens when the constraint propagation fails and you need to backtrack or start over. There is a split second at 12:04 where two big pink exclamation points show a failed propagation -- what to do with that is not explained at all, and in fact is the most difficult part of designing a WFC algorithm that doesn't run for hours or fail 99% of the time.

    • @martinbecker2164
      @martinbecker2164 2 ปีที่แล้ว +4

      @@OMGclueless Well, Ok that's a fair point & I did notice that but didn't quite understand what they meant, but for an explanation on how it generally works, I've found a lot of other explanations to be super complex or not very intuitive, especially when compaired to this explanation.

    • @kenhaley4
      @kenhaley4 2 ปีที่แล้ว

      @@OMGclueless Agreed. I was just about to reply with this same question.

    • @mrmartinwatson1
      @mrmartinwatson1 2 ปีที่แล้ว

      I see Martin, i like

    • @kyousouka
      @kyousouka 2 ปีที่แล้ว +3

      @@OMGclueless Backtracking is not part of WFC itself and is thus probably just outside this video's scope - the original WFC implementation quits when it encounters a contradiction. Backtracking just happens to be a very helpful addition to WFC :] That said, the fundamentals of backtracking are fairly simple to explain and probably could've been mentioned - you push every collapse and the pre-collapse state onto a stack, and if the collapse causes a contradiction, you pop that collapse and remove that candidate from that cell's candidate list and propagate that. If that removal also causes a contradiction, you pop yet another collapse off the stack, and so on. The difficulty comes from storing the pre-collapse state in such a way that it won't eat all your memory or require recalculating most of the state at each Undo, and that's definitely beyond this video's scope.

  • @iankaranja7765
    @iankaranja7765 4 ปีที่แล้ว +504

    This is one of the most well-presented videos, on a technical subject, that I have ever watched on youtube. Great work, looking forward to more content.

  • @Sergeeeek
    @Sergeeeek 2 ปีที่แล้ว +105

    This is super useful for generating levels with a set number of points of interest.
    You add whatever things you want to have in a level at random points and maybe add roads between them and after that you can make this algorithm do its magic to fill in the details. Very nice!

    • @jessiejanson1528
      @jessiejanson1528 2 ปีที่แล้ว +5

      though it would be different for every user unless you have some way to define what goes where specifically by the coordinate.

    • @Lumegrin
      @Lumegrin ปีที่แล้ว +9

      @@jessiejanson1528 as long as your pseudorandom selection process is consistent then it shouldn't be an issue

  • @Ziboo30
    @Ziboo30 4 ปีที่แล้ว +48

    Best WFC explanation I've watch. Thanks !

    • @fearian
      @fearian 4 ปีที่แล้ว +2

      It really is! And even provides links to all the further reading you want. Great video.

    • @alejmc
      @alejmc 4 ปีที่แล้ว +4

      Agreed.
      Definitely brings this ‘WFC’ that we have been seeing from the likes of Oskar Stalberg since some years now to humanly possible understandable levels. The Sudoku explanation is quite straightforward to grasp the concept, at least for me.
      Deserves the patron support hands down.

  • @scottcourtney8878
    @scottcourtney8878 2 ปีที่แล้ว +62

    Terrific explanation! I recently finished reading "Doors of Eden" (by Adrian Tchaikovsky), a novel in which wave function collapse influences the plot outcome significantly. I'm going to share the link for this video with my wife and a friend who've also recently read the book but who are both humanities scholars rather than techies, because if they simply stop at the beginning of the programming section, they will get an extremely lucid and approachable explanation of the theory. Well done, and thanks for sharing.

  • @cohan000
    @cohan000 2 ปีที่แล้ว +13

    Normally my brain hurts when I try to grasp new concepts, but that just didn't happen now. You have a way of explaining things making the concepts very easy to understand

  • @noamrtd-g4f
    @noamrtd-g4f 6 หลายเดือนก่อน +3

    Watched more than 3 hours of implementations and explanations about wave function collapse,
    Can confirm that this one was the best from every aspect,
    Thank you!.

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

    I could never wrap my mind around Wave Function Collapse until I saw this. Thank you

  • @luck3949
    @luck3949 2 ปีที่แล้ว +221

    If you add recursive backtracking to this algorithm, you'll end up with a classic algorithm for SAT solving, called DPLL. Also, DPLL is very old and outdated, so if your constraints are too complex to find a solution with it, consider taking inspiration from CDCL algorithm, or just use the off the shelf SAT/SMT solver, like Z3.

    • @sweetcornwhiskey
      @sweetcornwhiskey 2 ปีที่แล้ว +10

      I'm working on creating a complex sudoku solver for variant sudoku rules, and my current algorithm that I came up with seems to reduce to DPLL. Do you know of some elementary resources where I could learn some more about CDCL to make my algorithm faster? I got a minor in comp sci, but most of the resources that I've seen are borderline graduate CS level.

    • @luck3949
      @luck3949 2 ปีที่แล้ว +11

      @@sweetcornwhiskey I learned about that algorithms from presentations of Emina Torlak from her Washington University course, you can google that course. Once you get through the notation, that should be understandable.

    • @luck3949
      @luck3949 2 ปีที่แล้ว +7

      @@sweetcornwhiskey CSE 507

    • @sweetcornwhiskey
      @sweetcornwhiskey 2 ปีที่แล้ว +1

      @@luck3949 Thanks!

    • @notjnsz
      @notjnsz 2 ปีที่แล้ว +1

      @@sweetcornwhiskey there's been a SAT competition for the past 20 years: see SAT RACE / SAT COMP. You will find an assortment of different solvers source codes to look at/reference. A lot of the content is dense/state of the art, but the assorted info over the years is probably the best resource for speeding up SAT solving. You might find a PhD dissertation/Survey or two where the "preliminaries" or "background” section explain completely the ideas, reasoning behind it, etc. before jumping into what is likely more difficult.

  • @3nertia
    @3nertia 2 ปีที่แล้ว +16

    That was mind-bending! Really some food for thought! And you've convinced me to take up Sudoku! I really love that you relate Sudoku to wave function collapse in this way! Really helped something *click* in my brain; thank you!

  • @vast634
    @vast634 2 ปีที่แล้ว +13

    The idea to just analyze an example level to determine valid sockets is great. I did not even think about that. Makes it much easier to create complex rules and have the computer imitate the style of a human Level Designer.

  • @abraxas2658
    @abraxas2658 2 ปีที่แล้ว +5

    This is honestly not only extremely well explained, but also beautiful too

  • @oncedidactic
    @oncedidactic 2 ปีที่แล้ว +28

    Nicely presented! I thought you were going to talk about physics but I watched the whole video because this algo idea is so fun, and all the info was a good mix of visual demo and technical details, perfect for morning coffee :D

  • @TeamUnpro
    @TeamUnpro 2 ปีที่แล้ว +3

    the amount of math and editing required for this video is insanely impressive

  • @cintron3d
    @cintron3d 4 ปีที่แล้ว +43

    Wow, this was amazing. So well organized, articulated, and indeed respectful of my time. You sir have earned a sub + bell. Thank you for this I'm sure I'll end up referring back to this one day.

  • @drummerman883
    @drummerman883 10 หลายเดือนก่อน +1

    That was just enough information to be able to write it and not be lost. Thank you for not over or under explaining it like most videos do.

  • @technopoptart
    @technopoptart ปีที่แล้ว +2

    heck, you explained wave function collapse so beautifully in just two minutes. i am sticking around for the rest of the video of course but even so i had to compliment you on being so succinct

  • @MujjMujj
    @MujjMujj 4 ปีที่แล้ว +19

    Man you're so good! cant believe this channel is so small :O really helped me out with my next project :)

  • @asadplatypus3940
    @asadplatypus3940 ปีที่แล้ว +1

    As someone looking to do a wave function collapse implementation the really helped me understand

  • @CodingCircle
    @CodingCircle 2 ปีที่แล้ว +1

    Best WFC Explanation never thought of comparing it to Sudoku. Nice Vid!!

  • @abdullahx8118
    @abdullahx8118 2 ปีที่แล้ว +1

    holy shit this makes it make so much sense, i wouldnt have known this comparison would work so well! Good discovery!

  • @alexandrupostolache6704
    @alexandrupostolache6704 4 ปีที่แล้ว +3

    Excellent video! Thanks for sharing! Also, you are the reason I created a Patreon and you're the first person I'm sponsoring! :) Great job!

  • @lupin2232
    @lupin2232 2 ปีที่แล้ว +1

    v0_0 is how my face looks when looking at the astonishing amount of informative data in this video. Kudos on how well presented this is too!

  • @albingrahn5576
    @albingrahn5576 2 ปีที่แล้ว +2

    this is awesome, you explained the concept so well that it just intuitively clicked for me. i feel like the number of tools in my mental toolbox as a programmer has increased after watching this video

  • @noxabellus
    @noxabellus ปีที่แล้ว +1

    This is the best wave function collapse video out there. By far. 10/10

  • @evilplantosavetheworld
    @evilplantosavetheworld 3 ปีที่แล้ว +17

    I've been reading about wave function collapse for a few days, and four minutes into your video I already understand it better than everything else I've seen combined. Fantastic job

  • @jashanbhullar3384
    @jashanbhullar3384 2 ปีที่แล้ว +5

    I really appreciate the effort you put in to explain what I once thought was a really difficult algorithm to understand. Great Job!

  • @Nightstick24
    @Nightstick24 ปีที่แล้ว +1

    Wow, comparing it to sudoku was smart. That made it so much easier to wrap my head around!

  • @dameck9570
    @dameck9570 2 ปีที่แล้ว

    When i saw this title i realized, i have implemented WFC for Sudoku without realizing it. Amazing :)

  • @minleyfox5231
    @minleyfox5231 2 ปีที่แล้ว +1

    This is the best explanation video on WFC I have found! Alone with the example at the beginning I could conceptualize the algorithm. great work!

  • @maybenat
    @maybenat 3 ปีที่แล้ว +1

    This channel is ridiculously underrated
    wow

  • @RemyDrijkoningen
    @RemyDrijkoningen 3 ปีที่แล้ว +154

    This is by far the clearest and most detailed explanation i saw on the subject, thanx a lot ! I was wondering, just like for sudoku, is it possible that the algirithm runs into a dead end by selecting a combination of tiles that doesn't allow a suitable neighbour in some cases? Is there a strategy for the algorithm to backtrack and correct that, or is it better to start over again or carefully craft a tileset that allows every possible combinations?

    • @MartinDonald
      @MartinDonald  3 ปีที่แล้ว +61

      This can absolutely happen. Backtracking is a good option definitely, but I never got around to implementing anything like that. My implementation just starts the whole process again if any cell ends up completely empty of options. Making sure your tileset covers all bases definitely helps avoid contradictions.

    • @j.j.maverick9252
      @j.j.maverick9252 2 ปีที่แล้ว +4

      I was thinking that for each axis we might store a growing list of changes, so more recent changes are at the end. Then we could do a targeted backtrack looking only at the values which directly constrain a given location.
      I haven’t worked out how that would fit with the required propagation steps yet… it wouldn’t be as clean as a simple backtrack everything (breadth first search) but it feels like it should be hugely faster.

    • @abraxas2658
      @abraxas2658 2 ปีที่แล้ว +2

      @@j.j.maverick9252 If you only remove selected changes, there could be issues where the algorithm would prefer certain patterns of cells to be faaar more used than other patterns. Especially if a constraint is quite old, it would have influenced the choices for a lot of other cells. You could absolutely consider this intended behavior, but a small change in your tiles could cause quite large repercussions on the average outcome.

    • @jessiejanson1528
      @jessiejanson1528 2 ปีที่แล้ว

      seems like the best solution is just to solve it in a circular pattern going around the starting point. i cant imagine it would ever get stuck.

    • @sabata2
      @sabata2 2 ปีที่แล้ว +1

      @@jessiejanson1528 It absolutely can get stuck. You're talking about a FIFO Stack (First In First Out) for cell determination which is what this video shows, so long as you are leveraging squares (as in this example) you can run into impossible scenarios.
      In example, look at your number pad, take 2, 4, 6, and 8 to be South, West, East, and North respectively. You pick a determinate cell for North. You're now acting on East (clockwise), and just like North you have all the same options. Fast forward a bit and now deal with "North East" Your cell now has 2 restrictions applying to it to which you may have contradictory rules (See the example at 5:35).
      This is just hypothesis at the point of writing this but I suspect that one of three things can help mitigate this:
      1) Hexagonal Cylinders (making all surrounding cells directly relate to an immediately previously set cell's face)
      2) Writing an algo to parse your "tile set" and make sure you have Tile Sets that fulfil all iterable conditions (so assuming outwards propagation, 2 faces for a 2d square tileset, 3 faces for a 2d hexagon tileset and, atleast 3 faces for a 3d tileset)
      3) Making sure no Tile Face Socket exists only twice. (for the same reason as #2, if a face only has one possible match you're significantly more likely to enter a dead end.

  • @Gogglesofkrome
    @Gogglesofkrome 2 ปีที่แล้ว +2

    The way you break down the software is perfect for learning key concepts on a functional level. In my eyes, you are the gold standard. You can bet that I will be watching everything you'd ever made over the upcoming days

  • @slackstation
    @slackstation 3 ปีที่แล้ว +1

    This may be one of the best videos on this topic I've ever seen. Its explanatory power is breathtaking. This just shows the principle so well with so little wasted effort.

  • @gharren
    @gharren ปีที่แล้ว +1

    Hands down the best explanation for WFC I've ever seen. Kudos!

  • @HighlandHellboy
    @HighlandHellboy ปีที่แล้ว +1

    I’m from the complete other side of the spectrum, I’m a physics student in their penultimate year of their undergraduate and I know and understand superposition and collapsing a wavefunction in quantum mechanics, but have never seen it used for mapping. That’s awesome!

  • @PhilipBlyth
    @PhilipBlyth ปีที่แล้ว

    By far the best introduction to and explanation of WFC I've come across...! Thank you for taking the time to make this.

  • @xomvoid_akaluchiru_987
    @xomvoid_akaluchiru_987 6 หลายเดือนก่อน +1

    I saw the Bad North inspired island generation in the thumbnail :) Love the game! I can understand why Oskar is so stuck on the idea (He keeps going back to it on Twitter)

  • @rosva4331
    @rosva4331 2 ปีที่แล้ว

    Of all the videos that I watched on wave function collapse, yours is by far the best at explaining it.

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

    I’m a nuclear physicist who misread the title & assumed this was about quantum wavefunctuions… don’t think I’ll ever do anything with this information, but got interested & stuck around anyways. Incredibly engaging & high-quality video, & an excellent explanation even for someone who doesn’t do much with algorithms! :)

  • @thinhhb8117
    @thinhhb8117 2 ปีที่แล้ว

    you're the master of making difficult-to-understand things become much easier ones.

  • @PinikRahman
    @PinikRahman 4 ปีที่แล้ว +3

    wow.. this is the most amazing explanation ever.. Please Please keep making high quality videos like this.

  • @MrPooleish
    @MrPooleish 2 ปีที่แล้ว +3

    It took me longer than I'd like to admit to realize this wasn't about Thomas Young's double slit experiment.

  • @jessef3462
    @jessef3462 2 ปีที่แล้ว +4

    Thank You! This video helped it all make sense! I love your "wax on, wax off" trick about teaching us Wave Function Collapse through sudoku! Right when I'm like wait, I want to learn about Wave Function Collapse, you have already tricked me into learning it! I knew karate the whole time.

  • @chrisbovington9607
    @chrisbovington9607 2 ปีที่แล้ว +2

    This is a great example of how failing to explain some incidental details, which are not relevant to the topic but which have been arbitrarily chosen for illustration, leaves the audience confounded and unable to fully engage with what otherwise seems like a clear explanation of the topic.
    I mean, what the hell are these tile maps? What am I looking at? What am I supposed to intuit from these images? I don't understand the relation between the various tile images, so I am unable to recognise the patterns that are supposed to be illustrative. Not only does this fail to illustrate the explanation, it confounds it. I can't process the audio while my brain is trying to decode the impossible visual.
    But the Sudoku was such a perfect illustration that I understood that part instantly. Cheers.

    • @sabata2
      @sabata2 2 ปีที่แล้ว

      I believe that description is done at 4:33, but is slightly poor as it doesn't expressly point out the incongruity of the "negative space" the "isn't" tile creates.

  • @Darfk
    @Darfk 3 ปีที่แล้ว +1

    dude, this video is so good, I've looked at explanations on WFC for ages and this one really made me understand it

  • @custom_name854
    @custom_name854 2 ปีที่แล้ว +2

    Very nice and compact video, makes me want to program my own implementation from scratch.
    Also, the comparison of the wave function collapse to sudoku was what made it click for me, very well done :)

  • @abdullahihussein9389
    @abdullahihussein9389 5 หลายเดือนก่อน +1

    good explanation. Highly appreciated.

  • @qwertyuuytrewq825
    @qwertyuuytrewq825 3 ปีที่แล้ว +2

    Wow! Thank you for a great explanation and for mentioning all these references!
    I realized that when developing something like a tile engine I can avoid making an editor to create test levels (at least at the beginning) and use WFC to generate levels automatically.

  • @itToxic
    @itToxic 2 ปีที่แล้ว

    Absolutely loved this video, especially love how in the beginning you compared it to something that everyone can understand before going more in-depth.

  • @sirpaleet9144
    @sirpaleet9144 2 ปีที่แล้ว +1

    Our teacher added this as our study material on a course lol. Very informative!

    • @MartinDonald
      @MartinDonald  2 ปีที่แล้ว +1

      This makes me unreasonably proud, thank you for sharing! 🙏

    • @sirpaleet9144
      @sirpaleet9144 2 ปีที่แล้ว

      @@MartinDonald You should!

  • @MinecraftEpicPlayer
    @MinecraftEpicPlayer 3 ปีที่แล้ว +2

    That explanation of sudoku could be a video all of its own. Very clear and precise! It didn't just explain the rules; it highlighted both how you should play, what you should pay attention to, and why it's the way it is in just two minutes.

  • @AntEr3Bu5
    @AntEr3Bu5 2 ปีที่แล้ว +1

    good video! haven't found many good channels like this explaining algorithms or CS concepts, have subbed!

  • @vyzirT09
    @vyzirT09 2 ปีที่แล้ว +1

    just got my own implementation working in unity, this video was a massive help!

  • @allgreatfictions
    @allgreatfictions 2 ปีที่แล้ว +10

    I love that "Usually, a sudoku grid doesn't start off blank". There's some really great puzzles that have been made in the past few years that start with blank grids, and they're amazing. Sure, they've got extra constraints, but it's still sudoku, and it definitely counts.

  • @jasperkennis8499
    @jasperkennis8499 2 ปีที่แล้ว +1

    First explanation of WFC that I actually understood, thanks!

  • @dotvhs
    @dotvhs ปีที่แล้ว +1

    Holy crap, I just stumbled upon this channel randomly and I'm stunned. Amazing content, thank you for this.

  • @bilalakil
    @bilalakil 4 ปีที่แล้ว +2

    Thank you for the fantastically clear, intuitive, and well-articulated explanation 🙂 Much appreciated ❤️

  • @erikm9768
    @erikm9768 3 ปีที่แล้ว +1

    marian42 is such a champ for making that repository available for free ;-)

  • @clockworkkirlia7475
    @clockworkkirlia7475 ปีที่แล้ว +1

    Brilliant, concise, informative and fun! A truly exquisite piece of education.

  • @addmix
    @addmix 2 ปีที่แล้ว +1

    Really kinda surprised this channel isnt bigger

  • @remotestar
    @remotestar 4 ปีที่แล้ว +2

    Wow, very well explained!
    So, the constraints of reality lead to the collapse of wave function.

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

    As you mentioned, adding weights is important for a more practical usage.
    You can go a different direction if you really lean into depending on weights. You can have cells that are not adjacent weigh in on what cell type a cell should be. This can help limit behavior like too many house cells or never having a large ocean, since you can have ocean cells make other ocean cells very likely to be chosen if they are nearby or in certain land/ocean patterns. You could even add a property to your ocean cells indicating the depth, which affects the probability of other cells (no land cells within X cells of a X-hundred foot deep ocean cell).

  • @VictorGordan
    @VictorGordan 2 ปีที่แล้ว +2

    Really nice explanation and visuals!

  • @devwolph3019
    @devwolph3019 3 ปีที่แล้ว +3

    Thank you!
    I'm trying to make my own game featured infinite level generation, This will help me a lot !!
    Your explanation is so well, even a none English speaker like me can understand :D

  • @DariusKazemi
    @DariusKazemi 4 ปีที่แล้ว +3

    WOW, this is an incredibly well-made video. You've done such a good job teaching and choosing your metaphors.

  • @Gdquest
    @Gdquest 4 ปีที่แล้ว +131

    Excellent! I'll be eagerly watching your future videos.
    Are you also using Doom Emacs with the gdscript layer? If you have any suggestions for improvements they're welcome on the repository.

    • @MartinDonald
      @MartinDonald  4 ปีที่แล้ว +22

      I'm actually using pycharm but I can see why you'd think that, the colour schemes are almost identical. I'll definitely look into it though.

    • @kingsleylangston1959
      @kingsleylangston1959 3 ปีที่แล้ว

      I guess im asking the wrong place but does anyone know a tool to get back into an Instagram account..?
      I was stupid lost the password. I would love any tips you can offer me

    • @kingsleylangston1959
      @kingsleylangston1959 3 ปีที่แล้ว

      @Sylas Casey i really appreciate your reply. I got to the site on google and I'm trying it out atm.
      Looks like it's gonna take a while so I will get back to you later when my account password hopefully is recovered.

    • @kingsleylangston1959
      @kingsleylangston1959 3 ปีที่แล้ว +1

      @Sylas Casey it did the trick and I actually got access to my account again. I am so happy!
      Thank you so much you saved my account !

    • @sylascasey3828
      @sylascasey3828 3 ปีที่แล้ว

      @Kingsley Langston no problem :)

  • @OodldoodlNoodlesocks
    @OodldoodlNoodlesocks 2 ปีที่แล้ว

    I have never watched any video related to wave function collapse but youtube really wants me to watch a whole bunch of videos on wave function collapse lately.

  • @anothercastle17
    @anothercastle17 ปีที่แล้ว

    Very informative, thank you. I’ve been considering implementing wfc in music composition, and this explanation helps me grasp it. Have a pleasant day.

  • @g4fly4ever8
    @g4fly4ever8 2 ปีที่แล้ว

    I entered with no expectations and I didn't even know what are you going to talk about. But i was impressed by the video so to the next video we go

  • @JanezKrnc-San
    @JanezKrnc-San 2 ปีที่แล้ว +1

    Looked at some of your other videos as well. Brilliant content! Subbed.

  • @jeanahollings
    @jeanahollings 2 ปีที่แล้ว +1

    this was brilliant! come back, make more, please!!

  • @quantumsoul3495
    @quantumsoul3495 4 ปีที่แล้ว +3

    I thought it was a 50k subs channel. Those animations are awesome !

  • @howardjones543
    @howardjones543 2 ปีที่แล้ว

    This is the best explanation I've seen for WFC - it's got me thinking about where I can apply it, and I don't write games.
    I also accidentally watched all your back-catalogue. Pity there aren't more - they're all really well explained!

  • @NathanielWyatt
    @NathanielWyatt 2 ปีที่แล้ว +1

    Thanks for this high density video! Beautiful masterpiece, you earned my subscription!

  • @iruns1246
    @iruns1246 2 ปีที่แล้ว +1

    Not sure why there's a need for super fancy names for this. Superposition and wave function collapse? It's just constraints, options removal from constraints, and then options picking.
    It's a great explanation (and I know that the video maker didn't name them) but the naming still baffles me.
    Has that feeling of how Hollywood and alternative med (mis)use the word "quantum".

  • @yonatanchapal7800
    @yonatanchapal7800 2 ปีที่แล้ว +1

    What a great way to explain this! Wonderful video

  • @drtristanbehrens
    @drtristanbehrens 4 ปีที่แล้ว +4

    This is so great! The presentation is excellent! Will share on LinkedIn soon.

  • @crazydave6787
    @crazydave6787 ปีที่แล้ว +1

    This is a fantastic video. I'm half asleep and still understood what was going on. Going to implement something similar in my next game. Honestly kinda weird that this showed up on my front page 🧐

  • @folkusonme
    @folkusonme 2 ปีที่แล้ว +1

    (honestly I don't think I've pressed subscribe this quickly before) amazing video ♥️

  • @willlacey7621
    @willlacey7621 2 ปีที่แล้ว +2

    AWESOME video! Thank you so much for the extremely detailed overview of this algorithm! I definitely feel like I have a grasp on how to implement and modify it. Thanks again!

  • @jefflhama
    @jefflhama 4 ปีที่แล้ว +2

    Woah, I'll have to do a tier in your patreon, this is so well explained

  • @qwsafirkmc9093
    @qwsafirkmc9093 2 ปีที่แล้ว

    I came out with this algorithm and a friend of mine linked me this video, why are all great ideas already discovered

  • @azeews1368
    @azeews1368 4 ปีที่แล้ว +4

    I'm so glad I found your channel. You really remind me of Sebastian Lague! Your content is phenomenal, I really hope your channel picks up more traction soon. Cheers!

  • @shanmathew152
    @shanmathew152 ปีที่แล้ว

    Sudoku example was brilliant, Thank you so much .🙏.

  • @KakoriGames
    @KakoriGames 2 ปีที่แล้ว +2

    This algorithm reminds me a lot of differential equations, where you are trying to find a function that satisfy a set of rules laid out by the equation, while also satisfying some boundary conditions. In fact, I wonder if a approach similar to differential equations, using some interpolation techniques, can be use to procedurally generate terrain in a way that doesn't use tiles as a alternative to terrains generated by perlin noise. This could also be potentially used to generate non-repeating textures I'd imagine.
    If you wanted to have more agency over what's generated you could also implement some additional boundary conditions. Maybe set a few tiles from the start (like having all the outer tiles be walls, for instance), or even make that some coordinates are not allowed to be certain tiles. You could for instance force a river to pass through the middle of the level by forcing a river start and a river end to exist in the right and left edges of the screen, while disallowing any tiles too far away from the center from being river tiles and disallowing any other tiles to river ends.
    Of course, the more complex the boundary conditions, higher the chance of generating a invalid solution, which may introduce some problems if these thing need to be generated on the fly, so applying some backtracking and doing some manual optimizations may be required. This could also be modified to work with a seed, allowing certain levels to be replayed. This could be used in the final product like Minecraft does, or even just for testing purposes. I'm not a game dev, by the way, but I do know a good amount of programming and find game dev topics fascinating.

  • @EdNieThePianoGuy
    @EdNieThePianoGuy 2 ปีที่แล้ว +1

    Explaining wave function theory is usually quite the challenge, but you managed to do it really nicely by using Sudoku! I'm definitely gonna use this analogy next time I find myself talking about quantum mechanics (whenever that happens, haha).

  • @MiguelAngelJD
    @MiguelAngelJD 3 ปีที่แล้ว +2

    DUDE SUCH A NICE EXPLANATION! THANK YOU SO MUCH

  • @SkylorBeck
    @SkylorBeck ปีที่แล้ว +1

    Hey thanks for this video. I just spent the better part of my day creating a Tilemap generator using the knowledge gained from this video.

  • @peterellisjones1870
    @peterellisjones1870 2 ปีที่แล้ว +1

    Very interesting, thanks Martin. An extension to this would be to add a fourth dimension of time and use the algorithm to create valid random transitions along the dimension of time. Examples could be the creation of rivers via erosion, houses decaying, new constructions appearing in empty lots etc. Since the algorithm doesn't care about the direction of the dimension you could do some crazy stuff like simulate erosion _in reverse_, or a decayed destroyed city turning into a beautiful ancient metropolis as time travels backwards.

  • @vornamenachname8001
    @vornamenachname8001 4 ปีที่แล้ว +1

    so simple but so powerful I love it

  • @romajimamulo
    @romajimamulo 2 ปีที่แล้ว

    Despite this not being a video on quantum mechanics like I thought, it was still quite enjoyable

  • @driftliketokyo34ftw35
    @driftliketokyo34ftw35 ปีที่แล้ว +1

    If there’s one thing this video taught me it’s how to play sudoku

  • @among-us-99999
    @among-us-99999 3 ปีที่แล้ว +6

    Oh damn why didn’t I use that approach at 3:02. every tile containing the whole input...
    Would have made my approach maybe not more efficient but a lot more elegant
    Edit: or the sockets... why didn’t i find this video sooner 😭
    Edit 2: forget it, every part of this video is brilliant

  • @ripp_
    @ripp_ 2 ปีที่แล้ว

    I had no idea this was about game dev, so I'm quite ecited to learn this

  • @alextasarov1341
    @alextasarov1341 ปีที่แล้ว

    I spent time trying to find a fast Sudoku solving algorithm, and I never realized that I was using this exact function! Lol

  • @sabata2
    @sabata2 2 ปีที่แล้ว

    I guess that's more useful for people looking for coding help from this video instead of people looking for a simplified explanation but...
    The bulk tileset shown at 8:10 can be reduced *drastically* if your algorithm takes rotation into account.
    You can see that the 4 closest rows are the same geometry just rotated anywhere between 90 and 270 degrees. Their "Match Sockets" never differ compared to the geometry.
    You can also include overhangs, and cave-like systems with additional rotational checks in your algorithm.
    Lastly, you don't need to process these checks over and over again for each tile placement. You only need to iterate over your whole tileset once and store the available mappings (Tile Option + any rotation [axis + degree] required).
    You can even export this data so that instead of a "running process" it becomes a Constant Configuration Variable and *completely separate* from the rest of the game you're coding. Basically, separating out the "map relational code" into it's own product that is run only when the map tileset is updated. Allowing reuse between game projects.

  • @DavidSmerkous
    @DavidSmerkous 2 ปีที่แล้ว

    Without a doubt one of the best explanations I've heard/seen. Thank you so much for that.