Goal Stack Planning in Artificial Intelligence
Goal Stack Planning:
The Goal stack is like a node in a search tree, if there is a choice of action, we create branches. Goal stack planning uses a stack to hold goals and actions to satisfy the goals, and a knowledge base to hold the current state, action schemas and domain axioms.
Goal Stack Planning Algorithm:
Step-1: Push the original goal on the stack. Repeat until the stack is empty.
Step-2: If the stack top is a compound goal, push its unsatisfied subgoals on the stack.
Step-3: If the stack top is a single unsatisfied goal. It replaces it with an action that makes it
satisfied and push the action’s precondition on the stack.
Step-4: If stack top is an action, pop it from the stack, execute it and change the knowledge base by the action’s effects.
Step-5: If stack top is a satisfying goal, pop it from the stack.