Skip to content

Latest commit

 

History

History
17 lines (14 loc) · 943 Bytes

GraphPlan.md

File metadata and controls

17 lines (14 loc) · 943 Bytes

GRAPHPLAN

AIMA3e

function GRAPHPLAN(problem) returns solution or failure

graph ← INITIAL-PLANNING-GRAPH(problem)
goals ← CONJUNCTS(problem.GOAL)
nogoods ← an empty hash table
for tl = 0 todo
   if goals all non-mutex in St of graph then
     solution ← EXTRACT-SOLUTION(graph, goals, NUMLEVELS(graph), nogoods)
     if solution ≠ failure then return solution
   if graph and nogoods have both leveled off then return failure
   graph ← EXPAND-GRAPH(graph, problem)


Figure ?? The GRAPHPLAN algorithm. GRAPHPLAN calls EXPAND-GRAPH to add a level until either a solution is found by EXTRACT-SOLUTION, or no solution is possible.