Skip to content

schola.sb3.action_space_patch.ActionSpacePatch

class schola.sb3.action_space_patch.ActionSpacePatch(globs, discrete_norm_factor=1.0, continuous_norm_factor=1.0) : Bases: object

A context manager that patches the stable baselines3 library to support custom action spaces. This is done by overriding the make_proba_distribution function in the stable baselines3 library with a custom function that supports custom action spaces. Currently only works with PPO. discrete and continuous actions are balanced with the discrete_norm_factor and continuous_norm_factor respectively.

Parameters: : - globs (Dict) – The globals dictionary of the calling module.

  • discrete_norm_factor (float, optional) – The normalization factor for discrete actions, by default 1.0
  • continuous_norm_factor (float, optional) – The normalization factor for continuous actions, by default 1.0

globs : The globals dictionary of the calling module.

Type: : Dict

_continuous_norm_factor : The normalization factor for continuous actions.

Type: : float

_discrete_norm_factor : The normalization factor for discrete actions.

Type: : float

Methods

__init__(globs[, discrete_norm_factor, …])

__init__(globs, discrete_norm_factor=1.0, continuous_norm_factor=1.0)