🍳 Planning · Search · AI Reasoning

Robot Chef

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!

πŸ—ΊοΈ Kitchen Map
πŸ” BFS vs DFS
⭐ A* Search
πŸ‘¨β€πŸ³ Recipe Planner
πŸ† Badge

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.

🍳
Wizzy the AI Tutor
Meet Chef-Bot! πŸ€– The kitchen is a state space β€” a graph where each cell is a state and each move is an action. Click any tile to set the goal, and Chef-Bot will find a path! AI planning problems are always graphs like this β€” from chess moves to robot arms!

Step 1 β€” The Kitchen as a State Space

Click to set goal Β· Robot starts at πŸ€–

πŸ—ΊοΈ State Space

Grid size8 Γ— 6 = 48 states
Robot positionβ€”
GoalClick to set
Path lengthβ€”
Nodes exploredβ€”
Kitchen items:
πŸ₯• Fridge Β· 🍳 Stove Β· πŸ”ͺ Chopping board
πŸ₯£ Mixing bowl Β· πŸ§‚ Spice rack
⬛ Obstacle (walls/counters)
🍳
Wizzy the AI Tutor
Watch BFS and DFS explore the kitchen differently! 🌊 BFS spreads out in all directions like a wave β€” it guarantees the shortest path. πŸ”οΈ DFS dives deep into one corridor first β€” faster memory-wise but might find a longer path. Watch the explored cells fill in!

Step 2 β€” BFS vs DFS Side by Side

🌊 Breadth-First Search
πŸ”οΈ Depth-First Search
Path lengthβ€”
Nodes visitedβ€”
Optimal?β€”
Path lengthβ€”
Nodes visitedβ€”
Optimal?β€”
// Press Run to see both searches animate
Run both searches to compare them!
🍳
Wizzy the AI Tutor
A* is the gold standard of pathfinding! ⭐ It uses a heuristic β€” an estimate of the remaining distance β€” to prioritise which cells to explore. Watch how it focuses its search towards the goal instead of spreading everywhere like BFS. Google Maps uses A* to find your route!

Step 3 β€” A* Pathfinding

g(n)
Cost from start
h(n)
Heuristic to goal
f(n) = g+h
Priority score

⭐ A* Stats

Path lengthβ€”
Nodes exploredβ€”
vs BFS nodesβ€”
HeuristicManhattan dist.
A* uses f(n) = g(n) + h(n). Nodes with lower f scores are explored first.
🍳
Wizzy the AI Tutor
Now plan a multi-step recipe! πŸ‘¨β€πŸ³ Some steps depend on others β€” you can't fry vegetables before you've chopped them. AI must find a valid topological ordering that respects all dependencies. This is the same problem factory robots face every day!

Step 4 β€” Recipe Dependency Planner

Recipe: Dal Tadka

πŸ“… Parallel Execution Timeline

πŸ‘¨β€πŸ³ Planner Stats

Total steps8
Steps done0
Total timeβ€”
AI optimal timeβ€”
The AI uses topological sort to find a valid ordering. Steps without dependencies can run in parallel!
🍳
Wizzy the AI Tutor
🎊 You've mastered AI search and planning! BFS, DFS, A* β€” these are some of the most used algorithms in all of computer science. They power GPS navigation, chess engines, robot arms, game AI, and logistics planning. The Robot Chef is in good hands!
🍳

Planning Master Badge!

You mastered BFS, DFS, A* search, and dependency-aware recipe planning!

🍳 WhizzStep AI Lab
This certifies that
Student Name
has mastered AI Search & Planning β€” BFS, DFS, A* & Recipe Planning
Search Expert
A* Navigator
Planning Master
whizzstep.in

Key Concepts Mastered

State Space

πŸ—ΊοΈ The Graph

Any problem solvable by AI can be modelled as a graph: nodes = states, edges = actions. AI planning = graph search.

BFS

🌊 Optimal but Slow

Explores neighbours layer by layer. Guaranteed shortest path but visits many nodes. O(b^d) space complexity.

DFS

πŸ”οΈ Fast but Suboptimal

Dives deep first. Low memory but may find a very long path. Can get stuck in infinite loops without visited tracking.

A*

⭐ Best of Both

f(n) = g(n) + h(n). Heuristic guides the search. Optimal with an admissible heuristic. Powers GPS and game pathfinding.

Topological Sort

πŸ“‹ Dependency Order

Order tasks respecting dependencies. Used in build systems, project planning, recipe execution, and assembly lines.

Heuristic

🧭 Smart Guess

An estimate that guides search. Manhattan distance, Euclidean distance, or domain knowledge. Admissible = never overestimates.