Skip to content

Commit

Permalink
revert change to get_belief() in Concept; add parameter to Reasoner t…
Browse files Browse the repository at this point in the history
…o specify which inference engine to use
  • Loading branch information
maxeeem committed Mar 28, 2024
1 parent 050e0fe commit a8b267a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
3 changes: 2 additions & 1 deletion pynars/NARS/Control/Reasoner.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,8 @@ def __init__(self, theorem, budget: Budget) -> None:
super().__init__(hash(theorem), budget)
self._theorem = theorem

def __init__(self, n_memory, capacity, config='./config.json', nal_rules={1, 2, 3, 4, 5, 6, 7, 8, 9}, inference: str = 'kanren') -> None:
def __init__(self, n_memory, capacity, config='./config.json',
nal_rules={1, 2, 3, 4, 5, 6, 7, 8, 9}, inference: str = 'kanren') -> None:
# print('''Init...''')
Config.load(config)

Expand Down
8 changes: 4 additions & 4 deletions pynars/NARS/DataStructures/_py/Concept.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,10 +78,10 @@ def get_belief(self) -> Belief:

# return projectedBelief; // return the first satisfying belief
raise
if self.belief_table.empty:
for term_link in self.term_links:
if not term_link.target.belief_table.empty:
return term_link.target.belief_table.first()
# if self.belief_table.empty:
# for term_link in self.term_links:
# if not term_link.target.belief_table.empty:
# return term_link.target.belief_table.first()
return self.belief_table.first()

# def match_candidate(self, sentence: Sentence) -> Task | Belief:
Expand Down

0 comments on commit a8b267a

Please sign in to comment.