rollout
R2026bSyntax
Description
Use rollout to execute a specified number of simulation steps of
a given policy on all instances of a vectorized environment.
[
executes NextObservation,Observation,Action,Reward,IsDone,policy] = rollout(venv,policy,NumSteps)NumSteps simulation steps using the policy
policy on each instance of the vectorized environment
venv. The function generates a total of
NumSteps*venv.NumEnv samples.
[
also specifies the maximum steps for each environment instance. The function resets all
environment instances that reach or exceed this value. NextObservation,Observation,Action,Reward,IsDone,policy] = rollout(venv,policy,NumSteps,MaxStepsPerEpisode=Nmax)
Examples
Input Arguments
Output Arguments
Version History
Introduced in R2026b
See Also
Functions
convertToScalarEnv|rlFunctionVectorEnv|rlFunctionEnv|validateEnvironment|getObservationInfo|getActionInfo