Solving Mazes in Python: Depth-First Search, Breadth-First Search, & A*

แชร์
ฝัง
  • เผยแพร่เมื่อ 28 พ.ค. 2024
  • We will develop code to generate simple mazes in Python and find paths in them to navigate from a starting node to a goal node. Along the way, we will learn the fundamental search algorithms depth-first search, breadth-first search, and A*. To support these algorithms, we will also learn the stack, queue, and priority queue data structures.
    The examples are from chapter 2 of Classic Computer Science Problems in Python.
    amzn.to/3i9Olf8
    All of the code is available in the chapter 2 folder of the Classic Computer Science Problems in Python GitHub repository.
    github.com/davecom/ClassicCom...
    The Maze Solving GUI is also available on GitHub.
    github.com/davecom/MazeSolvin...
    I made a small mistake in the explanation of A*, I meant to say the explored dictionary is storing the g(n) so far, not the f(n). Sorry!
    Follow me on Twitter
    / davekopec
    Find out more about the Classic Computer Science Problems series, including the books in Java and Swift
    classicproblems.com

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

  • @enthusiastjumper8671
    @enthusiastjumper8671 24 วันที่ผ่านมา +1

    TH-cam algorithm did recommend something awesome finally.

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

    It always surprises me that high quality videos are underrated and especially their creators.
    The big problem I see in the video space is that people are only looking for short explanations and don't want to know the underlying things such as how is queue, stack and priority queue implemented. Even though those data structures are easy, this is not the point, the point I try to convey is that a approach from ground up takes longer to watch but in my opinion this facilitates the process of leaning the concept more easily and I guess also enabling the instructor to build on top of his explanation pyramid.
    And also I love your real world examples especially the one with the priority queue and the email inbox, quite intuitive and this video is a lot fun. I searched for a video about getting a refresher in common graph search algorithms after watching a little bit more about Machine Learning.
    Thanks a lot.

  • @matthewcarmody2283
    @matthewcarmody2283 ปีที่แล้ว +8

    This is incredible, I cannot believe you dont have 100times more subscribers

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

      No problem glad you found it useful.

  • @AAAA-rb2hm
    @AAAA-rb2hm ปีที่แล้ว +3

    I recommended your book to our University library, and they bought it for us, thanks, David.

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

    Amazing job @David Kopec. Waiting for more videos like this.

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

      Thank you! Do plan on making more.

  • @user-hz2ne7xi4n
    @user-hz2ne7xi4n 7 หลายเดือนก่อน +1

    you are a real champion..... thanks a lot................

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

    perfect way to show how dfs works! MIT proffesor also talked about mazes with dfs:)

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

    i haven't read you book yet, but due to the headache you saved me, i'll be downloading it shortly, am working on a warehouse simulator

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

      Thanks for buying the book and hope the warehouse simulator goes well.

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

    very well explained 👍

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

      Thank you!

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

    Thank you for sharing this!!!!!

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

      Thanks, Melinda.

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

    Thank you

  • @innocent.amchechesi276
    @innocent.amchechesi276 3 ปีที่แล้ว

    Can you please solve a maze for the longest path using ant system algorithm

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

    how can i implement GUI which youve provided in github using a code of A* algo youve provided?

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

      Going to leave that as an exercise for the watcher.

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

    can you please provide us the A* gui implementation