Robot Chef Search and Planning
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!
How AI Plans and Searches
State Space
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.
BFS
Breadth-First Search explores all neighbours before going deeper. Finds the shortest path β but explores many dead ends.
DFS
Depth-First Search goes deep before wide. Uses less memory but may find a long path instead of the shortest.
A*
Uses a heuristic (estimated distance to goal) to search smarter. Explores fewer nodes while still finding the optimal path.
Step 1 β The Kitchen as a State Space
Click to set goal Β· Robot starts at π€πΊοΈ State Space
π₯ Fridge Β· π³ Stove Β· πͺ Chopping board
π₯£ Mixing bowl Β· π§ Spice rack
β¬ Obstacle (walls/counters)
Step 2 β BFS vs DFS Side by Side
Step 3 β A* Pathfinding
Cost from start
Heuristic to goal
Priority score
β A* Stats
Step 4 β Recipe Dependency Planner
π Parallel Execution Timeline
π¨βπ³ Planner Stats
Planning Master Badge!
You mastered BFS, DFS, A* search, and dependency-aware recipe planning!
Optional. Stays on this device only β not sent to WhizzStep.
Key Concepts Mastered
πΊοΈ The Graph
Any problem solvable by AI can be modelled as a graph: nodes = states, edges = actions. AI planning = graph search.
π Optimal but Slow
Explores neighbours layer by layer. Guaranteed shortest path but visits many nodes. O(b^d) space complexity.
ποΈ Fast but Suboptimal
Dives deep first. Low memory but may find a very long path. Can get stuck in infinite loops without visited tracking.
β Best of Both
f(n) = g(n) + h(n). Heuristic guides the search. Optimal with an admissible heuristic. Powers GPS and game pathfinding.
π Dependency Order
Order tasks respecting dependencies. Used in build systems, project planning, recipe execution, and assembly lines.
π§ Smart Guess
An estimate that guides search. Manhattan distance, Euclidean distance, or domain knowledge. Admissible = never overestimates.
About this lab
Learning objective: Compare breadth-first, depth-first and A* search strategies solving a toy planning problem.
What this simplifies: This is a search/planning demonstration; it does not generate recipes.
Privacy: No learner input leaves the device.
Teacher prompt: Ask the class why this simulation might mislead someone who takes it too literally.
Reflect: What is one thing this activity showed you that you did not expect?
β Back to all Labs