public final class BudgetFunctions extends UtilityFunctions
Modifier and Type | Class | Description |
---|---|---|
static class |
BudgetFunctions.Activating |
Constructor | Description |
---|---|
BudgetFunctions() |
Modifier and Type | Method | Description |
---|---|---|
static void |
activate(BudgetValue receiver,
BudgetValue amount,
BudgetFunctions.Activating mode) |
Activate a concept by an incoming TaskLink
|
static void |
applyForgetting(BudgetValue budget,
float forgetCycles,
float relativeThreshold) |
Decrease Priority after an item is used, called in Bag.
|
static BudgetValue |
backward(TruthValue truth,
DerivationContext nal) |
Backward inference result and adjustment, stronger case
|
static BudgetValue |
backwardWeak(TruthValue truth,
DerivationContext nal) |
Backward inference result and adjustment, weaker case
|
private static BudgetValue |
budgetInference(float qual,
float complexity,
DerivationContext nal) |
Common processing for all inference step
|
static BudgetValue |
budgetTermLinkConcept(Concept c,
BudgetValue taskBudget,
TermLink termLink) |
|
static BudgetValue |
compoundBackward(Term content,
DerivationContext nal) |
Backward inference with CompoundTerm conclusion, stronger case
|
static BudgetValue |
compoundBackwardWeak(Term content,
DerivationContext nal) |
Backward inference with CompoundTerm conclusion, weaker case
|
static BudgetValue |
compoundForward(TruthValue truth,
Term content,
DerivationContext nal) |
Forward inference with CompoundTerm conclusion
|
static float |
conceptActivation(Memory mem,
Term t) |
Get the current activation level of a concept.
|
static BudgetValue |
distributeAmongLinks(BudgetValue b,
int n,
Parameters narParameters) |
Distribute the budget of a task among the links to it
|
static BudgetValue |
forward(TruthValue truth,
DerivationContext nal) |
Forward inference result and adjustment
|
static void |
merge(BudgetValue b,
BudgetValue a) |
Merge an item into another one in a bag, when the two are identical
except in budget values
|
static float |
rankBelief(Sentence judg,
boolean rankTruthExpectation) |
Determine the rank of a judgment by its quality and originality (stamp
baseLength), called from Concept
|
(package private) static BudgetValue |
revise(TruthValue tTruth,
TruthValue bTruth,
TruthValue truth,
boolean feedbackToLinks,
DerivationContext nal) |
Evaluate the quality of a revision, then de-prioritize the premises
|
(package private) static BudgetValue |
solutionEval(Sentence problem,
Sentence solution,
Task task,
Memory memory) |
Deprecated.
|
static float |
truthToQuality(TruthValue t) |
Determine the quality of a judgment by its truth value alone
|
static BudgetValue |
update(Task task,
TruthValue bTruth,
Parameters narParameters) |
Update a belief
|
public static final float truthToQuality(TruthValue t)
Mainly decided by confidence, though binary judgment is also preferred
t
- The truth value of a judgmentpublic static final float rankBelief(Sentence judg, boolean rankTruthExpectation)
judg
- The judgment to be rankedstatic BudgetValue revise(TruthValue tTruth, TruthValue bTruth, TruthValue truth, boolean feedbackToLinks, DerivationContext nal)
tTruth
- The truth value of the judgment in the taskbTruth
- The truth value of the belieftruth
- The truth value of the conclusion of revisionpublic static BudgetValue update(Task task, TruthValue bTruth, Parameters narParameters)
task
- The task containing new beliefbTruth
- Truth value of the previous beliefpublic static BudgetValue distributeAmongLinks(BudgetValue b, int n, Parameters narParameters)
b
- The original budgetn
- Number of linkspublic static void activate(BudgetValue receiver, BudgetValue amount, BudgetFunctions.Activating mode)
receiver
- The budget receiving the activationamount
- The budget for the new itempublic static void applyForgetting(BudgetValue budget, float forgetCycles, float relativeThreshold)
budget
- The previous budget valueforgetCycles
- The budget for the new itemrelativeThreshold
- The relative threshold of the bagpublic static void merge(BudgetValue b, BudgetValue a)
b
- The budget baseValue to be modifieda
- The budget adjustValue doing the adjustingpublic static BudgetValue forward(TruthValue truth, DerivationContext nal)
truth
- The truth value of the conclusionpublic static BudgetValue backward(TruthValue truth, DerivationContext nal)
truth
- The truth value of the belief deriving the conclusionnal
- Reference to the memorypublic static BudgetValue backwardWeak(TruthValue truth, DerivationContext nal)
truth
- The truth value of the belief deriving the conclusionnal
- Reference to the memorypublic static BudgetValue compoundForward(TruthValue truth, Term content, DerivationContext nal)
truth
- The truth value of the conclusioncontent
- The content of the conclusionnal
- Reference to the memorypublic static BudgetValue compoundBackward(Term content, DerivationContext nal)
content
- The content of the conclusionnal
- Reference to the memorypublic static BudgetValue compoundBackwardWeak(Term content, DerivationContext nal)
content
- The content of the conclusionnal
- Reference to the memorypublic static float conceptActivation(Memory mem, Term t)
t
- The Term naming a conceptprivate static BudgetValue budgetInference(float qual, float complexity, DerivationContext nal)
qual
- Quality of the inferencecomplexity
- Syntactic complexity of the conclusionnal
- Reference to the memory@Deprecated static BudgetValue solutionEval(Sentence problem, Sentence solution, Task task, Memory memory)
public static BudgetValue budgetTermLinkConcept(Concept c, BudgetValue taskBudget, TermLink termLink)
Copyright © 2020 OpenNARS. All rights reserved.