This reference describes unreleased code on main; no release documents it yet.

rlmesh::env::trial_index

functionPreviewuse rlmesh::env::trial_index;[source]

The reserved trial_index reset option, or None when absent.

fn trial_index(
    options: Option<&InfoDict>,
    lane: Option<usize>,
) -> Result<Option<i64>>

The ordinal of the episode a reset starts, 0-based and walked in order by the runtime. Delivered only to an env that declared "trial_index" in EnvFactory::reset_options. A reset covering one lane carries a bare integer; a reset covering several lanes of a vector env carries a list, one ordinal per lane, read with lane (the position among the lanes this reset covers).

Integers are returned as is (negatives too), an integral float in [-2^63, 2^63) is converted, and a bool or anything else is None. A list read without lane, or a lane outside the lanes it covers, is the ValueError class.

Also available as rlmesh::trial_index.