Describe the bug
In openssa/openssa/core/programming/hierarchical/plan.py,
" # if Reasoner's result is unsatisfactory,
# and if there is still allowed recursive depth,
# use Programmer to decompose Problem into sub-HTPs
# vvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvvv Here the parenthesis is missing
elif (self.task.is_attempted and not self.task.is_done) and (self.programmer and self.programmer.max_depth):
decomposed_htp: HTP = self.programmer.create_htp(task=self.task, knowledge=knowledge,
reasoner=self.reasoner)"
Here 'self.task.is_attempted' and 'self.task.is_done' are two functions. When used without (), the system will return the function itself, and the value will be interpreted as non None.
The system will not check the real value using the functions. Therefore, the logic is corrupted.
Expected behavior
Anywhere using is_done and is_attempted should be changed to is_done() and is_attempted().
For example,
'elif (self.task.is_attempted() and not self.task.is_done())'
Desktop (please complete the following information):
- OS: Ubuntu
- Python Version: 3.13
Describe the bug
In openssa/openssa/core/programming/hierarchical/plan.py,
" # if Reasoner's result is unsatisfactory,
# and if there is still allowed recursive depth,
# use Programmer to decompose Problem into sub-HTPs
Here 'self.task.is_attempted' and 'self.task.is_done' are two functions. When used without (), the system will return the function itself, and the value will be interpreted as non None.
The system will not check the real value using the functions. Therefore, the logic is corrupted.
Expected behavior
Anywhere using is_done and is_attempted should be changed to is_done() and is_attempted().
For example,
'elif (self.task.is_attempted() and not self.task.is_done())'
Desktop (please complete the following information):