mdp_playground.spaces.box_extended.BoxExtended

class mdp_playground.spaces.box_extended.BoxExtended(low, high, shape=None, dtype=<class 'numpy.float32'>, seed=None)[source]

Bases: gym.spaces.box.Box

__init__(low, high, shape=None, dtype=<class 'numpy.float32'>, seed=None)[source]

Initialize self. See help(type(self)) for accurate signature.

Methods

__init__(low, high[, shape, dtype, seed])

Initialize self.

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

is_bounded([manner])

sample()

Generates a single random sample inside of the Box.

seed([seed])

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.

contains(x)

Return boolean specifying if x is a valid member of this space

from_jsonable(sample_n)

Convert a JSONable data type to a batch of samples from this space.

sample()

Generates a single random sample inside of the Box.

In creating a sample of the box, each coordinate is sampled according to the form of the interval:

  • [a, b] : uniform distribution

  • [a, oo) : shifted exponential distribution

  • (-oo, b] : shifted negative exponential distribution

  • (-oo, oo) : normal distribution

seed(seed=None)

Seed the PRNG of this space.

to_jsonable(sample_n)

Convert a batch of samples from this space to a JSONable data type.