Navigation
API > API/Plugins > API/Plugins/LearningAgents
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- ULearningAgentsManagerComponent
- ULearningAgentsPolicy
References
| Module | LearningAgents |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgents/Public/LearningAgentsPolicy.h |
| Include | #include "LearningAgentsPolicy.h" |
Syntax
UCLASS&40;BlueprintType, Blueprintable&41;
class ULearningAgentsPolicy : public ULearningAgentsManagerComponent
Remarks
A policy that maps from observations to actions for the managed agents.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| These constructors/destructors are needed to make forward declarations happy. | |||
ULearningAgentsPolicy
(
FVTableHelper& Helper |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Evaluation | ||
| float | Get the action noise scale used. | ||
| ULearningAgentsNeuralNetwork * | Non-blueprint public interface | ||
| UE::Learning::FNeuralNetwork & | Get a reference to this policy's neural network. | ||
| UE::Learning::FNeuralNetworkPolicyFunction & | Get a reference to this policy's policy function object. | ||
| void | LoadPolicyFromAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Load a ULearningAgentsNeuralNetwork asset's weights into this policy. | |
| void | LoadPolicyFromSnapshot
(
const FFilePath& File |
Load / Save | |
| void | RunInference () |
Calls EncodeObservations, followed by EvaluatePolicy, followed by DecodeActions | |
| void | SavePolicyToAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Save this policy's weights to a ULearningAgentsNeuralNetwork asset. | |
| void | SavePolicyToSnapshot
(
const FFilePath& File |
Save this policy's weights into a snapshot. | |
| void | SetActionNoiseScale
(
const float ActionNoiseScale |
Set the action noise scale used. | |
| void | SetupPolicy
(
ULearningAgentsInteractor* InInteractor, |
Initializes this object to be used with the given agent interactor and policy settings. | |
| void | UsePolicyFromAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Use a ULearningAgentsNeuralNetwork asset directly for this critic rather than making a copy. |