mdp_playground.spaces.tuple_extended.TupleExtended¶
-
class
mdp_playground.spaces.tuple_extended.
TupleExtended
(spaces, seed=None)[source]¶ Bases:
gym.spaces.tuple.Tuple
Currently, this class doesn’t do anything special except allowing to seed from __init__().
Methods
__init__
(spaces[, 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
()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.
-