eta.core.reasoning.reasoning_loop
- reasoning_loop(ds)[source]
Infer new facts and possible actions from previous facts/observations.
First, all recent inferences are popped from the
inferences
buffer, and from these inferences, the system attempts to infer new facts in both a top down and a bottom up manner.A depth limit is imposed, such that only facts which are below some number of inference steps away from a direct observation are considered for further inference. Any inferred facts are added back to the
inferences
buffer, with a depth that is one greater than the minimum depth of the facts used to infer them.In the top down approach, the current state of the dialogue plan is used as the context for making inferences from each fact.
In the bottom up approach, a set of relevant facts are retrieved from memory and used to make inferences from each fact.
Second, all direct observations are popped from the
observations
buffer, and used to suggest possible actions that the system can take in reaction to those observations.- Parameters:
ds (DialogueState) –