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

RLMeshPredictContext

structExperimental#include <rlmesh.h>[source]

One row's episode identity. episode_id is runtime-minted and never repeats, so a stateful model keys per-episode state by it.

struct RLMeshPredictContext

predict_index is 0 on the first predict under the episode, then +1 per predict until on_episode_end drops it. predict_seed mixes the episode’s reset seed with that ordinal (rlmesh_predict_seed) so a stochastic policy can seed each forward reproducibly; has_predict_seed is false when the episode was reset without a seed. A model holds at most 65536 live episodes and never evicts one: a predict that would start one more fails with RLMESH_ERR_RUNTIME before the callback runs.

struct_size

field[source]
size_t struct_size

episode_id

field[source]
const char* episode_id

has_episode_seed

field[source]
bool has_episode_seed

_reserved0

field[source]
uint8_t _reserved0[7]

episode_seed

field[source]
int64_t episode_seed

predict_index

field[source]
uint64_t predict_index

has_predict_seed

field[source]
bool has_predict_seed

_reserved1

field[source]
uint8_t _reserved1[7]

predict_seed

field[source]
int64_t predict_seed

state

field[source]
RLMeshEpisodeState* state