Class AStarGoapPlanner
-
- All Implemented Interfaces:
-
com.embabel.plan.Planner,com.embabel.plan.goap.GoapPlanner
public final class AStarGoapPlanner extends OptimizingGoapPlanner
Implements a Goal-Oriented Action Planning system using the A* algorithm. A* works by finding the optimal sequence of actions to transform an initial state into a goal state while minimizing total cost. See https://en.wikipedia.org/wiki/A*_search_algorithm
The algorithm works as follows:
Start with the initial world state
Maintain an open list (priority queue) of states to explore, prioritized by f-score
For each state, explore all achievable actions, calculating:
Always expand the state with the lowest f-score first
Track visited states and their best known costs to avoid cycles and redundant exploration
Continue until finding a state that satisfies the goal conditions
The implementation ensures finding the optimal (lowest cost) sequence of actions by properly tracking path costs and using an admissible heuristic function.
-
-
Field Summary
Fields Modifier and Type Field Description private final WorldStateDeterminerworldStateDeterminer
-
Constructor Summary
Constructors Constructor Description AStarGoapPlanner(WorldStateDeterminer worldStateDeterminer)
-
Method Summary
Modifier and Type Method Description -
Methods inherited from class com.embabel.plan.goap.OptimizingGoapPlanner
getWorldStateDeterminer, planToGoal, prune, worldState -
Methods inherited from class com.embabel.plan.Planner
bestValuePlanToAnyGoal, plansToGoals -
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
-
Constructor Detail
-
AStarGoapPlanner
AStarGoapPlanner(WorldStateDeterminer worldStateDeterminer)
-
-
-
-