Skip to content

Commit

Permalink
call update_wellbeing() in _accept_goal()
Browse files Browse the repository at this point in the history
  • Loading branch information
bowen-xu committed Dec 7, 2023
1 parent 49e4b83 commit 390d51d
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions pynars/NARS/DataStructures/_py/Memory.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,10 @@ def _accept_goal(self, task: Task, concept: Concept, task_link: TaskLink=None):
if op in registered_operators and not task.is_mental_operation:
# to judge whether the goal has been fulfilled
task_operation_return, task_executed = execute(task, concept, self)

# update well-being
self.global_eval.update_wellbeing(task_executed.truth.e)

concept_task = self.take_by_key(task.term, remove=False)
if concept_task is not None:
belief: Belief = concept_task.match_belief(task.sentence)
Expand All @@ -271,6 +275,8 @@ def _accept_goal(self, task: Task, concept: Concept, task_link: TaskLink=None):
# if task_operation_return is not None: tasks_derived.append(task_operation_return)
# if task_executed is not None: tasks_derived.append(task_executed)






Expand Down

0 comments on commit 390d51d

Please sign in to comment.