MindCarry#

class hybrid_aif.composition.MindCarry[source]#

Bases: NamedTuple

One planning mind’s internal state between rounds, the only place its beliefs live: the carry of plan().

Carries are never merged, so two minds share no leaf.

Design: nesting-and-coupling.md N1.

beliefs: Mapping[str, Categorical | Gaussian | MixtureGaussian] | None#

The empirical prior the next round filters from: the last posterior pushed through its transition under the chosen action. None before the first round (the declared initial priors are used).

learn_state: LearnState | None#

The carry of System.learn once the mind learns online.

previous: Mapping[str, Categorical | Gaussian | MixtureGaussian] | None#

The posterior of the last round, the prev_beliefs that System.learn takes (None before the first round).

action: Mapping[str, Array] | None#

The action the last round chose, the action that System.learn takes (None before the first round).

trace: object | None#

The last round’s Trace under plan(trace=True).

plan: Array | None#

Under plan(warm_start=True), the continuous controls of the plan the last round acted on, (policy_len, action_dim): the policy of highest q_pi in the planner’s set (the gradient and mixed planners put all of q_pi on it). None before the first round and without warm_start.

static __new__(
_cls,
beliefs=None,
learn_state=None,
previous=None,
action=None,
trace=None,
plan=None,
)#

Create new instance of MindCarry(beliefs, learn_state, previous, action, trace, plan)