evaluate_policies#
- hybrid_aif.planning.evaluate_policies(policies, init_qs, transition_fn, step_terms, terminal_terms=None)[source]#
Score every policy: scan beliefs over the horizon, accumulate step TermTrees.
Structure after pymdp’s
control.compute_neg_efe_policyandupdate_posterior_policies(pymdp/control.py): onelax.scanper policy over the horizon, vmapped over the policy matrix.Per step the beliefs are pushed through
transition_fn(qs, action_t)and the post-transition beliefs scored bystep_terms(qs_next, action_t, t); leaves are summed over time andterminal_terms(qs_final)is merged in once. Every leaf carries a leading per-policy axis. Action-type-agnostic: a float(P, H, action_dim)set of continuous sequences scores the same way, and so does a pytree of(P, H, ...)leaves (aControlStep).