Package | Description |
---|---|
org.opennars.control | |
org.opennars.control.concept | |
org.opennars.entity |
Data entities that are independently stored
|
org.opennars.inference |
The inference rules and control functions
|
org.opennars.interfaces | |
org.opennars.io |
Input/output management
|
org.opennars.io.events | |
org.opennars.main | |
org.opennars.operator | |
org.opennars.operator.mental | |
org.opennars.plugin.mental | |
org.opennars.plugin.perception | |
org.opennars.storage |
Storage management
|
Modifier and Type | Field | Description |
---|---|---|
protected Task |
DerivationContext.currentTask |
Modifier and Type | Method | Description |
---|---|---|
Task |
DerivationContext.getCurrentTask() |
Modifier and Type | Method | Description |
---|---|---|
List<Task> |
DerivationContext.doublePremiseTask(Term newContent,
TruthValue newTruth,
BudgetValue newBudget,
boolean temporalInduction,
boolean overlapAllowed) |
Shared final operations by all double-premise rules, called from the
rules except StructuralRules
|
List<Task> |
DerivationContext.doublePremiseTask(Term newContent,
TruthValue newTruth,
BudgetValue newBudget,
boolean temporalInduction,
boolean overlapAllowed,
boolean addToMemory) |
|
static List<Task> |
TemporalInferenceControl.proceedWithTemporalInduction(Sentence newEvent,
Sentence stmLast,
Task controllerTask,
DerivationContext nal,
boolean SucceedingEventsInduction,
boolean addToMemory,
boolean allowSequence) |
Modifier and Type | Method | Description |
---|---|---|
void |
DerivationContext.addTask(Task t,
String reason) |
tasks added with this method will be remembered by this NAL instance; useful for feedback
|
void |
DerivationContext.addTask(Task currentTask,
BudgetValue budget,
Sentence sentence,
Sentence candidateBelief) |
Activated task called in MatchingRules.trySolution and
Concept.processGoal
|
static void |
TemporalInferenceControl.addToSequenceTasks(DerivationContext nal,
Task newEvent) |
|
boolean |
DerivationContext.derivedTask(Task task,
boolean revised,
boolean single,
boolean overlapAllowed) |
Derived task comes from the inference rules.
|
boolean |
DerivationContext.derivedTask(Task task,
boolean revised,
boolean single,
boolean overlapAllowed,
boolean addToMemory) |
|
static boolean |
TemporalInferenceControl.eventInference(Task newEvent,
DerivationContext nal) |
|
static void |
TemporalInferenceControl.NewOperationFrame(Memory mem,
Task task) |
|
static List<Task> |
TemporalInferenceControl.proceedWithTemporalInduction(Sentence newEvent,
Sentence stmLast,
Task controllerTask,
DerivationContext nal,
boolean SucceedingEventsInduction,
boolean addToMemory,
boolean allowSequence) |
|
void |
DerivationContext.setCurrentTask(Task currentTask) |
Modifier and Type | Field | Description |
---|---|---|
Task |
ProcessGoal.ExecutablePrecondition.executable_precond |
Modifier and Type | Method | Description |
---|---|---|
protected static void |
ProcessJudgment.addToTargetConceptsPreconditions(Task task,
DerivationContext nal) |
Add <(&/,a,op()) =/> b> beliefs to preconditions in concept b
|
static void |
ProcessGoal.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.
|
static void |
ProcessAnticipation.confirmAnticipation(Task task,
Concept concept,
DerivationContext nal) |
Whether a processed judgement task satisfies the anticipations within concept
|
static boolean |
ProcessGoal.executeOperation(DerivationContext nal,
Task t) |
Entry point for all potentially executable operation tasks.
|
private static boolean |
ProcessGoal.executePrecondition(DerivationContext nal,
ProcessGoal.ExecutablePrecondition precon,
Concept concept,
Sentence projectedGoal,
Task task) |
Execute the operation suggested by the most applicable precondition
|
static void |
ProcessAnticipation.firePredictions(Task judgementTask,
Concept concept,
DerivationContext nal,
Timable time,
TaskLink tasklink) |
Fire predictictive inference based on beliefs that are known to the concept's neighbours
|
static void |
ProcessJudgment.handleOperationFeedback(Task task,
DerivationContext nal) |
Handle the feedback of the operation that was processed as a judgment.
|
protected static boolean |
ProcessJudgment.isExecutableHypothesis(Task task,
DerivationContext nal) |
Check whether the task is an executable hypothesis of the form
<(&/,a,op()) =/> b>.
|
protected static void |
ProcessGoal.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
|
static void |
ProcessJudgment.processJudgment(Concept concept,
DerivationContext nal,
Task task) |
To accept a new judgment as belief, and check for revisions and solutions.
|
protected static void |
ProcessGoal.processOperationGoal(Sentence projectedGoal,
DerivationContext nal,
Concept concept,
Task oldGoalT,
Task task) |
To process an operation for potential execution
only called by processGoal
|
protected static void |
ProcessQuestion.processQuestion(Concept concept,
DerivationContext nal,
Task task) |
To answer a question by existing beliefs
|
static boolean |
ProcessTask.processTask(Concept concept,
DerivationContext nal,
Task task,
Timable time) |
Directly process a new task within a concept.Here task can either be a judgement, goal, question or quest.The function is called exactly once on each task.Using
local information and finishing in a constant time.
|
static void |
ProcessQuestion.ProcessWhatQuestion(Concept concept,
Task ques,
DerivationContext nal) |
Recognize an existing belief task as solution to the what question task, which contains a query variable
|
static void |
ProcessQuestion.ProcessWhatQuestionAnswer(Concept concept,
Task t,
DerivationContext nal) |
Recognize an added belief task as solution to what questions, those that contain query variable
|
static void |
ProcessGoal.questionFromGoal(Task task,
DerivationContext nal) |
Generate <?how =/> g>? question for g! goal.
|
Modifier and Type | Method | Description |
---|---|---|
private static ProcessGoal.ExecutablePrecondition |
ProcessGoal.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
|
Modifier and Type | Field | Description |
---|---|---|
Task |
Concept.AnticipationEntry.negConfirmation |
|
Task |
TaskLink.targetTask |
The Task linked.
|
Modifier and Type | Field | Description |
---|---|---|
List<Task> |
Concept.beliefs |
Judgments directly made about the term Use List because of access
and insertion in the middle
|
List<Task> |
Concept.desires |
Desire values on the term, similar to the above one
|
List<Task> |
Concept.executable_preconditions |
|
List<Task> |
Concept.general_executable_preconditions |
|
List<Task> |
Concept.questions |
Pending Question directly asked about the term
Note: since this is iterated frequently, an array should be used.
|
List<Task> |
Concept.quests |
Pending Quests to be answered by new desire values
|
Bag<Task<Term>,Sentence<Term>> |
Concept.seq_before |
|
Bag<TaskLink,Task> |
Concept.taskLinks |
Task links for indirect processing
|
Modifier and Type | Method | Description |
---|---|---|
static Task |
Concept.addToTable(Task newTask,
List<Task> table,
int capacity,
boolean rankTruthExpectation) |
Add a new belief (or goal) into the table Sort the beliefs/desires by
rank, and remove redundant or low rank one
|
Task |
TaskLink.getTarget() |
Get the target Task
|
Task |
TaskLink.name() |
|
Task |
Concept.selectCandidate(Task query,
List<Task> list,
Timable time) |
Select a belief value or desire value for a given query
|
Modifier and Type | Method | Description |
---|---|---|
List<Task> |
Concept.getBeliefs() |
returns unmodifidable collection wrapping beliefs
|
List<Task> |
Concept.getDesires() |
returns unmodifidable collection wrapping beliefs
|
List<Task> |
Concept.getQuess() |
|
List<Task> |
Concept.getQuestions() |
Return the questions, called in ComposionalRules in
dedConjunctionByQuestion only
|
Modifier and Type | Method | Description |
---|---|---|
void |
Concept.addToTable(Task task,
boolean rankTruthExpectation,
List<Task> table,
int max,
Class eventAdd,
Class eventRemove,
Object... extraEventArguments) |
|
static Task |
Concept.addToTable(Task newTask,
List<Task> table,
int capacity,
boolean rankTruthExpectation) |
Add a new belief (or goal) into the table Sort the beliefs/desires by
rank, and remove redundant or low rank one
|
Sentence |
Concept.getBelief(DerivationContext nal,
Task task) |
Select a isBelief to interact with the given task in inference
|
TaskLink |
Concept.linkToTask(Task task,
DerivationContext content) |
Link to a new task from all relevant concepts for continued processing in
the near future for unspecified time.
|
Task |
Concept.selectCandidate(Task query,
List<Task> list,
Timable time) |
Select a belief value or desire value for a given query
|
Modifier and Type | Method | Description |
---|---|---|
void |
Concept.addToTable(Task task,
boolean rankTruthExpectation,
List<Task> table,
int max,
Class eventAdd,
Class eventRemove,
Object... extraEventArguments) |
|
static Task |
Concept.addToTable(Task newTask,
List<Task> table,
int capacity,
boolean rankTruthExpectation) |
Add a new belief (or goal) into the table Sort the beliefs/desires by
rank, and remove redundant or low rank one
|
Task |
Concept.selectCandidate(Task query,
List<Task> list,
Timable time) |
Select a belief value or desire value for a given query
|
Constructor | Description |
---|---|
AnticipationEntry(float negConfirmationPriority,
Task negConfirmation,
long negConfirm_abort_mintime,
long negConfirm_abort_maxtime) |
|
TaskLink(Task t,
TermLink template,
BudgetValue v,
int recordLength) |
Constructor
|
Modifier and Type | Method | Description |
---|---|---|
static List<Task> |
TemporalRules.temporalInduction(Sentence s1,
Sentence s2,
DerivationContext nal,
boolean SucceedingEventsInduction,
boolean addToMemory,
boolean allowSequence) |
Modifier and Type | Method | Description |
---|---|---|
private static void |
RuleTables.applyRuleTable(TaskLink tLink,
TermLink bLink,
DerivationContext nal,
Task task,
Sentence taskSentence,
Term taskTerm,
Term beliefTerm,
Sentence belief) |
|
private static void |
RuleTables.goalFromQuestion(Task task,
Term taskTerm,
DerivationContext nal) |
|
static void |
RuleTables.goalFromWantBelief(Task task,
short tIndex,
short bIndex,
Term taskTerm,
DerivationContext nal,
Term beliefTerm) |
|
static boolean |
LocalRules.match(Task task,
Sentence belief,
Concept beliefConcept,
DerivationContext nal) |
The task and belief have the same content
|
(package private) static BudgetValue |
BudgetFunctions.solutionEval(Sentence problem,
Sentence solution,
Task task,
Memory memory) |
Deprecated.
|
static BudgetValue |
LocalRules.solutionEval(Task problem,
Sentence solution,
Task task,
DerivationContext nal) |
Evaluate the quality of a belief as a solution to a problem, then reward
the belief and de-prioritize the problem
|
static float |
LocalRules.solutionQuality(boolean rateByConfidence,
Task probT,
Sentence solution,
Memory memory,
Timable time) |
Evaluate the quality of the judgment as a solution to a problem
|
static boolean |
LocalRules.trySolution(Sentence belief,
Task task,
DerivationContext nal,
boolean report) |
Check if a Sentence provide a better answer to a Question or Goal
|
static BudgetValue |
BudgetFunctions.update(Task task,
TruthValue bTruth,
Parameters narParameters) |
Update a belief
|
Modifier and Type | Method | Description |
---|---|---|
private static void |
TemporalRules.appendConclusion(DerivationContext nal,
TruthValue truth1,
BudgetValue budget1,
Statement statement1,
List<Task> success) |
Modifier and Type | Method | Description |
---|---|---|
R |
TaskConsumer.addInput(Task task,
Timable time) |
consumes a task
|
Modifier and Type | Method | Description |
---|---|---|
Task |
Narsese.parseTask(String s) |
Enter a new Task in String into the memory, called from InputWindow or
locally.
|
Task |
Parser.parseTask(String narsese) |
Modifier and Type | Field | Description |
---|---|---|
private Task |
AnswerHandler.question |
Modifier and Type | Method | Description |
---|---|---|
abstract void |
Events.ConceptBeliefAdd.onBeliefAdd(Concept c,
Task t,
Object[] extra) |
|
abstract void |
Events.ConceptBeliefRemove.onBeliefRemove(Concept c,
Sentence removed,
Task t,
Object[] extra) |
|
abstract void |
Events.TaskImmediateProcess.onProcessed(Task t,
DerivationContext n) |
|
abstract void |
Events.TaskAdd.onTaskAdd(Task t,
String reason) |
|
void |
AnswerHandler.start(Task question,
Nar n) |
Modifier and Type | Method | Description |
---|---|---|
Nar |
Nar.addInput(Task t,
Timable time) |
|
private boolean |
Nar.dispatchToSensoryChannel(Task task) |
dispatches the task to the sensory channel if necessary
|
private void |
NarNode.sendTask(Task t) |
Send tasks that are above priority threshold and contain the optional mustContainTerm
|
Modifier and Type | Field | Description |
---|---|---|
private Task |
Operation.task |
Modifier and Type | Method | Description |
---|---|---|
Task |
Operation.getTask() |
|
Task |
Operator.ExecutionResult.getTask() |
Modifier and Type | Method | Description |
---|---|---|
protected List<Task> |
FunctionOperator.execute(Operation operation,
Term[] args,
Memory m,
Timable time) |
|
protected List<Task> |
NullOperator.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
called from Operator
|
protected abstract List<Task> |
Operator.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
Required method for every operator, specifying the corresponding
operation
|
Modifier and Type | Method | Description |
---|---|---|
void |
Operation.setTask(Task task) |
stores the currently executed task, which can be accessed by Operator execution
|
Modifier and Type | Method | Description |
---|---|---|
protected List<Task> |
Anticipate.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
|
protected List<Task> |
Believe.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a judgment with a given statement
|
protected List<Task> |
Consider.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To activate a concept as if a question has been asked about it
|
protected List<Task> |
Doubt.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To activate a concept as if a question has been asked about it
|
protected List<Task> |
Evaluate.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a quest with a given statement
|
protected List<Task> |
FeelBusy.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To get the current value of an internal sensor
|
protected List<Task> |
FeelSatisfied.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To get the current value of an internal sensor
|
protected List<Task> |
Hesitate.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To activate a concept as if a question has been asked about it
|
protected List<Task> |
Name.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a judgment with a given statement
|
protected List<Task> |
Register.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To register a new operator
|
protected List<Task> |
Remind.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To activate a concept as if a question has been asked about it
|
protected List<Task> |
Want.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a goal with a given statement
|
protected List<Task> |
Wonder.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a question with a given statement
|
protected List<Task> |
Feel.feeling(float value,
Memory memory,
Timable time) |
To get the current value of an internal sensor
|
Modifier and Type | Method | Description |
---|---|---|
void |
Anticipate.anticipate(Term content,
Memory memory,
long occurenceTime,
Task t,
Timable time) |
|
void |
Anticipate.anticipationFeedback(Term content,
Task t,
Memory memory,
Timable time) |
Modifier and Type | Method | Description |
---|---|---|
protected List<Task> |
Abbreviation.Abbreviate.execute(Operation operation,
Term[] args,
Memory memory,
Timable time) |
To create a judgment with a given statement
|
Modifier and Type | Method | Description |
---|---|---|
boolean |
Abbreviation.canAbbreviate(Task task) |
|
static void |
InternalExperience.InternalExperienceFromBelief(Memory memory,
Task task,
Sentence belief,
Timable time) |
|
static void |
InternalExperience.InternalExperienceFromTask(Memory memory,
Task task,
boolean full,
Timable time) |
|
static boolean |
InternalExperience.InternalExperienceFromTaskInternal(Memory memory,
Task task,
boolean full,
Timable time) |
Modifier and Type | Field | Description |
---|---|---|
(package private) Task |
VisionChannel.Prototype.task |
Modifier and Type | Field | Description |
---|---|---|
List<Task> |
SensoryChannel.results |
Modifier and Type | Method | Description |
---|---|---|
abstract Nar |
SensoryChannel.addInput(Task t,
Timable time) |
|
Nar |
VisionChannel.addInput(Task t,
Timable time) |
|
boolean |
VisionChannel.AddToMatrix(Task t,
Timable time) |
Constructor | Description |
---|---|
Prototype(Task t) |
Modifier and Type | Field | Description |
---|---|---|
Task |
Memory.lastDecision |
Modifier and Type | Field | Description |
---|---|---|
Bag<Task<Term>,Sentence<Term>> |
Memory.novelTasks |
|
Bag<Task<Term>,Sentence<Term>> |
Memory.recent_operations |
|
Bag<Task<Term>,Sentence<Term>> |
Memory.seq_current |
Modifier and Type | Method | Description |
---|---|---|
void |
Memory.addNewTask(Task t,
String reason) |
add new task that waits to be processed in the next cycleMemory
|
void |
Memory.inputTask(Timable time,
Task t) |
|
void |
Memory.inputTask(Timable time,
Task task,
boolean emitIn) |
Input task processing.
|
void |
Memory.localInference(Task task,
Parameters narParameters,
Timable time) |
|
void |
Memory.output(Task t) |
|
void |
Memory.removeTask(Task task,
String reason) |
Copyright © 2020 OpenNARS. All rights reserved.