Class EnablementPlanner

java.lang.Object
ai.badmonkey.agentspaces.planner.EnablementPlanner
All Implemented Interfaces:
Planner

public final class EnablementPlanner extends Object implements Planner
The enablement planner (strategy B1 read as a planner): one step, the enabled action whose effects reach the goal; stuck otherwise, naming what is missing. The cheapest planner, and the right one when the fleet's cards already cover the goal in one action.
  • Field Details

  • Constructor Details

    • EnablementPlanner

      public EnablementPlanner()
  • Method Details

    • name

      public String name()
      Description copied from interface: Planner
      The planner's name, written on the plan.
      Specified by:
      name in interface Planner
    • plan

      public Plan plan(String goal, PlanningState state, List<PlanAction> actions, List<Constraint> constraints, PlanBudget budget)
      Description copied from interface: Planner
      A plan from the state to the goal.
      Specified by:
      plan in interface Planner
      Parameters:
      goal - the term to reach: a type's simple name or a situation
      state - what holds for the key now
      actions - the actions the fleet offers
      constraints - the constraints in force; a plan that would violate one is not returned
      budget - the depth and width
      Returns:
      the plan, empty with a reason when none is found