rollout
11 memberslucid.utils.rolloutlucid.utils.rollout: environment contract, episode replay, and the loop that connects a policy to an environment.
Lucid ships no environments — every compute path here is closed to outside packages. What it ships is the shape one has to have, storage that hands a recurrent model contiguous sequences rather than loose transitions, and the two collection hyperparameters the world-model papers state: action repeat and exploration noise.
Classes
LatentPolicy3 methodsCarries an RSSM belief through an episode and asks the model to act.
Policy2 methodsSomething that chooses actions and can be told an episode restarted.
RandomPolicy3 methodsUniform actions, in whichever shape the action space has.
Environment2 methodsWhat a rollout needs an environment to do.
Episode1 methodsOne complete trajectory, laid out for the replay buffer.
StepResultWhat one environment step returns.
PrioritizedBatchWhat a prioritized draw returns.
PrioritizedSequenceReplay5 methodsSequence replay that samples in proportion to a priority.
SequenceReplay5 methodsWhole episodes in, contiguous chunks out.
SumTree5 methodsA flat segment tree over priorities: sample in .