AImitationPlayerController
A Blueprint-extendable PlayerController that implements the single-agent imitation interface.
This class provides a convenient base for creating human demonstration collection scenarios. It includes helper functions for Enhanced Input integration.
To use:Create a Blueprint subclass of this controller Set the InputMappingContext property to your IMC asset (action space is built automatically from it) Override DefineObservationSpace to define the observation space Override Reset and Step to implement environment behavior
class AImitationPlayerController : public AImitationPlayerControllerBase, public ISingleAgentImitationScholaEnvironmentMethods
AImitationPlayerController
AImitationPlayerController()DefineObservationSpace
void DefineObservationSpace(FInstancedStruct &OutObservationSpace)Define the observation space for this environment.
Parameters
OutObservationSpace(FInstancedStruct)
DefineObservationSpaceTyped
inline voidDefineObservationSpaceTyped(TInstancedStruct<FSpace> &OutObservationSpace)Type-safe wrapper for DefineObservationSpace.
Parameters
OutObservationSpace(TInstancedStruct<FSpace>)
InitializeEnvironment
void InitializeEnvironment(FInteractionDefinition &OutAgentDefinition)Initialize the environment and define the agent’s interaction space.
Parameters
OutAgentDefinition(FInteractionDefinition)
SeedEnvironment
void SeedEnvironment(int InSeed)Set the random seed for reproducible environment behavior.
Parameters
InSeed(int)
SetEnvironmentOptions
void SetEnvironmentOptions(const TMap<FString, FString> &InOptions)Configure environment-specific options.
Parameters
InOptions(const TMap<FString, FString>)
Reset
void Reset(FInitialAgentState &OutAgentState)Reset the environment and return the agent’s initial state.
Parameters
OutAgentState(FInitialAgentState)
Step
void Step(FImitationAgentState &OutAgentState)Execute one environment step and return the agent’s imitation state.
Parameters
OutAgentState(FImitationAgentState)
Attributes
InputMappingContext
TObjectPtr<UInputMappingContext> InputMappingContextThe Input Mapping Context used for automatic action space building.
Source: Source/ScholaImitation/Public/Environment/ImitationPlayerController.h