Package com.embabel.agent.core
Class Goal
-
- All Implemented Interfaces:
-
com.embabel.agent.core.AgentSystemStep,com.embabel.agent.core.Operation,com.embabel.common.core.types.Described,com.embabel.common.core.types.HasInfoString,com.embabel.common.core.types.Named,com.embabel.common.core.types.NamedAndDescribed,com.embabel.plan.Goal,com.embabel.plan.Step,com.embabel.plan.goap.GoapGoal,com.embabel.plan.goap.GoapStep
public final class Goal implements GoapGoal, AgentSystemStep
Agent platform goal. Exposes GOAP metadata.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classGoal.Companion
-
Field Summary
Fields Modifier and Type Field Description private final Map<String, ConditionDetermination>preconditionsprivate final Stringnameprivate final Stringdescriptionprivate final Set<String>preprivate final Set<IoBinding>inputsprivate final DomainTypeoutputTypeprivate final Doublevalueprivate final Set<String>tagsprivate final Set<String>examplesprivate final Exportexportprivate final Set<String>knownConditionspublic final static Goal.CompanionCompanion
-
Method Summary
Modifier and Type Method Description Map<String, ConditionDetermination>getPreconditions()Conditions that must be true for this step to execute StringgetName()StringgetDescription()final Set<String>getPre()Set<IoBinding>getInputs()final DomainTypegetOutputType()DoublegetValue()final Set<String>getTags()final Set<String>getExamples()final ExportgetExport()final GoalwithPreconditions(String preconditions)final GoalwithGoalPreconditions(Goal goals)final GoalwithValue(Double value)Create a goal with the given value. StringinfoString(Boolean verbose, Integer indent)final static GoalcreateInstance(String description, Class<?> type, String name, Set<String> tags, Set<String> examples)Convenient method to create a goal requiring creating an instance of this type. final static GoalcreateInstance(String description, Class<?> type, String name, Set<String> tags)Convenient method to create a goal requiring creating an instance of this type. final static GoalcreateInstance(String description, Class<?> type, String name)Convenient method to create a goal requiring creating an instance of this type. final static GoalcreateInstance(String description, Class<?> type)Convenient method to create a goal requiring creating an instance of this type. -
-
Constructor Detail
-
Goal
Goal(String name, String description, Set<String> pre, Set<IoBinding> inputs, DomainType outputType, Double value, Set<String> tags, Set<String> examples, Export export)
- Parameters:
name- name of the goaldescription- description of the goal.pre- preconditions for the goal, as a set of strings.inputs- inputs required for the goal, as a set of IoBinding objects.outputType- if this goal returns a single instance of a domain type, this is the class that will be returned.value- value of the goal, as a ZeroToOne.tags- Set of tags describing classes or capabilities for this specific skill.examples- The set of example scenarios that the skill can perform.
-
-
Method Detail
-
getPreconditions
Map<String, ConditionDetermination> getPreconditions()
Conditions that must be true for this step to execute
-
getDescription
String getDescription()
-
getOutputType
final DomainType getOutputType()
-
getExamples
final Set<String> getExamples()
-
withPreconditions
final Goal withPreconditions(String preconditions)
-
withGoalPreconditions
final Goal withGoalPreconditions(Goal goals)
-
infoString
String infoString(Boolean verbose, Integer indent)
-
createInstance
@JvmOverloads() final static Goal createInstance(String description, Class<?> type, String name, Set<String> tags, Set<String> examples)
Convenient method to create a goal requiring creating an instance of this type.
- Parameters:
description- description of the goaltype- type of the instance to create.name- name of the goal, defaults to "Create ${type.
-
createInstance
@JvmOverloads() final static Goal createInstance(String description, Class<?> type, String name, Set<String> tags)
Convenient method to create a goal requiring creating an instance of this type.
- Parameters:
description- description of the goaltype- type of the instance to create.name- name of the goal, defaults to "Create ${type.
-
createInstance
@JvmOverloads() final static Goal createInstance(String description, Class<?> type, String name)
Convenient method to create a goal requiring creating an instance of this type.
- Parameters:
description- description of the goaltype- type of the instance to create.name- name of the goal, defaults to "Create ${type.
-
createInstance
@JvmOverloads() final static Goal createInstance(String description, Class<?> type)
Convenient method to create a goal requiring creating an instance of this type.
- Parameters:
description- description of the goaltype- type of the instance to create.
-
-
-
-