public class ProcessGoal extends Object
Modifier and Type | Class | Description |
---|---|---|
private static class |
ProcessGoal.ExecutablePrecondition |
Constructor | Description |
---|---|
ProcessGoal() |
Modifier and Type | Method | Description |
---|---|---|
static void |
bestReactionForGoal(Concept concept,
DerivationContext nal,
Sentence projectedGoal,
Task task) |
When a goal is processed, use the best memorized reaction
that is applicable to the current context (recent events) in case that it exists.
|
private static ProcessGoal.ExecutablePrecondition |
calcBestExecutablePrecondition(DerivationContext nal,
Concept concept,
Sentence projectedGoal,
List<Task> execPreconditions,
Map<Operation,List<ProcessGoal.ExecutablePrecondition>> anticipationsToMake) |
Search for the best precondition that best matches recent events, and is most successful in leading to goal fulfilment
|
static boolean |
executeOperation(DerivationContext nal,
Task t) |
Entry point for all potentially executable operation tasks.
|
private static boolean |
executePrecondition(DerivationContext nal,
ProcessGoal.ExecutablePrecondition precon,
Concept concept,
Sentence projectedGoal,
Task task) |
Execute the operation suggested by the most applicable precondition
|
protected static void |
processGoal(Concept concept,
DerivationContext nal,
Task task) |
To accept a new goal, and check for revisions and realization, then
decide whether to actively pursue it, potentially executing in case of an operation goal
|
protected static void |
processOperationGoal(Sentence projectedGoal,
DerivationContext nal,
Concept concept,
Task oldGoalT,
Task task) |
To process an operation for potential execution
only called by processGoal
|
static void |
questionFromGoal(Task task,
DerivationContext nal) |
Generate <?how =/> g>? question for g! goal.
|
protected static void processGoal(Concept concept, DerivationContext nal, Task task)
concept
- The concept of the goalnal
- The derivation contexttask
- The goal task to be processedprotected static void processOperationGoal(Sentence projectedGoal, DerivationContext nal, Concept concept, Task oldGoalT, Task task)
projectedGoal
- The current goalnal
- The derivation contextconcept
- The concept of the current goaloldGoalT
- The best goal in the goal tabletask
- The goal taskpublic static void questionFromGoal(Task task, DerivationContext nal)
task
- the task for which the question should be processednal
- The derivation contextpublic static void bestReactionForGoal(Concept concept, DerivationContext nal, Sentence projectedGoal, Task task)
concept
- The concept of the goal to realizenal
- The derivation contextprojectedGoal
- The current goaltask
- The goal taskprivate static ProcessGoal.ExecutablePrecondition calcBestExecutablePrecondition(DerivationContext nal, Concept concept, Sentence projectedGoal, List<Task> execPreconditions, Map<Operation,List<ProcessGoal.ExecutablePrecondition>> anticipationsToMake)
nal
- The derivation contextconcept
- The goal conceptprojectedGoal
- The goal projected to the current timeexecPreconditions
- The procedural hypotheses with the executable preconditionsprivate static boolean executePrecondition(DerivationContext nal, ProcessGoal.ExecutablePrecondition precon, Concept concept, Sentence projectedGoal, Task task)
nal
- The derivation contextprecon
- The procedural hypothesis leading to goalconcept
- The concept of the goalprojectedGoal
- The goal projected to the current timetask
- The goal taskpublic static boolean executeOperation(DerivationContext nal, Task t)
nal
- The derivation conceptt
- The operation goal taskCopyright © 2020 OpenNARS. All rights reserved.