Help a robot navigate a kitchen using BFS, DFS, and A* search β then plan a multi-step recipe respecting ingredient dependencies. The same algorithms power Google Maps and chess engines!
The world is a graph of states. Each node is a situation. Each edge is an action. AI planning = finding the best path through this graph.
Breadth-First Search explores all neighbours before going deeper. Finds the shortest path β but explores many dead ends.
Depth-First Search goes deep before wide. Uses less memory but may find a long path instead of the shortest.
Uses a heuristic (estimated distance to goal) to search smarter. Explores fewer nodes while still finding the optimal path.
You mastered BFS, DFS, A* search, and dependency-aware recipe planning!
Any problem solvable by AI can be modelled as a graph: nodes = states, edges = actions. AI planning = graph search.
Explores neighbours layer by layer. Guaranteed shortest path but visits many nodes. O(b^d) space complexity.
Dives deep first. Low memory but may find a very long path. Can get stuck in infinite loops without visited tracking.
f(n) = g(n) + h(n). Heuristic guides the search. Optimal with an admissible heuristic. Powers GPS and game pathfinding.
Order tasks respecting dependencies. Used in build systems, project planning, recipe execution, and assembly lines.
An estimate that guides search. Manhattan distance, Euclidean distance, or domain knowledge. Admissible = never overestimates.