Class Operator

java.lang.Object
edu.uky.ai.planning.Operator

public class Operator extends Object
An operator is an action template that describes one way to change the world in terms of its precondition (what must be true before the action can be taken) and effect (what becomes true after the action is taken).
Author:
Stephen G. Ware
  • Field Details

    • name

      public final String name
      The name of the action
    • parameters

      public final ImmutableArray<Variable> parameters
      The parameters that provide the specific details for the action
    • precondition

      public final Proposition precondition
      What must be true before the action can be taken
    • effect

      public final Proposition effect
      What becomes true after the action is taken
  • Constructor Details

    • Operator

      public Operator(String name, ImmutableArray<Variable> parameters, Proposition precondition, Proposition effect)
      Constructs a new action template.
      Parameters:
      name - the name of the action
      parameters - the parameters that provide specific detail
      precondition - what must be true before
      effect - what becomes true after
    • Operator

      public Operator(String name, Variable[] parameters, Proposition precondition, Proposition effect)
      Constructs a new action template.
      Parameters:
      name - the name of the action
      parameters - the parameters that provide specific detail
      precondition - what must be true before
      effect - what becomes true after
  • Method Details

    • makeStep

      public Step makeStep(Substitution substitution)
      Creates a ground step (i.e. a specific action) from this action template.
      Parameters:
      substitution - provides bindings for each of the operator's parameters
      Returns:
      a step
    • toString

      public String toString()
      Overrides:
      toString in class Object