RLMeshPredictContext
One row's episode identity. episode_id is runtime-minted and never repeats, so a stateful model keys per-episode state by it.
struct RLMeshPredictContextpredict_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.
Fields
- struct_size
size_t struct_size - episode_id
const char* episode_id - has_episode_seed
bool has_episode_seed - _reserved0
uint8_t _reserved0[7] - episode_seed
int64_t episode_seed - predict_index
uint64_t predict_index - has_predict_seed
bool has_predict_seed - _reserved1
uint8_t _reserved1[7] - predict_seed
int64_t predict_seed - state
RLMeshEpisodeState* state
struct_size
field[source]size_t struct_sizeepisode_id
field[source]const char* episode_idhas_episode_seed
field[source]bool has_episode_seed_reserved0
field[source]uint8_t _reserved0[7]episode_seed
field[source]int64_t episode_seedpredict_index
field[source]uint64_t predict_indexhas_predict_seed
field[source]bool has_predict_seed_reserved1
field[source]uint8_t _reserved1[7]predict_seed
field[source]int64_t predict_seedstate
field[source]RLMeshEpisodeState* state