Maze generation with Aldous-Broder algorithm

Поделиться
HTML-код
  • Опубликовано: 13 сен 2024
  • How to generate a maze with Aldous-Broder method.
    github.com/fer...

Комментарии • 19

  • @_insalatadicetrioli_
    @_insalatadicetrioli_ Год назад +51

    It looks like it's trying to find a way out of its own maze😭

  • @seeker2889
    @seeker2889 Год назад +13

    the single brain cell in my brain trying to figure out the awnser to 2+2

  • @moonmountain_
    @moonmountain_ Год назад +27

    this is the the maze generation equivalent of the bozo sort lmao

    • @VIue_
      @VIue_ Год назад +3

      its one of the only algorithms that produces a truly random maze, with an equal distribution between all possible mazes

    • @acorlan145
      @acorlan145 Год назад +2

      @@VIue_ I mean, there is likely ways to still improve apon it, like stopping it from deciding HEY LETS GO OVER THIS ALREADY 100% FILLED SPOT 250 TIMES!

  • @sian2005
    @sian2005 4 года назад +9

    Looks amazing! Continue this cool maze algorithms playlist and maybe even create a infinite one!

  • @PunmasterSTP
    @PunmasterSTP Год назад +5

    Aldous-Broder? More like “Amazing maze creator!” 👍

  • @simonkormendy849
    @simonkormendy849 Год назад +3

    I managed to solve this maze as it was being generated.

  • @goodboiadvsp3297
    @goodboiadvsp3297 4 года назад +9

    So I've never seen this algorithm before. If I were to guess I'd say that it uses a dead end pathfinding algorithm until it comes across a cell whose neighbors haven't been created then chooses randomly between the "unpathed" neighbors which way to travel. Am I even close?

    • @goodboiadvsp3297
      @goodboiadvsp3297 4 года назад +6

      It cannot be using a stack because it keeps going back to where it's been over and over

    • @FistDaMonkey
      @FistDaMonkey 3 года назад +11

      Very close. It doesn't choose an unpathed neighbor. It just chooses a neighbor. However a path is created only when it's an unvisited neighbor. This algorithm is used to create a uniform spanning tree of pathways. If it has any bias to gravitate towards unvisited cells, then it is no longer unbiased. That's why it chooses a cell at complete random regardless of whether it's been visited/pathed or not.

    • @goodboiadvsp3297
      @goodboiadvsp3297 3 года назад +8

      @@FistDaMonkey Oh, I see it now, that's also why the "path creator" can skip over walls, interesting, terribly inefficient though

    • @no_name4796
      @no_name4796 2 года назад +4

      Nope it simply starts at a random position, choose a random direction and if the cell was already explored does nothing, otherwise it creates a path between the two cells.
      Loops this until all cells are visited

  • @comic-typ5919
    @comic-typ5919 2 года назад +3

    Easteregg: wirh 2x speed, there are two red dots ! ;D

  • @glaz.stalina
    @glaz.stalina Год назад +1

    4:26

  • @xfirexheartx8840
    @xfirexheartx8840 Год назад +1

    i thought this was a maze solving algorithm nad was like, man he sure sucks are solving a maze-

  • @8bit_cat72
    @8bit_cat72 Год назад +4

    4:26 accidentally made a swastika.

    • @simonkormendy849
      @simonkormendy849 Год назад +2

      I can see two swastikas in the maze, a white and a black one.