oughtinc / patchwork

Command-line recursive question-answering with immutable contexts and explicit data store
https://ought.org/projects/factored-cognition
MIT License
24 stars 1 forks source link

scheduling: Choose context also in RQS.__init__() #6

Closed rmoehn closed 6 years ago

rmoehn commented 6 years ago

When RootQuestionSession.act() resolves an action and gets None as a resulting context, it looks for other contexts that H can work on. RootQuestionSession.init() wasn't doing that, which resulted in issue #4. In order to fix this, look for other contexts in init(), too.

I don't fully understand the algorithm and I don't know your intentions, so this patch might not be what you want. Feel free to reject it.

Closes #4

stuhlmueller commented 6 years ago

Thanks for the PR, @rmoehn! As far as I can tell, this works. @benwr might have more global clean-up planned, but in the interest of keeping the repository in a working state I'm going to merge this for now, and we can make further improvements later.