diff --git a/pymdp/agent.py b/pymdp/agent.py index f09b559a..254c82c6 100644 --- a/pymdp/agent.py +++ b/pymdp/agent.py @@ -351,10 +351,9 @@ def infer_parameters(self, beliefs_A, outcomes, actions, beliefs_B=None, lr_pA=1 # if you have updated your beliefs about transitions, you need to re-compute the I matrix used for inductive inferenece if self.use_inductive and self.H is not None: I_updated = vmap(control.generate_I_matrix)(self.H, E_qB, self.inductive_threshold, self.inductive_depth) + agent = tree_at(lambda x: (x.B, x.pB, x.I), agent, (E_qB, qB, I_updated)) else: - I_updated = self.I - - agent = tree_at(lambda x: (x.B, x.pB, x.I), agent, (E_qB, qB, I_updated)) + agent = tree_at(lambda x: (x.B, x.pB), agent, (E_qB, qB)) return agent