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.io.events | |
org.opennars.plugin.mental | |
org.opennars.storage |
Storage management
|
Modifier and Type | Field | Description |
---|---|---|
protected Sentence |
DerivationContext.currentBelief |
Modifier and Type | Method | Description |
---|---|---|
Sentence |
DerivationContext.getCurrentBelief() |
Modifier and Type | Method | Description |
---|---|---|
void |
DerivationContext.addTask(Task currentTask,
BudgetValue budget,
Sentence sentence,
Sentence candidateBelief) |
Activated task called in MatchingRules.trySolution and
Concept.processGoal
|
static List<Task> |
TemporalInferenceControl.proceedWithTemporalInduction(Sentence newEvent,
Sentence stmLast,
Task controllerTask,
DerivationContext nal,
boolean SucceedingEventsInduction,
boolean addToMemory,
boolean allowSequence) |
|
void |
DerivationContext.setCurrentBelief(Sentence currentBelief) |
|
boolean |
DerivationContext.singlePremiseTask(Sentence newSentence,
BudgetValue newBudget) |
Modifier and Type | Method | Description |
---|---|---|
static void |
ProcessAnticipation.anticipate(DerivationContext nal,
Sentence mainSentence,
BudgetValue budget,
long mintime,
long maxtime,
float urgency,
Map<Term,Term> substitution) |
|
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.
|
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
|
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
|
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
|
Modifier and Type | Field | Description |
---|---|---|
private Sentence |
Task.bestSolution |
|
Sentence |
Task.parentBelief |
|
Sentence<T> |
Task.sentence |
Modifier and Type | Field | Description |
---|---|---|
Bag<Task<Term>,Sentence<Term>> |
Concept.seq_before |
Modifier and Type | Method | Description |
---|---|---|
Sentence |
Sentence.clone() |
Clone the Sentence
|
Sentence |
Sentence.clone(boolean makeEternal) |
|
Sentence |
Sentence.clone(Term t) |
clone with a different term
|
Sentence |
Concept.getBelief(DerivationContext nal,
Task task) |
Select a isBelief to interact with the given task in inference
|
Sentence |
Task.getBestSolution() |
Get the best-so-far solution for a Question or Goal
|
Sentence |
Task.getParentBelief() |
Get the parent belief of a task
|
Sentence |
Task.name() |
|
Sentence |
Sentence.projection(long targetTime,
long currentTime,
Memory mem) |
project a judgment to a difference occurrence time
|
Modifier and Type | Method | Description |
---|---|---|
void |
Task.setBestSolution(Memory memory,
Sentence judg,
Timable time) |
Set the best-so-far solution for a Question or Goal, and report answer
for input question
|
Constructor | Description |
---|---|
Task(Sentence<T> s,
BudgetValue b,
Sentence parentBelief) |
Constructors for double premise derived task
|
Task(Sentence<T> s,
BudgetValue b,
Sentence parentBelief,
Sentence solution) |
Constructors for solved double premise derived task
|
Task(Sentence<T> s,
BudgetValue b,
Task.EnumType type) |
Constructor for input task and single premise derived task
|
Modifier and Type | Method | Description |
---|---|---|
(package private) static boolean |
SyllogisticRules.abdIndCom(Term term1,
Term term2,
Sentence sentence1,
Sentence sentence2,
int figure,
DerivationContext nal) |
{<M ==> S>, <M ==> P>} |- {<S ==> P>, <P ==> S>, <S <=> P>}
|
(package private) static void |
SyllogisticRules.analogy(Term subj,
Term pred,
Sentence asym,
Sentence sym,
int figure,
DerivationContext nal) |
{<S ==> P>, <M <=> P>} |- <S ==> P>
|
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.asymmetricAsymmetric(Sentence taskSentence,
Sentence belief,
int figure,
DerivationContext nal) |
Syllogistic rules whose both premises are on the same asymmetric relation
|
private static void |
RuleTables.asymmetricSymmetric(Sentence asym,
Sentence sym,
int figure,
DerivationContext nal) |
Syllogistic rules whose first premise is on an asymmetric relation, and
the second on a symmetric relation
|
(package private) static void |
SyllogisticRules.conditionalDedInd(Sentence premise1Sentence,
Implication premise1,
short index,
Term premise2,
int side,
DerivationContext nal) |
{<(&&, S1, S2, S3) ==> P>, S1} |- <(&&, S2, S3) ==> P>
{<(&&, S2, S3) ==> P>, <S1 ==> S2>} |- <(&&, S1, S3) ==> P> {<(&&, S1, S3) ==> P>, <S1 ==> S2>} |- <(&&, S2, S3) ==> P> |
private static void |
RuleTables.conditionalDedIndWithVar(Sentence conditionalSentence,
Implication conditional,
short index,
Statement statement,
short side,
DerivationContext nal) |
Conditional deduction or induction, with variable unification
|
protected static boolean |
StructuralRules.contraposition(Statement statement,
Sentence sentence,
DerivationContext nal) |
{<A ==> B>, A@(--, A)} |- <(--, B) ==> (--, A)>
|
(package private) static void |
SyllogisticRules.dedExe(Term term1,
Term term2,
Sentence sentence,
Sentence belief,
DerivationContext nal) |
{<S ==> M>, <M ==> P>} |- {<S ==> P>, <P ==> S>}
|
(package private) static void |
SyllogisticRules.detachment(Sentence mainSentence,
Sentence subSentence,
int side,
boolean checkTermAgain,
DerivationContext nal) |
|
(package private) static void |
SyllogisticRules.detachment(Sentence mainSentence,
Sentence subSentence,
int side,
DerivationContext nal) |
{<<M --> S> ==> <M --> P>>, <M --> S>} |- <M --> P>
{<<M --> S> ==> <M --> P>>, <M --> P>} |- <M --> S> {<<M --> S> <=> <M --> P>>, <M --> S>} |- <M --> P> {<<M --> S> <=> <M --> P>>, <M --> P>} |- <M --> S> |
private static void |
RuleTables.detachmentWithVar(Sentence originalMainSentence,
Sentence subSentence,
int index,
boolean checkTermAgain,
DerivationContext nal) |
|
private static void |
RuleTables.detachmentWithVar(Sentence originalMainSentence,
Sentence subSentence,
int index,
DerivationContext nal) |
The detachment rule, with variable unification
|
static void |
CompositionalRules.eliminateVariableOfConditionAbductive(int figure,
Sentence sentence,
Sentence belief,
DerivationContext nal) |
|
private static void |
CompositionalRules.eliminateVariableOfConditionAbductiveInner1(Sentence sentence,
Sentence belief,
DerivationContext nal,
CompoundTerm s1,
Map<Term,Term> res3,
Term s12) |
|
private static void |
CompositionalRules.eliminateVariableOfConditionAbductiveTryCrossUnification(Sentence sentence,
Sentence belief,
DerivationContext nal,
Term s1,
Term p2,
Map<Term,Term> res3,
Map<Term,Term> res4) |
|
private static void |
CompositionalRules.eliminateVariableOfConditionAbductiveTryUnification1(Sentence sentence,
Sentence belief,
DerivationContext nal,
Term p1,
CompoundTerm p2,
Map<Term,Term> res3,
Map<Term,Term> res4) |
|
private static void |
LocalRules.inferToAsym(Sentence asym,
Sentence sym,
DerivationContext nal) |
Produce an Inheritance/Implication from a Similarity/Equivalence and a reversed Inheritance/Implication
{<S <-> P>, <P --> S>} |- <S --> P> |
private static void |
LocalRules.inferToSym(Sentence judgment1,
Sentence judgment2,
DerivationContext nal) |
Produce Similarity/Equivalence from a pair of reversed Inheritance/Implication
{<S --> P>, <P --> S} |- <S <-> p> |
(package private) static void |
CompositionalRules.IntroVarSameSubjectOrPredicate(Sentence originalMainSentence,
Sentence subSentence,
Term component,
Term content,
int index,
DerivationContext nal) |
|
static boolean |
LocalRules.match(Task task,
Sentence belief,
Concept beliefConcept,
DerivationContext nal) |
The task and belief have the same content
|
static void |
LocalRules.matchAsymSym(Sentence asym,
Sentence sym,
int figure,
DerivationContext nal) |
Inheritance/Implication matches Similarity/Equivalence
|
static boolean |
TemporalRules.matchingOrder(Sentence a,
Sentence b) |
|
static float |
BudgetFunctions.rankBelief(Sentence judg,
boolean rankTruthExpectation) |
Determine the rank of a judgment by its quality and originality (stamp
baseLength), called from Concept
|
(package private) static void |
SyllogisticRules.resemblance(Term term1,
Term term2,
Sentence belief,
Sentence sentence,
int figure,
DerivationContext nal) |
{<S <=> M>, << <=> P>} |- <S <=> P>
|
static boolean |
LocalRules.revisible(Sentence s1,
Sentence s2,
Parameters narParameters) |
Check whether two sentences can be used in revision
|
static boolean |
LocalRules.revision(Sentence newBelief,
Sentence oldBelief,
Concept beliefConcept,
boolean feedbackToLinks,
DerivationContext nal) |
Belief revision
Summarizes the evidence of two beliefs with 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
|
private static void |
RuleTables.symmetricSymmetric(Sentence belief,
Sentence taskSentence,
int figure,
DerivationContext nal) |
Syllogistic rules whose both premises are on the same symmetric relation
|
static List<Task> |
TemporalRules.temporalInduction(Sentence s1,
Sentence s2,
DerivationContext nal,
boolean SucceedingEventsInduction,
boolean addToMemory,
boolean allowSequence) |
|
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
|
Modifier and Type | Method | Description |
---|---|---|
abstract void |
Events.ConceptBeliefRemove.onBeliefRemove(Concept c,
Sentence removed,
Task t,
Object[] extra) |
|
abstract void |
AnswerHandler.onSolution(Sentence belief) |
called when the question task has been solved directly
|
Modifier and Type | Method | Description |
---|---|---|
protected void |
InternalExperience.beliefReason(Sentence belief,
Term beliefTerm,
Term taskTerm,
DerivationContext nal) |
used in full internal experience mode only
|
static void |
InternalExperience.InternalExperienceFromBelief(Memory memory,
Task task,
Sentence belief,
Timable time) |
|
static Term |
InternalExperience.toTerm(Sentence s,
Memory mem,
Timable time) |
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 |
Copyright © 2020 OpenNARS. All rights reserved.