rlmesh.spaces.Box
Continuous box space.
Box(
low: Bound | SpaceSpec,
high: Bound | None = None,
shape: Sequence[int] | None = None,
dtype: FloatDTypeLike = 'float32',
)Parameters
| Name | Type | Description |
|---|---|---|
low | Bound | SpaceSpec | Lower bound, or an existing native SpaceSpec. |
high | Bound | None | Upper bound when constructing a new spec. |
shape | Sequence[int] | None | Box shape when constructing a new spec. |
dtype | FloatDTypeLike | Element dtype name. |
Attributes
Methods
bounds_kind
attribute[source]bounds_kind: str | Nonelow
attribute[source]low: objecthigh
attribute[source]high: objectspec
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.