rlmesh.spaces.Dict
Mapping of named child spaces.
Dict(spaces: Mapping[str, Space[Any] | SpaceSpec] | SpaceSpec)Exposes read-only mapping access over its children, mirroring
gymnasium.spaces.Dict: index a child by name (space["obs"]), iterate
names (for name in space), test membership ("obs" in space), take
len(space), and read keys() / values() / items(). The
children are immutable (a MappingProxyType); build a new Dict to
change them.
Parameters
Attributes
Methods
- keys()The subspace names.
- values()The subspaces, in key order.
- items()The
(name, subspace)pairs. - seed()Seed the native sampler for this space.
- sample()Sample a value from this space.
- contains()Return whether a value is contained in this space.
- to_gymnasium_space()Convert this wrapper into a Gymnasium space.
spaces
attribute[source]spaces: Mapping[str, Space[Value]]keys
function[source]keys() -> KeysView[str]The subspace names.
values
function[source]values() -> ValuesView[Space[Value]]The subspaces, in key order.
items
function[source]items() -> ItemsView[str, Space[Value]]The (name, subspace) pairs.
spec
property[source]property spec: SpaceSpecNative space specification backing this wrapper.
kind
property[source]property kind: strNative RLMesh space kind.
shape
property[source]property shape: list[int]Native shape for tensor-like spaces.
dtype
property[source]property dtype: strElement dtype reported by the native spec.
seed
function[source]seed(seed: int | None = None) -> int | NoneSeed the native sampler for this space.
sample
function[source]sample() -> OutputTSample a value from this space.
contains
function[source]contains(value: object) -> boolReturn whether a value is contained in this space.
to_gymnasium_space
function[source]to_gymnasium_space() -> objectConvert this wrapper into a Gymnasium space.