I Solved The World's Hardest Maze (with Code)

114,797
0
Published 2024-01-02
πŸ’š Link to Code: www.patreon.com/greencode

P.S. Sorry for my upload being late :)

⭐ Other Social Media Links:
πŸ”Š Discord: discord.gg/JsFRUtfMzq
🐦 Twitter: twitter.com/theGreenCoding
πŸ“Έ Instagram: www.instagram.com/greencodecodes/
🎡 Tiktok: www.tiktok.com/@greencodecodes

πŸ”Š Music I Used in this Video: share.epidemicsound.com/7i1d0b

✨ Subscriber count: 11,534 subscribers πŸ’š

I had a lot of fun making this video. Mazes are such a cool way to visualize how algorithms like A* and Dijkstra work. I hope you enjoyed it as much as I did. Let me know what you think in the co

All Comments (21)
  • @DotboT3812
    i love how the wall followers just made maps of europe, i can just imagine using the path as land and non paths as water for a fantasy setting
  • @tiileaf
    To test djikstra on the large maze, use uniform cost search. Same algorithm, same results, but it doesn't load the entirety of the maze in memory at the start which is why your implementation wouldn't work for the large maze. Similar concept to how A* has a limited search frontier (the set possible choices for the algorithm to explore next)
  • @Roaxial
    When you showed that your maze file was >1GB I was so enraged that I decided to reimplement the maze generator and rewrite the part that exports to a file so that it would be smaller and I managed to get it down to about 5.29MB
  • @WH40KHero
    A neat thing i noticed is that the wallfollower algorithms create whats essentially a negative of each others routes. This is pretty neat!
  • I believe legt and right wall followers can be changed to give you the most optimal path, if the cells (when the algorithm backtracks) are removed from the path
  • I think if you want your video to have high quality available right when it comes out, you can just upload it, but schedule it to release sometime in the future. That way youtube will have time to process higher quality.
  • @DqwertyC
    The dead-end filling algorithm is fun because it can be set up as a cellular automata. Make the walls thicker so they're the same size as the passages, then define the the maze so that passages are "living" cells and walls are "dead" cells. The automata only really needs one rule - if a living cell has fewer than 2 living neighbors, it dies. If you set it up with a loop of living cells around the outside of the maze (to keep the entrance and exit always alive), eventually all of cells that make up the dead ends will "die," leaving you with just the solution alive.
  • @DirectalYT
    Wait a second this isn’t code bullet
  • @analyzers9335
    How is A* or Dijkstra not faster? Are you using a priority heap or just tossing everything into an array ?
  • @whyshouldntiGD
    "even thought a* completed 2nd rank and not aat all faster than RH WF, i declare that A* wins the race because it is one of my favourites" worst scam of all time
  • @Vniulus
    4:27 BOGO SORT OF MAZE SOLVING LET'S GOOOOOOOOOOOO
  • @MrRaveYard
    Your video is well produced, but 4600x4600 worth of cells can fit into about 5.4MB of memory if you only use 1 bit of information to store if a wall exists or not.
  • @otter502
    5:19 this only works with these specifc types of mazes whete all of the walls are connected to the edges of the board
  • @rafssoares
    Very cool! πŸ”₯ keep up the consisting uploads
  • @OmarRida10
    How do you do such animated videos? I really want to know how to build things like your character, the maze generation, and pretty much everything. I love them so much!
  • @drdilyor
    why don't use just run... bfs... it will always find the best solution... and dijkstra is useless because its only useful when edges have weihgts. if the weights are all 1, bfs gets the job done