mdp_playground.spaces.discrete_extended.DiscreteExtended¶
-
class
mdp_playground.spaces.discrete_extended.DiscreteExtended(n, seed=None)[source]¶ Bases:
gym.spaces.discrete.DiscreteMethods
__init__(n[, 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.
sample([max, prob, size, replace])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(max=None, prob=None, size=1, replace=True)[source]¶ 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.
-