Class UPipelinedStepper
Class UPipelinedStepper
- Defined in File PipelinedStepper.h
Nested Relationships
Nested Types
Inheritance Relationships
Base Types
-
public UObject -
public IStepper(Class IStepper)
class UPipelinedStepper : public UObject, public IStepperSource: Source/Schola/InferenceUtils/Public/Steppers/PipelinedStepper.h
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.
Public Functions
| Symbol | Details |
|---|---|
Init | Initialize the pipelined stepper with agents and policy. |
Step | Execute one step of the pipelined agent-policy loop. |
BeginDestroy | Override for object destruction. |
Init
inline virtual bool Init(const TArray<TScriptInterface<IAgent>> &InAgents, const TScriptInterface<IPolicy> &InPolicy) overrideInitialize the pipelined stepper with agents and policy.
Sets up the pipeline frames and prepares for asynchronous operation.
Parameters
-
InAgents – [in] The array of agents to manage
-
InPolicy – [in] The policy to use for inference (must support batched operations)
Returns:
true if initialization succeeded (agents and policy are valid), false otherwise
| # | Direction | Name | Type | Description |
|---|---|---|---|---|
| 1 | — | InAgents | const TArray< TScriptInterface< IAgent > > & | The array of agents to manage |
| 2 | — | InPolicy | const TScriptInterface< IPolicy > & | The policy to use for inference (must support batched operations) |
Attributes: inline, virtual
Source: Source/Schola/InferenceUtils/Public/Steppers/PipelinedStepper.h
Step
void Step()Execute one step of the pipelined agent-policy loop.
Must be called every tick on the Game Thread. Performs:
-
Applies actions from the previous frame (if ready)
-
Collects observations from all agents
-
Dispatches asynchronous inference if policy is not busy
The inference runs on a background thread and results are applied in a subsequent frame once ready.
Source: Source/Schola/InferenceUtils/Public/Steppers/PipelinedStepper.h
Implementation: Source/Schola/InferenceUtils/Private/Steppers/PipelinedStepper.cpp
BeginDestroy
inline virtual void BeginDestroy() overrideOverride for object destruction.
Sets the shutdown flag to prevent background threads from accessing the object after it has been destroyed.
Attributes: inline, virtual
Source: Source/Schola/InferenceUtils/Public/Steppers/PipelinedStepper.h