Skip to content

Commit

Permalink
Update GeneralEngine.py
Browse files Browse the repository at this point in the history
  • Loading branch information
ccrock4t committed Jan 31, 2024
1 parent f252578 commit 1e6dfd2
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions pynars/NARS/InferenceEngine/GeneralEngine/GeneralEngine.py
Original file line number Diff line number Diff line change
Expand Up @@ -391,14 +391,14 @@ def step(self, concept: Concept):
if is_valid:
Global.States.record_premises(task, belief)
Global.States.record_rules(rules)
derived_tasks = self.inference(task, belief, term_belief, task_link_valid, term_link_valid, rules)
new_tasks = self.inference(task, belief, term_belief, task_link_valid, term_link_valid, rules)
if term_link_valid is not None:
# reward the termlink
for derived_task in derived_tasks:
reward: float = max(derived_task.budget.priority, task.achieving_level())
TermLink.reward_budget(reward)
for new_task in new_tasks:
reward: float = max(new_task.budget.priority, task.achieving_level())
term_link_valid.reward_budget(reward)

tasks_derived.extend(tasks)
tasks_derived.extend(new_tasks)

for term_link in term_links: concept.term_links.put_back(term_link)

Expand Down

0 comments on commit 1e6dfd2

Please sign in to comment.