Dynamics noise¶
State-dependent dynamics noise Q(x): the world can diffuse more in some states than others. A constant Q needs no object. It goes in the model's dynamics_noise. DynamicsNoiseModel is the protocol for a Q(x) in dynamics_noise_model, the twin of ObservationModel on the sensor side, and a plain matrix does not satisfy it. CallableDynamicsNoise carries the Q(x) function, with the same two arguments as CallableSensor.
DynamicsNoiseModel ¶
Bases: Protocol
How much the dynamics diffuse per step, as a covariance Q(x) at each state.
The model's dynamics_noise_model slot takes one, as observation_model takes
an ObservationModel. A constant Q needs no object.
It goes in dynamics_noise, and a plain matrix does not satisfy this protocol. A
state-dependent Q(x) brings epistemic value back through the internal route
(RFC-001 chapter 8).
is_fixed
property
¶
True when Q does not vary with the state.
The filter then keeps its fixed path and reads the model's
dynamics_noise, which equals this object's Q.
CallableDynamicsNoise
dataclass
¶
CallableDynamicsNoise(
noise_fn: Callable[
[Float64[Array, n], PyTree], Float64[Array, "n n"]
],
noise_params: PyTree,
)
State-dependent dynamics noise, Q(state) = noise_fn(state, noise_params).
The dynamics-side twin of CallableSensor, with the same
two arguments. noise_fn holds the functional form. It is static aux, since a
callable cannot be a traced leaf. noise_params holds the values it is a
function of, as a pytree leaf, so the EFE is differentiable with respect to them.
A number belongs in noise_params if it might ever be fitted, and is baked into
noise_fn only if it is structural. Pass a module-level noise_fn. A closure
or lambda hashes by identity and defeats jit caching.
noise_fn must return a positive-semi-definite (n, n) covariance at every
reachable state. The model probes it once at construction, where n is known.
Attributes:
| Name | Type | Description |
|---|---|---|
noise_fn |
Callable[[Float64[Array, n], PyTree], Float64[Array, 'n n']]
|
|
noise_params |
PyTree
|
the pytree of values |
Source code in src/cpomdp/dynamics.py
noise_at ¶
tree_flatten ¶
tree_unflatten
classmethod
¶
Rebuild without re-validating — leaves may be tracers.