Environments

Contents

Environments#

A world a System acts in can be declared three ways. The envs package holds the functional form: an Env has a pure reset and step over a separate params pytree, and GenerativeEnv is one made from a generative model declared the same way an agent’s is; System.as_env returns that pair for any tabular or hybrid System, its tensors run forward. A System can also be a world as it stands: couple joins it to an agent through its ports, with_mirror couples a model with its own mirror, and black_box stands in for an external process declared by its ports alone, all on the Composing systems page.

Environments#

Env

Abstract functional environment (pymdp's Env, with value semantics).

GenerativeEnv

A positional process inner with name-keyed faces; names is static.

GenerativeEnvParams

An environment's parameters: one entry per modality and per state factor, and the actuator's kernels.

make

Build a positional (pymdp-style) process + params (tuple containers) from tensors; defaults: A on all state factors, B on own state factor.

broadcast_params

Broadcast every leaf to a leading (batch_size,) axis (shared parameters).