CEMResult#

class hybrid_aif.planning.CEMResult[source]#

Bases: NamedTuple

One CEM plan: the posterior, the metrics, and the proposal it ended on.

G, q_pi and every tree leaf share the leading axis of candidates.

q_pi: Categorical#

The posterior over the candidates.

tree: dict[str, dict[str, Interval]] | None#

The term tree of the objective over the candidates (None under metrics=False).

candidates: Array#

The scored plans, (num_candidates + 1, policy_len, action_dim); entry 0 is the final proposal mean.

G: Interval#

The expected free energy of each candidate.

mean: Array#

The final proposal’s mean, (policy_len, action_dim).

std: Array#

The final proposal’s standard deviation, (policy_len, action_dim).

static __new__(_cls, q_pi, tree, candidates, G, mean, std)#

Create new instance of CEMResult(q_pi, tree, candidates, G, mean, std)