From f9a21545494a801af9af75cdc6d520dcd3b215dc Mon Sep 17 00:00:00 2001 From: ccrock4t <15344554+ccrock4t@users.noreply.github.com> Date: Thu, 9 Nov 2023 22:25:19 -0500 Subject: [PATCH] Update Task.py --- pynars/Narsese/_py/Task.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pynars/Narsese/_py/Task.py b/pynars/Narsese/_py/Task.py index 688c145..4e81cb5 100644 --- a/pynars/Narsese/_py/Task.py +++ b/pynars/Narsese/_py/Task.py @@ -21,15 +21,15 @@ def h(self): truth_belief = self.best_solution.truth if self.best_solution is not None else None return self.achieving_level(truth_belief) - def achieving_level(self, truth_belief: Truth=None): + def achieving_level(self, previous_belief: Truth=None): if self.is_judgement or self.is_goal: - if truth_belief is not None: - return 1 - abs(self.truth.e - truth_belief.e) + if previous_belief is not None: + return 1 - abs(self.truth.e - previous_belief.e) else: # no previous belief return abs(self.truth.e - 0.5) elif self.is_question or self.is_quest: - if truth_belief is not None: - return truth_belief.e if self.is_query else truth_belief.c + if previous_belief is not None: + return previous_belief.e if self.is_query else previous_belief.c else: # no previous belief return 0 else: