subsystem#
- hybrid_aif.composition.subsystem(composite, params, name, inputs=None)[source]#
One mind’s bona-fide
(System, SystemParams), derived from the composite and its metadata.The view holds:
its own state factors and modalities, under the composite’s namespaced names, and the control nodes it still chooses (
Subsystem.controls) with their action nodes;boundary stubs (
subsystem_states()) as ordinary latent state factors with their declared dynamics;for every control node another component chooses that a state factor of the view reads (a stub’s own node, or a node a same-step
Linkmade one with ours), that state factor’s axis marginalised under a prior over the node: uniform by default, or given ininputskeyed by the node’s action node, read as inClamp; the node itself is absent, as is a node merged away;for every control node of the component that a variable drives (
System.observesnames a control node:Identify("mission.a_option", "rover.u_opt")), the node as a control node with no action node (an input, driven from outside) and every state factor reading it; given aninputsentry for its driving variable, the node is sliced out at that level (anint), averaged under a distribution (aCategoricalor a probability vector), or averaged uniformly (None), as a partner’s node is. A driven continuous node is never sliced;for every carried per-step target conditional on such a node (
C_deps), that parent axis contracted under the node’s entry ininputs(required): a level slices it, a distribution mixes a categorical target’s preferences in probability space, as a soft step does, and a Gaussian target takes a level;nothing for an out-bound observation link;
the recognition entries and external inputs of the component’s own, under the composite’s names, with their modules shared by reference.
Parameters are the composite’s arrays, shared by reference; beliefs are private (they live in the caller’s carry). Other components’ designations and
epistemickeys naming absent variables are dropped. A leaf takes its planner configuration (Subsystem.config) and its habit, precision, durations and scoring (SystemParams.parts) from its own record; the habit is carried only when the view holds all of the leaf’s control nodes, and raises otherwise. A leaf that shares no latent with another gets its own System unsliced; recognition and scoring come with it. A view that carries stubs of an amortized composite is refused (a stub would cut a recognition conditioning set).A view is one component’s side of one particle: the neighbours it models are stubs, not other minds’ beliefs. A modality that observes an emission or an action node of this component (
System.observes) keeps its entry; one that observes another component’s (a beliefLink) is left an ordinary observation, whichrun()supplies each round from the emission the source component’s step realised.Design: docs/design/nesting-systems.md (architecture sketch; partner modeling); nesting-and-coupling.md N1, N2.