Trace#

class hybrid_aif.composition.Trace[source]#

Bases: NamedTuple

What a planning step kept of one round’s plan (plan(trace=True), in MindCarry.trace).

q_pi: Categorical#

The posterior over the policy set.

tree: Any#

The term tree of the objective (System.act’s metrics).

policies: Array | None#

The enumerated policy set q_pi is over (System.policies); None unless the plan is over an enumerated set.

plans: Any#

The policy set as the planner returned it, in the order of q_pi and the tree’s leaves: every start’s final plan (starts, policy_len, action_dim) for the gradient planner, a ControlStep for the mixed planner, integer levels for an enumerating one.

detail: Any#

The round’s InferenceDetail (System.infer_states with detail=True: the log-evidence per modality, the free energy); None on the amortized path.

parameters: Mapping[str, Any] | None#

The view’s parameter variables (SystemParams.parameters) the round planned with: after the round’s learning under learn, else as handed in.

static __new__(_cls, q_pi, tree, policies, plans=None, detail=None, parameters=None)#

Create new instance of Trace(q_pi, tree, policies, plans, detail, parameters)