Class AAbstractScholaEnvironment

class AAbstractScholaEnvironment : public AActor

An abstract class representing an environment.

Subclassed by ABlueprintScholaEnvironment

Public Functions

void RegisterAgent(AAbstractTrainer *Agent)

Register an individual agent with the environment.

Called after the environment is initialized.

Parameters:

Agent – The agent to register

inline virtual void RegisterAgents(TArray<APawn*> &OutAgentControlledPawnArray)

Register a list of agents with the environment, from a list of pawns with associated agents.

Called after the environment is initialized.

Parameters:

OutAgentControlledPawnArray – An array of pawns in the environment that are controlled by agents

void Initialize()

Collects all the AgentObjects from their pawns and then initializes them.

Note

Must be called after play begins. Calls InitializeEnvironment and RegisterAgents.

void RetrieveUtilityComponents()

Retrieve all the utility components from the environment.

Called after the environment is initialized.

void PopulateAgentStatePointers(FSharedEnvironmentState &OutAgentStatePointers)

Used on initialization to populate the AgentStateMapping with the AgentStates pointers.

Parameters:

OutAgentStatePointers[out] A shared state structure that will be populated with the agent state pointers.

void PopulateAgentDefinitionPointers(FSharedEnvironmentDefinition &OutEnvDefn)

Used on initialization to populate the AgentDefinitionMapping with the AgentDefinition pointers.

Parameters:

OutEnvDefn[out] A shared environment definition structure that will be populated with the agent definition pointers.

int GetNumAgents()

Get the number of agents registered to this environment.

Returns:

The Number of Agents registered to this environment

FVector GetEnvironmentCenterPoint()

Convenience function to get the centerpoint of the environment for resetting agents.

Returns:

an FVector representation of the center of this environment

inline virtual void ResetEnvironment()

Reset the environment.

Note that this does not reset the agent state.

Note

Subclasses should implement this method to add logic that runs when the environment is reset

inline virtual void InitializeEnvironment()

Perform any environment setup like initializing variables, or binding delegates.

Occurs before Register Agents.

void Reset()

Reset the environment and any agents in it.

Note: Does not set the state to running.

void MarkCompleted()

Set the EnvironmentState to Resetting.

void AllAgentsThink()

Perform a think step for all agents in the environment.

Collects observations and sends them to the agents.

void AllAgentsAct(const FEnvStep &EnvUpdate)

Perform an act step for all agents in the environment.

Acts on any decisions from the brains

Parameters:

EnvUpdate[in] The environment update to act on

void SetEnvId(int EnvironmentId)

Set the Id of this environment.

Called when Registering with the subsystem.

Parameters:

EnvironmentId[in] The Id of the environment

void UpdateStatus(EEnvironmentStatus NewStatus)

Set the status of this environment to the given status.

Parameters:

NewStatus[in] The new status of the environment

EEnvironmentStatus GetStatus()

Get the current status of this environment.

Returns:

The status of the environment

inline virtual void SetEnvironmentOptions(const TMap<FString, FString> &Options)

Configure this environment based on arbitrary Options from the GymConnector.

Called immediately before the environment is reset, if the gym connector has Options.

Parameters:

Options[in] A map of options to configure the environment with

inline virtual void SeedEnvironment(int Seed)

Configure this environment based on a Seed .

Called immediately before the environment is reset, if the gym connector has a new seed supplied.

Parameters:

Seed[in] The seed to configure the environment with

Public Members

TArray<UAbstractEnvironmentUtilityComponent*> UtilityComponents

A list of utility components that can be used to add additional behaviour such as logging or data collection.

Related pages

  • Visit the Schola product page for download links and more information.

Looking for more documentation on GPUOpen?

AMD GPUOpen software blogs

Our handy software release blogs will help you make good use of our tools, SDKs, and effects, as well as sharing the latest features with new releases.

GPUOpen Manuals

Don’t miss our manual documentation! And if slide decks are what you’re after, you’ll find 100+ of our finest presentations here.

AMD GPUOpen Performance Guides

The home of great performance and optimization advice for AMD RDNA™ 2 GPUs, AMD Ryzen™ CPUs, and so much more.

Getting started: AMD GPUOpen software

New or fairly new to AMD’s tools, libraries, and effects? This is the best place to get started on GPUOpen!

AMD GPUOpen Getting Started Development and Performance

Looking for tips on getting started with developing and/or optimizing your game, whether on AMD hardware or generally? We’ve got you covered!

AMD GPUOpen Technical blogs

Browse our technical blogs, and find valuable advice on developing with AMD hardware, ray tracing, Vulkan®, DirectX®, Unreal Engine, and lots more.

Find out more about our software!

AMD GPUOpen Effects - AMD FidelityFX technologies

Create wonder. No black boxes. Meet the AMD FidelityFX SDK!

AMD GPUOpen Samples

Browse all our useful samples. Perfect for when you’re needing to get started, want to integrate one of our libraries, and much more.

AMD GPUOpen developer SDKs

Discover what our SDK technologies can offer you. Query hardware or software, manage memory, create rendering applications or machine learning, and much more!

AMD GPUOpen Developer Tools

Analyze, Optimize, Profile, Benchmark. We provide you with the developer tools you need to make sure your game is the best it can be!