Package com.embabel.plan
Interface Planner
-
- All Implemented Interfaces:
public interface Planner<S extends PlanningSystem, W extends WorldState, P extends Plan>A planner is a system that can plan from a set of actions to a set of goals. A planner should have a way of determining present state, such as the GOAP WorldStateDeterminer. The representation of state can differ between planners.
-
-
Method Summary
Modifier and Type Method Description abstract WworldState()Current world state abstract PplanToGoal(Collection<Action> actions, Goal goal)Plan from here to the given goal Return null if no plan found List<P>plansToGoals(PlanningSystem system)Return the best plan to each goal from the present world state. PbestValuePlanToAnyGoal(PlanningSystem system)Return the best plan to any goal PbestValuePlanToAnyGoal(PlanningSystem system, Set<String> excludedActionNames)Return the best plan to any goal, excluding specified actions. abstract Sprune(S planningSystem)Return a PlanningSystem that excludes all actions that cannot help achieve one of the goals from the present world state. -
-
Method Detail
-
worldState
abstract W worldState()
Current world state
-
planToGoal
abstract P planToGoal(Collection<Action> actions, Goal goal)
Plan from here to the given goal Return null if no plan found
- Parameters:
actions- The available actionsgoal- The goal to plan to
-
plansToGoals
List<P> plansToGoals(PlanningSystem system)
Return the best plan to each goal from the present world state. The plans (one for each goal) are sorted by net value, descending.
-
bestValuePlanToAnyGoal
P bestValuePlanToAnyGoal(PlanningSystem system)
Return the best plan to any goal
-
bestValuePlanToAnyGoal
P bestValuePlanToAnyGoal(PlanningSystem system, Set<String> excludedActionNames)
Return the best plan to any goal, excluding specified actions. Used to prevent infinite loops when replanning.
- Parameters:
system- The planning systemexcludedActionNames- Names of actions to exclude from planning
-
-
-
-