Skip to content

Commit

Permalink
Update Task.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrock4t committed Nov 10, 2023
1 parent 71dc5db commit f9a2154
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynars/Narsese/_py/Task.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f9a2154

Please sign in to comment.