Uninformed search: BFS & DFS
Step 3 of 13 in Classical AI · Build · Easy
Search explores states from a start until it finds a goal. BFS goes level by level and finds the shortest path; DFS dives deep and uses little memory but can get lost.
Build it
Maze solver
Parse a text maze and solve it with BFS and DFS; print the path and nodes expanded.
Done when: BFS path is shortest; handles a maze with no solution.
Resources
- Wikipedia: Breadth-first search Article
- Berkeley CS188 Course
- Red Blob Games: A* Article
- AIMA (Russell & Norvig) Book
Earn this star
On the map, you log what you built. Finish the step and its star lights.
Open this step on the map