rlmesh.spaces.Text
Bounded text space.
Text(
max_length: int | SpaceSpec,
min_length: int = 1,
charset: str | None = None,
)Parameters
| Name | Type | Description |
|---|---|---|
max_length | int | SpaceSpec | Maximum string length, or an existing native SpaceSpec. |
min_length | int | Minimum string length. |
charset | str | None | Optional allowed character set. |
Attributes
Methods
min_length
attribute[source]min_length: intmax_length
attribute[source]max_length: intcharset
attribute[source]charset: strspec
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.