Navigation
API > API/Plugins > API/Plugins/LearningAgentsTraining
The Gym Base abstract class handles the start and reset of entities training in a single gym.
| Name | ALearningAgentsGymBase |
| Type | class |
| Header File | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgentsTraining/Public/LearningAgentsGym.h |
| Include Path | #include "LearningAgentsGym.h" |
Syntax
UCLASS (MinimalAPI, Abstract, BlueprintType)
class ALearningAgentsGymBase : public AActor
Inheritance Hierarchy
- UObjectBase → UObjectBaseUtility → UObject → AActor → ALearningAgentsGymBase
Derived Classes
Constructors
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
ALearningAgentsGymBase() |
LearningAgentsGym.h |
Variables
Public
| Name | Type | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|---|
| OnBeginGymReset | FOnBeginGymResetSignature | Event called at the start of a gym's reset. | LearningAgentsGym.h |
|
| OnGymInitialized | FOnGymInitializedSignature | Event called at a gym's initialization. | LearningAgentsGym.h |
|
| OnPostGymReset | FOnPostGymResetSignature | Event called at the end of a gym's reset. | LearningAgentsGym.h |
|
Functions
Public
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual FVector GenerateRandomLocationInGym () |
Generates a valid random point in the gym using the gym's random stream. | LearningAgentsGym.h | |
virtual FRotator GenerateRandomRotationInGym() |
Generates a random rotator using the gym's random stream. | LearningAgentsGym.h | |
virtual void GetGymExtents
(
FVector& OutMinExtents, |
Gets the gym max and min bounds. Must be overridden in a derived class. | LearningAgentsGym.h | |
| Retrieves the current random stream used by the Gym. | LearningAgentsGym.h | ||
void GetRandomStream
(
FRandomStream& OutRandomStream |
Retrieves the current random stream used by the Gym. | LearningAgentsGym.h |
|
void Initialize() |
Initializes the gym at the start of training. | LearningAgentsGym.h |
|
bool IsMemberOfGym
(
TObjectPtr< AActor > Actor |
Checks if an actor is training in this gym. | LearningAgentsGym.h | |
virtual FVector ProjectPointToGym
(
const FVector& InPoint |
Projects a point onto a valid location in the gym. Must be overridden in a derived class. | LearningAgentsGym.h | |
void SetRandomStream
(
const TSharedPtr< FRandomStream >& InRandomStream |
Sets the random stream used by the Gym. | LearningAgentsGym.h |
Overridden from AActor
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
virtual void Reset() |
Resets the gym for a new training episode. | LearningAgentsGym.h |
|
Protected
| Name | Remarks | Include Path | Unreal Specifiers |
|---|---|---|---|
void PopulateLearningComponents() |
LearningAgentsGym.h |