Search in sources :

Example 1 with ScalarBeliefTable

use of nars.concept.dynamic.ScalarBeliefTable in project narchy by automenta.

the class GoalActionAsyncConcept method feedback.

public void feedback(@Nullable Truth f, @Nullable Truth g, NAR nar) {
    long now = nar.time();
    int dur = nar.dur();
    // long start =
    // now - dur/2;
    // long end =
    // now + dur/2;
    long start = now;
    long end = now + dur;
    Task fg;
    if (g != null) {
        // //fg = feedGoal.task(term, g, goalTime-dur, goalTime, nar.time.nextStamp()); //allow the feedback goal (Ex: curiosity) to override, otherwise use the current goal
        // fg = feedGoal.set(this, g, stamper, goalTime, dur, nar);
        // fg = GoalActionConcept.curiosity(nar, g, term, curiosityStamp);
        fg = null;
    } else
        fg = null;
    SignalTask fb = ((ScalarBeliefTable) beliefs()).add(f, start, end, dur, nar);
    in.input(fg, fb);
    PredictionFeedback.feedbackSignal(fb, /* in case stretched */
    beliefs, nar);
}
Also used : SignalTask(nars.task.signal.SignalTask) ITask(nars.task.ITask) Task(nars.Task) SignalTask(nars.task.signal.SignalTask) ScalarBeliefTable(nars.concept.dynamic.ScalarBeliefTable)

Aggregations

Task (nars.Task)1 ScalarBeliefTable (nars.concept.dynamic.ScalarBeliefTable)1 ITask (nars.task.ITask)1 SignalTask (nars.task.signal.SignalTask)1