AMultiAgentImitationPlayerController
A Blueprint-extendable PlayerController that implements the multi-agent imitation interface.
This class provides a convenient base for creating human demonstration collection scenarios with multiple agents. It includes helper functions for Enhanced Input integration.
To use:Create a Blueprint subclass of this controller Override the interface methods to define observation/action spaces and implement environment behavior Optionally set the InputMappingContexts map if using the Enhanced Input helpers
class AMultiAgentImitationPlayerController : public AImitationPlayerControllerBase, public IMultiAgentImitationScholaEnvironmentMethods
AMultiAgentImitationPlayerController
AMultiAgentImitationPlayerController()InitializeEnvironment
void InitializeEnvironment( TMap<FString, FInteractionDefinition> &OutAgentDefinitions)Initialize the environment and define all agents’ interaction spaces.
Parameters
OutAgentDefinitions(TMap<FString, FInteractionDefinition>)
SeedEnvironment
void SeedEnvironment(int Seed)Set the random seed for reproducible environment behavior.
Parameters
Seed(int)
SetEnvironmentOptions
void SetEnvironmentOptions(const TMap<FString, FString> &Options)Configure environment-specific options.
Parameters
Options(const TMap<FString, FString>)
Reset
void Reset(TMap<FString, FInitialAgentState> &OutAgentState)Reset the environment and return the agents’ initial states.
Parameters
OutAgentState(TMap<FString, FInitialAgentState>)
Step
void Step(TMap<FString, FImitationAgentState> &OutAgentStates)Execute one environment step and return the agents’ imitation states.
Parameters
OutAgentStates(TMap<FString, FImitationAgentState>)
GetAgentNames
TArray<FString> GetAgentNames() constGet the list of agent names registered in this environment.
Attributes
Public
InputMappingContexts
TMap<FString, TObjectPtr<UInputMappingContext>> InputMappingContextsMap of agent names to their Input Mapping Contexts.
Protected
RandomSeed
int32 RandomSeed = 0Random seed for reproducibility.
EnvironmentOptions
TMap<FString, FString> EnvironmentOptionsEnvironment options.
Source: Source/ScholaImitation/Public/Environment/MultiAgentImitationPlayerController.h