Skip to content

Normalization¤

Algorithm-side observation and reward normalization, enabled with the normalize_observations / normalize_rewards hyperparameters. Because the running statistics live inside the agent, they are checkpointed and restored along with it. This is then typically preferred over the environment wrappers (NormalizeVecObsWrapper and NormalizeVecRewardWrapper).

jaxnasium.algorithms.core.Normalizer ¤

A container for running statistics on Observations and Rewards.

normalize_obs(obs: PyTree) -> PyTree ¤

Normalizes the given batch of observations if normalization of observations is enabled.

normalize_reward(reward: Array) -> Array ¤

Normalizes the given batch of rewards if normalization of rewards is enabled.

update(batch: Transition) -> Normalizer ¤

Updates the normalization state with a new Transition containing both rewards and observations.

update_obs(obs: PyTree, mask: Array | None = None) -> Normalizer ¤
update_reward(reward: Array, done: Array) -> Normalizer ¤