mwg API
    Preparing search index...

    Function runRollouts

    • Interactive rollouts at simulation speed, with a fresh seeded reset per episode. The evaluator is created once per batch and shares its buffers across agents. A synchronous signal is checked between steps; cancellation from another event on the same thread requires the async worker path.

      Type Parameters

      • State
      • Command
      • Event

      Parameters

      Returns RolloutEpisode[]

      import { runRollouts, TrainingEnvironment } from '@datamoc/mwg/simulation';
      import type { NeuralModel } from '@datamoc/mwg/ai';
      declare const env: TrainingEnvironment<{ x: number }, number, never>;
      declare const model: NeuralModel;
      const episodes = runRollouts(env, model, { seeds: [1, 2, 3], trajectoryLimit: 2 });