public class LocalRules extends Object
revision: between judgments or goals on non-overlapping evidence;
satisfy: between a Sentence and a Question/Goal;
merge: between items of the same type and stamp;
conversion: between different inheritance relations.
| Constructor | Description |
|---|---|
LocalRules() |
| Modifier and Type | Method | Description |
|---|---|---|
private static void |
conversion(DerivationContext nal) |
Produce an Inheritance/Implication from a reversed Inheritance/Implication
{<P --> S>} |- <S --> P> |
private static void |
convertedJudgment(TruthValue newTruth,
BudgetValue newBudget,
DerivationContext nal) |
Convert judgment into different relation
|
private static void |
convertRelation(DerivationContext nal) |
Switch between Inheritance/Implication and Similarity/Equivalence
{<S --> P>} |- <S <-> P> {<S <-> P>} |- <S --> P> |
private static void |
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 |
inferToSym(Sentence judgment1,
Sentence judgment2,
DerivationContext nal) |
Produce Similarity/Equivalence from a pair of reversed Inheritance/Implication
{<S --> P>, <P --> S} |- <S <-> p> |
static boolean |
intervalProjection(DerivationContext nal,
Term newBeliefTerm,
Term oldBeliefTerm,
List<Float> recent_ivals,
TruthValue newTruth) |
Interval projection
Decides to use whether to use old or new term dependent on which one is more usual,
also discounting the truth confidence according to the interval difference.
|
static boolean |
match(Task task,
Sentence belief,
Concept beliefConcept,
DerivationContext nal) |
The task and belief have the same content
|
static void |
matchAsymSym(Sentence asym,
Sentence sym,
int figure,
DerivationContext nal) |
Inheritance/Implication matches Similarity/Equivalence
|
static void |
matchReverse(DerivationContext nal) |
The task and belief match reversely
|
static boolean |
revisible(Sentence s1,
Sentence s2,
Parameters narParameters) |
Check whether two sentences can be used in revision
|
static boolean |
revision(Sentence newBelief,
Sentence oldBelief,
Concept beliefConcept,
boolean feedbackToLinks,
DerivationContext nal) |
Belief revision
Summarizes the evidence of two beliefs with same content.
|
static BudgetValue |
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 |
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 |
trySolution(Sentence belief,
Task task,
DerivationContext nal,
boolean report) |
Check if a Sentence provide a better answer to a Question or Goal
|
public static boolean match(Task task, Sentence belief, Concept beliefConcept, DerivationContext nal)
task - The taskbelief - The beliefpublic static boolean revisible(Sentence s1, Sentence s2, Parameters narParameters)
s1 - The first sentences2 - The second sentencepublic static boolean revision(Sentence newBelief, Sentence oldBelief, Concept beliefConcept, boolean feedbackToLinks, DerivationContext nal)
newBelief - The new belief in taskoldBelief - The previous belief with the same contentfeedbackToLinks - Whether to send feedback to the linkspublic static boolean intervalProjection(DerivationContext nal, Term newBeliefTerm, Term oldBeliefTerm, List<Float> recent_ivals, TruthValue newTruth)
nal - newBeliefTerm - oldBeliefTerm - recent_ivals - recent intervalsnewTruth - public static boolean trySolution(Sentence belief, Task task, DerivationContext nal, boolean report)
belief - The proposed answertask - The task to be processedpublic static float solutionQuality(boolean rateByConfidence,
Task probT,
Sentence solution,
Memory memory,
Timable time)
probT - A goal or questionsolution - The solution to be evaluatedpublic static BudgetValue solutionEval(Task problem, Sentence solution, Task task, DerivationContext nal)
problem - The problem (question or goal) to be solvedsolution - The belief as solutiontask - The task to be immediately processed, or null for continued processpublic static void matchReverse(DerivationContext nal)
nal - Reference to the memorypublic static void matchAsymSym(Sentence asym, Sentence sym, int figure, DerivationContext nal)
asym - A Inheritance/Implication sentencesym - A Similarity/Equivalence sentencefigure - location of the shared termnal - Reference to the memoryprivate static void inferToSym(Sentence judgment1, Sentence judgment2, DerivationContext nal)
judgment1 - The first premisejudgment2 - The second premisenal - Reference to the memoryprivate static void inferToAsym(Sentence asym, Sentence sym, DerivationContext nal)
asym - The asymmetric premisesym - The symmetric premisenal - Reference to the memoryprivate static void conversion(DerivationContext nal)
nal - Reference to the memoryprivate static void convertRelation(DerivationContext nal)
nal - Reference to the memoryprivate static void convertedJudgment(TruthValue newTruth, BudgetValue newBudget, DerivationContext nal)
called in MatchingRules
newBudget - The budget value of the new tasknewTruth - The truth value of the new tasknal - Reference to the memoryCopyright © 2020 OpenNARS. All rights reserved.