Search in sources :

Example 1 with MetaGoal

use of nars.control.MetaGoal in project narchy by automenta.

the class TaskConcept method value.

public void value(Task t, float activation, NAR n) {
    byte punc = t.punc();
    if (punc == BELIEF || punc == GOAL) {
        MetaGoal p = punc == BELIEF ? MetaGoal.Believe : MetaGoal.Desire;
        p.learn(t.cause(), Param.beliefValue(t) * activation, n.causes);
    }
// return Emotivation.preferConfidentAndRelevant(t, activation, when, n);
// positive value based on the conf but also multiplied by the activation in case it already was known
// return valueIfProcessedAt(t, activation, n.time(), n);
// @Override
// public float value(@NotNull Task t, NAR n) {
// byte p = t.punc();
// if (p == BELIEF || p == GOAL) {// isGoal()) {
// //example value function
// long s = t.end();
// 
// if (s!=ETERNAL) {
// long now = n.time();
// long relevantTime = p == GOAL ?
// now - n.dur() : //present or future goal
// now; //future belief prediction
// 
// if (s > relevantTime) //present or future TODO irrelevance discount for far future
// return (float) (0.1f + Math.pow(t.conf(), 0.25f));
// }
// }
// 
// //return super.value(t, activation, n);
// return 0;
// }
}
Also used : MetaGoal(nars.control.MetaGoal)

Aggregations

MetaGoal (nars.control.MetaGoal)1