Grow your YouTube channel like a PRO with a free tool
Get Free YouTube Subscribers, Views and Likes

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

Follow
David Kopec

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 depthfirst search, breadthfirst 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.
https://amzn.to/3i9Olf8

All of the code is available in the chapter 2 folder of the Classic Computer Science Problems in Python GitHub repository.
https://github.com/davecom/ClassicCom...

The Maze Solving GUI is also available on GitHub.
https://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
https://classicproblems.com

posted by bheo5g75