pymgrid.utils.space.ModuleSpace#
- class pymgrid.utils.space.ModuleSpace(unnormalized_low, unnormalized_high, shape=None, dtype=<class 'numpy.float64'>, seed=None)[source]#
Methods
contains(x)Check if x is a valid member of the space.
denormalize(val)from_jsonable(sample_n)Convert a JSONable data type to a batch of samples from this space.
normalize(val)sample([normalized])Randomly sample an element of this space.
seed([seed])Seed the PRNG of this space and possibly the PRNGs of subspaces.
to_jsonable(sample_n)Convert a batch of samples from this space to a JSONable data type.
Attributes
Checks whether this space can be flattened to a
spaces.Box.Lazily seed the PRNG since this is expensive and only needed if sampling from this space.
Return the shape of the space as an immutable property.