Navigation
API > API/Plugins > API/Plugins/LearningAgents
Inheritance Hierarchy
- UObjectBase
- UObjectBaseUtility
- UObject
- UActorComponent
- ULearningAgentsManagerComponent
- ULearningAgentsCritic
References
| Module | LearningAgents |
| Header | /Engine/Plugins/Experimental/LearningAgents/Source/LearningAgents/Public/LearningAgentsCritic.h |
| Include | #include "LearningAgentsCritic.h" |
Syntax
UCLASS&40;BlueprintType, Blueprintable&41;
class ULearningAgentsCritic : public ULearningAgentsManagerComponent
Remarks
A critic used by some algorithms for training the managed agents.
Constructors
| Type | Name | Description | |
|---|---|---|---|
| These constructors/destructors are needed to make forward declarations happy. | |||
ULearningAgentsCritic
(
FVTableHelper& Helper |
Destructors
| Type | Name | Description | |
|---|---|---|---|
Functions
| Type | Name | Description | |
|---|---|---|---|
| void | Evaluation | ||
| UE::Learning::FNeuralNetwork & | Get a reference to this critic's neural network. | ||
| UE::Learning::FNeuralNetworkCriticFunction & | Get a reference to this critic's critic function object. | ||
| float | GetEstimatedDiscountedReturn
(
const int32 AgentId |
Gets an estimate of the average discounted return expected by an agent according to the critic. | |
| ULearningAgentsNeuralNetwork * | Non-blueprint public interface | ||
| void | LoadCriticFromAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Load a ULearningAgentsNeuralNetwork asset's weights into this critic. | |
| void | LoadCriticFromSnapshot
(
const FFilePath& File |
Load / Save | |
| void | SaveCriticToAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Save this critic's weights to a ULearningAgentsNeuralNetwork asset. | |
| void | SaveCriticToSnapshot
(
const FFilePath& File |
Save this critic's weights into a snapshot. | |
| void | SetupCritic
(
ULearningAgentsInteractor* InInteractor, |
Initializes this object to be used with the given agent interactor and critic settings. | |
| void | UseCriticFromAsset
(
ULearningAgentsNeuralNetwork* NeuralNetworkAsset |
Use a ULearningAgentsNeuralNetwork asset directly for this critic rather than making a copy. |
Overridden from ULearningAgentsManagerComponent
| Type | Name | Description | |
|---|---|---|---|
| void | OnAgentsAdded
(
const TArray< int32 >& AgentIds |
Called whenever agents are added to the parent ALearningAgentsManager object. | |
| void | OnAgentsRemoved
(
const TArray< int32 >& AgentIds |
Called whenever agents are removed from the parent ALearningAgentsManager object. | |
| void | OnAgentsReset
(
const TArray< int32 >& AgentIds |
Called whenever agents are reset on the parent ALearningAgentsManager object. |