Skip to content

UPipelinedStepper

Pipelined stepper implementation for asynchronous inference.

A sophisticated stepper that pipelines agent observations and policy inference across multiple frames to hide inference latency. Uses a two-stage pipeline:

Frame N: Collect observations -> Dispatch async inference Frame N+1: Apply actions from N -> Collect observations -> Dispatch async inference

This allows the policy to perform inference on a background thread while the game continues running, significantly reducing effective latency for expensive inference operations. The stepper manages synchronization between the game thread and inference threads.

class UPipelinedStepper : public UObject, public IStepper

Methods

Init

inline virtual bool Init(const TArray<TScriptInterface<IAgent>> &InAgents,
const TScriptInterface<IPolicy> &InPolicy) override

Initialize the pipelined stepper with agents and policy.

Parameters

  • InAgents (const TArray<TScriptInterface<IAgent>>)

  • InPolicy (const TScriptInterface<IPolicy>)


Step

void Step()

Execute one step of the pipelined agent-policy loop.


BeginDestroy

inline virtual void BeginDestroy() override

Override for object destruction.

Source: Source/ScholaInferenceUtils/Public/Steppers/PipelinedStepper.h