Class Planner

java.lang.Object
edu.tufts.hrilab.action.planner.Planner
Direct Known Subclasses:
FFPlanner, Pddl4jPlanner

public abstract class Planner extends Object
  • Field Details

    • log

      protected final org.slf4j.Logger log
    • pddl

      protected Pddl pddl
      Last instantiated Pddl. Cached so that the Domain and Problem can be retrieved.
  • Constructor Details

    • Planner

      public Planner()
  • Method Details

    • registerWithTRADE

      public void registerWithTRADE()
      Register to make services available (e.g., getCurrentPlan, getDomain)
    • plan

      protected abstract String plan(File domain, File problem)
      Only method that needs to be implemented by a class extending the Planner class.
      Returns:
    • plan

      public final ParameterizedAction plan(Goal goal, ActionConstraints constraints, StateMachine stateMachine)
      Main access point to use any planner that extends the base Planner class. Serves as both a factory method and execution method, where only the resulting plan is returned.
      Parameters:
      goal -
      stateMachine -
      Returns:
    • getPddlDomain

      public Domain getPddlDomain()
      Return the last PDDL Domain. Can be null.
      Returns:
    • getPddlProblem

      public Problem getPddlProblem()
      Return the last PDDL Problem. Can be null.
      Returns:
    • getCurrentPlan

      public String getCurrentPlan()
      Return the last generated plan. This is currently only for RapidLearn integration. This should really be exposed in relation to the goal that the plan is for, since in general concurrent goals can be running.
      Returns:
    • getCurrentDomain

      public Domain getCurrentDomain()
      Return the last generated pddl Domain. This is currently only for RapidLearn integration. This should really be exposed in relation to the goal that the plan is for, since in general concurrent goals can be running.
      Returns: