Planning Algorithms
Find a sequence of actions that turns the current state into a goal state.
The idea
A planner works with states, actions (with preconditions and effects) and a goal. State-space search tries action sequences forward from the start or backward from the goal; plan-space search edits partial plans. Heuristics extracted from a relaxed version of the problem make it practical.
Watch it run
This is a real computation, not a drawing. Pause, step, change the settings, or try new random data.
- current
- frontier
- explored
- path
Walls are dark, brown cells are mud (cost 3), everything else costs 1. Find a route from S to G.
Compare modes on the same map: A* and UCS find the cheapest route, greedy is fast but can be fooled.
Step by step
- 1Describe the initial state, the goal and the available actions.
- 2Pick an action whose preconditions hold.
- 3Apply its effects to get a new state.
- 4Search until the goal is satisfied and return the action sequence.
Where it is used
Robotics, logistics, game AI, automated scheduling.
Watch out for
The state space is enormous without good heuristics.