|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnars.inference.UtilityFunctions
nars.inference.BudgetFunctions
public final class BudgetFunctions
Budget functions for resources allocation
| Constructor Summary | |
|---|---|
BudgetFunctions()
|
|
| Method Summary | |
|---|---|
static void |
activate(Concept concept,
BudgetValue budget)
Activate a concept by an incoming TaskLink |
static BudgetValue |
backward(TruthValue truth)
Backward inference result and adjustment, stronger case |
static BudgetValue |
backwardWeak(TruthValue truth)
Backward inference result and adjustment, weaker case |
private static BudgetValue |
budgetInference(float qual,
int complexity)
Common processing for all inference step |
static BudgetValue |
compoundBackward(Term content)
Backward inference with CompoundTerm conclusion, stronger case |
static BudgetValue |
compoundBackwardWeak(Term content)
Backward inference with CompoundTerm conclusion, weaker case |
static BudgetValue |
compoundForward(TruthValue truth,
Term content)
Forward inference with CompoundTerm conclusion |
static BudgetValue |
distributeAmongLinks(BudgetValue b,
int n)
Distribute the budget of a task among the links to it |
static void |
forget(BudgetValue budget,
float forgetRate,
float relativeThreshold)
Decrease Priority after an item is used, called in Bag |
(package private) static BudgetValue |
forward(TruthValue truth)
Forward inference result and adjustment |
static void |
merge(BudgetValue baseValue,
BudgetValue adjustValue)
Merge an item into another one in a bag, when the two are identical except in budget values |
static float |
rankBelief(Judgment judg)
Determine the rank of a judgment by its confidence and originality (stamp length) |
(package private) static BudgetValue |
revise(TruthValue tTruth,
TruthValue bTruth,
TruthValue truth,
Task task,
boolean feedbackToLinks)
Evaluate the quality of a revision, then de-prioritize the premises |
(package private) static BudgetValue |
solutionEval(Sentence problem,
Judgment solution,
Task task)
Evaluate the quality of a belief as a solution to a problem, then reward the belief and de-prioritize the problem |
static BudgetValue |
temporalIndCom(BudgetValue b1,
BudgetValue b2,
TruthValue t)
Special treatment for temporal induction and comparison among recent event, no feedback |
static float |
truthToQuality(TruthValue t)
Determine the quality of a judgment by its truth value alone |
(package private) static BudgetValue |
update(Task task,
TruthValue bTruth)
Update a belief |
| Methods inherited from class nars.inference.UtilityFunctions |
|---|
and, aveAri, aveGeo, or, w2c |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BudgetFunctions()
| Method Detail |
|---|
public static float truthToQuality(TruthValue t)
Mainly decided by confidence, though binary judgment is also preferred
t - The truth value of a judgment
public static float rankBelief(Judgment judg)
judg - The judgment to be ranked
static BudgetValue solutionEval(Sentence problem,
Judgment solution,
Task task)
problem - The problem (question or goal) to be solvedsolution - The belief as solutiontask - The task to be immediatedly processed, or null for continued process
static BudgetValue revise(TruthValue tTruth,
TruthValue bTruth,
TruthValue truth,
Task task,
boolean feedbackToLinks)
tTruth - The truth value of the judgment in the taskbTruth - The truth value of the belieftruth - The truth value of the conclusion of revisiontask - The task to be immediatedly or continuely processed
static BudgetValue update(Task task,
TruthValue bTruth)
task - The task containing new beliefbTruth - Truth value of the previous belief
public static BudgetValue distributeAmongLinks(BudgetValue b,
int n)
b - The original budgetn - Number of links
public static void activate(Concept concept,
BudgetValue budget)
concept - The conceptbudget - The budget for the new item
public static void forget(BudgetValue budget,
float forgetRate,
float relativeThreshold)
After a constant time, p should become d*p. Since in this period, the item is accessed c*p times, each time p-q should multiple d^(1/(c*p)). The intuitive meaning of the parameter "forgetRate" is: after this number of times of access, priority 1 will become d, it is a system parameter adjustable in run time.
budget - The previous budget valueforgetRate - The budget for the new itemrelativeThreshold - The relative threshold of the bag
public static void merge(BudgetValue baseValue,
BudgetValue adjustValue)
baseValue - The budget value to be modifiedadjustValue - The budget doing the adjustingstatic BudgetValue forward(TruthValue truth)
truth - The truth value of the conclusion
public static BudgetValue backward(TruthValue truth)
truth - The truth value of the belief deriving the conclusion
public static BudgetValue backwardWeak(TruthValue truth)
truth - The truth value of the belief deriving the conclusion
public static BudgetValue compoundForward(TruthValue truth,
Term content)
truth - The truth value of the conclusioncontent - The content of the conclusion
public static BudgetValue compoundBackward(Term content)
content - The content of the conclusion
public static BudgetValue compoundBackwardWeak(Term content)
content - The content of the conclusion
private static BudgetValue budgetInference(float qual,
int complexity)
qual - Quality of the inferencecomplexity - Syntactic complexity of the conclusion
public static BudgetValue temporalIndCom(BudgetValue b1,
BudgetValue b2,
TruthValue t)
b1 - Budget value of the first premiseb2 - Budget value of the second premiset - Truth value of the conclusion
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||