mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended

class mdp_playground.spaces.multi_discrete_extended.MultiDiscreteExtended(nvec, seed=None)[source]

Bases: gym.spaces.multi_discrete.MultiDiscrete

Currently, this class doesn’t do anything special except allowing to seed from __init__().

nvec: vector of counts of each categorical variable

__init__(nvec, seed=None)[source]

nvec: vector of counts of each categorical variable

Methods

__init__(nvec[, seed])

nvec: vector of counts of each categorical variable

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()

Randomly sample an element of this space.

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()

Randomly sample an element of this space. Can be uniform or non-uniform sampling based on boundedness of space.

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.