rlmesh.spaces.Box

classfrom rlmesh.spaces import Box[source]

Continuous box space.

Box(
    low: Bound | SpaceSpec,
    high: Bound | None = None,
    shape: Sequence[int] | None = None,
    dtype: FloatDTypeLike = 'float32',
)

Parameters

NameTypeDescription
lowBound | SpaceSpecLower bound, or an existing native SpaceSpec.
highBound | NoneUpper bound when constructing a new spec.
shapeSequence[int] | NoneBox shape when constructing a new spec.
dtypeFloatDTypeLikeElement dtype name.

bounds_kind

attribute[source]
bounds_kind: str | None

low

attribute[source]
low: object

high

attribute[source]
high: object

spec

property[source]
property spec: SpaceSpec

Native space specification backing this wrapper.

kind

property[source]
property kind: str

Native RLMesh space kind.

shape

property[source]
property shape: list[int]

Native shape for tensor-like spaces.

dtype

property[source]
property dtype: str

Element dtype reported by the native spec.

seed

function[source]
seed(seed: int | None = None) -> int | None

Seed the native sampler for this space.

sample

function[source]
sample() -> OutputT

Sample a value from this space.

contains

function[source]
contains(value: object) -> bool

Return whether a value is contained in this space.

to_gymnasium_space

function[source]
to_gymnasium_space() -> object

Convert this wrapper into a Gymnasium space.